- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 验证手机号的正则表达式
private boolean isMobile(String input) { Pattern pattern = Pattern.compile("^1[34578][0-9]{9}$"); Matcher matcher = pattern.matcher(input); return matcher.matches();
2015-07-30 09:48:55 633
原创 managedQuery过时的解决办法
错误信息:The method managedQuery(Uri, String[], String, String[], String) from the type Activity 解决办法:用Context.getContentResolver().query()来代替managerQuery(),参数都一样
2015-07-27 13:42:48 5562
原创 ActionBar 透明
FadingActionBarHelper.javaimport android.annotation.TargetApi;import android.app.ActionBar;import android.graphics.drawable.Drawable;import android.os.Build;import android.view.View;public cla
2015-07-21 14:04:24 718
原创 ListView的OnItemClickListener失效的解决办法
我的原因是ListView中含有Button,根本原因是ListView的Item抢占焦点。在xml中抢占焦点的空间中加入这行代码即可解决问题android:focusable="false"
2015-07-20 19:11:03 538
转载 自定义EditText,自带清除内容按钮
转载自:http://www.cnblogs.com/windamy/p/3924111.html定义了一个控件类CleanableEditText,实现在焦点变化时和输入内容发生变化时均要判断是否显示右边clean图标 后台调用自定义控件的时候需要LayoutInflater来载入(见第三段代码)。package com.utils; import androi
2015-07-20 19:01:02 504
原创 使用Fragment后翻转屏崩溃解决办法
方法一:AndroidManifest.xml文件中加一句话:android:configChanges="orientation|screenSize" <activity android:name=".MainActivity" android:configChanges="orientation|screenSize"
2015-07-20 18:57:30 631
原创 动态加载xml文件
点击追加按钮,添加一排控件在原布局文件中定义一个LinearLayout,然后将所要添加的那一排控件写成一个xml,将这个xml通过代码插入到定义的那个LinearLayout中
2015-07-20 18:49:32 1033
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人