06 2013 档案

摘要:1 imageView.setOnTouchListener(); 2 3 private final class TouchListener implements OnTouchListener{ 4 private int mode = 0; 5 private static final int DRAG = 1;// 拖拉 6 private static final int ZOOM = 2;// 缩放 7 // 存放开始点 8 private PointF startPoint = new PointF(); 9 // 矩阵对象移动... 阅读全文
posted @ 2013-06-27 13:10 轻云沉峰 阅读(326) 评论(0) 推荐(0)
摘要:Android提供了两种动画 一、Tween动画也就相当于补间动画透明度变化alpha1 AlphaAnimation aa = new AlphaAnimation(0.0f,1.0f);//不透明到完全透明2 aa.setDuration(2000);// 持续时间3 imageView.startAnimation(aa);// 作用到对象上旋转动画rotate1 RotateAnimation ra = new RotateAnimation(0,90);//从0-90度2 // 旋转中心的设置3 RotateAnimation ra = new RotateAnimation(0,9 阅读全文
posted @ 2013-06-27 09:40 轻云沉峰 阅读(2140) 评论(0) 推荐(0)
摘要:一、AndroidManifest文件中1 2 3 4 5 二、新建class继承AndroidTestCasepublic void test()throws Exception{}三、右击运行Run As - Android Junit Test 阅读全文
posted @ 2013-06-26 16:20 轻云沉峰 阅读(215) 评论(0) 推荐(0)
摘要:1 电话拨号 2 Intent intent = new Intent(); 3 intent.setAction(Intent.ACTION_CALL);// 动作类型 拨打电话操作 4 intent.setData(Uri.parse("tel:"+number));// 数据 Android中通过Uri来描述 5 startActivity(intent); 6 需要的权限 7 8 9 发短信10 SmsManager sm = SmsManager.getDefault();// 短信管理11 // sendIntent,deliveryIntent延期的意图 发送 阅读全文
posted @ 2013-06-26 15:56 轻云沉峰 阅读(336) 评论(0) 推荐(0)
摘要:因Activity关闭,而通过WindowManager添加的控件未关闭,导致无法附着报类似has leaked window android.widget的错误,只需做如下处理@Overrideprotected void onDestroy() { super.onDestroy(); mWindowManager.removeView(mDialogText);} 阅读全文
posted @ 2013-06-26 10:21 轻云沉峰 阅读(8073) 评论(0) 推荐(0)
摘要:adb全称android debug bridge即android调试桥的意思拷贝文件到手机 adb push 原文件 目标文件拷贝文件到电脑 adb pull 原文件目标文件关闭adb服务 adb kill-server启动adb服务 adb start-server安装apk adb install v.apk卸载apk[包名] adb uninstall com.android.v版本号 adb version模拟器或真机控制台 adb shell横竖屏切换 ctrl + F11 阅读全文
posted @ 2013-06-24 15:18 轻云沉峰 阅读(221) 评论(0) 推荐(0)
摘要:安装新的ADT或升级时,导入之前的项目正常,但编译运行时会NoClassDefFoundError,找不到第三方jar包。解决办法:Properties->Java Build Path->Order and Export全部勾上即可 阅读全文
posted @ 2013-06-20 13:47 轻云沉峰 阅读(220) 评论(0) 推荐(0)
摘要:一、JDK配置JAVA_HOME D:\Java\jdk1.6.0_45配置classpath .;%JAVA_HOME%/lib/rt.jar;%JAVA_HOME%/lib/tools.jar配置Path %JAVA_HOME%/bin;二、SDK配置与JDK类似在Path前继续追加:%ANDROID_SDK_HOME%\platform-tools;%ANDROID_SDK_HOME%\tools; 阅读全文
posted @ 2013-06-19 18:26 轻云沉峰 阅读(430) 评论(1) 推荐(0)
摘要:Eclipse中ADT可能出错,那么卸载重装可能比较省事,具体步骤直接如图:下一步就是选择需要卸载的因插件文件路径变更,而报错问题Some sites could not be found. See the error log for more detail,解决方法如下图: 阅读全文
posted @ 2013-06-19 09:35 轻云沉峰 阅读(4202) 评论(0) 推荐(0)
摘要:1、“回车”变为“下一步”1 android:imeOptions="actionNext"2、“回车”变为“完成”1 ndroid:imeOptions="actionDone"3、只显示一行1 android:singleLine="true"4、键盘类型1 android:inputType="number" 数字 2 android:inputType="textPhonetic" 拼音输入 3 android:inputType="date" 日期键盘 阅读全文
posted @ 2013-06-18 10:46 轻云沉峰 阅读(262) 评论(0) 推荐(0)