<span id="Label3"></p><p><p>Defined in the Style.xml file</p></p><pre><span style="color: #0000ff;"><span style="color: #0000ff;"><?</span></span><span style="color: #ff00ff;"><span style="color: #ff00ff;">XML version= "1.0" encoding= "UTF-8"</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">?></span></span> <span style="color: #0000ff;"><span style="color: #0000ff;"><</span></span><span style="color: #800000;"><span style="color: #800000;">Resources</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">></span></span> <span style="color: #0000ff;"><span style="color: #0000ff;"><</span></span><span style="color: #800000;"><span style="color: #800000;">style</span></span><span style="color: #ff0000;"><span style="color: #ff0000;">name</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">= "notitle"</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">></span></span> <span style="color: #0000ff;"><span style="color: #0000ff;"><</span></span><span style="color: #800000;"><span style="color: #800000;">Item</span></span><span style="color: #ff0000;"><span style="color: #ff0000;">name</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">= "android:windownotitle"</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">></span></span>True<span style="color: #0000ff;"><span style="color: #0000ff;"></</span></span><span style="color: #800000;"><span style="color: #800000;">Item</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">></span></span> <span style="color: #0000ff;"><span style="color: #0000ff;"></</span></span><span style="color: #800000;"><span style="color: #800000;">style</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">></span></span> <span style="color: #0000ff;"><span style="color: #0000ff;"></</span></span><span style="color: #800000;"><span style="color: #800000;">Resources</span></span><span style="color: #0000ff;"><span style="color: #0000ff;">></span></span> </pre><p><p>And then reference it in the Manifest.xml.</p></p><pre><pre><span style="color: #0000ff;"><</span><span style="color: #800000;"></span><span style="color: #ff0000;">android:icon</span><span style="color: #0000ff;">= "@drawable/icon"</span><span style="color: #ff0000;"> android:label</span><span style="color: #0000ff;">= "@string/app_ Name "</span><span style="color: #ff0000;"> android:theme</span><span style="color: #0000ff;">=" @style/notitle "</span><span style="color: #0000ff;">></span> </pre></pre><p><p></p></p><p><p>If the error is described as</p></p><p><p>Java.lang.IllegalStateException:You need to use a theme.appcompat Theme (or descendant) with this Activity.</p></p><p><p></p></p><p><p>Reason:<br>Mention Theme.appcompat Theme from the error message because our activity must have inherited the class from the compatibility pack,<br>For example, I have inadvertently inherited the actionbaractivity, it comes from Android.support.v7.app.ActionBarActivity.<br>So it is necessary to use the theme of the AppCompat with which it fits.</p></p><p><p>How to get rid of the title bar in Android apps</p></p></span>
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