android activity 后的形式藏

it2025-08-02  20

activity 希望的形式 于AndroidManifest.xml  建立 theme 属性

   <activity             android:name="zicox.ui.activity.SearchPrinter"             android:theme="@android:style/Theme.Dialog">         </activity>

事实上影藏 activity 就是隐藏 activity 的view. 

先找到方法 获取activity rootView

private static View get_root_view(Activity context) { return ((ViewGroup)context.findViewById(android.R.id.content)).getChildAt(0); } get_root_view(context).setVisibility(View.GONE);  //影藏 view

get_root_view(context).setVisibility(View.VISIBLE);  //显示view

版权声明:本文博主原创文章。博客,未经同意不得转载。

转载于:https://www.cnblogs.com/bhlsheji/p/4793673.html

相关资源:Android开发入门教程(汇集Android社区智慧图)--详细书签版
最新回复(0)