Compare commits

...

1 Commits

Author SHA1 Message Date
LucasGGamerM a168a0226b fix(recycler-empty-view): make the textViews in the empty views follow the color themes 2023-09-25 11:28:28 -03:00
1 changed files with 12 additions and 0 deletions

View File

@ -2,6 +2,10 @@ package org.joinmastodon.android.fragments;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toolbar; import android.widget.Toolbar;
import org.joinmastodon.android.R; import org.joinmastodon.android.R;
@ -43,6 +47,14 @@ public abstract class MastodonRecyclerFragment<T> extends BaseRecyclerFragment<T
refreshLayout.setProgressBackgroundColorSchemeColor(UiUtils.alphaBlendColors(colorBackground, colorPrimary, 0.11f)); refreshLayout.setProgressBackgroundColorSchemeColor(UiUtils.alphaBlendColors(colorBackground, colorPrimary, 0.11f));
refreshLayout.setColorSchemeColors(colorPrimary); refreshLayout.setColorSchemeColors(colorPrimary);
} }
// This is to set the color of the 'This list is empty'
for (int i=0; i < ((LinearLayout) emptyView).getChildCount(); i++) {
View v = ((LinearLayout) emptyView).getChildAt(i);
if(v instanceof TextView) {
((TextView) v).setTextColor(UiUtils.getThemeColor(getContext(), android.R.attr.textColorSecondary));
}
}
} }
@Override @Override