开发者

Text not showing if image on background

i am tried set image on background of textview. All ok but .. when i "setText("blyablya")" than text not showing. I am tried to use setBackgroundResource and setBackgroundDrawable... but always on background only image and i can't see text from TextView (((

Please can anyone help me ??

simple code :

//tit - TextView tit
tit.setText("blabla");
        tit.setTextColor(Color.BLACK);
        tit.setBackgroundDrawable(getResource开发者_开发技巧s().getDrawable(R.drawable.popup_title));

added after help : if normal drawable than all ok but if background drawable is a 9patch than this might help you.


If your background drawable is a 9patch, check that the content area (defined by bottom and right black lines) is wide enough to contain the text, because it might be hidden by the padding itself.

(thanks @Peter)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