Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small UI fix in room member profile hearder #4700

Merged
merged 5 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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