Skip to content
Open
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
6 changes: 6 additions & 0 deletions changelog/unreleased/4800
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Add margin in members list for long display names in all cases

An extra margin has been added to the right side in the list of members when the display name is long, preventing the text from overflowing.

https://github.com/owncloud/android/issues/4781
https://github.com/owncloud/android/pull/4800
10 changes: 6 additions & 4 deletions owncloudApp/src/main/res/layout/member_item.xml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change the configuration (layout_width andlayout_marginEnd) of member_name and member_role elements? What would happen if the user has expiration date? 🤔

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The member_name was changed to match_parent and member_role to 0dp with layout_weight="1" to ensure the text fills available space correctly within the container. The layout_marginEnd was moved to the container LinearLayout instead. This works correctly with expiration date as well since the container handles the right margin for all child views.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, the member role is more important than the expiration date. So, if you assign weight to member_role, you should also assign weight (with lower priority) to expiration_date.

Anyway, you don’t need to fix that glitch in this PR, since we have a separate issue for that: #4793. Up to you! 😄

Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginEnd="@dimen/standard_half_margin"
android:orientation="vertical">

<TextView
android:id="@+id/member_name"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/standard_half_margin"
android:layout_marginStart="@dimen/standard_half_margin"
android:layout_marginBottom="@dimen/standard_quarter_margin"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this margin is not necessary 🤔

android:layout_gravity="center_vertical"
android:text="@string/placeholder_filename"
android:textSize="@dimen/two_line_primary_text_size"
Expand All @@ -60,16 +62,16 @@
android:maxLines="1"/>

<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:id="@+id/member_role"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="@dimen/standard_half_margin"
android:layout_marginEnd="@dimen/standard_half_margin"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove this margin?

android:layout_marginBottom="@dimen/standard_half_margin"
android:text="@string/placeholder_sentence"
android:textSize="13sp"
Expand Down