avatar  

Log out

Recently viewed tickets

GUI Buttons layout used

The buttons got a minimum height op 50dp.
The width of the button is the same as the screen.
The paddingstart and padding end of the button is 16dp.
The padding of the container of the buttons ia also 16dp.

If you add the "style="@style/sdk_button_style"" tag to the button layout xml, then the button will automatically inherit the style of the sdk.

The button shape can be changed by overriding:
<dimen name="sdk_button_corner_radius">25dp</dimen>
This is the half of the button height.

Additional customizing.
<!-- button -->
<color name="sdk_button_color">@color/sdk_secondary_color</color>
<color name="sdk_button_pressed_color">@color/sdk_secondary_pressed_color</color>
<color name="sdk_button_disabled_color">#CCCCCC</color>
<color name="sdk_button_text_color">#FFFFFF</color>
<color name="sdk_button_pressed_text_color">#00343E</color>
<color name="sdk_button_disabled_text_color">#434343</color>
<color name="sdk_button_border_color">@color/sdk_button_color</color>
<color name="sdk_button_pressed_border_color">@color/sdk_button_pressed_color</color>
<color name="sdk_button_disabled_border_color">@color/sdk_button_disabled_color</color>

<style name="sdk_button_style" parent="@style/Widget.AppCompat.Button">
<item name="android:minHeight">@dimen/sdk_button_height</item>
<item name="android:paddingStart">16dp</item>
<item name="android:paddingEnd">16dp</item>
<item name="android:layout_marginStart">8dp</item>
<item name="android:layout_marginEnd">8dp</item>
<item name="android:gravity">center</item>
<item name="android:stateListAnimator">@null</item>
<item name="android:drawableEnd">@drawable/button_forward_arrow</item>
<item name="android:background">@drawable/button_background</item>
<item name="android:textColor">@color/button_text_color</item>
<item name="android:textSize">16sp</item>
<item name="android:textAllCaps">false</item>
</style>

On iOS you can set `buttonCornerRadius` and `buttonTextWeight` on the ResourcesConfiguration.


The button height can be "set" by adjusting `buttonContentInsets` on the ResourcesConfiguration. Default: UIEdgeInsets(top: 12.0, left: 8.0, bottom: 12.0, right: 8.0)
Creation date: 06/04/2018 07:32 ()      Updated: 01/11/2019 12:29 (ronny@idmee.no)