一.概念 Activity相当于浏览器的标签,相当于空白的网页; Activity可以跳转,就相当于浏览器内点击链接后跳转到另外一个浏览器窗口 二.怎样创建Activity setContentView(R.layout.main);//设置布局文件 ...
分类:
移动开发 时间:
2017-05-10 00:19:01
阅读次数:
209
//取消状态栏getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);一定得在setContentView()上面隐藏虚拟按键: prot ...
分类:
移动开发 时间:
2017-05-04 20:09:45
阅读次数:
274
、if (dialShareDialog == null) { dialShareDialog = new Dialog(context, R.style.dialog); dialShareDialog.setContentView(R.layout.dialog_share); dialShar ...
分类:
移动开发 时间:
2017-05-04 09:39:30
阅读次数:
203
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.hello_world_layout); if (savedInstanc... ...
分类:
其他好文 时间:
2017-05-03 10:29:16
阅读次数:
157
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); int v = this.getWindow().getAttri ...
分类:
移动开发 时间:
2017-04-17 12:57:30
阅读次数:
238
1.WebView的使用 (a). 创建WebView的实例加入到Activity中 WebView webview = new WebView(this); setContentView(webview); 或者在xml中配置WebView <Webview android:layout_widt ...
分类:
移动开发 时间:
2017-04-12 23:44:06
阅读次数:
363
继承 PreferenceActivity,实现OnPreferenceChangeListener,删掉setContentView(R.layout.fragment_main); 在res文件下创建Floder文件夹再创建xml文件:Resourece Type:Preference ;Fil ...
分类:
移动开发 时间:
2017-03-28 19:18:07
阅读次数:
233
Colorful (Github) Colorful简单实用,通过这个开源库可以通过编码的方式来改变应用的主题,不再需要定义不同的style 你需要改变主题的Activity必须继承CActivity 或者在 setContentView()之前调用下面的方法 也可以调用 Colorful.appl ...
分类:
移动开发 时间:
2017-03-27 16:33:00
阅读次数:
276
界面的设置 对其功能的实现:protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); picture... ...
分类:
其他好文 时间:
2017-03-21 22:41:42
阅读次数:
169
最近研究沉浸式导航栏,上网看了好多,差不多实现都是一样的。。。。代码如下: 在你的Activity中(最好是setContentView()被调用之后)添加以下代码: ...
分类:
其他好文 时间:
2017-03-21 15:29:27
阅读次数:
276