Commit 360c9611 authored by Alexander Martinz's avatar Alexander Martinz Committed by Michael Bestas

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: default avatarAlexander Martinz <amartinz@shiftphones.com>
parent 76f37643
......@@ -27,6 +27,7 @@
android:visibility="gone">
<ImageView
android:id="@+id/no_results_image"
android:layout_width="@dimen/white_note_width"
android:layout_height="@dimen/white_note_height"
android:layout_gravity="center_horizontal"
......
......@@ -16,8 +16,10 @@
package org.lineageos.eleven.widgets;
import android.content.Context;
import android.graphics.PorterDuff;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
......@@ -43,7 +45,7 @@ public class NoResultsContainer extends LinearLayout {
}
public void setMainHighlightText(final String text) {
final TextView hightlightText = (TextView)findViewById(R.id.no_results_main_highlight_text);
final TextView hightlightText = findViewById(R.id.no_results_main_highlight_text);
if (text == null || text.isEmpty()) {
hightlightText.setVisibility(View.GONE);
......@@ -58,8 +60,9 @@ public class NoResultsContainer extends LinearLayout {
}
public void setTextColor(int color) {
((ImageView)findViewById(R.id.no_results_image)).setColorFilter(color, PorterDuff.Mode.SRC_IN);
((TextView)findViewById(R.id.no_results_main_text)).setTextColor(color);
((TextView)findViewById(R.id.no_results_main_highlight_text)).setTextColor(color);
((TextView)findViewById(R.id.no_results_secondary_text)).setTextColor(color);
}
}
\ No newline at end of file
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment