From ba58a9886b4541beb8fc8ac1c031646d5a2073e6 Mon Sep 17 00:00:00 2001 From: Roman Nurik Date: Tue, 6 Jan 2015 12:07:24 -0500 Subject: [PATCH] Import some local fixes Change-Id: I408707a9b5474aa40755fd041169ac8503df9817 --- .travis.yml | 2 +- Wearable/build.gradle | 2 +- .../apps/iosched/iowear/utils/Utils.java | 2 +- android/build.gradle | 2 +- .../samples/apps/iosched/ui/BaseActivity.java | 6 ++++- .../selected_navdrawer_item_background.xml | 23 +++++++++++++++++++ doc/BUILDING.md | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 8 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 android/src/main/res/drawable/selected_navdrawer_item_background.xml diff --git a/.travis.yml b/.travis.yml index 540819e8ea..e2d90ec89f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ language: android android: components: - - build-tools-21.1.1 + - build-tools-21.1.2 - android-20 - android-21 - extra-google-m2repository diff --git a/Wearable/build.gradle b/Wearable/build.gradle index 05a05a89ab..4b9d9bd98c 100644 --- a/Wearable/build.gradle +++ b/Wearable/build.gradle @@ -25,7 +25,7 @@ repositories { android { compileSdkVersion 20 - buildToolsVersion "20.0.0" + buildToolsVersion "21.1.2" defaultConfig { applicationId "com.google.samples.apps.iosched" diff --git a/Wearable/src/main/java/com/google/samples/apps/iosched/iowear/utils/Utils.java b/Wearable/src/main/java/com/google/samples/apps/iosched/iowear/utils/Utils.java index 8ab1ef13c4..91b78033d6 100644 --- a/Wearable/src/main/java/com/google/samples/apps/iosched/iowear/utils/Utils.java +++ b/Wearable/src/main/java/com/google/samples/apps/iosched/iowear/utils/Utils.java @@ -104,7 +104,7 @@ private static String getSessionIdFromPreference(Context context) { */ public static final void LOGD(String TAG, String message) { if (Log.isLoggable(TAG, Log.DEBUG)) { - LOGD(TAG, message); + Log.d(TAG, message); } } diff --git a/android/build.gradle b/android/build.gradle index 737c14198a..f4e6d5a9ed 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,7 +25,7 @@ repositories { android { compileSdkVersion 21 - buildToolsVersion "21.1.1" + buildToolsVersion "21.1.2" defaultConfig { minSdkVersion 14 diff --git a/android/src/main/java/com/google/samples/apps/iosched/ui/BaseActivity.java b/android/src/main/java/com/google/samples/apps/iosched/ui/BaseActivity.java index e0528655dc..d1b6714f97 100644 --- a/android/src/main/java/com/google/samples/apps/iosched/ui/BaseActivity.java +++ b/android/src/main/java/com/google/samples/apps/iosched/ui/BaseActivity.java @@ -1361,6 +1361,10 @@ private void formatNavDrawerItem(View view, int itemId, boolean selected) { ImageView iconView = (ImageView) view.findViewById(R.id.icon); TextView titleView = (TextView) view.findViewById(R.id.title); + if (selected) { + view.setBackgroundResource(R.drawable.selected_navdrawer_item_background); + } + // configure its appearance according to whether or not it's selected titleView.setTextColor(selected ? getResources().getColor(R.color.navdrawer_text_color_selected) : @@ -1383,7 +1387,7 @@ private void registerGCMClient() { } else { // Get the correct GCM key for the user. GCM key is a somewhat non-standard - // approach we use in this app. For more about this, check GCM.MD. + // approach we use in this app. For more about this, check GCM.TXT. final String gcmKey = AccountUtils.hasActiveAccount(this) ? AccountUtils.getGcmKey(this, AccountUtils.getActiveAccountName(this)) : null; // Device is already registered on GCM, needs to check if it is diff --git a/android/src/main/res/drawable/selected_navdrawer_item_background.xml b/android/src/main/res/drawable/selected_navdrawer_item_background.xml new file mode 100644 index 0000000000..88a1670c8b --- /dev/null +++ b/android/src/main/res/drawable/selected_navdrawer_item_background.xml @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/doc/BUILDING.md b/doc/BUILDING.md index 8f966335e9..7100240661 100644 --- a/doc/BUILDING.md +++ b/doc/BUILDING.md @@ -48,7 +48,7 @@ This is a Gradle-based project that works best with [Android Studio]. - Tools > Android SDK Platform-tools (rev 21 or above) - Tools > Android SDK Tools (rev 23.0.5 or above) - Tools > Android SDK Build-tools version 20 - - Tools > Android SDK Build-tools version 21 (rev 21.0.2 or above) + - Tools > Android SDK Build-tools version 21 (rev 21.1.2 or above) - Android 4.4W2 > SDK Platform (API 20) - Android 5.0 > SDK Platform (API 21) - Extras > Android Support Repository diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 137e0e60e2..2877ca1d5e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Jun 07 00:06:01 EDT 2014 +#Tue Dec 02 14:11:25 EST 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip