Merge "Minor Copy/Paste overlay UI edits" into tm-dev
This commit is contained in:
@@ -44,10 +44,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user