Skip to content

Instantly share code, notes, and snippets.

Avatar

Robby Pond robbypond

View GitHub Profile
View strip_play_services.gradle
afterEvaluate { project ->
android.applicationVariants.each { variant ->
variant.javaCompile.dependsOn stripPlayServices
}
}
task stripPlayServices << {
def playServiceRootFolder = new File(rootProject.buildDir, "intermediates/exploded-aar/com.google.android.gms/play-services/")
playServiceRootFolder.list().each { versionName ->
def versionFolder = new File(playServiceRootFolder, versionName)
@robbypond
robbypond / StyleSearchView
Created Dec 12, 2013
Shows how to apply custom style/drawables to the Android SearchView widget.
View StyleSearchView
final MenuItem searchItem = menu.findItem(R.id.action_search);
SearchView searchView = (SearchView) searchItem.getActionView();
if (searchView != null) {
//These are the internal resource names so we must find the id
int searchPlateId = getResources().getIdentifier("android:id/search_plate", null, null);
int submitAreaId = getResources().getIdentifier("android:id/submit_area", null, null);
//These are not guaranteed to exist and could be different based on device software
if(searchPlateId != 0 && submitAreaId != 0) {
You can’t perform that action at this time.