set top corner of shape radius programmatically android

Solutions on MaxInterview for set top corner of shape radius programmatically android by the best coders in the world

showing results for - "set top corner of shape radius programmatically android"
Fynn
17 Jan 2020
1 GradientDrawable shape =  new GradientDrawable();
2 shape.setCornerRadius( 8 );
3
4 // add some color
5 // You can add your random color generator here
6 // and set color
7 if (i % 2 == 0) {
8  shape.setColor(Color.RED);
9 } else {
10  shape.setColor(Color.BLUE);
11 }
12
13 // now find your view and add background to it
14 View view = (LinearLayout) findViewById( R.id.my_view );
15 view.setBackground(shape);
queries leading to this page
top rounded corners androidandroid drawable rounded corners programmaticallytop corners round android shapeandroid round corner xmltop rounded corners stroke androidconstraint layout border radius dynamic backgroundhow to change radis of a shape programatcally kotlinhow to set card corner radius programmatically androidlayout corner radius androidprogramatically set button backgroudn roundedandroid layout rounded corners programmaticallyrounded corner android xandroid top left radius shapeandroid linear layout add radius on top cornerhow to set a corner curve to only 1 side of the view in androidset corner radius programmatically androidandroid set corners programmaticallybackground corner radius androidandroid corner radius programmaticallyandroid xml top corner radius onlyandroid linearlayout rounded corners programmaticallyhow to set the radius of framelayout in android programmaticallyview corner radius dynamically androidadd corner radius androidset corner radius android programmaticallyandroid button radius programmaticallyandroid how to change background radius programmaticallyhow to set corner radius for layout in android programmaticallyandroid shape corner radius top leftandroid button rounded corners programmaticallyandroid set rounded corners programmaticallyandroid button set corner radius programmaticallyhow to set background in corner android set button shape programmaticallyhow to take corner radius just in the top android xmlhow to make textview rounded programmaticallyandroid gradient drawable set cornersround background drawable javahow to set card corner radius for each corner programmatically androidadd corner radius view androidset top corner of shape radius programmatically androidandroid studio give border radius through java fileandroid set border radius programmaticallyrounded corners view android programmaticallyandroid layout only top rounded corners programmaticallycorner radius of layout androidandroid button border radius programmaticallyset top corner of shape radius programmatically android