picasso的使用

摘要: Picasso框架 picasso是Square公司开源的一个Android图形缓存库,地址http://square.github.io/picasso/,可以实现图片下载和缓存功能。 picasso使用简单,如下 [java] view plain copy print? Picasso.wit 阅读全文
posted @ 2016-05-26 14:48 天空很大,我们很小 阅读(476) 评论(0) 推荐(0) 编辑

取消ActionBar标题显示

摘要: 方法一:此方式必须设置在setContentView之上 requestWindowFeature(Window.FEATURE_NO_TITLE);//隐藏标题 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, Win 阅读全文
posted @ 2016-05-20 20:27 天空很大,我们很小 阅读(170) 评论(0) 推荐(0) 编辑

模拟窗口抖动

摘要: 本质就是平移动画 一、res/anim/cycle.xml 《cycleInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:cycles="2"/》 二、res/anim/myanim.xml 阅读全文
posted @ 2016-05-20 20:20 天空很大,我们很小 阅读(185) 评论(0) 推荐(0) 编辑

DateUtils日期工具类

摘要: import java.util.Date; import java.util.Random; import java.text.SimpleDateFormat; import java.text.DateFormat; //类名:DateUtils //详细:工具类,可以用作获取系统日期 pub 阅读全文
posted @ 2016-05-20 20:19 天空很大,我们很小 阅读(200) 评论(0) 推荐(0) 编辑

Android判断当前线程是否是主线程的方法

摘要: 方法一:使用Looper类判断 方法二:通过查看Thread类的当前线程 阅读全文
posted @ 2016-05-20 20:14 天空很大,我们很小 阅读(1076) 评论(0) 推荐(0) 编辑

TextView设置下划线

摘要: TextView对象.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);//下划线 TextView对象.getPaint().setAntiAlias(true);//抗锯齿 TextView对象.getPaint().setFlags(Paint.ST 阅读全文
posted @ 2016-05-20 20:10 天空很大,我们很小 阅读(241) 评论(0) 推荐(0) 编辑

editText文本设置显示和隐藏

摘要: // 设置EditText文本为可见的 EditText对象.et.setTransformationMethod(HideReturnsTransformatio nMethod.getInstance()); // 设置EditText文本为隐藏的 EditText对象.setTransform 阅读全文
posted @ 2016-05-20 17:29 天空很大,我们很小 阅读(348) 评论(0) 推荐(0) 编辑

安卓跑马灯

摘要: <TextView android:id="@+id/menu_desc" android:layout_width="300dip" android:layout_height="wrap_content" android:layout_centerHorizontal="true" androi 阅读全文
posted @ 2016-05-16 15:06 天空很大,我们很小 阅读(120) 评论(0) 推荐(0) 编辑

utf-8加密用于汉字加密(避免乱码)

摘要: //防止乱码,主要用于汉字 name_utf8 = URLEncoder.encode(code_text, "utf-8"); 阅读全文
posted @ 2016-05-14 16:40 天空很大,我们很小 阅读(1359) 评论(0) 推荐(0) 编辑

设置将edittext的光标到最后

摘要: CharSequence charSequence = login_password.getText(); if (charSequence instanceof Spannable) { Spannable spanText = (Spannable) charSequence; Selectio 阅读全文
posted @ 2016-05-14 14:56 天空很大,我们很小 阅读(298) 评论(0) 推荐(0) 编辑