摘要: 就两个界面,一个是所有程序,一个是开机动画设置,还有设置壁纸。比较粗糙,因为项目停滞,所以就没有继续开发,在此分享一下,望高手莫喷。有些代码是网上摘抄,找不到出处了,原作者莫怪咯!效果图:项目结构:HomeActivity.java(所有程序界面) 1 package com.bvin.demo.launcher; 2 3 import java.util.List; 4 5 import android.app.Activity; 6 import android.content.ComponentName; 7 import android.content.Intent;... 阅读全文
posted @ 2012-10-11 20:54 bvin 阅读(1074) 评论(0) 推荐(0) 编辑
摘要: 1、提升apk的权限:在AndroidManifest.xml中添加 <uses-sdk android:minSdkVersion="7" android:sharedUserId="android.uid.system"/>2、通过eclipse的Android tools 导出无签名的apk文件(old.apk):Export Unsighted Application Package...图例:解压old.apk,查看内容,无META-INF文件,说明未签名:图例:3、将Android源码中的build/target/product/ 阅读全文
posted @ 2012-09-24 02:25 bvin 阅读(1430) 评论(0) 推荐(0) 编辑
摘要: 输出斐波纳契数列的前N项public class Test { public static void main(String[] args){ new Test().printFinonacci(10); } void printFinonacci(int count){ for(int i=0;i<count;i++){ System.out.println(finonacci(i)); } } int finonacci(in... 阅读全文
posted @ 2012-09-20 17:09 bvin 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 其实在android的开发中体现了不少java的知识。1.for循环的使用情景在填充ListView上都是与适配器绑定的,我们看一下适配器的继承结构图。详情参考Devin Zhang的Android之Adapter用法总结这边文章。用的比较多自然就属SimpleAdapter咯,使用简洁,可自定义界面。看下这个适配器是如何填充的。SimpleAdapter getAdapter(int[] res){//填充SimpleAdapter List<Map<String,Object>> list = new ArrayList<Map<String,Objec 阅读全文
posted @ 2012-09-18 16:54 bvin 阅读(2432) 评论(8) 推荐(0) 编辑
摘要: 1.Handler.post(Runnable),必须要有有Looper。 1 package com.bvin.study.thread; 2 3 import android.app.Activity; 4 import android.os.Bundle; 5 import android.os.Handler; 6 import android.os.HandlerThread; 7 import android.os.Looper; 8 import android.os.Message; 9 import android.util.Log;10 11 public class M. 阅读全文
posted @ 2012-08-31 17:47 bvin 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 1.HandlerThread+Handler+Messagepackage com.bvin.study.message;import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.os.Handler.Callback;import android.os.HandlerThread;import android.os.Message;public class MainActivity extends Activity { /** Called when th... 阅读全文
posted @ 2012-08-31 17:43 bvin 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 先看效果,点击更改,换掉头像。想过两个办法一个是直接把Listview里ItemView里的ImageView接出来,赋值给成员变量,然后在单机事件中,改变它。public class MainActivity extends Activity { /** Called when the activity is first created. */ ListView lv; ImageView iv; ....... class BindAdapter extends BaseAdapter{ @Override publi... 阅读全文
posted @ 2012-08-31 17:39 bvin 阅读(973) 评论(0) 推荐(0) 编辑
摘要: 5个属性:android:cacheColorHint="#00000000":点击某一项时,item里的元素背景会变黑或白 android:fadingEdge="@null"//上下滑动时上下边的过度颜色 android:scrollingCache="false"//滑动时背景变黑色android:divider="@null"//分割线 android:scrollbars="none"//滑动条android:fastScrollEnabled="true"//开启 阅读全文
posted @ 2012-08-25 15:10 bvin 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 主Activity 1 package com.test.nitifi; 2 3 import android.app.Activity; 4 import android.app.Notification; 5 import android.app.NotificationManager; 6 import android.app.PendingIntent; 7 import android.content.Context; 8 import android.content.Intent; 9 import android.net.Uri;10 import android.os.Bun. 阅读全文
posted @ 2012-08-22 11:45 bvin 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 在ListView加入 android:fastScrollEnabled="true" android:focusable="true"属性 阅读全文
posted @ 2012-08-20 15:52 bvin 阅读(194) 评论(0) 推荐(0) 编辑