Skip to content

Instantly share code, notes, and snippets.

@amitabha2715
Created November 19, 2018 07:21
Show Gist options
  • Save amitabha2715/22a0787bf835859622348ece91e58bd1 to your computer and use it in GitHub Desktop.
Save amitabha2715/22a0787bf835859622348ece91e58bd1 to your computer and use it in GitHub Desktop.
def myFlavor = "DI"
if (myFlavor.equals("DI")) {
println "--> flavor1 copy!"
copy {
from 'src/DI/'
include '*.json'
into '.'
}
} else {
println "--> flavor2 copy!"
copy {
from 'src/JPA/'
include '*.json'
into '.'
}
}
public static StateListDrawable makeSelector()
{
int color = Color.parseColor(headerColorCode);
StateListDrawable res = new StateListDrawable();
// res.setExitFadeDuration(400);
// res.setAlpha(45);
res.addState(new int[]{android.R.attr.state_pressed}, new ColorDrawable(Color.TRANSPARENT));
res.addState(new int[]{android.R.attr.state_checked}, new ColorDrawable(color));
res.addState(new int[]{}, new ColorDrawable(Color.TRANSPARENT));
return res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment