Fixes crashes #575

This commit is contained in:
stom79 2018-11-20 07:44:26 +01:00
parent c663d46d77
commit 34690078f4
7 changed files with 29 additions and 8 deletions

View File

@ -545,7 +545,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
changeDrawableColor(context, R.drawable.ic_bookmark,R.color.black);
changeDrawableColor(context, R.drawable.ic_bookmark_border,R.color.black);
changeDrawableColor(context, R.drawable.ic_translate,R.color.black);
holder.status_cardview.setBackgroundResource(R.drawable.card_border_black);
}else if( theme == Helper.THEME_DARK ){
changeDrawableColor(context, R.drawable.ic_reply,R.color.action_dark);
@ -569,7 +569,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
holder.status_cardview_title.setTextColor(ContextCompat.getColor(context, R.color.dark_text_toot_header));
holder.status_cardview_content.setTextColor(ContextCompat.getColor(context, R.color.dark_icon));
holder.status_cardview_url.setTextColor(ContextCompat.getColor(context, R.color.dark_text_toot_header));
holder.status_cardview.setBackgroundResource(R.drawable.card_border_dark);
changeDrawableColor(context, R.drawable.ic_bookmark,R.color.mastodonC1);
changeDrawableColor(context, R.drawable.ic_bookmark_border,R.color.mastodonC1);
changeDrawableColor(context, R.drawable.ic_translate,R.color.mastodonC1);
@ -587,7 +587,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
holder.status_reblog_count.setTextColor(ContextCompat.getColor(context, R.color.action_light));
holder.status_reply.setTextColor(ContextCompat.getColor(context, R.color.action_light));
holder.status_cardview.setBackgroundResource(R.drawable.card_border_light);
changeDrawableColor(context, R.drawable.ic_photo,R.color.mastodonC4);
changeDrawableColor(context, R.drawable.ic_remove_red_eye,R.color.mastodonC4);
@ -1157,7 +1157,6 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
changeDrawableColor(context, R.drawable.ic_reply,R.color.action_light);
imgReply = ContextCompat.getDrawable(context, R.drawable.ic_reply);
assert imgFav != null;
imgFav.setBounds(0,0,(int) (20 * iconSizePercent/100 * scale + 0.5f),(int) (20 * iconSizePercent/100 * scale + 0.5f));
assert imgReblog != null;

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/transparent"/>
<stroke android:width="1dp"
android:color="@color/cardBorderBlack"
/>
<corners android:bottomRightRadius="3dp" android:bottomLeftRadius="3dp"
android:topLeftRadius="3dp" android:topRightRadius="3dp"/>
</shape>

View File

@ -3,7 +3,7 @@
<solid android:color="@color/transparent"/>
<stroke android:width="1dp"
android:color="?attr/cardBorder"
android:color="@color/cardBorderDark"
/>
<corners android:bottomRightRadius="3dp" android:bottomLeftRadius="3dp"

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/transparent"/>
<stroke android:width="1dp"
android:color="@color/cardBorderLight"
/>
<corners android:bottomRightRadius="3dp" android:bottomLeftRadius="3dp"
android:topLeftRadius="3dp" android:topRightRadius="3dp"/>
</shape>

View File

@ -304,7 +304,7 @@
android:id="@+id/status_cardview"
android:visibility="gone"
android:layout_marginBottom="5dp"
android:background="@drawable/card_border"
android:background="@drawable/card_border_light"
android:layout_width="match_parent"
android:gravity="center_vertical"
android:layout_height="wrap_content"

View File

@ -288,7 +288,7 @@
android:padding="5dp"
android:layout_marginTop="5dp"
android:visibility="gone"
android:background="@drawable/card_border"
android:background="@drawable/card_border_light"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

View File

@ -216,7 +216,7 @@
android:id="@+id/status_cardview"
android:layout_marginBottom="10dp"
android:visibility="gone"
android:background="@drawable/card_border"
android:background="@drawable/card_border_light"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="1dp"