摘要:
@Override public boolean onKeyUp(int keyCode, KeyEvent event) { if(keyCode==KeyEvent.KEYCODE_MENU) { this.getLocalActivityManager().getCurrentActivity().openOptionsMenu(); }else if(keyCode == KeyEvent.KEYCODE_BACK){ finish(); } return super.onKeyDown(keyCode, event); } 阅读全文
摘要:
第一种是list中的对象实现Comparable接口,如下:/***根据order对User排序*/publicclassUserimplementsComparable<User>{privateStringname;privateIntegerorder;publicStringgetName(){returnname;}publicvoidsetName(Stringname){this.name=name;}publicIntegergetOrder(){returnorder;}publicvoidsetOrder(Integerorder){this.order=ord 阅读全文