mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 18:05:36 +03:00
Fix long text overlapping
This commit is contained in:
parent
fea3441bbf
commit
f0eae523d5
2 changed files with 69 additions and 55 deletions
|
@ -40,51 +40,59 @@
|
|||
<TextView
|
||||
android:id="@+id/titleText"
|
||||
style="@style/Widget.Vector.TextView.Body.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/avatar"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintEnd_toStartOf="@id/liveIndicator"
|
||||
app:layout_constraintStart_toEndOf="@id/avatarRightBarrier"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@sample/rooms.json/data/name" />
|
||||
|
||||
<androidx.constraintlayout.helper.widget.Flow
|
||||
android:id="@+id/metadataFlow"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/metadataGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:orientation="vertical"
|
||||
app:constraint_referenced_ids="broadcasterNameMetadata,bufferingMetadata,voiceBroadcastMetadata,listenersCountMetadata"
|
||||
app:flow_horizontalAlign="start"
|
||||
app:flow_verticalGap="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/liveIndicator"
|
||||
app:layout_constraintStart_toEndOf="@id/avatarRightBarrier"
|
||||
app:layout_constraintTop_toBottomOf="@id/titleText" />
|
||||
app:layout_constraintTop_toBottomOf="@id/titleText">
|
||||
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/broadcasterNameMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:metadataIcon="@drawable/ic_voice_broadcast_mic"
|
||||
tools:metadataValue="@sample/users.json/data/displayName" />
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/broadcasterNameMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:metadataIcon="@drawable/ic_voice_broadcast_mic"
|
||||
tools:metadataValue="@sample/users.json/data/displayName" />
|
||||
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastBufferingView
|
||||
android:id="@+id/bufferingMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastBufferingView
|
||||
android:id="@+id/bufferingMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/voiceBroadcastMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:metadataIcon="@drawable/ic_voice_broadcast"
|
||||
app:metadataValue="@string/attachment_type_voice_broadcast" />
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/voiceBroadcastMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:metadataIcon="@drawable/ic_voice_broadcast"
|
||||
app:metadataValue="@string/attachment_type_voice_broadcast" />
|
||||
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/listenersCountMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:metadataIcon="@drawable/ic_member_small"
|
||||
app:metadataValue="@string/no_value_placeholder"
|
||||
tools:metadataValue="5 listeners" />
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/listenersCountMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:metadataIcon="@drawable/ic_member_small"
|
||||
app:metadataValue="@string/no_value_placeholder"
|
||||
tools:metadataValue="5 listeners" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/headerBottomBarrier"
|
||||
|
@ -92,7 +100,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:barrierMargin="10dp"
|
||||
app:constraint_referenced_ids="roomAvatarImageView,titleText,metadataFlow" />
|
||||
app:constraint_referenced_ids="roomAvatarImageView,titleText,metadataGroup" />
|
||||
|
||||
<androidx.constraintlayout.helper.widget.Flow
|
||||
android:id="@+id/controllerButtonsFlow"
|
||||
|
|
|
@ -38,39 +38,45 @@
|
|||
<TextView
|
||||
android:id="@+id/titleText"
|
||||
style="@style/Widget.Vector.TextView.Body.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/avatar"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintEnd_toStartOf="@id/liveIndicator"
|
||||
app:layout_constraintStart_toEndOf="@id/avatarRightBarrier"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@sample/users.json/data/displayName" />
|
||||
tools:text="@sample/rooms.json/data/name" />
|
||||
|
||||
<androidx.constraintlayout.helper.widget.Flow
|
||||
android:id="@+id/metadataFlow"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/metadataGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:orientation="vertical"
|
||||
app:constraint_referenced_ids="listenersCountMetadata,remainingTimeMetadata"
|
||||
app:flow_horizontalAlign="start"
|
||||
app:flow_verticalGap="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/liveIndicator"
|
||||
app:layout_constraintStart_toEndOf="@id/avatarRightBarrier"
|
||||
app:layout_constraintTop_toBottomOf="@id/titleText" />
|
||||
app:layout_constraintTop_toBottomOf="@id/titleText">
|
||||
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/listenersCountMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:metadataIcon="@drawable/ic_member_small"
|
||||
app:metadataValue="@string/no_value_placeholder"
|
||||
tools:metadataValue="5 listening" />
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/listenersCountMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:metadataIcon="@drawable/ic_member_small"
|
||||
app:metadataValue="@string/no_value_placeholder"
|
||||
tools:metadataValue="5 listening" />
|
||||
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/remainingTimeMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:metadataIcon="@drawable/ic_timer"
|
||||
tools:metadataValue="3h 2m 50s left" />
|
||||
<im.vector.app.features.voicebroadcast.views.VoiceBroadcastMetadataView
|
||||
android:id="@+id/remainingTimeMetadata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:metadataIcon="@drawable/ic_timer"
|
||||
tools:metadataValue="3h 2m 50s left" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/headerBottomBarrier"
|
||||
|
@ -78,7 +84,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:barrierMargin="12dp"
|
||||
app:constraint_referenced_ids="roomAvatarImageView,titleText,metadataFlow" />
|
||||
app:constraint_referenced_ids="roomAvatarImageView,titleText,metadataGroup" />
|
||||
|
||||
<androidx.constraintlayout.helper.widget.Flow
|
||||
android:id="@+id/controllerButtonsFlow"
|
||||
|
|
Loading…
Reference in a new issue