Widget - Style Button

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);

Komentar

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

TextInputLayout in Sketchware

How to find and​ highlight a word in a text field in Sketchware?

A Flash Light App in Sketchware

How to enable download in webview in Sketchware apps?

Intent - Open File By Type

Code for implementing Notifications in Sketchware

How to share an image from Drawable folder?

ActionBar back button

Animation Transtition Animation