Is it possible to set the wid开发者_运维技巧th of the button while clicking the same button ?
final Button button = (Button) findViewById(R.id.Button01);
int pixels = 30;
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
button.setWidth(pixels);
}
});
精彩评论