回覆列表
  • 1 # 羊毛學院

    將Activity設定成視窗模式有兩種方法,一種是利用系統提供的theme在清單配置檔案中設定當前Activity的theme屬性。另一種就是根據專案的需求自定義主題。第一種方法:在AndroidManifest.xml清單配置檔案中修改當前Activity的theme屬性[html] view plain copyandroid:theme="@style/Theme.AppCompat.Light.Dialog" 完整的AndroidManifest.xml:[html] view plain copy<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.zwb.floatactivity"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/Theme.AppCompat.Light.Dialog"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

  • 中秋節和大豐收的關聯?
  • 添油加醋挑撥離間的句子?