Fixes some color icons issues
This commit is contained in:
parent
244f4a8c94
commit
647157dc5a
|
@ -19,8 +19,10 @@ import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -94,6 +96,7 @@ public class ListAdapter extends BaseAdapter implements OnListActionInterface {
|
||||||
}
|
}
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||||
|
|
||||||
if( theme == Helper.THEME_LIGHT){
|
if( theme == Helper.THEME_LIGHT){
|
||||||
holder.search_container.setBackgroundResource(R.color.mastodonC3__);
|
holder.search_container.setBackgroundResource(R.color.mastodonC3__);
|
||||||
changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right,R.color.black);
|
changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right,R.color.black);
|
||||||
|
@ -101,7 +104,13 @@ public class ListAdapter extends BaseAdapter implements OnListActionInterface {
|
||||||
holder.search_container.setBackgroundResource(R.color.mastodonC1_);
|
holder.search_container.setBackgroundResource(R.color.mastodonC1_);
|
||||||
changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right,R.color.dark_text);
|
changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right,R.color.dark_text);
|
||||||
}
|
}
|
||||||
|
Drawable next = ContextCompat.getDrawable(context, R.drawable.ic_keyboard_arrow_right);
|
||||||
holder.search_title.setText(list.getTitle());
|
holder.search_title.setText(list.getTitle());
|
||||||
|
assert next != null;
|
||||||
|
next.setBounds(0,0,100,100);
|
||||||
|
assert next != null;
|
||||||
|
holder.search_title.setCompoundDrawables(null, null, next, null);
|
||||||
|
|
||||||
holder.search_container.setOnClickListener(new View.OnClickListener() {
|
holder.search_container.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
|
@ -20,7 +20,9 @@ import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -99,7 +101,12 @@ public class SearchTootsListAdapter extends BaseAdapter {
|
||||||
holder.search_container.setBackgroundResource(R.color.mastodonC1_);
|
holder.search_container.setBackgroundResource(R.color.mastodonC1_);
|
||||||
changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right,R.color.dark_text);
|
changeDrawableColor(context, R.drawable.ic_keyboard_arrow_right,R.color.dark_text);
|
||||||
}
|
}
|
||||||
|
Drawable next = ContextCompat.getDrawable(context, R.drawable.ic_keyboard_arrow_right);
|
||||||
holder.search_title.setText(search);
|
holder.search_title.setText(search);
|
||||||
|
assert next != null;
|
||||||
|
next.setBounds(0,0,100,100);
|
||||||
|
holder.search_title.setCompoundDrawables(null, null, next, null);
|
||||||
|
|
||||||
holder.search_container.setOnClickListener(new View.OnClickListener() {
|
holder.search_container.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<TextView
|
<TextView
|
||||||
android:drawableRight="@drawable/ic_keyboard_arrow_right"
|
|
||||||
android:drawableEnd="@drawable/ic_keyboard_arrow_right"
|
|
||||||
android:id="@+id/search_keyword"
|
android:id="@+id/search_keyword"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
|
|
Loading…
Reference in New Issue