I want to be able to update height on every child of the ViewFlipper. Is this possible as I could never find any API documentation for ViewFlipper and updating the height or width.
Update Height with ViewFlipper
Asked Answered
just use
ViewFlipper myflipper = (ViewFlipper)findViewById(R.id.myflipper);
myflipper .setMeasureAllChildren(false);
It will take height, and width of visible child only
Worked like a charm :) –
Generator
You're just going to have to loop through:
LayoutParams myLP = new LayoutParams(myHeight, myWidth);
for (int i = 0; i < myViewFlipper.getChildCount(); i++) {
myViewFlipper.getViewAt(i).setLayoutParams(myLP);
}
© 2022 - 2024 — McMap. All rights reserved.