Fixes with colors
This commit is contained in:
parent
cd654d8d89
commit
66053eb3a9
|
@ -55,7 +55,6 @@ import static app.fedilab.android.helper.Helper.changeDrawableColor;
|
|||
public class HowToVideosAdapter extends BaseAdapter implements OnListActionInterface {
|
||||
|
||||
private List<HowToVideo> howToVideos;
|
||||
private LayoutInflater layoutInflater;
|
||||
private Context context;
|
||||
|
||||
public HowToVideosAdapter(List<HowToVideo> howToVideos) {
|
||||
|
@ -82,7 +81,7 @@ public class HowToVideosAdapter extends BaseAdapter implements OnListActionInter
|
|||
public View getView(final int position, View convertView, ViewGroup parent) {
|
||||
|
||||
context = parent.getContext();
|
||||
layoutInflater = LayoutInflater.from(context);
|
||||
LayoutInflater layoutInflater = LayoutInflater.from(context);
|
||||
final HowToVideo howToVideo = howToVideos.get(position);
|
||||
final ViewHolder holder;
|
||||
if (convertView == null) {
|
||||
|
@ -96,19 +95,7 @@ public class HowToVideosAdapter extends BaseAdapter implements OnListActionInter
|
|||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||
|
||||
if (theme == Helper.THEME_LIGHT) {
|
||||
holder.how_to_container.setBackgroundResource(R.color.mastodonC3__);
|
||||
Helper.changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right, R.color.black);
|
||||
} else if (theme == Helper.THEME_DARK) {
|
||||
holder.how_to_container.setBackgroundResource(R.color.mastodonC1_);
|
||||
Helper.changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right, R.color.dark_text);
|
||||
} else if (theme == Helper.THEME_BLACK) {
|
||||
holder.how_to_container.setBackgroundResource(R.color.black_2);
|
||||
Helper.changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right, R.color.dark_text);
|
||||
}
|
||||
Helper.changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right, R.attr.iconColorMenu);
|
||||
Drawable next = ContextCompat.getDrawable(context, R.drawable.ic_keyboard_arrow_right);
|
||||
holder.how_to_description.setText(howToVideo.getDescription());
|
||||
holder.how_to_title.setText(howToVideo.getName());
|
||||
|
|
Loading…
Reference in New Issue