最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Android 歡迎全屏圖片詳解及實(shí)例代碼

 更新時(shí)間:2017年02月24日 16:09:09   作者:xyTianZhao  
這篇文章主要介紹了Android 歡迎全屏圖片詳解及實(shí)例代碼的相關(guān)資料,需要的朋友可以參考下

Android 歡迎全屏圖片詳解

 其實(shí)歡迎界面就是在主Activity之前再添加一個(gè)歡迎的Activity。在這個(gè)Activity中實(shí)現(xiàn)歡迎界面,和其他的Activity用法
是基本一樣,只有細(xì)微的差別。

    1、在Activity的onCreate方法中實(shí)現(xiàn):

 @Override 
ic void onCreate(Bundle savedInstanceState) { 
super.onCreate(savedInstanceState); 
/**全屏設(shè)置,隱藏窗口所有裝飾**/ 
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
    WindowManager.LayoutParams.FLAG_FULLSCREEN); 
/**標(biāo)題是屬于View的,所以窗口所有的修飾部分被隱藏后標(biāo)題依然有效,需要去掉標(biāo)題**/ 
requestWindowFeature(Window.FEATURE_NO_TITLE); 
setContentView(R.layout.main); 

       2、在AndroidManifest.xml文件中的相應(yīng)的歡迎Activity中進(jìn)行配置

<activity 
 android:name=".ActivityDemo" 
 android:label="@string/app_name" 
 android:theme="@android:style/Theme.NoTitleBar"> 
<intent-filter> 
    <action android:name="android.intent.action.MAIN" /> 
    <category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 
 </activity> 

 也可以將設(shè)置成Android:theme="@android:style/Theme.NoTitleBar.Fullscreen"(取消頂部的狀態(tài)欄)

    3、歡迎Activity的layout布局文件

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
  android:layout_width="fill_parent" 
  android:layout_height="fill_parent" 
  android:background="@drawable/welcome" 
  android:orientation="vertical" > 
</LinearLayout> 

          上面的android:background="@drawable/welcome"是相對應(yīng)的圖片資源文件

     4、運(yùn)行結(jié)果如下

感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

最新評論

延庆县| 同德县| 浮梁县| 肥城市| 昭通市| 五莲县| 林州市| 隆昌县| 弥渡县| 顺义区| 白城市| 星子县| 视频| 海城市| 琼海市| 宜宾县| 库车县| 大同市| 丰台区| 洪洞县| 道真| 宝清县| 高阳县| 漳平市| 法库县| 育儿| 湘潭市| 龙川县| 即墨市| 丹江口市| 庆云县| 尼木县| 怀化市| 晋江市| 隆尧县| 贵阳市| 共和县| 庆云县| 丘北县| 横峰县| 麦盖提县|