Revert "Make text bubbles a bit smaller"

This reverts commit db0fd21097c3ed66e9633c6aef745dbb0e0e2b3b.
This commit is contained in:
nielsandriesse 2020-09-04 18:45:00 +10:00
parent 10e9d9d1d1
commit 4b8609ea5a
5 changed files with 45 additions and 48 deletions

View File

@ -59,8 +59,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/massive_spacing" android:layout_marginEnd="@dimen/massive_spacing"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:paddingTop="12dp" android:paddingTop="@dimen/medium_spacing"
android:paddingBottom="12dp" android:paddingBottom="@dimen/medium_spacing"
android:orientation="vertical" android:orientation="vertical"
android:clipToPadding="false" android:clipToPadding="false"
android:clipChildren="false" android:clipChildren="false"
@ -71,9 +71,9 @@
android:id="@+id/group_sender_holder" android:id="@+id/group_sender_holder"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginBottom="12dp" android:layout_marginBottom="@dimen/medium_spacing"
android:layout_marginEnd="12dp" android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
@ -113,9 +113,9 @@
android:id="@+id/quote_view" android:id="@+id/quote_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp" android:layout_marginStart="@dimen/large_spacing"
android:layout_marginBottom="12dp" android:layout_marginBottom="@dimen/medium_spacing"
android:layout_marginEnd="20dp" android:layout_marginEnd="@dimen/large_spacing"
android:visibility="gone" android:visibility="gone"
app:message_type="incoming" app:message_type="incoming"
app:quote_colorPrimary="@color/text" app:quote_colorPrimary="@color/text"
@ -127,7 +127,7 @@
android:layout="@layout/conversation_item_received_shared_contact" android:layout="@layout/conversation_item_received_shared_contact"
android:layout_width="@dimen/media_bubble_default_dimens" android:layout_width="@dimen/media_bubble_default_dimens"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="@dimen/message_bubble_top_padding"
android:visibility="gone"/> android:visibility="gone"/>
<ViewStub <ViewStub
@ -153,9 +153,9 @@
android:layout="@layout/conversation_item_received_audio" android:layout="@layout/conversation_item_received_audio"
android:layout_width="210dp" android:layout_width="210dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginBottom="4dp" android:layout_marginBottom="6dp"
android:layout_marginEnd="12dp" /> android:layout_marginEnd="@dimen/message_bubble_horizontal_padding" />
<ViewStub <ViewStub
android:id="@+id/document_view_stub" android:id="@+id/document_view_stub"
@ -163,15 +163,15 @@
android:layout_width="210dp" android:layout_width="210dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginEnd="12dp" /> android:layout_marginEnd="@dimen/message_bubble_horizontal_padding" />
<org.thoughtcrime.securesms.components.emoji.EmojiTextView <org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/conversation_item_body" android:id="@+id/conversation_item_body"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginEnd="12dp" android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
style="@style/Signal.Text.Body" style="@style/Signal.Text.Body"
android:textColor="?conversation_item_received_text_primary_color" android:textColor="?conversation_item_received_text_primary_color"
android:textColorLink="?conversation_item_received_text_primary_color" android:textColorLink="?conversation_item_received_text_primary_color"
@ -185,8 +185,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginEnd="12dp" android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
android:clipChildren="false" android:clipChildren="false"
android:clipToPadding="false" android:clipToPadding="false"
android:alpha="0.6" android:alpha="0.6"
@ -197,9 +197,9 @@
android:id="@+id/conversation_item_sticker_footer" android:id="@+id/conversation_item_sticker_footer"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="4dp" android:layout_marginTop="6dp"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginEnd="12dp" android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
android:clipChildren="false" android:clipChildren="false"
android:clipToPadding="false" android:clipToPadding="false"
android:visibility="gone" android:visibility="gone"

View File

