Hi everyone, just wanted to give this a bump. Anyone have this
problem? I really would like to include the padding in the XML so that
the correct padding is loaded with the correct layout auto-magically.
But without this I have to have this in the source....



On Oct 21, 8:02 pm, cyntacks <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This is a strange issue and I can't seem to figure out why it is
> happening. I have a set of ImageButtons in my xml Layout (inside of a
> Table/Row) which require padding. Here is a sample button:
>
> [code]
>         <ImageButton android:id="@+id/icon1" />
> [/code]
>
> I attempt to add padding to all 4 edges, like so:
>
> [code]
>         <ImageButton android:id="@+id/icon1"  android:padding="5sp" />
> [/code]
>
> But it doesn't work. BUT, if I add the padding to the button
> dynamically in the source, it does work. Like so:
>
> [code]
>         button.setPadding(5, 2, 5, 2);
> [/code]
>
> Any ideas what is going on here? This is killing me because the last
> thing I want to do is have the padding configured in the source, then
> it would have to be the same for each layout or I would have to add
> overhead into the code...
>
> As always, thanks for the help,
>
> Kevin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to