fix button style

This commit is contained in:
osodebailar 2022-07-27 09:45:09 +02:00
parent 0734b4c620
commit ff378579c4
5 changed files with 8 additions and 2 deletions

View file

@ -312,7 +312,7 @@ class ActionsFragment : DaggerFragment() {
for (customAction in customActions) {
if (!customAction.isEnabled) continue
val btn = SingleClickButton(currentContext, null, android.R.attr.buttonStyle)
val btn = SingleClickButton(currentContext, null, R.attr.customBtnStyle)
btn.text = rh.gs(customAction.name)
val layoutParams = LinearLayout.LayoutParams(

View file

@ -582,7 +582,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
for (event in events)
if (event.isEnabled && event.trigger.shouldRun())
context?.let { context ->
SingleClickButton(context).also {
SingleClickButton(context, null, R.attr.customBtnStyle).also {
it.setTextColor(rh.gac(context, R.attr.treatmentButton))
it.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10f)
it.layoutParams = LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 0.5f).also { l ->

View file

@ -248,6 +248,8 @@
<item name="crossTargetColor">@color/white</item>
<!---Spinner style from pump common-->
<item name="android:spinnerItemStyle">@style/CommonSpinnerItemStyle</item>
<!---Custom button -->
<item name="customBtnStyle">@style/GrayButton</item>
</style>

View file

@ -218,4 +218,6 @@
<!---Icons in Loop area -->
<attr name="profileColor" format="reference|color" />
<attr name="crossTargetColor" format="reference|color" />
<!---Custom button -->
<attr name="customBtnStyle" format="reference"/>
</resources>

View file

@ -249,6 +249,8 @@
<item name="crossTargetColor">@color/white</item>
<!---Spinner style from pump common-->
<item name="android:spinnerItemStyle">@style/CommonSpinnerItemStyle</item>
<!---Custom button -->
<item name="customBtnStyle">@style/GrayButton</item>
</style>
<style name="CommonSpinnerItemStyle" parent="Widget.AppCompat.TextView.SpinnerItem">