[MediaWiki-commits] [Gerrit] [Gingerbread] Work around lack of ColorDrawable.getColor - change (apps...wikipedia)
Yuvipanda has submitted this change and it was merged. Change subject: [Gingerbread] Work around lack of ColorDrawable.getColor .. [Gingerbread] Work around lack of ColorDrawable.getColor Change-Id: I8a8364ab266d8bbbaf7cde50ad7e08e4d637b5a1 --- M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java index 426571b..a8e9a6d 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java @@ -128,7 +128,11 @@ navbar = (LinearLayout) parentLayout.findViewById(R.id.navbar); searchTermText = (EditText) parentLayout.findViewById(R.id.search_term_text); try { -navbarColor = ((ColorDrawable)(searchBarContainer.getBackground())).getColor(); +if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { +navbarColor = ((ColorDrawable) (searchBarContainer.getBackground())).getColor(); +} else { +navbarColor = Color.WHITE; +} searchTermTextColor = searchTermText.getCurrentTextColor(); searchTermHintTextColor = searchTermText.getCurrentHintTextColor(); } catch (Exception e) { -- To view, visit https://gerrit.wikimedia.org/r/122547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a8364ab266d8bbbaf7cde50ad7e08e4d637b5a1 Gerrit-PatchSet: 8 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Gingerbread] Work around lack of ColorDrawable.getColor - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122547 Change subject: [Gingerbread] Work around lack of ColorDrawable.getColor .. [Gingerbread] Work around lack of ColorDrawable.getColor Change-Id: I8a8364ab266d8bbbaf7cde50ad7e08e4d637b5a1 --- M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/47/122547/1 diff --git a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java index 426571b..a8e9a6d 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java @@ -128,7 +128,11 @@ navbar = (LinearLayout) parentLayout.findViewById(R.id.navbar); searchTermText = (EditText) parentLayout.findViewById(R.id.search_term_text); try { -navbarColor = ((ColorDrawable)(searchBarContainer.getBackground())).getColor(); +if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { +navbarColor = ((ColorDrawable) (searchBarContainer.getBackground())).getColor(); +} else { +navbarColor = Color.WHITE; +} searchTermTextColor = searchTermText.getCurrentTextColor(); searchTermHintTextColor = searchTermText.getCurrentHintTextColor(); } catch (Exception e) { -- To view, visit https://gerrit.wikimedia.org/r/122547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a8364ab266d8bbbaf7cde50ad7e08e4d637b5a1 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits