摘要: 参考博客网址:http://www.creturn.com/html/2014-01-15-android-%E4%B8%8A%E4%BC%A0php-xutils-bug%E4%BF%AE%E5%A4%8D%E5%88%86%E6%9E%90%E8%BF%87%E7%A8%8B.html作为全职PHPer偶尔需要客串下Androider,最近公司的一个项目需要Android的客户端(主要图片特效处理及其上传),自己就客串下Androider.之前有过Android开发经验所以做这个挺顺手的,几乎所有东西直接github中拿过来改改就用,不过在处理图片上传的时候选择了xUtils这个开源工具类 阅读全文
posted @ 2014-03-17 15:04 F_YuXiang 阅读(904) 评论(0) 推荐(0) 编辑
摘要: 在项目中,一进入一个页面, EditText默认就会自动获取焦点。那么如何取消这个默认行为呢?解决之道:在EditText的父级控件中找一个,设置成android:focusable="true" android:focusableInTouchMode="true"这样,就把EditText默认的行为截断了! 阅读全文
posted @ 2014-03-13 17:41 F_YuXiang 阅读(576) 评论(0) 推荐(1) 编辑
摘要: 该工具提供缩放 drawable转换bitmap 转换倒影图 转换成圆角图 1 package com.nailsoul.imagedemo.utils; 2 3 import android.graphics.Bitmap; 4 import android.graphics.Canvas; 5 import android.graphics.LinearGradient; 6 import android.graphics.Matrix; 7 import android.graphics.Paint; 8 import android.graphics.PixelFor... 阅读全文
posted @ 2014-03-06 16:50 F_YuXiang 阅读(537) 评论(0) 推荐(0) 编辑
摘要: 以下是设置按钮的右边框和底边框颜色为红色,边框大小为3dp,如下图:在drawable新建一个 buttonstyle.xml的文件,内容如下:[html]view plaincopy然后在布局文件里面的Button里面设置如下:[html]view plaincopy 阅读全文
posted @ 2014-03-05 16:02 F_YuXiang 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 平时对某些字符的简单的替换1 /**2 * @author 付昱翔3 * @since 201303044 * 这里可以除掉里面的标点符号或者自己不想要的文字什么的 */5 text = text.replaceAll(",|,|?|。|、|!", "");主要就是replaceall的使用,里面有多个的话,用英文的“|”分隔。 阅读全文
posted @ 2014-03-04 17:17 F_YuXiang 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 我对ActionBar的简单总结一、功能:1、显示选项菜单的菜单项2、使用程序图标作为返回Home主屏或向上的导航操作3、提供交互是View作为Action View4、提供Tab的导航方式,可用于切换多个Fragment5、提供下拉式的导航二、启用ActionBarActionBar acitonBar= getActionBar();acitonBar.show();acitonBar.hide();三、显示选项菜单setShowAsAction(int actionEnum);该方法设置是否将该菜单项显示在ActionBar上,作为ActionItem。里面的参数有以下几种 Menu.. 阅读全文
posted @ 2014-01-10 00:23 F_YuXiang 阅读(1010) 评论(0) 推荐(0) 编辑
摘要: char byte 一个字节 short 2个字节 int long 4个字节 //int在16位系统里是2字节 float 4个字节 double 8 个字节 阅读全文
posted @ 2013-10-09 17:57 F_YuXiang 阅读(506) 评论(0) 推荐(0) 编辑