Today I encountered a quit weird layout issue and I have not found out any helpful answer from Google.
On my layout, I have a button with text on the left and an icon on the right. I want the text to be 20dp left margin to the border of the button then I set paddingLeft to the button but it's not working. By chance, I set background color for the button and the padding works like charm. Anyone can help me explain this thing.
The layout is as below
<Buttonandroid:layout_width="fill_parent"
        android:drawableRight="@drawable/right_arrow"
        android:paddingLeft="20dp"
        android:paddingRight="20dp"
        android:layout_height="72dp"
        android:text="Button"
        android:id="@+id/btn"
        android:gravity="center_vertical"
        android:fontFamily="roboto regular"
        android:textColor="#ffffff00"
        style="@android:style/Widget.DeviceDefault.Button.Borderless" />
Thank you all!
 
     
     
     
    