@ -37,8 +37,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:layout_marginStart="@dimen/massive_spacing" android:layout_marginStart="@dimen/massive_spacing"
android:paddingTop="12dp" android:paddingTop="@dimen/medium_spacing"
android:paddingBottom="12dp" android:paddingBottom="@dimen/medium_spacing"
android:layout_gravity="end" android:layout_gravity="end"
android:clipToPadding="false" android:clipToPadding="false"
android:clipChildren="false" android:clipChildren="false"
@ -49,9 +49,9 @@
android:id="@+id/quote_view" android:id="@+id/quote_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp" android:layout_marginStart="@dimen/large_spacing"
android:layout_marginBottom="12dp" android:layout_marginBottom="@dimen/medium_spacing"
android:layout_marginEnd="20dp" android:layout_marginEnd="@dimen/large_spacing"
android:visibility="gone" android:visibility="gone"
app:message_type="outgoing" app:message_type="outgoing"
app:quote_colorPrimary="@color/text" app:quote_colorPrimary="@color/text"
@ -63,7 +63,7 @@
android:layout="@layout/conversation_item_sent_shared_contact" android:layout="@layout/conversation_item_sent_shared_contact"
android:layout_width="@dimen/media_bubble_default_dimens" android:layout_width="@dimen/media_bubble_default_dimens"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="12dp" android:layout_marginBottom="@dimen/medium_spacing"
android:visibility="gone"/> android:visibility="gone"/>
<ViewStub <ViewStub
@ -89,25 +89,25 @@
android:layout="@layout/conversation_item_sent_audio" android:layout="@layout/conversation_item_sent_audio"
android:layout_width="210dp" android:layout_width="210dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginBottom="4dp" android:layout_marginBottom="6dp"
android:layout_marginEnd="12dp" /> android:layout_marginEnd="@dimen/message_bubble_horizontal_padding" />
<ViewStub <ViewStub
android:id="@+id/document_view_stub" android:id="@+id/document_view_stub"
android:layout="@layout/conversation_item_sent_document" android:layout="@layout/conversation_item_sent_document"
android:layout_width="210dp" android:layout_width="210dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:layout_marginEnd="12dp" /> android:layout_marginEnd="@dimen/message_bubble_horizontal_padding" />
<org.thoughtcrime.securesms.components.emoji.EmojiTextView <org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/conversation_item_body" android:id="@+id/conversation_item_body"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginEnd="12dp" android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
style="@style/Signal.Text.Body" style="@style/Signal.Text.Body"
android:textColor="?conversation_item_sent_text_primary_color" android:textColor="?conversation_item_sent_text_primary_color"
android:textColorLink="?conversation_item_sent_text_primary_color" android:textColorLink="?conversation_item_sent_text_primary_color"
@ -139,8 +139,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginEnd="12dp" android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
android:clipChildren="false" android:clipChildren="false"
android:clipToPadding="false" android:clipToPadding="false"
app:footer_text_color="?attr/conversation_item_sent_text_secondary_color" app:footer_text_color="?attr/conversation_item_sent_text_secondary_color"
@ -150,9 +150,9 @@
android:id="@+id/conversation_item_sticker_footer" android:id="@+id/conversation_item_sticker_footer"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="4dp" android:layout_marginTop="6dp"
android:layout_marginStart="12dp" android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
android:layout_marginEnd="12dp" android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
android:clipChildren="false" android:clipChildren="false"
android:clipToPadding="false" android:clipToPadding="false"
android:visibility="gone" android:visibility="gone"

View File

@ -9,7 +9,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="false" android:clickable="false"
android:focusable="false" android:focusable="false"
android:layout_marginBottom="-4dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">

View File

@ -73,7 +73,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/Signal.Text.Body" style="@style/Signal.Text.Body"
android:textColor="@color/text" android:textColor="@color/text"
android:textSize="@dimen/small_font_size" android:textSize="@dimen/medium_font_size"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" android:ellipsize="end"
tools:text="The-Amazing-Spider-Man.cba" /> tools:text="The-Amazing-Spider-Man.cba" />
@ -99,7 +99,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
style="@style/Signal.Text.Body" style="@style/Signal.Text.Body"
android:textSize="@dimen/small_font_size"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
tools:text="With great power comes great responsibility." tools:text="With great power comes great responsibility."

