Title Style issues in Android

Source: Internet
Author: User

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


To set a button in the TITLE bar, create a new title.xml, also in the OnCreate method called the requestwindowfeature (Window.feature_custom_title);
Setcontentview (R.layout.activity_main);
GetWindow (). Setfeatureint (Window.feature_custom_title,
R.LAYOUT.TITLE_BTN);
But the error, you cannot combine custom titles with the other title features, in accordance with several methods on the internet have tried, the result is not you cannot combine custom titles with OT Her title features is 03-26 01:54:02.073:e/androidruntime (2790): java.lang.RuntimeException:Unable to start activity Componentinfo{com.example.camera/com.example.camera.mainactivity}: Java.lang.IllegalStateException:You need to use A Theme.appcompat Theme (or descendant) with the this activity.
Can you tell me how to solve the problem of elder?

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


Http://mobile.51cto.com/aprogram-387074.htm wants to help.

Title Style issues in Android

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.