若开发者没有声明该属性,ratio_float 的默认值为1.86,小于2.0,因此这类应用在全面屏手机上,默认不会全屏显示,屏幕底部会留黑。考虑到将有更多 19.5:9 甚至更长的手机出现,建议开发者声明 Maximum Aspect Ratio ≥ 2.2 或更多。值得一提的是,如果应用的 android:resizeableActivity 已经设置为 true,就不必设置 Maximum Aspect Ratio 了。详见 Android 官方文档 Declaring maximum aspect ratio。
/**
* Sets the color of the navigation bar to {@param color}.
*
* For this to take effect,
* the window must be drawing the system bar backgrounds with
* {@link android.view.WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS} and
* {@link android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_NAVIGATION} must not be set.
*
* If {@param color} is not opaque, consider setting
* {@link android.view.View#SYSTEM_UI_FLAG_LAYOUT_STABLE} and
* {@link android.view.View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION}.
* <p>
* The transitionName for the view background will be "android:navigation:background".
* </p>
*/publicabstractvoidsetNavigationBarColor(@ColorInt int color);
if (!isSlaveWifiConnected(getApplicationContext())){
//TODO Provide Dual Wifi Ui guidance and reCheck
Intent intent = new Intent("android.settings.DUAL_WIFI.WIFI_SETTINGS");
startActivity(intent);
return;
}
publicclassClipDescriptionimplementsParcelable {
/**
* The MIME type for a clip holding plain text.
*/publicstaticfinal String MIMETYPE_TEXT_PLAIN = "text/plain";
/**
* The MIME type for a clip holding HTML text.
*/publicstaticfinal String MIMETYPE_TEXT_HTML = "text/html";
/**
* The MIME type for a clip holding one or more URIs. This should be
* used for URIs that are meaningful to a user (such as an http: URI).
* It should <em>not</em> be used for a content: URI that references some
* other piece of data; in that case the MIME type should be the type
* of the referenced data.
*/publicstaticfinal String MIMETYPE_TEXT_URILIST = "text/uri-list";
/**
* The MIME type for a clip holding an Intent.
*/publicstaticfinal String MIMETYPE_TEXT_INTENT = "text/vnd.android.intent";
/**
* The MIME type for an activity. The ClipData must include intents with required extras
* {@link #EXTRA_PENDING_INTENT} and {@link Intent#EXTRA_USER}, and an optional
* {@link #EXTRA_ACTIVITY_OPTIONS}.
* @hide
*/publicstaticfinal String MIMETYPE_APPLICATION_ACTIVITY = "application/vnd.android.activity";
/**
* The MIME type for a shortcut. The ClipData must include intents with required extras
* {@link Intent#EXTRA_SHORTCUT_ID}, {@link Intent#EXTRA_PACKAGE_NAME} and
* {@link Intent#EXTRA_USER}, and an optional {@link #EXTRA_ACTIVITY_OPTIONS}.
* @hide
*/publicstaticfinal String MIMETYPE_APPLICATION_SHORTCUT = "application/vnd.android.shortcut";
/**
* The MIME type for a task. The ClipData must include an intent with a required extra
* {@link Intent#EXTRA_TASK_ID} of the task to launch.
* @hide
*/publicstaticfinal String MIMETYPE_APPLICATION_TASK = "application/vnd.android.task";
/**
* The MIME type for data whose type is otherwise unknown.
* <p>
* Per RFC 2046, the "application" media type is to be used for discrete
* data which do not fit in any of the other categories, and the
* "octet-stream" subtype is used to indicate that a body contains arbitrary
* binary data.
*/publicstaticfinal String MIMETYPE_UNKNOWN = "application/octet-stream";
......
}
分屏不仅不是伪需求,而且会是一个大众需求。我们认为分屏最主流的使用场景是:一边看视频,一边做其它事情。用手机看视频,已经成为用户的主流场景,各大视频应用的日活人数、使用次数、使用时长都可以佐证这个观点。但使用手机看视频有很多痛点,比如会被 IM 消息打断、切换至后台视频会暂停等。这些痛点都可以通过分屏较好地解决,这也是分屏能成为大众需求的潜力。