I have a button coded as below
<Button
android:id="@+id/btn_register"
style="@style/MyButtonStyle"
android:layout_width="20dp"
android:layout_height="10dp"
android:text="@string/word_text" />
My style is as below.
<style name="MyButtonStyle" >
<item name="android:textColor">@color/colorWhite</item>
<item name="android:textAllCaps">false</item>
<item name="android:textSize">@dimen/text_size_medium_small</item>
<item name="android:stateListAnimator">@null</item>
<item name="android:elevation">@dimen/elevation_standard</item>
<item name="android:backgroundTint">@color/colorPrimary</item>
</style>
If I view on Nexus 5 Android M, the button disappear without any height. If I view on Samsung S7 Android M, it shows the 10dp height.
If I have something bigger than 10dp height or wrap_content, the Samsung S7 shows a thicker button than Nexus 5. Any reason why is this happening? How could I make the height consistent?