Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #view #width #programmatically #android
ADD COMMENT
Topic
Name
2+6 =