Android button styling looks different on different devices (AOSP and Samsung Galaxy)
<p>I am devloping an app which I am testing on the OnePlus 3 and the Samsung Galaxy Tab A. The tablet is a recent addition to my list and all the development until now was on the OnePlus 3.</p>

<p>My problem is that the same button rendors differently on the Galaxy Tablet than on the OnePlus 3.</p>

<p>Previously I had tried the app on the Nexus 9 emulator in Android Studio and it rendored as it should. This makes me feel that Samsung has messed with something which is changing the look of my button. </p>

<p>To put the problem more exactly, the button background fills the entire view on the tablet as is visible in the screenshot. I want to make it like a normal android button.</p>

<p>The code of my button is like this</p>

<pre><code>&lt;Button
    android:id="@+id/outputButton"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="-4dp"
    android:text=""
    android:textSize="13sp"/&gt;
</code></pre>

<p>I can get the same look on both of them if I specify a background (btn_default) on the button. But that obviously causes the animations of the button to not work anymore.
According to my understanding, the default style (Widget.AppCompat.Button; which I also tried stating explicitly) should also use the default background (btn_default) but there seems to be some flaw with my understanding of this.</p>

<p>So how do I get the same look on both the devices?</p>

<p>Galaxy Tab A - </p>

<p><a href="https://i.stack.imgur.com/SxFqt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SxFqt.png" alt="enter image description here"></a>
<a href="https://i.stack.imgur.com/AvV48.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AvV48.png" alt="enter image description here"></a></p>

<p>OnePlus 3 - </p>

<p><a href="https://i.stack.imgur.com/MMGYa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MMGYa.png" alt="enter image description here"></a>
<a href="https://i.stack.imgur.com/rnjSS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rnjSS.png" alt="enter image description here"></a></p>