摘要: 线性表,链表,哈希表是常用的数据结构,在进行Java开发时,JDK已经为我们提供了一系列相应的类来实现基本的数据结构。这些类均在java.util包中。本文试图通过简单的描述,向读者阐述各个类的作用以及如何正确使用这些类。Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口 Collection是最基本的集合接口,一个Collection代表一组Object,即Collection的元素(Elements)。一些 Collection允许相. 阅读全文
posted @ 2012-06-08 14:34 幻星宇 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 1、要弄清楚这个问题,首先需要弄明白什么是implicit(隐藏) intent什么是explicit(明确) intent。Explicit Intent明确的指定了要启动的Acitivity ,比如以下Java代码: Intent intent= new Intent(this, B.class) Implicit Intent没有明确的指定要启动哪个Activity ,而是通过设置一些Intent Filter来让系统去筛选合适的Acitivity去启动。2、intent到底发给哪个activity,需要进行三个匹配,一个是action,一个是category,一个是data。理论上来说 阅读全文
posted @ 2012-06-08 12:07 幻星宇 阅读(3480) 评论(0) 推荐(0) 编辑
摘要: private Timer timer = new Timer();timer.schedule(task, 800);TimerTask task = new TimerTask() { @Override public void run() { intent = new Intent(LoadUI.this, LoadDataService.class); Bundle bundle = new Bundle(); bundle.putString("city", WeatherUtil.getDefaultCity(LoadUI.this)); bundle.pu.. 阅读全文
posted @ 2012-06-08 11:49 幻星宇 阅读(330) 评论(0) 推荐(0) 编辑
摘要: GIFView gif = new GIFView(LoadUI.this, R.drawable.progress); ((RelativeLayout) findViewById(R.id.progress)).addView(gif);GIFView.javapackage src.com.android.weather.util;import java.io.InputStream;import android.content.Context;import android.graphics.Bitmap;import android.graphics.Canvas;imp... 阅读全文
posted @ 2012-06-08 11:46 幻星宇 阅读(936) 评论(0) 推荐(0) 编辑