2012年12月7日

android动画 对fillBefore 和 fillAfter的理解

摘要: fillBefore是指动画结束时画面停留在第一帧,fillAfter是指动画结束是画面停留在最后一帧。这2个参数不能在</alpha>,</scale>,</translate>,</rotate>中设置没有效果,必须</set>中设置才可以 例如:<?xml version="1.0" encoding="utf-8"?><set xmlns:android="http://schemas.android.com/apk/res/android" and 阅读全文

posted @ 2012-12-07 13:41 南瓜饼 阅读(463) 评论(0) 推荐(0) 编辑

Android用Animation-list实现逐帧动画

摘要: 先看看效果图下面是2个动画的xml文件animation1.xml<?xml version="1.0" encoding="utf-8"?><!-- 根标签为animation-list,其中oneshot代表着是否只展示一遍,设置为false会不停的循环播放动画 根标签下,通过item标签对动画中的每一个图片进行声明 android:duration 表示展示所用的该图片的时间长度--><animation-list xmlns:android="http://schemas.android.com/apk/r 阅读全文

posted @ 2012-12-07 11:17 南瓜饼 阅读(3442) 评论(4) 推荐(1) 编辑

2012年12月5日

android 主线程与分线程 做同步

摘要: 直接上代码package com.example.handlerthreaddemo;import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.os.Message;import android.view.Menu;import android.view.View;public class MainActivity extends Activity { Test t; Handler mh=new Handler(){ @Override ... 阅读全文

posted @ 2012-12-05 16:48 南瓜饼 阅读(493) 评论(0) 推荐(0) 编辑

2012年11月30日

NSString赋值方法

摘要: //1、创建常量字符串。 NSString *astring = @"This is a String!"; //2、创建空字符串,给予赋值。 NSString *astring = [[NSString alloc] init]; astring = @"This is a String!"; NSLog(@"astring:%@",astring); [astring release]; //3、在以上方法中,提升速度:initWithString方法 NSString *astring = [[NSString alloc] i 阅读全文

posted @ 2012-11-30 11:32 南瓜饼 阅读(1860) 评论(0) 推荐(0) 编辑

2012年11月29日

IOS中使用正则表达式

摘要: NSString * regex = @"^.*\"success\":false{1}.*$";NSPredicate * pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];BOOL isMatch = [pred evaluateWithObject:@"\"loginCallback({\"sS\":\"101\",\"iI\":false,\"iP\&qu 阅读全文

posted @ 2012-11-29 12:05 南瓜饼 阅读(155) 评论(0) 推荐(0) 编辑

2012年11月23日

反编译APK

摘要: 一.反编译Apk得到Java源代码 工具下载:dex2jar-0.0.7-SNAPSHOT.zip2011-7-17 15:39 上传点击文件名下载附件 下载积分: e币 -1 元JD-GUI下载地址: windows版JD-GUI jdgui.zip2011-7-17 15:40 上传点击文件名下载附件 下载积分: e币 -1 元 Linux版JD-GUI:http://laichao.googlecode.com/files/jd-gui-0.3.2.linux.i686.tar.gz步骤: 1.首先找到Android软件安装包中的classes.dex 把.apk文件改名为.zip,然. 阅读全文

posted @ 2012-11-23 14:31 南瓜饼 阅读(182) 评论(0) 推荐(0) 编辑

2012年11月1日

android仿照ipone的弹性效果

摘要: package com.example.bounce;import android.content.Context;import android.util.AttributeSet;import android.util.DisplayMetrics;import android.widget.ListView; public class BounceListView extends ListView{ private static final int MAX_Y_OVERSCROLL_DISTANCE = 200; private Context mContext; ... 阅读全文

posted @ 2012-11-01 11:26 南瓜饼 阅读(819) 评论(0) 推荐(0) 编辑

2012年10月27日

Canvas基础

摘要: import android.app.Activity;import android.content.Context;import android.graphics.Bitmap;import android.graphics.Bitmap.Config;import android.graphics.BitmapFactory;import android.graphics.Canvas;import android.graphics.Paint;import android.os.Bundle;import android.view.Menu;import android.view.Mot 阅读全文

posted @ 2012-10-27 17:14 南瓜饼 阅读(195) 评论(0) 推荐(0) 编辑

2012年10月25日

HandlerThread分线程启动handler

摘要: import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.os.HandlerThread;import android.os.Looper;import android.os.Message;public class MainActivity extends Activity{ /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedI 阅读全文

posted @ 2012-10-25 14:03 南瓜饼 阅读(673) 评论(0) 推荐(0) 编辑

2012年9月24日

[Java]HashMap的两种排序方式

摘要: 转载:http://www.cnblogs.com/lovebread/archive/2009/11/23/1609121.htmlMap<String, Integer> map = new HashMap<String, Integer>();map.put("d", 2);map.put("c", 1);map.put("b", 1);map.put("a", 3);List<Map.Entry<String, Integer>> infoIds = new 阅读全文

posted @ 2012-09-24 09:16 南瓜饼 阅读(216) 评论(0) 推荐(0) 编辑

导航