Answers for "set view width programmatically android"

1

how to set view width programmatically in android

View view = findViewById(R.id.nutrition_bar_filled);
LayoutParams layoutParams = view.getLayoutParams();
layoutParams.width = newWidth;
view.setLayoutParams(layoutParams);
Posted by: Guest on April-19-2020
0

set view size android

someView.setLayoutParams(new LayoutParams(width, height));
Posted by: Guest on June-16-2020

Code answers related to "set view width programmatically android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language