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 TextFragment extends BaseFragment { | |
private TextView mTextView; | |
private ArrayList<String> mTexts; | |
@Override | |
public void onCreate(@Nullable Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
mTexts = new ArrayList<>(); |
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 AppConstants { | |
String FLAVOR = "DEV"; | |
} |
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
<resources> | |
<string name="app_name">FlavorExample(DEV)</string> | |
</resources> |
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
final NotificationCompat.Builder builder = new NotificationCompat.Builder(this) | |
.setColor(ResourcesCompat.getColor(getResources(), R.color.red, null)) | |
.setSmallIcon(R.drawable.ic_stat_name) | |
.setDefaults(Notification.DEFAULT_ALL) | |
.setPriority(Notification.PRIORITY_MAX) | |
.setContentTitle(getString(R.string.app_name)) | |
.setContentText(getString(R.string.app_name) + " TEST"); |
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
Glide.with(MainActivity.this) | |
.load(IMAGE_URL) | |
.asBitmap() | |
.into(new SimpleTarget<Bitmap>() { | |
@Override | |
public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) { | |
Bitmap bitmap = ImageUtils.getCircularBitmap(resource); | |
builder.setLargeIcon(bitmap); |
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 Bitmap getCircularBitmap(@NonNull Bitmap bitmap) { | |
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), | |
bitmap.getHeight(), Bitmap.Config.ARGB_8888); | |
Canvas canvas = new Canvas(output); | |
final int color = 0xff424242; | |
final Paint paint = new Paint(); | |
final Rect rect = new Rect(0, 0, bitmap.getWidth(), | |
bitmap.getHeight()); |
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
language: android | |
before_cache: | |
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | |
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ | |
cache: | |
directories: | |
- $HOME/.gradle/caches/ | |
- $HOME/.gradle/wrapper/ |
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
🌞 Morning 219 commits ████▊░░░░░░░░░░░░░░░░ 22.7% | |
🌆 Daytime 439 commits █████████▌░░░░░░░░░░░ 45.4% | |
🌃 Evening 248 commits █████▍░░░░░░░░░░░░░░░ 25.7% | |
🌙 Night 60 commits █▎░░░░░░░░░░░░░░░░░░░ 6.2% |
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
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
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
// toggle all to viewed | |
document.querySelectorAll('.js-reviewed-checkbox').forEach((elem => { | |
if (elem.checked) { return } | |
var clickEvent = new MouseEvent('click'); | |
elem.dispatchEvent(clickEvent); | |
})) | |
// toggle all to not-viewed | |
document.querySelectorAll('.js-reviewed-checkbox').forEach((elem => { | |
if (!elem.checked) { return } |
OlderNewer