2016年11月30日

获取edit焦点,打开和关闭软键盘

摘要: 打开: et_search.requestFocus(); et_search.setFocusable(true); et_search.setFocusableInTouchMode(true); InputMethodManager imm = (InputMethodManager) get 阅读全文
posted @ 2016-11-30 09:33 随缘101 阅读(274) 评论(0) 推荐(0) 编辑

Handler机制来处理子线程去更新UI线程控件

摘要: public class HandlerTestActivity extends Activity { private TextView tv; private static final int UPDATE = 0; private Handler handler = new Handler() { @Override public v... 阅读全文
posted @ 2016-11-30 09:22 随缘101 阅读(856) 评论(0) 推荐(0) 编辑

获得某月份的天数

摘要: //获得某月份的天数private int getDaysForMonth(int month) { // month is 0-based if (month == 1) { int x400 = month % 400; if (x400 < 0) { x4... 阅读全文
posted @ 2016-11-30 09:06 随缘101 阅读(212) 评论(0) 推荐(0) 编辑