Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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's avatarAlexander Martinz <amartinz@shiftphones.com>
parent 76f37643
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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"
+5 −2
Original line number Diff line number Diff line
@@ -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,6 +60,7 @@ 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);