Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Button Padding in Android App

$
0
0

I have a Button with the following XML & Style:

<Button style="@style/EntryButton" android:text="8"/>

<style name="EntryButton">
    <item name="android:layout_width">60dp</item>
    <item name="android:layout_height">60dp</item>
    <item name="android:background">#c0c0c0</item>
    <item name="android:textColor">@android:color/black</item>
    <item name="android:layout_margin">2dp</item>
    <item name="android:padding">0dp</item>
    <item name="android:textSize">30dp</item>
</style>

This gives me the following in the emulator:

I want to shift the text upwards within the Button. I thought that adding an android:paddingBottom attribute like the following would do this:

<Button style="@style/EntryButton" android:text="8" android:paddingBottom="15dp"/>

But it did not seem to make any difference. What is the problem (or what should I do)? Thanks.


Viewing all articles
Browse latest Browse all 204402

Trending Articles