1
应用程序开发人员可以为运行android的任何设备开发多窗口应用程序吗?我不确定是否仅限Android操作系统(某些版本)支持此操作?还是只有三星专有? 如果它可以为运行android的任何设备开发,建议如何开始做这件事?支持多窗口应用程序开发
应用程序开发人员可以为运行android的任何设备开发多窗口应用程序吗?我不确定是否仅限Android操作系统(某些版本)支持此操作?还是只有三星专有? 如果它可以为运行android的任何设备开发,建议如何开始做这件事?支持多窗口应用程序开发
任何人都可以做到。您的活动屏幕区域缩小了。
您可以使用资源限定符为这些实例选择不同的布局。 参见:http://developer.android.com/guide/topics/resources/providing-resources.html#ScreenHeightQualifier
下面是一个支持多窗口支持的AndroidManifest.xml示例。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.multiwintest"
android:versionCode="1" android:versionName="1.0"
>
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
<application
android:allowBackup="true" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:theme="@style/AppTheme"
>
<uses-library android:name="com.sec.android.app.multiwindow" android:required="false" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<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" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
这仅适用于三星提供的版本。
请官方Android 7.0(APIv24)支持read the docs here。
你说的是同时运行(比如说)两个应用程序(比如一个运行在上半部分,另一个运行在屏幕的下半部分)?我指的是这种情况。 – trish
我编辑了我的答案,包含一个包含更改的示例清单文件,以便FlashBarService可以将您的应用程序检测为启用多窗口。 – Simon