add an Arrow back and Clipboard label at the toolbar
This commit is contained in:
parent
9dabc77fe7
commit
ea0cfed492
|
@ -285,6 +285,8 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||
|
||||
mClipboardManagerHolder?.apply {
|
||||
clipboard_manager_holder.background = ColorDrawable(mBackgroundColor.darkenColor())
|
||||
clipboard_manager_close.applyColorFilter(mTextColor)
|
||||
clipboard_manager_label.setTextColor(mTextColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -346,6 +348,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||
handleClipboard()
|
||||
}
|
||||
}
|
||||
|
||||
mClipboardManagerHolder!!.apply {
|
||||
clipboard_manager_close.setOnClickListener {
|
||||
mClipboardManagerHolder!!.clipboard_manager_holder.beGone()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -104,6 +104,37 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/toolbar_holder" />
|
||||
app:layout_constraintTop_toTopOf="@+id/toolbar_holder">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/clipboard_manager_top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/clipboard_manager_close"
|
||||
android:layout_width="@dimen/toolbar_icon_height"
|
||||
android:layout_height="@dimen/toolbar_icon_height"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/medium_margin"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/clipboard"
|
||||
android:padding="@dimen/small_margin"
|
||||
android:src="@drawable/ic_arrow_left_vector" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/clipboard_manager_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/medium_margin"
|
||||
android:layout_toEndOf="@+id/clipboard_manager_close"
|
||||
android:text="@string/clipboard"
|
||||
android:textSize="@dimen/big_text_size" />
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
Loading…
Reference in New Issue