![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Android开发
wael1234
这个作者很懒,什么都没留下…
展开
-
短信分享
Uri smsToUri = Uri.parse( "smsto:" ); Intent sendIntent = new Intent(Intent.ACTION_VIEW, smsToUri); //sendIntent.putExtra("address", "123456"); // 电话号码,这行去掉的话,默认就没有电话 sendIntent.putExtra( "sm转载 2014-03-30 14:51:16 · 407 阅读 · 0 评论 -
Android的手势识别
对于触摸屏,其原生的消息无非按下、抬起、移动这几种,我们只需要简单重载onTouch或者设置触摸侦听器setOnTouchListener即可进行处理。不过,为了提高我们的APP的用户体验,有时候我们需要识别用户的手势,Android给我们提供的手势识别工具GestureDetector就可以帮上大忙了。 基础GestureDetector的工作原理是,当我们接收到用户触摸转载 2014-06-17 23:37:39 · 375 阅读 · 0 评论 -
设置Activity窗口模式
在AndroidManifest.xml中在你需要显示为窗口的activity中添加如果属性:android:theme="@android:style/Theme.Dialog"但是这个窗口模式是有标题的,即时在application节点设置了NoTitleBar原创 2014-03-13 17:04:20 · 1101 阅读 · 0 评论 -
selector的使用
这是颜色的选择器,需要放在res的color的文件夹里面,没有就创建一个 背景的选择器 需要放在res的drawable系列文件夹中原创 2014-03-13 17:07:20 · 418 阅读 · 0 评论 -
Animation动画类
ScaleAnimation(float fromX, float toX, float fromY, float toY,int pivotXType, float pivotXValue, int pivotYType, float pivotYValue) float fromX 动画起始时 X坐标上的伸缩尺寸 float toX 动画结束时 X坐标上的伸缩尺寸 float转载 2014-03-17 09:38:59 · 432 阅读 · 0 评论 -
给TextView部分加粗
给一个texitview里面部分文字加粗,所以上面的这个就不合适了,这个时候我想了以前设置文字点击和插入表情的方法,想着用span来实现 public class MyStyleSpan extends StyleSpan { public MyStyleSpan(int style) { super(style); } @Override public int descr转载 2014-03-19 14:14:32 · 1893 阅读 · 0 评论 -
处理窗口化Activity点击空白处自动关闭的问题
转自:http://blog.csdn.net/voiceofnet/article/details/9061309将Activity设置成窗口的样式实现Dialog或者Popupwindow效果在开发中是很常用的一种方式,在AndroidMenifest.xml中将需要设置的Activity增加android:theme="@android:style/Theme.Dialo转载 2014-03-19 14:48:46 · 1464 阅读 · 0 评论 -
Android View坐标getLeft, getRight, getTop, getBottom
1 引起疑惑 分析视图invalidate流程的过程中发现view的left, right, top, bottom跟自己理解的不一样,现在想分析一下这几个值具体的含义。 2 理解坐标,位置概念 这里涉及坐标系的概念:坐标系在二维视图中通过X轴和Y轴两个数字为组合表示某个点的绝对坐标。例如(30, 100) 通常表示X轴30, Y轴100转载 2014-03-27 16:28:49 · 367 阅读 · 0 评论 -
android 上下左右手势判断
package com.gesture;import android.content.Context;import android.util.DisplayMetrics;import android.view.WindowManager;public class GestureUtils { //获取屏幕的大小 public static Screen转载 2014-03-30 22:55:49 · 772 阅读 · 0 评论 -
判断网络类型
判断网络类型是wifi,还是3G,还是2G网络,对不同的网络进行不同的处理,现将判断方法整理给大家,以供参考 说明:下面用到的数据移动2G,联通2G,联通3G,wifi我都已经测试过,暂时手上没有电信的卡,所以没有验证,有电信手机的同事,可以验证一下,验证后将结果发送给大家。 ConnectivityManager connectMgr =转载 2014-06-25 12:53:22 · 574 阅读 · 0 评论 -
Touch事件
Android里有两个类 android.view.GestureDetector android.view.GestureDetector.SimpleOnGestureListener 1) 新建一个类继承SimpleOnGestureListener,HahaGestureDetectorListener ,可以实现以下event事件。 boolean onDoub转载 2014-03-23 19:49:53 · 456 阅读 · 0 评论 -
Universal-Image-Loader设置图片高宽
UIL为了避免将原图存到内存中,会根据ImageView的参数来缩小图片的尺寸,这些参数包括maxWidth 、maxHeight 、layout_width 、layout_height,另外图片是等比压缩的,为了让图片填满整个view,可以设置ImageView的android:scaleType="fitXY",不过这样如果等比压缩后的图片小于容器的宽和高,会被拉伸变形。转载 2014-07-30 16:19:56 · 636 阅读 · 0 评论