i guess you could try android:scaleType attribute.

On Jun 9, 2:06 pm, Stanley Li <[email protected]> wrote:
> Hi all,
>
> I try to make a button with a background image. However, the background
> image is scaled down.
>
> In my xml code, I have:
>
> <Button
> android:id="@+id/start_game_button"
> android:layout_width="480px"
> android:layout_height="wrap_content"
> android:text="@string/Start_Game"
> android:textSize="25dip"
> android:layout_gravity="center_horizontal"
> android:background="@drawable/startgame_button"
> />
>
> The background image is 400X100. However, when it goes to the screen
> (480X854), the image is much smaller than 400 pixel wide.
>
> If i use an image of 480X100, the image still can't fit the whole screen.
>
> It seems there is a relationship between layout_width and the size of the
> background image. For example, when i set layout_width=700px, the background
> image's width is increased but it still can't fit the whole screen
> horizontally.
>
> Can any help me with this?
>
> Thanks so much.
>
> Stanley

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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