How to fill the image according to percentage of textview.and it should change according to percentage of textview.below is my code so please check.
if u want to change the opacity then you can simply set the opacity according to the value in textview usinf setalpha method.
I have a good idea to solve this simply try it your self.
Put your imageview in a linear/relative layout set the heightto the max width that u want to assign for the image view.
Then initially set the heightof the image view to zero
Then depending on the value from textview set the height of the image view programatically
int x=Integer.parseInt(battery.getText().toString());
image_level.getLayoutParams().height = x;