2013年9月2日星期一

android how to set the size of the background image adaptive

What I mean is this, I have a TextView, want to set its background image, background picture will be based on the size of the share TextView automatic scaling , but because of the background image is relatively large , resulting in the space occupied by TextView swell with background images I wanted to ask is , how to set a background image to make goes TextView automatically scaled to fit the size of the original space occupied , thank
------ Solution ------------ --------------------------------
TextView attributes android: layout_height and android: layout_width is wrap_content you set it ?
into a fixed value , such as :
android: layout_height = "60dip"
android: layout_width = "60dip"
------ Solution ---------------------------- ----------------
set to a fixed value
------ Solution ---------------- ----------------------------
can use .9. png format images as a background , it should meet ,
------ reference ---------------------------------------

+1
------ reference ---------------------------------- -----
  This reply was moderator deleted at 2012-05-17 09:51:13

------ reference ------------------------------------ ---
this effect is correct
------ reference ----------------------------- ----------
fixed size , and demand is inconsistent.
requirements are as follows :
1. TextView size , along with the text how much it will change its size , can not be fixed . Ie, text and more , View it bigger .
2. while the background image, and the TextView can always maintain the same size , that image size, size of the decision by the TextView , rather than by the picture decision.
------ reference --------------------------------------- < br> Why use a .9. png picture or not?

没有评论:

发表评论