Skip to content

Instantly share code, notes, and snippets.

View RajuSE's full-sized avatar
💻
Working remotely

Raju RajuSE

💻
Working remotely
  • India
View GitHub Profile
void customSnackBar(String text, int color) {
Snackbar mSnackbar = Snackbar.make(mRelativeLayout, text, Snackbar.LENGTH_LONG);
// get snackbar view
View mView = mSnackbar.getView();
mView.setBackgroundResource(color);
// get textview inside snackbar view
TextView textview = (TextView) mView.findViewById(android.support.design.R.id.snackbar_text);
@RajuSE
RajuSE / bintrayv1.gradle
Created June 9, 2017 12:31
For uploading library to JCenter
apply plugin: 'com.jfrog.bintray'
version = libraryVersion
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
@RajuSE
RajuSE / UpgradeRetrofit2.md
Last active December 30, 2016 11:50
How to upgrade to Retrofit2 from Retrofit1.X
@RajuSE
RajuSE / RxifyRetrofit2.md
Last active December 30, 2016 11:51
How to add rxjava2 changes to Retrofit2
@RajuSE
RajuSE / AppUtils.java
Last active December 27, 2016 13:47
productFlavors Tips: Possible Business cases: 1>Suppose if you want to install two versions of the app on single device, One app for development & One app for testing app with production on Same device, at same time! 2> Build Config Fields for customizing app behaviour on basis of productFlavours
class AppUtils{//Get fields in build.gradle
public static boolean getFeatureFlag(){
return BuildConfig.FLAG_FEATURE;
}
public static String getAdmboBannerId(){
return BuildConfig.ADMOB_BANNERADS_ID;
}
}