Update assets and themes to leverage DayNight system.

This commit is contained in:
Cody Henthorne
2020-11-10 10:20:54 -05:00
parent 81eaae4070
commit c3b5323010
610 changed files with 1222 additions and 2043 deletions

View File

@@ -7,6 +7,7 @@ import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
@@ -22,8 +23,6 @@ import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader;
import org.thoughtcrime.securesms.mms.GlideRequests;
import org.thoughtcrime.securesms.stickers.StickerKeyboardPageFragment.EventListener;
import org.thoughtcrime.securesms.stickers.StickerKeyboardRepository.PackListResult;
import org.thoughtcrime.securesms.util.ResUtil;
import org.thoughtcrime.securesms.util.ThemeUtil;
import org.thoughtcrime.securesms.util.Throttler;
import java.util.ArrayList;
@@ -63,9 +62,9 @@ public final class StickerKeyboardProvider implements MediaKeyboardProvider,
@Override
public int getProviderIconView(boolean selected) {
if (selected) {
return ThemeUtil.isDarkTheme(context) ? R.layout.sticker_keyboard_icon_dark_selected : R.layout.sticker_keyboard_icon_light_selected;
return R.layout.sticker_keyboard_icon_selected;
} else {
return ThemeUtil.isDarkTheme(context) ? R.layout.sticker_keyboard_icon_dark : R.layout.sticker_keyboard_icon_light;
return R.layout.sticker_keyboard_icon;
}
}
@@ -240,7 +239,7 @@ public final class StickerKeyboardProvider implements MediaKeyboardProvider,
@Override
public void loadCategoryTabIcon(@NonNull GlideRequests glideRequests, @NonNull ImageView imageView, int index) {
if (index == 0) {
Drawable icon = ResUtil.getDrawable(context, R.attr.emoji_category_recent);
Drawable icon = ContextCompat.getDrawable(context, R.drawable.ic_recent_20);
imageView.setImageDrawable(icon);
} else {
Uri uri = packs.get(index - 1).getCover().getUri();