textview限制字数,结尾显示。。。。。
摘要:android:maxEms="6" android:singleLine="true"android:ellipsize="end"
阅读全文
限制imageview大小
摘要:http://sunzone.iteye.com/blog/1869915android:adjustViewBounds="true" //保持宽高比android:maxHeight="80dp"android:maxWidth="100dp"
阅读全文
ActionBarActivity环境搭建步骤及遇到的问题总结
摘要:http://blog.csdn.net/shuzui1985/article/details/20528305更新之后exlipse有好多变化,v7,compat 容易出错
阅读全文
android alertdialog 自定义button监听事件
摘要:AlertDialog Dialog = new AlertDialog.Builder(Huntinfo.this).create();Dialog.show();Dialog.getWindow().setGravity(Gravity.BOTTOM);Dialog.getWindow().se...
阅读全文
setContentView默认不能弹出软键盘
摘要:http://wbj05791467.blog.163.com/blog/static/120329697201332542626138/可以阅读官方文档:http://developer.android.com/reference/android/app/Dialog.html其中有一段:Note...
阅读全文
AlertDialog 自定义大小
摘要:AlertDialog salert = new AlertDialog.Builder(this).create();salert.show();//******************改变alertdialogWindow dialogWindow = salert.getWindow();di...
阅读全文
AlertDialog 设定位置
摘要:AlertDialog alert = new AlertDialog.Builder(this).create();WindowManager.LayoutParams lp =alert.getWindow().getAttributes();// lp.x=0;lp.y=100;alert.s...
阅读全文
static静态变量 出现空指针异常
摘要:public static String pic_url =new String();这样定义就不会出现空指针异常http://www.2cto.com/kf/201205/133951.html
阅读全文
LinearLayout 让最后一个空间靠到屏幕底部
摘要:比如这个Button 必须用LinearLayout包起来,然后设置:android:layout_weight="0.1"android:gravity="bottom"android:orientation="vertical"
阅读全文
wordpress 更新 插件更新安装
摘要:需要 更改 wordpress 安装目录的所有者为:www-data同时注意 文件夹权限777
阅读全文
URL中包含有特殊字符,进行转义
摘要:String temp = URLEncoder.encode(json);URL中的特殊字符有些符号在URL中是不能直接传递的,如果要在URL中传递这些特殊符号,那么就要使用他们的编码了。编码的格式为:%加字符的ASCII码,即一个百分号%,后面跟对应字符的ASCII(16进制)码值。例如 空格的...
阅读全文
LinkedLIst<String> 可以自动将JSON字符串编排格式
摘要:简单的加几个JSON字符串累加之后,con_list.toString() 的结果 是:[{"id":5,"con":"请吃药****","repeatdelay":1,"time":"22:03:03","repeatday":"1,2,3,4,5,6","repeattimes":2}, {"i...
阅读全文
Android Studio开发入门-引用jar及so文件
摘要:一、引用jar文件 1.将jar文件复制、粘贴到app的libs目录中; 2.右键点击jar文件,并点击弹出菜单中的“Add As Library”,将jar文件作为类库添加到项目中; 3.选择指定的类库。 注:如果不执行2、3步,jar文件将不起作用,并且不能使用import语句引用。 二...
阅读全文
AlertDialog The specified child already has a parent. You must call removeView() on the child's parent first.
摘要:点击AlertDialog 关闭之后再点击报错:The specified child already has a parent. You must call removeView() on the child's parent first.意思是这个子view 已经有个父view了,你现在要使用的...
阅读全文
AlertDialog 简易代码
摘要:builder = new AlertDialog.Builder(getActivity()).setTitle(" ").setMessage(" ").setPositiveButton("确定", new DialogInterface.OnClickListener() {@Overrid...
阅读全文
判断邮箱格式
摘要:public static boolean isEmail(String strEmail) {String strPattern = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";Pattern p = Pattern.compile(s...
阅读全文
ListView 上面用EditText 改变内容
摘要:holder.insure_account.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(final View view) {AlertDialog builder = new AlertDia...
阅读全文