This video shows how to make one in two textviews selected or deselected in Sketchware.
The code used for creating GradientDrawable:-
android.graphics.drawable.GradientDrawable gd = new android.graphics.drawable.GradientDrawable();
gd.setColor(Color.WHITE);
gd.setStroke(1, Color.DKGRAY);
if (_textview == textview2){
float[] radii = {60, 60, 0, 0, 0, 0, 60, 60};
gd.setCornerRadii(radii);
} else {
float[] radii = {0, 0, 60, 60, 60, 60, 0, 0};
gd.setCornerRadii(radii);
}
_textview.setBackground(gd);