Color gradient in Sketchware



Code:-


int[] colors = {Color.rgb(138,41,81),Color.rgb(41,53,158)};
android.graphics.drawable.GradientDrawable gd = new android.graphics.drawable.GradientDrawable(android.graphics.drawable.GradientDrawable.Orientation.BR_TL, colors);
gd.setCornerRadius(0f); 
gd.setStroke(0,Color.WHITE);
if(android.os.Build.VERSION.SDK_INT >= 16) {linear1.setBackground(gd); } else {linear1.setBackgroundDrawable(gd);}

Comments

  1. How to launch app by name like we can launch app in google Assistant ?

    ReplyDelete
  2. Please add your video for better understanding.

    ReplyDelete

Post a Comment

Popular posts from this blog

Background video in Sketchware