mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Adjust footer offset on collapsed text items.
This commit is contained in:
committed by
Cody Henthorne
parent
59af304002
commit
e22c403b10
@@ -24,6 +24,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.updateLayoutParams
|
import androidx.core.view.updateLayoutParams
|
||||||
|
import androidx.core.widget.TextViewCompat
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.signal.core.util.StringUtil
|
import org.signal.core.util.StringUtil
|
||||||
@@ -177,6 +178,8 @@ open class V2ConversationItemTextOnlyViewHolder<Model : MappingModel<Model>>(
|
|||||||
binding.body.setMentionBackgroundTint(ContextCompat.getColor(context, R.color.transparent_black_25))
|
binding.body.setMentionBackgroundTint(ContextCompat.getColor(context, R.color.transparent_black_25))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextViewCompat.setLineHeight(binding.body, TypedValue.COMPLEX_UNIT_SP, 22f)
|
||||||
|
|
||||||
binding.bodyWrapper.background = bodyBubbleDrawable
|
binding.bodyWrapper.background = bodyBubbleDrawable
|
||||||
binding.bodyWrapper.layoutTransition = bodyBubbleLayoutTransition
|
binding.bodyWrapper.layoutTransition = bodyBubbleLayoutTransition
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
|
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
|
||||||
android:layout_marginTop="@dimen/message_bubble_top_padding"
|
android:layout_marginTop="@dimen/message_bubble_top_padding"
|
||||||
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
|
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
|
||||||
android:layout_marginBottom="@dimen/message_bubble_collapsed_footer_padding"
|
android:layout_marginBottom="@dimen/message_bubble_bottom_padding"
|
||||||
android:textAppearance="@style/Signal.Text.BodyLarge"
|
android:textAppearance="@style/Signal.Text.BodyLarge"
|
||||||
android:textColor="@color/conversation_item_sent_text_primary_color"
|
android:textColor="@color/conversation_item_sent_text_primary_color"
|
||||||
android:textColorLink="@color/conversation_item_sent_text_primary_color"
|
android:textColorLink="@color/conversation_item_sent_text_primary_color"
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:linksClickable="false"
|
android:linksClickable="false"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:paddingBottom="@dimen/message_bubble_bottom_padding"
|
android:paddingBottom="@dimen/message_bubble_footer_bottom_padding"
|
||||||
android:textColor="@color/signal_text_secondary"
|
android:textColor="@color/signal_text_secondary"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/conversation_item_body_wrapper"
|
app:layout_constraintBottom_toBottomOf="@id/conversation_item_body_wrapper"
|
||||||
app:layout_constraintEnd_toStartOf="@id/conversation_item_expiration_timer"
|
app:layout_constraintEnd_toStartOf="@id/conversation_item_expiration_timer"
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
android:id="@+id/conversation_item_expiration_timer"
|
android:id="@+id/conversation_item_expiration_timer"
|
||||||
android:layout_width="12dp"
|
android:layout_width="12dp"
|
||||||
android:layout_height="12dp"
|
android:layout_height="12dp"
|
||||||
android:layout_marginBottom="@dimen/message_bubble_bottom_padding"
|
android:layout_marginBottom="@dimen/message_bubble_footer_bottom_padding"
|
||||||
android:alpha="0.7"
|
android:alpha="0.7"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/conversation_item_footer_date"
|
app:layout_constraintBottom_toBottomOf="@id/conversation_item_footer_date"
|
||||||
app:layout_constraintEnd_toStartOf="@id/footer_end_pad"
|
app:layout_constraintEnd_toStartOf="@id/footer_end_pad"
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
|
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
|
||||||
android:layout_marginTop="@dimen/message_bubble_top_padding"
|
android:layout_marginTop="@dimen/message_bubble_top_padding"
|
||||||
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
|
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
|
||||||
android:layout_marginBottom="@dimen/message_bubble_collapsed_footer_padding"
|
android:layout_marginBottom="@dimen/message_bubble_bottom_padding"
|
||||||
android:textAppearance="@style/Signal.Text.BodyLarge"
|
android:textAppearance="@style/Signal.Text.BodyLarge"
|
||||||
android:textColor="@color/conversation_item_sent_text_primary_color"
|
android:textColor="@color/conversation_item_sent_text_primary_color"
|
||||||
android:textColorLink="@color/conversation_item_sent_text_primary_color"
|
android:textColorLink="@color/conversation_item_sent_text_primary_color"
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:linksClickable="false"
|
android:linksClickable="false"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:paddingBottom="@dimen/message_bubble_bottom_padding"
|
android:paddingBottom="@dimen/message_bubble_footer_bottom_padding"
|
||||||
android:textColor="@color/signal_text_secondary"
|
android:textColor="@color/signal_text_secondary"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/conversation_item_body_wrapper"
|
app:layout_constraintBottom_toBottomOf="@id/conversation_item_body_wrapper"
|
||||||
app:layout_constraintEnd_toStartOf="@id/conversation_item_expiration_timer"
|
app:layout_constraintEnd_toStartOf="@id/conversation_item_expiration_timer"
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
android:layout_width="12dp"
|
android:layout_width="12dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:paddingBottom="@dimen/message_bubble_bottom_padding"
|
android:paddingBottom="@dimen/message_bubble_footer_bottom_padding"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/conversation_item_footer_date"
|
app:layout_constraintBottom_toBottomOf="@id/conversation_item_footer_date"
|
||||||
app:layout_constraintEnd_toStartOf="@id/conversation_item_delivery_status"
|
app:layout_constraintEnd_toStartOf="@id/conversation_item_delivery_status"
|
||||||
app:layout_constraintTop_toTopOf="@id/conversation_item_footer_date" />
|
app:layout_constraintTop_toTopOf="@id/conversation_item_footer_date" />
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:paddingBottom="@dimen/message_bubble_bottom_padding"
|
android:paddingBottom="@dimen/message_bubble_footer_bottom_padding"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/conversation_item_body_wrapper"
|
app:layout_constraintBottom_toBottomOf="@id/conversation_item_body_wrapper"
|
||||||
app:layout_constraintEnd_toStartOf="@id/footer_end_pad"
|
app:layout_constraintEnd_toStartOf="@id/footer_end_pad"
|
||||||
app:layout_constraintTop_toTopOf="@id/conversation_item_footer_date" />
|
app:layout_constraintTop_toTopOf="@id/conversation_item_footer_date" />
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
<dimen name="message_bubble_collapsed_footer_padding">6dp</dimen>
|
<dimen name="message_bubble_collapsed_footer_padding">6dp</dimen>
|
||||||
<dimen name="message_bubble_edge_margin">32dp</dimen>
|
<dimen name="message_bubble_edge_margin">32dp</dimen>
|
||||||
<dimen name="message_bubble_bottom_padding">7dp</dimen>
|
<dimen name="message_bubble_bottom_padding">7dp</dimen>
|
||||||
|
<dimen name="message_bubble_footer_bottom_padding">5dp</dimen>
|
||||||
<dimen name="message_bubble_collapsed_bottom_padding">7dp</dimen>
|
<dimen name="message_bubble_collapsed_bottom_padding">7dp</dimen>
|
||||||
<dimen name="message_bubble_revealable_padding">12dp</dimen>
|
<dimen name="message_bubble_revealable_padding">12dp</dimen>
|
||||||
<dimen name="media_bubble_remove_button_size">24dp</dimen>
|
<dimen name="media_bubble_remove_button_size">24dp</dimen>
|
||||||
|
|||||||
Reference in New Issue
Block a user