Uses material design icons for favourites
|
@ -75,6 +75,7 @@ import fr.gouv.etalab.mastodon.client.Entities.Notification;
|
|||
import fr.gouv.etalab.mastodon.client.Entities.Status;
|
||||
import fr.gouv.etalab.mastodon.helper.Helper;
|
||||
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_DARK;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
|
||||
|
||||
|
||||
|
@ -261,7 +262,7 @@ public class NotificationsListAdapter extends BaseAdapter implements OnPostActio
|
|||
changeDrawableColor(context, R.drawable.ic_local_post_office,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_retweet_black,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_retweet,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_fav_black,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_favorite_border,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_photo,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_remove_red_eye,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_delete,R.color.dark_text);
|
||||
|
@ -274,7 +275,7 @@ public class NotificationsListAdapter extends BaseAdapter implements OnPostActio
|
|||
changeDrawableColor(context, R.drawable.ic_local_post_office,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_retweet_black,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_retweet,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_fav_black,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_favorite_border,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_photo,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_remove_red_eye,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_delete,R.color.black);
|
||||
|
@ -345,10 +346,16 @@ public class NotificationsListAdapter extends BaseAdapter implements OnPostActio
|
|||
|
||||
|
||||
Drawable imgFav, imgReblog;
|
||||
if( status.isFavourited())
|
||||
imgFav = ContextCompat.getDrawable(context, R.drawable.ic_fav_yellow);
|
||||
else
|
||||
imgFav = ContextCompat.getDrawable(context, R.drawable.ic_fav_black);
|
||||
if( status.isFavourited() || (status.getReblog() != null && status.getReblog().isFavourited())) {
|
||||
changeDrawableColor(context, R.drawable.ic_favorite,R.color.yellowicon);
|
||||
imgFav = ContextCompat.getDrawable(context, R.drawable.ic_favorite);
|
||||
}else {
|
||||
if( theme == THEME_DARK)
|
||||
changeDrawableColor(context, R.drawable.ic_favorite_border,R.color.dark_text);
|
||||
else
|
||||
changeDrawableColor(context, R.drawable.ic_favorite_border,R.color.black);
|
||||
imgFav = ContextCompat.getDrawable(context, R.drawable.ic_favorite_border);
|
||||
}
|
||||
|
||||
if( status.isReblogged())
|
||||
imgReblog = ContextCompat.getDrawable(context, R.drawable.ic_retweet_yellow);
|
||||
|
|
|
@ -96,6 +96,7 @@ import fr.gouv.etalab.mastodon.translation.YandexQuery;
|
|||
import mastodon.etalab.gouv.fr.mastodon.R;
|
||||
|
||||
import static fr.gouv.etalab.mastodon.activities.MainActivity.currentLocale;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_DARK;
|
||||
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
|
||||
|
||||
|
||||
|
@ -348,7 +349,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
|||
changeDrawableColor(context, R.drawable.ic_action_lock_closed,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_local_post_office,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_retweet_black,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_fav_black,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_favorite_border,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_action_pin_dark, R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_photo,R.color.dark_text);
|
||||
changeDrawableColor(context, R.drawable.ic_remove_red_eye,R.color.dark_text);
|
||||
|
@ -361,7 +362,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
|||
changeDrawableColor(context, R.drawable.ic_action_lock_closed,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_local_post_office,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_retweet_black,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_fav_black,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_favorite_border,R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_action_pin_dark, R.color.black);
|
||||
changeDrawableColor(context, R.drawable.ic_photo,R.color.white);
|
||||
changeDrawableColor(context, R.drawable.ic_remove_red_eye,R.color.white);
|
||||
|
@ -601,10 +602,16 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
|
|||
}
|
||||
|
||||
Drawable imgFav, imgReblog, imgPinned;
|
||||
if( status.isFavourited() || (status.getReblog() != null && status.getReblog().isFavourited()))
|
||||
imgFav = ContextCompat.getDrawable(context, R.drawable.ic_fav_yellow);
|
||||
else
|
||||
imgFav = ContextCompat.getDrawable(context, R.drawable.ic_fav_black);
|
||||
if( status.isFavourited() || (status.getReblog() != null && status.getReblog().isFavourited())) {
|
||||
changeDrawableColor(context, R.drawable.ic_favorite,R.color.yellowicon);
|
||||
imgFav = ContextCompat.getDrawable(context, R.drawable.ic_favorite);
|
||||
}else {
|
||||
if( theme == THEME_DARK)
|
||||
changeDrawableColor(context, R.drawable.ic_favorite_border,R.color.dark_text);
|
||||
else
|
||||
changeDrawableColor(context, R.drawable.ic_favorite_border,R.color.black);
|
||||
imgFav = ContextCompat.getDrawable(context, R.drawable.ic_favorite_border);
|
||||
}
|
||||
|
||||
if( status.isReblogged()|| (status.getReblog() != null && status.getReblog().isReblogged()))
|
||||
imgReblog = ContextCompat.getDrawable(context, R.drawable.ic_retweet_yellow);
|
||||
|
|
Before Width: | Height: | Size: 782 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 292 B |
After Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 452 B |
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 860 B |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 504 B |
Before Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 398 B |
After Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 398 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 832 B |
Before Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 549 B |
After Width: | Height: | Size: 832 B |
Before Width: | Height: | Size: 584 B After Width: | Height: | Size: 549 B |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 717 B |
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 761 B After Width: | Height: | Size: 717 B |
|
@ -987,7 +987,7 @@ public class MainActivity extends AppCompatActivity
|
|||
changeDrawableColor(getApplicationContext(), R.drawable.ic_action_lock_closed,R.color.dark_text);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_local_post_office,R.color.dark_text);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_retweet_black,R.color.dark_text);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_fav_black,R.color.dark_text);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_favorite_border,R.color.dark_text);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_photo,R.color.dark_text);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_remove_red_eye,R.color.dark_text);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_translate,R.color.dark_text);
|
||||
|
@ -999,7 +999,7 @@ public class MainActivity extends AppCompatActivity
|
|||
changeDrawableColor(getApplicationContext(), R.drawable.ic_action_lock_closed,R.color.black);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_local_post_office,R.color.black);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_retweet_black,R.color.black);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_fav_black,R.color.black);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_favorite_border,R.color.black);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_photo,R.color.white);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_remove_red_eye,R.color.white);
|
||||
changeDrawableColor(getApplicationContext(), R.drawable.ic_translate,R.color.white);
|
||||
|
|