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