Android ApiDemos示例解析(18):App->Activity->Wall易做图
Wall易做图介绍一个Activity如何通过Style把系统Wall易做图作为当前Activity的背景。
这是Wall易做图Activity在AndroidManifest.xml中的定义:
<activity android:name=”.app.Wall易做图Activity”
android:label=”@string/activity_wall易做图”
android:theme=”@style/Theme.Wall易做图”>
<intent-filter>
< action android:name=”android.intent.action.MAIN” />
<category android:name=”android.intent.category.SAMPLE_CODE” />
< /intent-filter>
< /activity>
@style/Theme.Wall易做图定义如下:继承系统android:style/Theme.Wall易做图,并将前景色设为白色(这里是文字的颜色)
<!– A theme that has a wall易做图 background. Here we explicitly specify
that this theme is to inherit from the system’s wall易做图 theme,
which sets up various attributes correctly. –>
<style name=”Theme.Wall易做图” parent=”android:style/Theme.Wall易做图”>
<item name=”android:colorForeground”>#fff</item>
< /style>
作者:mapdigit
补充:移动开发 , Android ,