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

Commit 9c6e8f9c authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Minor Copy/Paste overlay UI edits

- update background color of text view to match buttons
- add padding to right edge of edit text activity TextView
- add ellipsis when text is cut off in preview

Bug: 223845368
Fix: 223845368
Bug: 223965587
Fix: 223965587
Bug: 223829956
Fix: 223829956
Test: manual (visual changes; tested in light and dark modes)
Change-Id: Ibcb276c34e402687a7954887d0574e60501d178b
parent 4e45ade9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,10 +43,10 @@
        android:layout_height="0dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintStart_toStartOf="@+id/copy_button"
        app:layout_constraintEnd_toEndOf="@id/share"
        app:layout_constraintTop_toBottomOf="@+id/attribution">

        <EditText
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
  -->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:alpha="0"
    android:layout_width="match_parent"
@@ -118,7 +119,8 @@
                      android:autoSizeTextType="uniform"
                      android:autoSizeMinTextSize="10sp"
                      android:autoSizeMaxTextSize="200sp"
                      android:textColor="?android:attr/textColorPrimary"
                      android:textColor="?attr/overlayButtonTextColor"
                      android:background="?androidprv:attr/colorAccentSecondary"
                      android:layout_width="@dimen/clipboard_preview_size"
                      android:layout_height="@dimen/clipboard_preview_size"/>
            <ImageView
+7 −0
Original line number Diff line number Diff line
@@ -190,6 +190,13 @@ public class ClipboardOverlayController {
            }
        });

        mTextPreview.getViewTreeObserver().addOnPreDrawListener(() -> {
            int availableHeight = mTextPreview.getHeight()
                    - (mTextPreview.getPaddingTop() + mTextPreview.getPaddingBottom());
            mTextPreview.setMaxLines(availableHeight / mTextPreview.getLineHeight());
            return true;
        });

        mDismissButton.setOnClickListener(view -> animateOut());

        mEditChip.setIcon(Icon.createWithResource(mContext, R.drawable.ic_screenshot_edit), true);