开启系统FreeForm模式。
adb shell settings put global enable_freeform_support 1
adb shell settings put global force_resizable_activities 1
/frameworks/native/data/etc/android.software.freeform_window_management.xml
push到目录system/etc/permissions/
代码如下:
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent =
Android P FreeForm窗口模式实战

本文介绍了如何开启Android P的FreeForm模式,通过adb命令设置全局参数,并将相关xml文件推送到系统目录。示例代码展示了一个简单的FreeFormActivity,仅显示文字'Hello FreeForm!'。
最低0.47元/天 解锁文章
1018

被折叠的 条评论
为什么被折叠?



