Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-apps-Eleven: Commit

packages/apps/Eleven


Commit MetaInfo

Revision360c9611ff19b00dfa48bad6ad33d4bdcb0c2e12 (tree)
Time2019-03-20 05:56:33
AuthorAlexander Martinz <amartinz@shif...>
CommiterMichael Bestas

Log Message

no_results: also tint image drawable

If we are setting color for it, the drawable got ignored, resulting
in eg white text and a black drawable.

Tint drawable as well when setting text to make all match.

Change-Id: I29cda801a0319699bb87213bc702e3a28ec4fae8
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>

Change Summary

Incremental Difference

--- a/res/layout/no_results_message.xml
+++ b/res/layout/no_results_message.xml
@@ -27,6 +27,7 @@
2727 android:visibility="gone">
2828
2929 <ImageView
30+ android:id="@+id/no_results_image"
3031 android:layout_width="@dimen/white_note_width"
3132 android:layout_height="@dimen/white_note_height"
3233 android:layout_gravity="center_horizontal"
--- a/src/org/lineageos/eleven/widgets/NoResultsContainer.java
+++ b/src/org/lineageos/eleven/widgets/NoResultsContainer.java
@@ -16,8 +16,10 @@
1616 package org.lineageos.eleven.widgets;
1717
1818 import android.content.Context;
19+import android.graphics.PorterDuff;
1920 import android.util.AttributeSet;
2021 import android.view.View;
22+import android.widget.ImageView;
2123 import android.widget.LinearLayout;
2224 import android.widget.TextView;
2325
@@ -43,7 +45,7 @@ public class NoResultsContainer extends LinearLayout {
4345 }
4446
4547 public void setMainHighlightText(final String text) {
46- final TextView hightlightText = (TextView)findViewById(R.id.no_results_main_highlight_text);
48+ final TextView hightlightText = findViewById(R.id.no_results_main_highlight_text);
4749
4850 if (text == null || text.isEmpty()) {
4951 hightlightText.setVisibility(View.GONE);
@@ -58,8 +60,9 @@ public class NoResultsContainer extends LinearLayout {
5860 }
5961
6062 public void setTextColor(int color) {
63+ ((ImageView)findViewById(R.id.no_results_image)).setColorFilter(color, PorterDuff.Mode.SRC_IN);
6164 ((TextView)findViewById(R.id.no_results_main_text)).setTextColor(color);
6265 ((TextView)findViewById(R.id.no_results_main_highlight_text)).setTextColor(color);
6366 ((TextView)findViewById(R.id.no_results_secondary_text)).setTextColor(color);
6467 }
65-}
\ No newline at end of file
68+}
Show on old repository browser