开发者

Update Height with ViewFlipper

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.


just use

ViewFlipper myflipper = (ViewFlipper)findViewById(R.id.myflipper);
myflipper .setMeasureAllChildren(false);

It will take height, and width of visible child only


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);
 }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