Java Code Examples for android.widget.Button.getWidth()

The following are Jave code examples for showing how to use getWidth() of the android.widget.Button class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: RoundButton   File: RoundButton.java   Source Code and License Vote up 5 votes
public ButtonProperty(Button button) {
    width = button.getWidth();
    height = button.getHeight();
    text = button.getText().toString();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        drawables = button.getCompoundDrawablesRelative();
    } else {
        drawables = button.getCompoundDrawables();
    }
}