这篇文章将为大家详细讲解有关在Android应用中如何释放空间,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

在网上搜索找到两种方法:
if (Build.VERSION.SDK_INT >= 19){
WindowManager.LayoutParams localLayoutParams = mActivity.getWindow().getAttributes();
localLayoutParams.flags = (WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | localLayoutParams.flags);
if (fmMain != null) { //fmMain:自定义的顶部导航条
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) fmMain.getLayoutParams();
layoutParams.setMargins(0, ChuangChuangApp.STATUSBARHEIGHT, 0, 0);//STATUSBARHEIGHT状态栏高度
fmMain.setLayoutParams(layoutParams); //设置顶部margin值
}
} 
售后响应及时
7×24小时客服热线
数据备份
更安全、更高效、更稳定
价格公道精准
项目经理精准报价不弄虚作假
合作无风险
重合同讲信誉,无效全额退款