Merge pull request #1967 from osodebailar/bugfix/fix-wrong-button-style
fix button style
This commit is contained in:
commit
7f3e29eb84
5 changed files with 8 additions and 2 deletions
|
@ -312,7 +312,7 @@ class ActionsFragment : DaggerFragment() {
|
||||||
for (customAction in customActions) {
|
for (customAction in customActions) {
|
||||||
if (!customAction.isEnabled) continue
|
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)
|
btn.text = rh.gs(customAction.name)
|
||||||
|
|
||||||
val layoutParams = LinearLayout.LayoutParams(
|
val layoutParams = LinearLayout.LayoutParams(
|
||||||
|
|
|
@ -582,7 +582,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
||||||
for (event in events)
|
for (event in events)
|
||||||
if (event.isEnabled && event.trigger.shouldRun())
|
if (event.isEnabled && event.trigger.shouldRun())
|
||||||
context?.let { context ->
|
context?.let { context ->
|
||||||
SingleClickButton(context).also {
|
SingleClickButton(context, null, R.attr.customBtnStyle).also {
|
||||||
it.setTextColor(rh.gac(context, R.attr.treatmentButton))
|
it.setTextColor(rh.gac(context, R.attr.treatmentButton))
|
||||||
it.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10f)
|
it.setTextSize(TypedValue.COMPLEX_UNIT_SP, 10f)
|
||||||
it.layoutParams = LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 0.5f).also { l ->
|
it.layoutParams = LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 0.5f).also { l ->
|
||||||
|
|
|
@ -248,6 +248,8 @@
|
||||||
<item name="crossTargetColor">@color/white</item>
|
<item name="crossTargetColor">@color/white</item>
|
||||||
<!---Spinner style from pump common-->
|
<!---Spinner style from pump common-->
|
||||||
<item name="android:spinnerItemStyle">@style/CommonSpinnerItemStyle</item>
|
<item name="android:spinnerItemStyle">@style/CommonSpinnerItemStyle</item>
|
||||||
|
<!---Custom button -->
|
||||||
|
<item name="customBtnStyle">@style/GrayButton</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -218,4 +218,6 @@
|
||||||
<!---Icons in Loop area -->
|
<!---Icons in Loop area -->
|
||||||
<attr name="profileColor" format="reference|color" />
|
<attr name="profileColor" format="reference|color" />
|
||||||
<attr name="crossTargetColor" format="reference|color" />
|
<attr name="crossTargetColor" format="reference|color" />
|
||||||
|
<!---Custom button -->
|
||||||
|
<attr name="customBtnStyle" format="reference"/>
|
||||||
</resources>
|
</resources>
|
|
@ -249,6 +249,8 @@
|
||||||
<item name="crossTargetColor">@color/white</item>
|
<item name="crossTargetColor">@color/white</item>
|
||||||
<!---Spinner style from pump common-->
|
<!---Spinner style from pump common-->
|
||||||
<item name="android:spinnerItemStyle">@style/CommonSpinnerItemStyle</item>
|
<item name="android:spinnerItemStyle">@style/CommonSpinnerItemStyle</item>
|
||||||
|
<!---Custom button -->
|
||||||
|
<item name="customBtnStyle">@style/GrayButton</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="CommonSpinnerItemStyle" parent="Widget.AppCompat.TextView.SpinnerItem">
|
<style name="CommonSpinnerItemStyle" parent="Widget.AppCompat.TextView.SpinnerItem">
|
||||||
|
|
Loading…
Reference in a new issue