Question : how to set view width programmatically in android
Answered by : attractive-addax-ptay7wwsjrdv
View view = findViewById(R.id.nutrition_bar_filled);
LayoutParams layoutParams = view.getLayoutParams();
layoutParams.width = newWidth;
view.setLayoutParams(layoutParams);
Source : https://stackoverflow.com/questions/10159372/android-view-layout-width-how-to-change-programmatically/10160317 | Last Update : Sun, 26 Apr 20