摘要: 先看效果图,免得浪费大家时间,看是不是想要的效果 。直接上代码 ,核心方法。privatevoidshowPopupWindow(Viewparent){if(popupWindow==null){LayoutInflaterlayoutInflater=(LayoutInflater)getSys... 阅读全文
posted @ 2015-10-26 14:58 蜗牛眼里的世界 阅读(878) 评论(0) 推荐(0) 编辑
摘要: 一、Handler的定义: Handler主要接收子线程发送的数据, 并用此数据配合主线程更新UI,用来跟UI主线程交互用。比如可以用handler发送一个message,然后在handler的线程中来接收、处理该消息,以避免直接在UI主线程中处理事务导致影响UI主线程的其他处理工作,Androi... 阅读全文
posted @ 2015-10-23 17:43 蜗牛眼里的世界 阅读(343) 评论(0) 推荐(0) 编辑
摘要: publicBitmapgetVideoThumbnail(StringfilePath){Bitmapbitmap=null;MediaMetadataRetrieverretriever=newMediaMetadataRetriever();try{retriever.setDataSourc... 阅读全文
posted @ 2015-10-23 12:03 蜗牛眼里的世界 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 访问登记属性android.permission.ACCESS_CHECKIN_PROPERTIES ,读取或写入登记check-in数据库属性表的权限获取错略位置android.permission.ACCESS_COARSE_LOCATION,通过WiFi或移动基站的方式获取用户错略的经纬度信息... 阅读全文
posted @ 2015-10-23 11:51 蜗牛眼里的世界 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1 Intent intent=new Intent(); 2 /*打开相册*/ 3 intent.setType("image/*"); 4 // 兼容4.4以下及4.4以上 5 if (android.os.Build.V... 阅读全文
posted @ 2015-10-23 11:37 蜗牛眼里的世界 阅读(311) 评论(0) 推荐(0) 编辑
摘要: package com.bdkj.gmys.utils;import java.io.File;import android.content.Context;import com.nostra13.universalimageloader.cache.disc.impl.ext.LruDiscCac... 阅读全文
posted @ 2015-10-22 16:58 蜗牛眼里的世界 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 在开发的过程中可能需要用到listview嵌套gridview的场景,但是在android中,不能在一个拥有Scrollbar的组件中嵌入另一个 拥有Scrollbar的组件,因为这不科学,会混淆滑动事件,导致只显示一到两行数据。那么就换一种思路,首先让子控件的内容全部显示出来,禁用了它的 滚动。如... 阅读全文
posted @ 2015-10-22 15:32 蜗牛眼里的世界 阅读(183) 评论(0) 推荐(0) 编辑
摘要: /** * @ClassName: MatrixImageView * @Description: 带放大、缩小、移动效果的ImageView * @author LinJ * @date 2015-1-7 上午11:15:07 * */public class MatrixImageV... 阅读全文
posted @ 2015-10-22 15:22 蜗牛眼里的世界 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 1、退出 在用户退出的时候提示用户是否退出,含有“确定”和“退出”两个按键。 1 btnExit.setOnClickListener(new View.OnClickListener() { 2 @Override 3 public ... 阅读全文
posted @ 2015-10-22 14:51 蜗牛眼里的世界 阅读(304) 评论(0) 推荐(0) 编辑
摘要: package com.bdkj.gmys.utils;import org.apache.http.Header;import org.json.JSONArray;import org.json.JSONException;import org.json.JSONObject;import an... 阅读全文
posted @ 2015-10-22 14:40 蜗牛眼里的世界 阅读(241) 评论(0) 推荐(0) 编辑