Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9384cb1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[DocsUI M3] Truncate long file names in the middle" into main

parents 69e782c2 e492d83c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@
                android:id="@android:id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:ellipsize="middle"
                android:singleLine="true"
                android:textAlignment="center"
                android:textAppearance="@style/FileItemLabelText" />
+6 −1
Original line number Diff line number Diff line
@@ -244,7 +244,12 @@ final class GridDocumentHolder extends DocumentHolder {

        mIconHelper.load(mDoc, mIconThumb, mIconMimeLg, mIconMimeSm);

        if (isUseMaterial3FlagEnabled()) {
            // Only Normal type works with ellipsize=middle.
            mTitle.setText(mDoc.displayName, TextView.BufferType.NORMAL);
        } else {
            mTitle.setText(mDoc.displayName, TextView.BufferType.SPANNABLE);
        }
        mTitle.setVisibility(View.VISIBLE);
        // Show the full name in a tooltip.
        itemView.setTooltipText(mDoc.displayName);