Skip to content

Commit

Permalink
Small UI fix in room member profile hearder (#4700)
Browse files Browse the repository at this point in the history
Small ui fix on room member profile name

Co-authored-by: Claire Gizard <cgizard>
  • Loading branch information
Claire1817 authored Dec 16, 2021
1 parent 3b35be5 commit ca58a04
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
1 change: 1 addition & 0 deletions changelog.d/4700.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix name and shield are truncated in the room detail screen
54 changes: 30 additions & 24 deletions vector/src/main/res/layout/view_stub_room_member_profile_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
android:id="@+id/memberProfileInfoContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:layout_constraintBottom_toTopOf="@id/memberProfileNameView"
app:layout_constraintTop_toTopOf="@id/memberProfileNameView">

Expand All @@ -23,7 +23,7 @@
android:layout_height="128dp"
android:layout_marginBottom="16dp"
android:contentDescription="@string/avatar"
app:layout_constraintBottom_toTopOf="@id/memberProfileNameView"
app:layout_constraintBottom_toTopOf="@id/memberProfileLinearLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
Expand All @@ -45,30 +45,36 @@
tools:src="@drawable/ic_presence_offline"
tools:visibility="visible" />

<im.vector.app.core.ui.views.ShieldImageView
android:id="@+id/memberProfileDecorationImageView"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="8dp"
app:layout_constraintBottom_toBottomOf="@id/memberProfileNameView"
app:layout_constraintEnd_toStartOf="@id/memberProfileNameView"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/memberProfileNameView" />

<TextView
android:id="@+id/memberProfileNameView"
style="@style/Widget.Vector.TextView.Title"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/memberProfileLinearLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:textStyle="bold"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/memberProfileIdView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/memberProfileDecorationImageView"
app:layout_constraintTop_toBottomOf="@id/memberProfileAvatarView"
tools:text="@sample/users.json/data/displayName" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/memberProfileAvatarView">

<im.vector.app.core.ui.views.ShieldImageView
android:id="@+id/memberProfileDecorationImageView"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="8dp" />

<TextView
android:id="@+id/memberProfileNameView"
style="@style/Widget.Vector.TextView.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:gravity="center"
android:textStyle="bold"
tools:text="@sample/users.json/data/displayName" />

</LinearLayout>

<TextView
android:id="@+id/memberProfileIdView"
Expand All @@ -82,7 +88,7 @@
app:layout_constraintBottom_toTopOf="@id/memberProfilePowerLevelView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/memberProfileNameView"
app:layout_constraintTop_toBottomOf="@id/memberProfileLinearLayout"
tools:text="@sample/users.json/data/id" />

<TextView
Expand Down

0 comments on commit ca58a04

Please sign in to comment.