摘要:1.Listlist=newArrayList(); //有值ListlistTemp=newArrayList(); //临时的listIteratorit=list.iterator();//取得有值得list的迭代器while(it.hasNext()){ int a = it.next(...
阅读全文
摘要:android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:marqueeRepeatLimit="marquee_forever" android:singleLi
阅读全文
摘要:1、使用equals( )方法比较两个字符串是否相等 boolean equals(Object str) 这里str是一个用来与调用字符串(String)对象做比较的字符串(String)对象。 如果两个字符串具有相同的字符和长度,它返回true,否则返回false。这种比较是区分大小写的。...
阅读全文
摘要:String sql = "select count(*) as c from sqlite_master where type ='table' and name ='" + tableName.trim() + "' "; cursor = db.rawQuery(sql, nul...
阅读全文
摘要:Alt+H:查找功能,全局查找F4:查看类继承关系Ctrl+E:查看最近打开过的文件Ctrl+Shift+E:查看最近编辑过的文件Ctrl+Shift+R:快速定位到你所想打开的文件。(如果选中名称还能修改名称)Ctrl+Shift+/:模块注释,反注释再按一次即可,注意这边的”/“不能用小键盘的C...
阅读全文
摘要:打开Android SDK Manager1点击左上角的tools-->options:将Proxy Settings 里的HTTP Proxy Server和HTTP Proxy Port分别设置成mirrors.neusoft.edu.cn和80。2如果还有问题,将Others中的Force h...
阅读全文
摘要://activity销毁之前调用,把状态值存储上@Override protected void onSaveInstanceState(Bundle outState) { outState.putBoolean("isConflict", false); outState.putBo...
阅读全文
摘要:一般用的情况先声明一个ProgressDialogprogressShow = true;(用来判断用户是否点击了取消键) final ProgressDialog pd = new ProgressDialog(LoginActivity.this);pd.setCanceledOnTouchOu...
阅读全文
摘要:1. ctrl+shift+r 打开资源这组快捷键可以让你打开你工作区中的任何一个文件。而你只需要按下键盘的文件名或前几个字母美中不足的是这组快捷键并非在所有视图下都能用。2.ctrl+o:快速outline如果想要查看当前类的某个方法或特定方法,但又不想把代码拉上拉下,也不想使用查找功能的话,就用...
阅读全文
摘要:AndroidManifest.xml文件中界面对应的<activity>里加入android:windowSoftInputMode="adjustPan" 键盘就会覆盖屏幕(解决了view随着键盘弹出而整体上移)android:windowSoftInputMode="stateVisible|
阅读全文
摘要:Intent intent = new Intent(getActivity(), Activity_Character.class); intent.putExtra("mlTrait", (Serializable)getNormalTraits()); startActivity(i...
阅读全文