Widget - Style Button

Anmol dwivedi
0

android.graphics.drawable.GradientDrawable style = new android.graphics.drawable.GradientDrawable();
style.setCornerRadius((float)20);
style.setColor(new android.content.res.ColorStateList(new int[][] {{ -android.R.attr.state_pressed} , {android.R.attr.state_pressed}}, new int [] {Color.parseColor("#FF0000"), Color.parseColor("#000000")}));
style.setStroke((int)5, new android.content.res.ColorStateList(new int [][] {{ -android.R.attr.state_pressed}, {android.R.attr.state_pressed}}, new int [] {Color.parseColor("#0000FF"), Color.parseColor("#00FF00")}));
button1.setBackground(style);

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)
Our website uses cookies to enhance your experience. Learn More
Accept !