Skip to content

Commit

Permalink
Refine ViewPrivateMessagesActivity UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Docile-Alligator committed Sep 8, 2024
1 parent 6bf18f6 commit 5c057b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ private void bindView() {
getResources().getConfiguration().locale, privateMessage, accountName, mCustomThemeWrapper);
mLinearLayoutManager = new LinearLayoutManagerBugFixed(this);
mLinearLayoutManager.setStackFromEnd(true);
binding.recyclerViewViewPrivateMessages.setLayoutManager(mLinearLayoutManager);
binding.recyclerViewViewPrivateMessages.setAdapter(mAdapter);
binding.recyclerViewViewPrivateMessagesActivity.setLayoutManager(mLinearLayoutManager);
binding.recyclerViewViewPrivateMessagesActivity.setAdapter(mAdapter);
goToBottom();
binding.sendImageViewViewPrivateMessagesActivity.setOnClickListener(view -> {
if (!isSendingMessage) {
Expand Down Expand Up @@ -233,7 +233,7 @@ public void fetchUserAvatar(String username, ProvideUserAvatarCallback provideUs
}

public void delayTransition() {
TransitionManager.beginDelayedTransition(binding.recyclerViewViewPrivateMessages, new AutoTransition());
TransitionManager.beginDelayedTransition(binding.recyclerViewViewPrivateMessagesActivity, new AutoTransition());
}

private void goToBottom() {
Expand Down Expand Up @@ -286,11 +286,10 @@ protected void applyCustomTheme() {
binding.getRoot().setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
applyAppBarLayoutAndCollapsingToolbarLayoutAndToolbarTheme(binding.appbarLayoutViewPrivateMessagesActivity,
null, binding.toolbarViewPrivateMessagesActivity);
binding.editTextDividerViewPrivateMessagesActivity.setBackgroundColor(mCustomThemeWrapper.getDividerColor());
binding.cardViewViewPrivateMessagesActivity.setCardBackgroundColor(mCustomThemeWrapper.getFilledCardViewBackgroundColor());
binding.editTextViewPrivateMessagesActivity.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
mSecondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor();
binding.editTextViewPrivateMessagesActivity.setHintTextColor(mSecondaryTextColor);
binding.editTextWrapperLinearLayoutViewPrivateMessagesActivity.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
mSendMessageIconColor = mCustomThemeWrapper.getSendMessageIconColor();
binding.sendImageViewViewPrivateMessagesActivity.setColorFilter(mSendMessageIconColor, android.graphics.PorterDuff.Mode.SRC_IN);
if (typeface != null) {
Expand Down
18 changes: 8 additions & 10 deletions app/src/main/res/layout/activity_view_private_messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,19 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior" >

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_view_private_messages"
android:id="@+id/recycler_view_view_private_messages_activity"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false" />

<LinearLayout
android:id="@+id/edit_text_wrapper_linear_layout_view_private_messages_activity"
<com.google.android.material.card.MaterialCardView
android:id="@+id/card_view_view_private_messages_activity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<View
android:id="@+id/edit_text_divider_view_private_messages_activity"
android:layout_width="match_parent"
android:layout_height="1dp" />
android:layout_margin="8dp"
app:cardCornerRadius="48dp"
style="?attr/materialCardViewFilledStyle">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -57,6 +54,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:background="#00000000"
android:fontFamily="?attr/font_family"
android:hint="@string/message"
Expand All @@ -80,7 +78,7 @@

</LinearLayout>

</LinearLayout>
</com.google.android.material.card.MaterialCardView>

</LinearLayout>

Expand Down

0 comments on commit 5c057b4

Please sign in to comment.