This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
get_module_names() { | |
array=( $(cat $(pwd)/settings.gradle | grep -o 'feature:[A-z_-]\+') ) | |
for el in ${array[*]}; do | |
echo $el | grep -o "[A-z_-]\+\$" | |
done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
get_module_names() { | |
array=( $(cat $(pwd)/settings.gradle | grep -o 'feature:[A-z_-]\+') ) | |
for el in ${array[*]}; do | |
echo $el | grep -o "[A-z_-]\+\$" | |
done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2015 "Henry Tao <[email protected]>" | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FragmentUtils { | |
public static FragmentTransaction ensureTransaction(final FragmentManager fragmentManager) { | |
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); | |
fragmentTransaction.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_left); | |
return fragmentTransaction; | |
} | |
public static Fragment getFragment(final FragmentManager fragmentManager, final String tag) { | |
return fragmentManager.findFragmentByTag(tag); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Command<T extends Parcelable> { | |
void execute(Context context, T data); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = <seu_nome> | |
email = <seu_email> | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Xms2560m | |
-Xmx4500m | |
-XX:MaxPermSize=5250m | |
-XX:ReservedCodeCacheSize=960m | |
-XX:+UseCompressedOops |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FocusLooserViewPager extends ViewPager { | |
public FocusLooserViewPager(Context context) { | |
super(context); | |
} | |
public FocusLooserViewPager(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static boolean isNetworkConnected(Context context){ | |
ConnectivityManager cm = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); | |
NetworkInfo network = cm.getActiveNetworkInfo(); | |
if(network != null){ | |
return network.isAvailable(); | |
} | |
return false; | |
} |
NewerOlder