- 博客(6)
- 资源 (6)
- 收藏
- 关注
转载 startActivityForResult用法
1.跳转的时候不是采用startActivity(intent) 这个方法,而是startActivityForResult(intent, 0)Intent intent=new Intent();intent.setClass(A.this, B.class);Bundle bundle=new Bundle();String str1="aaaaaa";bundle.putStr
2015-10-11 19:18:56 304
原创 ListView setOnItemClickListener 点击无效
listview的item布局里面如果有checkbox,button之类点击类的控件,会导致setOnItemClickListener 点击无效,原因是这类控件会获取到焦点,使listview失去焦点,从而导致setOnItemClickListener无效,解决办法,把checkbox,button之类控件的获取焦点设置为falseandroid:focusable="false"
2015-10-11 18:55:04 359
原创 SharedPreferences 存取数据
SharedPreferences sharedPreferences = context.getSharedPreferences("user",Context.MODE_PRIVATE); Editor editor = sharedPreferences.edit(); editor.putInt("userId",1); editor.com
2015-10-10 00:39:34 337
原创 按屏幕大小设置dialog宽高
public void setDialogSize(Dialog dg) { Window dialogWindow = dg.getWindow(); WindowManager.LayoutParams lp = dialogWindow.getAttributes();// 获取对话框当前的参数值 dialogWindow.setGravity
2015-10-08 01:16:15 813 2
原创 android 如何在string里使用%
Multiple annotations found at this line: - error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute? - error: Unexpected
2015-10-06 15:29:32 1421
SecureCRT 6.7.4 .x64 含注册机
2013-03-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人