Buttonを拡張するボタンクラスを作成したいと思います。カスタムボタンをクリックすると、その上に円の形が表示され、円の形が表示されます。コードは好きです: publicクラスにMyButtonは{アンドロイドそれ以上のボタンを作成する
public GlowButton(Context context) {
super(context);
}
public GlowButton(Context context,AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean performClick() {
//Add the code for show the shape
return super.performClick();
}
} が、このことは可能ですボタンを拡張しますか?そして、ボタンの上にシェイプを作成するにはどうすればいいですか? ありがとうございます!
なぜ9パッチのグラフィックとトグルボタンを使用しないのですか? – trgraglia
@ trgragliaありがとう、詳細を説明できますか?図形はボタンよりも大きい –
9つのパッチグラフィックに精通していますか? http://developer.android.com/guide/developing/tools/draw9patch.html – trgraglia