- 博客(14)
- 收藏
- 关注
原创 Android - Create an arrow shape
实现思路学习Layer List图层列表学习Shape Drawable形状可绘制对象学习Animation Resources中的元素实现引用shape参考资料总结实现思路我希望通过layer-list中添加两个item,并旋转45度,形成一个直角箭头的形状。学习Layer List图层列表首先学习layer-list的用法,根据L...
2018-04-20 01:51:05 934 1
原创 使用Android DocumentType来处理Strings.xml中的资源,实现xml内拼接
Use Android DocumentType to handle String resources问题是这样的:两个string,string a是“账号邮箱”,string b是“账号邮箱:”,有没有方法可以,直接在xml中,把string a和“:”拼接起来组成b。<string name="account_email">账号邮箱</string><str...
2018-04-18 23:41:43 674
原创 How to dismiss a DialogFragment when pressing outside the dialog? 怎么通过点击DialogFragment的外部透明隐藏它
引用:http://stackoverflow.com/questions/8404140/how-to-dismiss-a-dialogfragment-when-pressing-outside-the-dialogDialogFragment.getDialog().setCanceledOnTouchOutside(true); Must be called in onCrea
2016-10-25 18:10:19 975
原创 #CheckBox expand its click area ##CheckBox扩大点击区域
Method用”android:drawableLeft“取代”android:background”来设置CheckBox的自定义样式;同时自身设置”android:text”来显示文字提示,取代CheckBox+TextView的模式使用TouchDelegate,>引用[link text](“http://stackoverflow.com/questions/1343222/is-th
2016-10-25 17:36:07 899
原创 Method to remove Tablet nav
1.delete /system/app/SystemUI.apk ( /system/priv-app/SystemUI.apk )
2016-07-28 18:25:34 471
转载 android paint cap join 理解 图示
网上查了很多资料,对paint的里面的枚举类cap join讲的不是很透彻。在这里自己做一个比较深入的研究。首先说Cap,比较形象的解释就是 用来控制我们的画笔在离开画板时候留下的最后一点图形,比如矩形,圆形等。不懂?那接着往下看。先看看源码: ?123456789
2016-02-24 14:54:33 377
原创 ScrollView中的LinearLayout不能fill_parent
当在ScrollVIew中使用LinearLayout的时候,发现不能使layout_width或者height="fill_parent",此时注意到(http://developer.android.com/reference/android/widget/ScrollView.html)设其true可解决问题。
2013-12-04 17:26:27 529
原创 [工具]android-unused-resources 找出项目中没用的资源
工具地址:http://code.google.com/p/android-unused-resources/使用方法:1、将AndroidUnusedResources1.6.2.jar文件放入工程的根目录,在命令行运行命令”java -jar AndroidUnusedResources1.6.2.jar”, 就可以多余的资源文件列出,只列出在cmd中。2、java -jar An
2013-12-04 17:12:19 1767
原创 Android重写TextView实现文字跑马灯效果
/** * 重写TextView实现文字跑马灯效果 */import android.content.Context;import android.graphics.Rect;import android.util.AttributeSet;import android.widget.TextView;/**@Discription: * @author Rose */pu
2013-11-28 15:18:05 890
转载 Java 判断文件或者文件夹是否存在并创建新文件或者文件夹
File file=new File("C:\\Users\\QPING\\Desktop\\JavaScript\\2.htm"); if(!file.exists()) { try { file.createNewFile(); } catch (IOException e) { // TODO A
2013-10-30 16:45:00 625
原创 android 监听某一组件的按下和松开状态
例如ButtonButton btn = (Button)findViewById(R.id.button);btn.setOnTouchListener(buttonListener);private OnTouchListener buttonListener = new OnTouchListener() { public boolean onTouch(View ar
2013-10-30 16:33:55 1750
原创 Android中px与dip,sp与dip等的转换工具类
/** * 将px值转换为dip或dp值,保证尺寸大小不变 * * @param pxValue * @param scale(DisplayMetrics类中属性density) * @return */ public static int px2dip(float pxValue, float scale) { return (int) (pxV
2013-10-30 15:46:07 516
转载 android程序报错:String types not allowed(at 'configChanges' with value 'orientation|keyboardHidden|sc...
此类型的错误是eclipse在当前Android的API权限下不识别,调整你的API权限。方法如下:1、右键打开你的工程的priperties
2013-10-30 11:18:25 4677
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人