- 博客(20)
- 收藏
- 关注
转载 apk,xls格式的文件下载
publicclassFileDownLoad { privatelongid; privateDownloadManager manager; privateDownloadManager.Request request; privateRequestComple...
2016-06-08 10:55:00
415
转载 TextView字体跑马效果
<TextView android:id="@+id/myTextView" android:layout_width="180px" android:layout_height="wrap_content" android:textColor="@android :color/whit...
2016-06-08 10:52:00
180
转载 PickerView可以滑动选择的pickerView工具类(转载)
package com.service.ybs.view; import java.util.ArrayList; import java.util.List; import java.util.Timer; import java.util.TimerTask; import andro...
2016-06-08 10:48:00
147
转载 PopuMenu使用实例
/** *点击editText时,有之前输入的偏好存起来,用于此次显示在popuMenu中 *//1.得到InputMethodManager对象 InputMethodManager imm = (InputMethodManager) getSystem...
2016-06-08 10:38:00
173
转载 监听editText字数计数并显示
private int fontCount; @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override ...
2016-06-08 10:22:00
141
转载 异步请求工具类NetTool
public class NetTool { private String url = ""; private String method = ""; private String body = ""; public NetTool() { ...
2016-06-08 10:16:00
192
转载 HttpTool工具类
public class HttpTool implements Runnable{ private String url = ""; private String body = ""; private int timeout = 0; private Han...
2016-06-08 10:08:00
362
转载 json解析工具类
public static User parseJSONStr(String str,String type){ if(gson==null) gson=new Gson(); if(Constants.UserType.pos.equals(...
2016-06-08 09:58:00
107
转载 universalimageloader加载本地图片(转载)
/** * 异步加载本地图片工具类 * * @author tony * */public class LoadLocalImageUtil { private LoadLocalImageUtil() { } private static LoadL...
2016-06-08 09:44:00
98
转载 NetUtils网络连接工具类
public class NetUtils { // 判断网络是否连接的 public static boolean isNetworkConnected(Context context) { if (context != null) { ...
2016-06-08 09:21:00
212
转载 单选样式的自定义dialog
//dialog的布局 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:l...
2016-06-07 20:20:00
110
转载 DateTimePickDialog
/** * 日期时间选择控件 使用方法: private EditText inputDate;//需要设置的日期时间文本编辑框 private String * initDateTime="2012年9月3日 14:44",//初始日期时间值 在点击事件中使用: * inputDate...
2016-06-07 20:11:00
227
转载 自定义Toast
public static void showToast(Context context,String str){ Toast toast=new Toast(context); TextView view = new TextView(context); ...
2016-06-07 20:10:00
108
转载 SharedPreferences封装及使用
//application中初始化 @Override public void onCreate() { super.onCreate(); initSharef(); } // 初始化SharedPrefenc...
2016-06-07 20:09:00
164
转载 自定义dialog
public static void showDialog(Context context,String string) { TextView view=new TextView(context); view.setText(string); v...
2016-06-07 20:05:00
127
转载 universalimageloader相关
//使用方法 ImageLoader.getInstance().displayImage(advert.getImgUrl(), imageView, mOptions, new SimpleImageLoadingListener() { ...
2016-06-07 19:59:00
101
转载 OOM问题(bitmap背景用完回收)
View view = findViewById(R.id.page_bg); BitmapDrawable bitmapDrawable = (BitmapDrawable) view.getBackground(); view.setBackgroundResource(0); ...
2016-06-07 17:38:00
190
转载 圆形头像view
value文件中的,attrs中的属性 <declare-styleable name="CircleImagerView"> <attr name="border_widths" format="dimension" /> ...
2016-06-07 13:26:00
105
转载 android 图片压缩
/** * 简单压缩 * * @param is * @return Bitmap */ public static Bitmap setOption(InputStream is) { BitmapFactory.Op...
2016-06-07 13:21:00
75
转载 从drawable把图片放入外部存储目录中
/** * 从drawable把图片放入data * * @return File * @param context * @param resId */ try { // path==/storage/emu...
2016-06-07 13:17:00
240
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人