View File

@ -87,7 +87,6 @@ import org.thoughtcrime.securesms.jobs.SmsSendJob;
import org.thoughtcrime.securesms.linkpreview.LinkPreview; import org.thoughtcrime.securesms.linkpreview.LinkPreview;
import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil; import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil;
import org.thoughtcrime.securesms.logging.Log; import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.loki.utilities.GeneralUtilitiesKt;
import org.thoughtcrime.securesms.loki.utilities.MentionUtilities; import org.thoughtcrime.securesms.loki.utilities.MentionUtilities;
import org.thoughtcrime.securesms.loki.views.ProfilePictureView; import org.thoughtcrime.securesms.loki.views.ProfilePictureView;
import org.thoughtcrime.securesms.mms.GlideRequests; import org.thoughtcrime.securesms.mms.GlideRequests;
@ -503,23 +502,23 @@ public class ConversationItem extends LinearLayout
if (hasOnlyThumbnail(messageRecord)) { if (hasOnlyThumbnail(messageRecord)) {
int topPadding = 0; int topPadding = 0;
if (groupSenderHolder.getVisibility() == VISIBLE) { if (groupSenderHolder.getVisibility() == VISIBLE) {
topPadding = GeneralUtilitiesKt.toPx(12, getResources()); topPadding = (int)getResources().getDimension(R.dimen.medium_spacing);
} }
int bottomPadding = 0; int bottomPadding = 0;
if (messageRecord.getBody().length() > 0) { if (messageRecord.getBody().length() > 0) {
bodyTextLayoutParams.topMargin = GeneralUtilitiesKt.toPx(12, getResources()); bodyTextLayoutParams.topMargin = (int)getResources().getDimension(R.dimen.medium_spacing);
bottomPadding = GeneralUtilitiesKt.toPx(12, getResources()); bottomPadding = (int)getResources().getDimension(R.dimen.medium_spacing);
} }
bodyBubble.setPadding(0, topPadding, 0, bottomPadding); bodyBubble.setPadding(0, topPadding, 0, bottomPadding);
} else { } else {
bodyBubble.setPadding(0, GeneralUtilitiesKt.toPx(12, getResources()), 0, GeneralUtilitiesKt.toPx(12, getResources())); bodyBubble.setPadding(0, (int)getResources().getDimension(R.dimen.medium_spacing), 0, (int)getResources().getDimension(R.dimen.medium_spacing));
} }
bodyText.setLayoutParams(bodyTextLayoutParams); bodyText.setLayoutParams(bodyTextLayoutParams);
LinearLayout.LayoutParams senderHolderLayoutParams = (LinearLayout.LayoutParams)groupSenderHolder.getLayoutParams(); LinearLayout.LayoutParams senderHolderLayoutParams = (LinearLayout.LayoutParams)groupSenderHolder.getLayoutParams();
if (groupSenderHolder.getVisibility() == VISIBLE && hasOnlyText(messageRecord)) { if (groupSenderHolder.getVisibility() == VISIBLE && hasOnlyText(messageRecord)) {
senderHolderLayoutParams.bottomMargin = (int)(getResources().getDisplayMetrics().density * 4); senderHolderLayoutParams.bottomMargin = (int)(getResources().getDisplayMetrics().density * 4);
} else { } else {
senderHolderLayoutParams.bottomMargin = GeneralUtilitiesKt.toPx(12, getResources()); senderHolderLayoutParams.bottomMargin = (int)getResources().getDimension(R.dimen.medium_spacing);
} }
groupSenderHolder.setLayoutParams(senderHolderLayoutParams); groupSenderHolder.setLayoutParams(senderHolderLayoutParams);
if (documentViewStub.resolved()) { if (documentViewStub.resolved()) {