Fragmenttabhost the Error collection when doing menu bar

Source: Internet
Author: User

1. menu bar ran to the top of the screen, not at the bottom, saw a long time to find out the layout with relativelayout, changed the LinearLayout good.

2. Write the resource file when not pay attention to a drawable-v21, resource files ran this inside and then run wrong

Binary XML file line #2: Error inflating class <unknown>

Resources$notfoundexception:resource ID #0x7f030009

(resource introduced incorrectly), move the resource file to drawable, OK

3. The font color of the menu bar can be set with selector, but this selector should be placed under Res/color

Item with Android:color no problem

<item android:color= "@color/mediumaquamarine" android:state_selected= "true" ></item>
<item Android:color= "@color/grey" android:state_selected= "false" ></item>


I was watching the rookie mall video, but there is no complete, there is also a blog Introduction menu bar Implementation http://blog.csdn.net/yangyu20121224/article/details/9016223


Related Article

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.