Ask about Android's layout_weight problem!!!!!!!!!!!!!!!!!!!!!!!!!

Source: Internet
Author: User

============ Problem Description ============


The following specific code, just self-taught Android, ask the master to see the problem there is not, the view is displayed in the simulator is not the same.

============ Solution 1============


ImageView ...

============ Solution 2============


Sorry to have inadvertently submitted, your ImageView height is set to 0dip

============ Solution 3============


Sometimes the emulator display and the XML above is inconsistent, because the compilation problem, Layout_weight=1 will be compiled first, you click on it will come out

============ Solution 4============


Try not to have this problem. Did you change ImageView's visibility?

============ Solution 5============


Height of 0DP when the right to occupy a lot of weight, the height of the matchparent time, a large proportion of the small. You can also try to edittext and button weights.

Ask about Android's layout_weight problem!!!!!!!!!!!!!!!!!!!!!!!!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.