2012年7月5日 星期四

Android modify View's properties in Code

we sometimes need to change View's properties in Code.
try this demo code.
//change color
colorBtn.setTextColor(0xFF000000);

//change text size
sizeBtn.setTextSize(14);

//change gravity
gravityBtn.setGravity(android.view.Gravity.BOTTOM);

沒有留言:

張貼留言