Android 无SetContentView显示页面

今天从github上面下载了eoe的客户端,发现进入SplashActivity时,在onCreate中没有发现以往中的SetContentView,但是页面还是显示了

后来发现SplashActivity 在AndroidManifest.xml里面是这样写的

 <activity
            android:name=".ui.SplashActivity"
            android:label="@string/app_name"
            android:launchMode="singleTask"
            android:theme="@style/splash_style"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

接着查看theme中的style.xml 文件

<style name="splash_style" parent="@android:style/Theme.NoTitleBar.Fullscreen">
        <item name="android:background">@drawable/splash_load</item>
    </style>

释然了,但是还是不太明白android:background 怎么会在此处起作用。先标记下,以后清楚了再补全

 

posted @ 2013-05-22 10:37  似水流云  阅读(446)  评论(0编辑  收藏  举报