Update background color for attachment keyboard.

This commit is contained in:
Alex Hart
2022-06-17 09:33:01 -03:00
committed by Greyson Parrelli
parent 211361684d
commit ff64f7368b
2 changed files with 8 additions and 1 deletions

View File

@@ -117,7 +117,7 @@ public class AttachmentKeyboard extends FrameLayout implements InputAwareLayout.
public void setWallpaperEnabled(boolean wallpaperEnabled) {
if (wallpaperEnabled) {
container.setBackgroundColor(getContext().getResources().getColor(R.color.wallpaper_compose_background));
container.setBackground(null);
} else {
container.setBackgroundColor(getContext().getResources().getColor(R.color.signal_background_primary));
}

View File

@@ -7,6 +7,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import org.thoughtcrime.securesms.R;
@@ -87,6 +88,12 @@ class AttachmentKeyboardButtonAdapter extends RecyclerView.Adapter<AttachmentKey
image.setImageResource(button.getIconRes());
title.setText(button.getTitleRes());
if (wallpaperEnabled) {
title.setTextColor(ContextCompat.getColor(itemView.getContext(), R.color.signal_colorOnCustom));
} else {
title.setTextColor(ContextCompat.getColor(itemView.getContext(), R.color.signal_colorOnBackground));
}
itemView.setOnClickListener(v -> listener.onClick(button));
}