简体   繁体   中英

How to make a view fit a layout?

I have a main layout in which i'm adding dynamic view inflated, i do this add in scale with the main layout but in some cases the view exceeds the mainl layout height.How can i tell them to stick to the layout height and not cross over?

Thank you

Please provide the code, so that I can help you by analyzing it. Try using proper LayoutParams. why do you want to add View dynamically. If you can make it in XML, make it!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM