摘要: Intent intent = getIntent();Intent intent2 = new Intent();通常通过getIntent()方法获取到是非空的,即类似于:intent:Intent { act=android.intent.action.MAIN cat=[android.in... 阅读全文
posted @ 2015-09-10 21:42 Sunor 阅读(636) 评论(0) 推荐(0) 编辑
摘要: EditText可以使用:TextView.setEnabled(true)来设置为可编辑,其实很简单,写在这里以便以后自己查看。 Button设置可用性:setVisibility(View.VISIBLE),这样就设置为可用了。其中参数是一个int型以后有其他的控件的设置,可以再进行补充。... 阅读全文
posted @ 2015-09-10 21:12 Sunor 阅读(797) 评论(0) 推荐(0) 编辑
摘要: 用于创建菜单的常用的方法有如下两种:1.onCreateOptionsMenu(Menu menu) 2.onPrepareOptionsMenu(Menu menu)MyDiaryActivity中的方法: 1 /** 2 * Initialize the contents of ... 阅读全文
posted @ 2015-09-10 20:33 Sunor 阅读(979) 评论(0) 推荐(0) 编辑