Design Cool List UI in Sketchware
Welcome Guys I hope you are doing well π
In this topic I will show you how to design a better list UI
FOLLOW ME
- Add linear layout
- Add listview
- Create custom view
- Link your listview with custom view
- create string "s"
- Create list map "map"
- Add items to your list map
Codes used :
On create add this code :
listview1.setDivider(null);
listview1.setDividerHeight(15);
listview1.setVerticalScrollBarEnabled(false);
In listview1 : onBindCustomView add this code :
textview1.setText(s.substring(0,1));
Random rnd = new Random();
int color = Color.argb(255, rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256));
android.graphics.drawable.GradientDrawable gd = new android.graphics.drawable.GradientDrawable();
gd.setColor(color);
gd.setCornerRadius(600);
gd.setStroke(2, Color.WHITE);
textview1.setBackground(gd);
android.graphics.drawable.RippleDrawable ripdr = new android.graphics.drawable.RippleDrawable(new android.content.res.ColorStateList(new int[][]{new int[]{}}, new int[]{ Color.parseColor("#B0BEC5")}), new android.graphics.drawable.ColorDrawable(Color.WHITE), null);
linear1.setBackground(ripdr);
linear1.setElevation((int)16);
I can Design better than you see mine
ReplyDelete