随笔分类 -  Android

摘要:在Java中,求1!+2!+3!+···+1000!的结果,结果长度远远超出int和long类型的最大值,所以要使用BigDecimal类型,代码如下: 阅读全文
posted @ 2016-06-03 09:46 望臻风格 阅读(294) 评论(0) 推荐(0)
摘要:1 public class MD5Util { 2 public static String getMD5(String s) { 3 char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 4 'A', 'B', 'C', 'D', 'E', '... 阅读全文
posted @ 2016-04-15 09:35 望臻风格 阅读(250) 评论(0) 推荐(0)
摘要:1 import android.content.Context; 2 import android.graphics.Bitmap; 3 import android.graphics.BitmapShader; 4 import android.graphics.Canvas; 5 import 阅读全文
posted @ 2016-04-08 16:59 望臻风格 阅读(318) 评论(0) 推荐(0)
摘要:1 public class DisplayUtil { 2 /** 3 * 将px值转换为dip或dp值,保证尺寸大小不变 4 * 5 * @param pxValue (DisplayMetrics类中属性density) 6 * @return 7 */ 8 public static int px2dip(... 阅读全文
posted @ 2016-04-05 12:40 望臻风格 阅读(213) 评论(0) 推荐(0)
摘要:通过反射实现Menu显示图标 截取屏幕,获得Bitmap 从系统图库选择图片 无限轮播,在Adapter中处理 阅读全文
posted @ 2016-03-31 17:02 望臻风格 阅读(502) 评论(0) 推荐(0)
摘要:开袋即食 阅读全文
posted @ 2016-03-25 16:51 望臻风格 阅读(1655) 评论(0) 推荐(0)
摘要:代码如下: 阅读全文
posted @ 2016-03-17 20:37 望臻风格 阅读(1376) 评论(0) 推荐(0)
摘要:1 public class SquareLayout extends RelativeLayout { 2 public SquareLayout(Context context, AttributeSet attrs, int defStyle) { 3 super(c... 阅读全文
posted @ 2016-01-08 11:29 望臻风格 阅读(882) 评论(0) 推荐(0)
摘要:最近几天了解市场上主流的推送SDK。腾迅信鸽所需SDK,去官网自行下载。去下载完整的清单文件如下: 1 2 6 7 10 11 12 13 14 15 16 17 18 19 ... 阅读全文
posted @ 2015-11-24 12:00 望臻风格 阅读(477) 评论(0) 推荐(0)
摘要:继承SwipeBackActivity即可实现向右滑动删除Activity效果点击下载所需文件 阅读全文
posted @ 2015-09-21 14:48 望臻风格 阅读(663) 评论(0) 推荐(0)
摘要:布局 1 5 6 11 12 13 14 19 20 21 实现代码 1 import java.util.ArrayList; 2 import java.util.List; 3 4 import com.astuetz.PagerSlidingTabStr... 阅读全文
posted @ 2015-08-12 17:27 望臻风格 阅读(461) 评论(0) 推荐(0)
摘要:activity_main.xml 1 5 6 11 12 13 20 21 28 29 36 37 44 45 46 关键代码: 1 import com.lidroid.xutils.ViewUtils; 2... 阅读全文
posted @ 2015-08-11 16:01 望臻风格 阅读(335) 评论(0) 推荐(0)
摘要:1 /**2 * 自定义ActionBar3 */4 private void CustomeActionBar() {5 ActionBar actionBar = getSupportActionBar();6 actionBar.se... 阅读全文
posted @ 2015-08-06 19:03 望臻风格 阅读(231) 评论(0) 推荐(0)
摘要:floating_button_layout.xml 1 2 5 6 16 17 18 floating_menu.xml 1 2 6 7 12 13 18 19 24 25 30 31 FloatingMenu.java 1 packag... 阅读全文
posted @ 2015-08-05 13:39 望臻风格 阅读(1225) 评论(0) 推荐(0)
摘要:布局 1 5 6 11 12 13 20 21 28 29 37 38 46 47 55 56 57 63 64 68 69 70 74 ... 阅读全文
posted @ 2015-08-02 15:31 望臻风格 阅读(271) 评论(0) 推荐(0)
摘要:1 /** 2 * 修改默认滑动条 3 */ 4 private void SetSliderIcon() { 5 try { 6 Field f = AbsListView.class.getDeclaredField("mFa... 阅读全文
posted @ 2015-08-01 23:17 望臻风格 阅读(552) 评论(0) 推荐(0)
摘要:自带的模拟器太慢,Genymotion配置过于复杂,天天模拟器旧版本直接可用于调试,由于新版本的天大模拟器端口号被修改为6555,要想用于开发,需要使用ADB命令进行连接。下载天天模拟器天天模拟器官网配置ADB环境变量新建系统环境变量"ANDROID"内容为:D:\BACKUP\Android\ad... 阅读全文
posted @ 2015-08-01 14:18 望臻风格 阅读(415) 评论(0) 推荐(0)
摘要:dialog_background_style.xml1 2 3 4 5 6 7 8 anim_dialog.xml 1 2 4 5 15 16 在styles.xml中定义如下主题:1 代码实现: 1 package com.wangzhen.view; 2 3 i... 阅读全文
posted @ 2015-07-29 16:41 望臻风格 阅读(181) 评论(0) 推荐(0)
摘要:1 package com.wangzhen.tasks; 2 3 import java.io.ByteArrayOutputStream; 4 import java.io.IOException; 5 import java.io.InputStream; 6 7 impo... 阅读全文
posted @ 2015-07-21 17:15 望臻风格 阅读(273) 评论(0) 推荐(0)
摘要:主界面↓ 1 package com.wangzhen.pulltorefresh; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 import com.handmark.pulltorefresh.libr... 阅读全文
posted @ 2015-07-20 22:45 望臻风格 阅读(258) 评论(0) 推荐(0)