Android ImageView用法

详见:http://gentoo-pjq.vicp.net/bbs/viewtopic.php?f=8&t=85&p=100&sid=f1b441b45cf00aaa9b3c88e74fc45902#p100

代码可以到这里下载:http://github.com/pjq/weatherUI/tree/master
用git clone:

代码:
git clone git@github.com:pjq/weatherUI.git

要做一个weather report 的UI。
用Droiddraw画了一个UI。
写了一些测试代码,当点到一张图片的时候,并将这张图片显示出来。
这里要注意这一段:

代码:
public boolean onTouch(View v, MotionEvent event) {
ImageView imageview = (ImageView)findViewById(v.getId());
imageview.setBackgroundDrawable(v.getBackground());

按理说不应该再重新设置背景了,但很奇怪的是,当第一次点到一张图片时,会将这张点到的图片放到,所以在那么小的ImageView里就会显示不全,而只显示放大后的图片的一部分。
——后来又试了一下,好像又没问题,奇怪!!!

pjq@localhost ~/eclipse/workspace/weatherUI/src/com/qisda/weather $ cat weatherUI.java
package com.qisda.weather;

import android.app.Activity;
import android.os.Bundle;