【发布时间】:2014-12-28 21:04:17
【问题描述】:
所以我对 android 开发还很陌生,我只是无法在操作栏中显示任何图标。
我创建了一个最低 sdk API 15 的新项目,并在 Theme-Dropdown (XML-Design-View) 中选择“Holo.Light”。
所以我希望它看起来像这样: http://i.stack.imgur.com/zfgCq.png
但它看起来像这样: http://i.imgur.com/Lmxutct.png
我的 AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
我想我必须以某种方式将 android:theme 更改为 Holo.Light?但是没有定义资源,我似乎无法添加任何资源..
我的样式.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"/>
<!-- Customize your theme here. -->
ic_launcher.png 位于 drawables 文件夹中.. 那么我该怎么做才能让那个该死的图标显示出来呢?
(顺便说一句,我使用我的 HTC 一台 M8,但它也没有出现在模拟器上)
谢谢!
【问题讨论】: