I want to make Column graph, that each Column is in fact int variable from my java. I made all the buttons and Ijust have to put somehow the variables in the buttons's layout_height.
so anyone know how to do it?
CodePudding user response:
You can use the Databinding to achieve this.please refer to this link!
CodePudding user response:
Button btnFirst = findViewById(R.id.btnFirst);
//change height
btnFirst.setLayoutParams(new LinearLayout.LayoutParams(5, 5));
//change text
btnFirst.setText("your text");