Revert shade removal and add nav bar coloring.
This commit is contained in:
parent
fcb4c627e4
commit
897e176f0d
4 changed files with 16 additions and 21 deletions
|
@ -117,14 +117,13 @@ public class AttachmentKeyboard extends FrameLayout implements InputAwareLayout.
|
|||
|
||||
public void setWallpaperEnabled(boolean wallpaperEnabled) {
|
||||
if (wallpaperEnabled) {
|
||||
container.setBackground(null);
|
||||
container.setBackgroundColor(getContext().getResources().getColor(R.color.wallpaper_compose_background));
|
||||
} else {
|
||||
container.setBackgroundColor(getContext().getResources().getColor(R.color.signal_background_primary));
|
||||
}
|
||||
buttonAdapter.setWallpaperEnabled(wallpaperEnabled);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void show(int height, boolean immediate) {
|
||||
ViewGroup.LayoutParams params = getLayoutParams();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.thoughtcrime.securesms.conversation;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -88,12 +89,6 @@ 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));
|
||||
}
|
||||
|
||||
|
|
|
@ -406,6 +406,7 @@ public class ConversationParentFragment extends Fragment
|
|||
private MessageRequestsBottomView messageRequestBottomView;
|
||||
private ConversationReactionDelegate reactionDelegate;
|
||||
private Stub<FrameLayout> voiceNotePlayerViewStub;
|
||||
private View navigationBarBackground;
|
||||
|
||||
private AttachmentManager attachmentManager;
|
||||
private AudioRecorder audioRecorder;
|
||||
|
@ -1197,6 +1198,7 @@ public class ConversationParentFragment extends Fragment
|
|||
reactionDelegate.hide();
|
||||
} else if (container.isInputOpen()) {
|
||||
container.hideCurrentInput(composeText);
|
||||
navigationBarBackground.setVisibility(View.GONE);
|
||||
} else if (isSearchRequested) {
|
||||
if (searchViewItem != null) {
|
||||
searchViewItem.collapseActionView();
|
||||
|
@ -1213,6 +1215,7 @@ public class ConversationParentFragment extends Fragment
|
|||
emojiDrawerStub.get().hide(true);
|
||||
}
|
||||
if (attachmentKeyboardStub.resolved() && attachmentKeyboardStub.get().isShowing()) {
|
||||
navigationBarBackground.setVisibility(View.GONE);
|
||||
attachmentKeyboardStub.get().hide(true);
|
||||
}
|
||||
}
|
||||
|
@ -1550,6 +1553,7 @@ public class ConversationParentFragment extends Fragment
|
|||
updatePaymentsAvailable();
|
||||
|
||||
container.show(composeText, attachmentKeyboardStub.get());
|
||||
navigationBarBackground.setVisibility(View.VISIBLE);
|
||||
|
||||
viewModel.onAttachmentKeyboardOpen();
|
||||
}
|
||||
|
@ -2136,6 +2140,7 @@ public class ConversationParentFragment extends Fragment
|
|||
wallpaper = view.findViewById(R.id.conversation_wallpaper);
|
||||
wallpaperDim = view.findViewById(R.id.conversation_wallpaper_dim);
|
||||
voiceNotePlayerViewStub = ViewUtil.findStubById(view, R.id.voice_note_player_stub);
|
||||
navigationBarBackground = view.findViewById(R.id.navbar_background);
|
||||
|
||||
ImageButton quickCameraToggle = view.findViewById(R.id.quick_camera_toggle);
|
||||
ImageButton inlineAttachmentButton = view.findViewById(R.id.inline_attachment_button);
|
||||
|
@ -4059,19 +4064,6 @@ public class ConversationParentFragment extends Fragment
|
|||
updateLinkPreviewState();
|
||||
}
|
||||
|
||||
private int inputAreaHeight() {
|
||||
int height = panelParent.getMeasuredHeight();
|
||||
|
||||
if (attachmentKeyboardStub.resolved()) {
|
||||
View keyboard = attachmentKeyboardStub.get();
|
||||
if (keyboard.getVisibility() == View.VISIBLE) {
|
||||
return height + keyboard.getMeasuredHeight();
|
||||
}
|
||||
}
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
private void onMessageRequestDeleteClicked(@NonNull MessageRequestViewModel requestModel) {
|
||||
Recipient recipient = requestModel.getRecipient().getValue();
|
||||
if (recipient == null) {
|
||||
|
|
|
@ -160,6 +160,15 @@
|
|||
|
||||
</org.thoughtcrime.securesms.components.InputAwareLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/navbar_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/wallpaper_compose_background"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/navigation_bar_guideline" />
|
||||
|
||||
<View
|
||||
android:id="@+id/toolbar_background"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Add table
Reference in a new issue