Skip to content

Commit 04e7e51

Browse files
authored
Merge pull request #4380 from Prakhar1701/fix/long_display_name
[BUG] Fix display name truncation issue with ellipsis
2 parents aa52a8d + 07d6ceb commit 04e7e51

4 files changed

Lines changed: 18 additions & 1 deletion

File tree

changelog/unreleased/4351

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Bugfix: Resolve incorrect truncation of long display names in Manage Accounts view
2+
3+
Resolved the bug where long display names were truncated incorrectly in the Manage Accounts view.
4+
Now, display names are properly truncated in the middle with ellipsis (...) to maintain readability.
5+
6+
https://github.com/owncloud/android/issues/4351
7+
https://github.com/owncloud/android/pull/4380

owncloudApp/src/main/java/com/owncloud/android/presentation/releasenotes/ReleaseNotesViewModel.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ class ReleaseNotesViewModel(
105105
subtitle = R.string.release_notes_4_3_0_subtitle_password_generator,
106106
type = ReleaseNoteType.ENHANCEMENT
107107
),
108+
ReleaseNote(
109+
title = R.string.release_notes_4_3_0_title_display_name_truncation,
110+
subtitle = R.string.release_notes_4_3_0_subtitle_display_name_truncation,
111+
type = ReleaseNoteType.BUGFIX
112+
),
108113
)
109114
}
110115
}
116+

owncloudApp/src/main/res/layout/account_item.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,19 @@
5252

5353
<TextView
5454
android:id="@+id/name"
55-
android:layout_width="210dp"
55+
android:layout_width="0dp"
5656
android:layout_height="28dp"
5757
android:layout_marginStart="8dp"
5858
android:layout_marginTop="8dp"
59+
android:ellipsize="middle"
5960
android:gravity="bottom"
6061
android:maxLines="1"
6162
android:text="@string/placeholder_filename"
6263
android:textColor="@color/textColor"
6364
android:textSize="16sp"
6465
android:textStyle="bold"
6566
app:layout_constraintBottom_toTopOf="@+id/account"
67+
app:layout_constraintEnd_toStartOf="@+id/clean_account_local_storage_button"
6668
app:layout_constraintStart_toEndOf="@+id/ticker"
6769
app:layout_constraintTop_toTopOf="parent" />
6870

owncloudApp/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@
748748
<string name="release_notes_4_3_0_subtitle_improvements_remove_dialog">Added a custom dialog when the file that is going to be deleted has thumbnail and added the number of files that are going to be deleted in a multiple selection</string>
749749
<string name="release_notes_4_3_0_title_password_generator">Password generator for public links</string>
750750
<string name="release_notes_4_3_0_subtitle_password_generator">Passwords for public links can be now generated via a new generator in Infinite Scale accounts</string>
751+
<string name="release_notes_4_3_0_title_display_name_truncation">Resolved the bug where long display names were truncated incorrectly</string>
752+
<string name="release_notes_4_3_0_subtitle_display_name_truncation">Display names are now properly truncated in the middle with ellipsis (…) to maintain readability</string>
751753

752754
<!-- Open in web -->
753755
<string name="ic_action_open_in_web">Open in web</string>

0 commit comments

Comments
 (0)