2015年12月10日

android 软键盘的使用

摘要: AndroidManifest.xml文件中界面对应的<activity>里加入android:windowSoftInputMode="adjustPan" 键盘就会覆盖屏幕(解决了view随着键盘弹出而整体上移)android:windowSoftInputMode="stateVisible| 阅读全文

posted @ 2015-12-10 15:50 赵磊磊 阅读(195) 评论(0) 推荐(0) 编辑

2015年12月2日

android之间传递list

摘要: Intent intent = new Intent(getActivity(), Activity_Character.class); intent.putExtra("mlTrait", (Serializable)getNormalTraits()); startActivity(i... 阅读全文

posted @ 2015-12-02 09:59 赵磊磊 阅读(232) 评论(0) 推荐(0) 编辑

2015年11月26日

android 中string.xml中的%1$s

摘要: idView.setText(getString(R.string.estate_id, mCollectParamObj.getPlotNo())); estate_id:小区号%1$s %d (表示整数) %f (表示浮点数) %s (表示字符串) String temp = getResour 阅读全文

posted @ 2015-11-26 11:35 赵磊磊 阅读(299) 评论(0) 推荐(0) 编辑

android activity传递实体类对象

摘要: 通过实现Parcelable接口序列化对象的步骤:1、实现Parcelable接口。2、并且实现Parcelable接口的publicvoid writeToParcel(Parcel dest, int flags)方法 。3、自定义类型中必须含有一个名称为CREATOR的静态成员,该成员对象要求... 阅读全文

posted @ 2015-11-26 11:12 赵磊磊 阅读(415) 评论(0) 推荐(0) 编辑

2015年11月23日

android 通过getDimension,getDimensionPixelOffset和getDimensionPixelSize获取dimens.xml文件里面的变量值

摘要: dimens.xml里写上三个变量: 16dp 16px 16sp读取这三个变量:floata1=getResources().getDimension(R.dimen.activity_vertical_margin1); inta2=getResources().getDimensionP... 阅读全文

posted @ 2015-11-23 15:49 赵磊磊 阅读(3833) 评论(0) 推荐(0) 编辑

android 获取屏幕的宽和高

摘要: 屏幕高度:context.getResources().getDisplayMetrics().heightPixels屏幕宽度:context.getResources().getDisplayMetrics().widthPixels 阅读全文

posted @ 2015-11-23 15:36 赵磊磊 阅读(185) 评论(0) 推荐(0) 编辑

2015年11月17日

android dialog弹出的情况下监听返回键

摘要: view = LayoutInflater.from(getActivity()).inflate( R.layout.dialog_tips, null); title2 = (TextView) view.findViewById(R.id.title2); d... 阅读全文

posted @ 2015-11-17 11:00 赵磊磊 阅读(2425) 评论(0) 推荐(0) 编辑

2015年11月13日

join on用法

摘要: 内连接和外连接 内连接用于返回满足连接条件的记录;而外连接则是内连接的扩展,它不仅会满足连接条件的记录,而且还会返回不满足连接条件的记录内连接 内连接查询返回满足条件的所有记录,默认情况下没有指定任何连接则为内连接selectt1.name,t2.namefromcip_tempst1inne... 阅读全文

posted @ 2015-11-13 15:13 赵磊磊 阅读(7068) 评论(0) 推荐(0) 编辑

2015年11月12日

android webview加载网络连接

摘要: webview = (WebView) findViewById(R.id.webview); WebSettings webSettings = webview.getSettings(); //设置WebView属性,能够执行Javascript脚本 webSettings... 阅读全文

posted @ 2015-11-12 15:43 赵磊磊 阅读(337) 评论(0) 推荐(0) 编辑

2015年11月9日

android imageview按钮按下动画效果

摘要: private ImageView today_eat; today_eat = (ImageView) view.findViewById(R.id.today_eat); today_eat.setOnClickListener(b); today_eat.setOnTouc... 阅读全文

posted @ 2015-11-09 10:05 赵磊磊 阅读(2959) 评论(1) 推荐(0) 编辑

导航