I'm trying to change the width of an ImageView to ...
# android
t
I'm trying to change the width of an ImageView to show progress - but for some reason it's not working, here's the below code (it's a quiz app, each question that you answer [whether it be incorrect or correct], the ImageView's width will increase)
Copy code
progBar.getLayoutParams().width = (DisplayMetrics().heightPixels / quizInstance.questions.size) * ++indx
progBar.getLayoutParams().height = 100
progBar.requestLayout()
stackoverflow 4