mirror of
https://github.com/afollestad/nock-nock.git
synced 2025-04-20 03:25:14 +00:00
Fix script input layout background color
This commit is contained in:
parent
9514a5ec83
commit
e39093b526
8 changed files with 10 additions and 18 deletions
|
@ -123,7 +123,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/content_inset"
|
||||
android:layout_marginTop="@dimen/content_inset_half"
|
||||
android:background="@color/lighterGray"
|
||||
android:background="?scriptLayoutBackground"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/content_inset"
|
||||
android:layout_marginTop="@dimen/content_inset_half"
|
||||
android:background="@color/lighterGray"
|
||||
android:background="?scriptLayoutBackground"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
<attr format="color" name="toolbarTitleColor"/>
|
||||
<attr format="color" name="dividerColor"/>
|
||||
<attr format="color" name="iconColor"/>
|
||||
<attr format="color" name="scriptLayoutBackground"/>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
<color name="colorPrimary_darkTheme">#212121</color>
|
||||
<color name="colorPrimaryDark_darkTheme">#252525</color>
|
||||
|
||||
<color name="lighterGray">#303030</color>
|
||||
<color name="darkerGray">#303030</color>
|
||||
<color name="lighterGray">#EEEEEE</color>
|
||||
|
||||
<color name="colorAccent">#FF6E40</color>
|
||||
<color name="colorAccent_pressed">#E44615</color>
|
||||
<color name="colorAccent_translucent">#40FF6E40</color>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<style name="PrimaryDarkButton" parent="Widget.MaterialComponents.Button">
|
||||
<item name="android:textColor">#fff</item>
|
||||
<item name="backgroundTint">@color/lighterGray</item>
|
||||
<item name="backgroundTint">@color/darkerGray</item>
|
||||
<item name="android:fontFamily">@font/lato</item>
|
||||
</style>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<item name="toolbarTitleColor">#000000</item>
|
||||
<item name="dividerColor">#EEEEEE</item>
|
||||
<item name="iconColor">#000000</item>
|
||||
<item name="scriptLayoutBackground">@color/lighterGray</item>
|
||||
|
||||
<item name="android:textColorPrimary">#212121</item>
|
||||
<item name="android:textColorSecondary">#727272</item>
|
||||
|
@ -33,6 +34,7 @@
|
|||
<item name="toolbarTitleColor">#ffffff</item>
|
||||
<item name="dividerColor">#303030</item>
|
||||
<item name="iconColor">#FFFFFF</item>
|
||||
<item name="scriptLayoutBackground">@color/darkerGray</item>
|
||||
|
||||
<item name="android:textColorPrimary">#FFFFFF</item>
|
||||
<item name="android:textColorSecondary">#F0F0F0</item>
|
||||
|
|
|
@ -18,7 +18,6 @@ package com.afollestad.nocknock.viewcomponents.ext
|
|||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.ViewTreeObserver
|
||||
import androidx.annotation.DimenRes
|
||||
import com.afollestad.vvalidator.form.Condition
|
||||
|
||||
|
@ -32,18 +31,6 @@ fun View.hide() {
|
|||
|
||||
fun View.showOrHide(show: Boolean) = if (show) show() else hide()
|
||||
|
||||
fun View.onLayout(cb: () -> Unit) {
|
||||
if (this.viewTreeObserver.isAlive) {
|
||||
this.viewTreeObserver.addOnGlobalLayoutListener(
|
||||
object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
cb()
|
||||
this@onLayout.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun View.dimenFloat(@DimenRes res: Int) = resources.getDimension(res)
|
||||
|
||||
fun View.dimenInt(@DimenRes res: Int) = resources.getDimensionPixelSize(res)
|
||||
|
|
|
@ -52,7 +52,7 @@ class JavaScriptInputLayout(
|
|||
contentInset // bottom
|
||||
)
|
||||
elevation = dimenFloat(dimen.default_elevation)
|
||||
inflate(context, layout.javascript_input_layout, this)
|
||||
inflate(context, R.layout.javascript_input_layout, this)
|
||||
}
|
||||
|
||||
fun attach(
|
||||
|
|
Loading…
Add table
Reference in a new issue