kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix reaction sizing issue.
rodzic
38adb0373d
commit
42269efa57
|
@ -16,6 +16,7 @@ import androidx.core.content.ContextCompat;
|
|||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.components.emoji.EmojiImageView;
|
||||
import org.thoughtcrime.securesms.components.emoji.EmojiUtil;
|
||||
import org.thoughtcrime.securesms.database.model.ReactionRecord;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
|
@ -137,13 +138,13 @@ public class ReactionsConversationView extends LinearLayout {
|
|||
}
|
||||
|
||||
private static View buildPill(@NonNull Context context, @NonNull ViewGroup parent, @NonNull Reaction reaction) {
|
||||
View root = LayoutInflater.from(context).inflate(R.layout.reactions_pill, parent, false);
|
||||
TextView emojiView = root.findViewById(R.id.reactions_pill_emoji);
|
||||
TextView countView = root.findViewById(R.id.reactions_pill_count);
|
||||
View spacer = root.findViewById(R.id.reactions_pill_spacer);
|
||||
View root = LayoutInflater.from(context).inflate(R.layout.reactions_pill, parent, false);
|
||||
EmojiImageView emojiView = root.findViewById(R.id.reactions_pill_emoji);
|
||||
TextView countView = root.findViewById(R.id.reactions_pill_count);
|
||||
View spacer = root.findViewById(R.id.reactions_pill_spacer);
|
||||
|
||||
if (reaction.displayEmoji != null) {
|
||||
emojiView.setText(reaction.displayEmoji);
|
||||
emojiView.setImageEmoji(reaction.displayEmoji);
|
||||
|
||||
if (reaction.count > 1) {
|
||||
countView.setText(String.valueOf(reaction.count));
|
||||
|
|
|
@ -2,29 +2,19 @@
|
|||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:minWidth="32dp"
|
||||
android:paddingStart="7dp"
|
||||
android:paddingEnd="7dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:gravity="center">
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
|
||||
android:id="@+id/reactions_pill_emoji"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14dp"
|
||||
tools:text="\u2764\ufe0f"
|
||||
android:includeFontPadding="false"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:emoji_forceCustom="true"
|
||||
tools:ignore="SpUsage" />
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/reactions_pill_spacer"
|
||||
|
@ -35,6 +25,8 @@
|
|||
android:id="@+id/reactions_pill_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textSize="12dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="@color/reactions_pill_text_color"
|
||||
|
|
Ładowanie…
Reference in New Issue