mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-03-18 20:40:07 +01:00
show a divider at the top of the keyboard at white or black bg
This commit is contained in:
parent
5058167c04
commit
ddcbd7751f
app/src/main
@ -282,7 +282,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
val layerDrawable = rippleBg.findDrawableByLayerId(R.id.clipboard_background_holder) as LayerDrawable
|
||||
layerDrawable.findDrawableByLayerId(R.id.clipboard_background_shape).applyColorFilter(mBackgroundColor)
|
||||
|
||||
val wasDarkened = mBackgroundColor != mBackgroundColor.darkenColor()
|
||||
mToolbarHolder?.apply {
|
||||
top_keyboard_divider.beGoneIf(wasDarkened)
|
||||
|
||||
background = ColorDrawable(mBackgroundColor.darkenColor())
|
||||
clipboard_value.apply {
|
||||
background = rippleBg
|
||||
@ -296,6 +299,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||
}
|
||||
|
||||
mClipboardManagerHolder?.apply {
|
||||
top_clipboard_divider.beGoneIf(wasDarkened)
|
||||
clipboard_manager_holder.background = ColorDrawable(mBackgroundColor.darkenColor())
|
||||
clipboard_manager_close.applyColorFilter(mTextColor)
|
||||
clipboard_manager_manage.applyColorFilter(mTextColor)
|
||||
|
@ -83,6 +83,16 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/top_keyboard_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.simplemobiletools.keyboard.views.MyKeyboardView
|
||||
@ -196,5 +206,16 @@
|
||||
app:spanCount="2" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/top_clipboard_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user