Skip to content

Commit

Permalink
fix(recycler-empty-view): make the textViews in the empty views follo…
Browse files Browse the repository at this point in the history
…w the color themes
  • Loading branch information
LucasGGamerM committed Sep 25, 2023
1 parent f3a1e7c commit c92ab11
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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;
Expand Down Expand Up @@ -44,6 +46,14 @@ else if(wantsElevationOnScrollEffect())
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
Expand Down

0 comments on commit c92ab11

Please sign in to comment.