Android set height and width of Custom view programmatically

前端 未结 6 1675
感情败类
感情败类 2020-11-28 21:06

I have created a custom view named Graphview . Here is the structure for the GraphView class.

public class GraphView extends View {

    public          


        
6条回答
  •  囚心锁ツ
    2020-11-28 21:29

    spin12.setLayoutParams(new LinearLayout.LayoutParams(200, 120));
    

    spin12 is your spinner and 200,120 is width and height for your spinner.

提交回复
热议问题