摘要: 1、//隐藏软键盘((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(WidgetSearchActivity.this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); 2、//显示软键盘,控件ID可以是EditText,TextView((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE)).showSoftInpu 阅读全文
posted @ 2012-09-04 16:09 蓝渡 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 今天做一个Android的文件管理器,里面用到很多的地方用到了getResources。Drawable currentIcon = null;currentIcon = getResources().getDrawable(R.drawable.folder);currentIcon = getResources().getDrawable(R.drawable.image); 一开始不是很理解为什么用 getResources()这个方法就可以获取存在系统的资源。于是看了一下文档和翻阅了一下资料: 例如:把资源文件放到应用程序的/raw/raw下,那么就可以在应用中使用getResou.. 阅读全文
posted @ 2012-09-04 15:07 蓝渡 阅读(264) 评论(0) 推荐(0) 编辑