fix(recycler-empty-view): make the textViews in the empty views follow the color themes

This commit is contained in:
LucasGGamerM
2023-09-25 11:10:37 -03:00
parent f3a1e7cf58
commit c92ab11dcd

View File

@@ -2,6 +2,8 @@ package org.joinmastodon.android.fragments;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toolbar;
import org.joinmastodon.android.R;
@@ -44,6 +46,14 @@ public abstract class MastodonRecyclerFragment<T> extends BaseRecyclerFragment<T
list.addOnScrollListener(elevationOnScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, getViewsForElevationEffect()));
if(refreshLayout!=null)
setRefreshLayoutColors(refreshLayout);
// 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