kopia lustrzana https://github.com/ryukoposting/Signal-Android
Update the color preview to tint the send button.
rodzic
6c5ceab4e5
commit
33187ea12f
|
@ -1,6 +1,7 @@
|
||||||
package org.thoughtcrime.securesms.wallpaper;
|
package org.thoughtcrime.securesms.wallpaper;
|
||||||
|
|
||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
|
@ -62,6 +63,7 @@ public class ChatWallpaperFragment extends Fragment {
|
||||||
ColorizerView colorizerView = view.findViewById(R.id.colorizer);
|
ColorizerView colorizerView = view.findViewById(R.id.colorizer);
|
||||||
TextView resetAllWallpaper = view.findViewById(R.id.chat_wallpaper_reset_all_wallpapers);
|
TextView resetAllWallpaper = view.findViewById(R.id.chat_wallpaper_reset_all_wallpapers);
|
||||||
AppCompatImageView recvBubble = view.findViewById(R.id.chat_wallpaper_preview_bubble_1);
|
AppCompatImageView recvBubble = view.findViewById(R.id.chat_wallpaper_preview_bubble_1);
|
||||||
|
View sendButton = view.findViewById(R.id.chat_wallpaper_preview_bottom_bar_plus);
|
||||||
|
|
||||||
dimInNightMode = view.findViewById(R.id.chat_wallpaper_dark_theme_dims_wallpaper);
|
dimInNightMode = view.findViewById(R.id.chat_wallpaper_dark_theme_dims_wallpaper);
|
||||||
|
|
||||||
|
@ -184,6 +186,9 @@ public class ChatWallpaperFragment extends Fragment {
|
||||||
Drawable colorCircle = chatColors.asCircle();
|
Drawable colorCircle = chatColors.asCircle();
|
||||||
colorCircle.setBounds(0, 0, ViewUtil.dpToPx(16), ViewUtil.dpToPx(16));
|
colorCircle.setBounds(0, 0, ViewUtil.dpToPx(16), ViewUtil.dpToPx(16));
|
||||||
TextViewCompat.setCompoundDrawablesRelative(setChatColor, null, null, colorCircle, null);
|
TextViewCompat.setCompoundDrawablesRelative(setChatColor, null, null, colorCircle, null);
|
||||||
|
|
||||||
|
sendButton.getBackground().setColorFilter(chatColors.asSingleColor(), PorterDuff.Mode.MULTIPLY);
|
||||||
|
sendButton.getBackground().invalidateSelf();
|
||||||
});
|
});
|
||||||
|
|
||||||
sentBubble.addOnLayoutChangeListener((v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> viewModel.refreshChatColors());
|
sentBubble.addOnLayoutChangeListener((v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> viewModel.refreshChatColors());
|
||||||
|
|
Ładowanie…
Reference in New Issue