Merge "Minor Copy/Paste overlay UI edits" into tm-dev am: 1c6f7596c2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17183294 Change-Id: I0e5512e46544acc04e2a096439e03a68a7662baf
This commit is contained in:
@@ -44,10 +44,10 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/copy_button"
|
app:layout_constraintStart_toStartOf="@+id/copy_button"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/share"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/attribution">
|
app:layout_constraintTop_toBottomOf="@+id/attribution">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
-->
|
-->
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
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"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:alpha="0"
|
android:alpha="0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -118,7 +119,8 @@
|
|||||||
android:autoSizeTextType="uniform"
|
android:autoSizeTextType="uniform"
|
||||||
android:autoSizeMinTextSize="10sp"
|
android:autoSizeMinTextSize="10sp"
|
||||||
android:autoSizeMaxTextSize="200sp"
|
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_width="@dimen/clipboard_preview_size"
|
||||||
android:layout_height="@dimen/clipboard_preview_size"/>
|
android:layout_height="@dimen/clipboard_preview_size"/>
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|||||||
@@ -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());
|
mDismissButton.setOnClickListener(view -> animateOut());
|
||||||
|
|
||||||
mEditChip.setIcon(Icon.createWithResource(mContext, R.drawable.ic_screenshot_edit), true);
|
mEditChip.setIcon(Icon.createWithResource(mContext, R.drawable.ic_screenshot_edit), true);
|
||||||
|
|||||||
Reference in New Issue
Block a user