update ui layout
[freespace.git] / weibosrc / com / weibo / view / LinkImageView.java
blob56cdd26bc270e604f459e447f92ae72dfaf88d4b
1 package com.weibo.view;
3 import android.content.Context;
4 import android.content.Intent;
5 import android.util.AttributeSet;
6 import android.view.View;
7 import android.view.View.OnClickListener;
8 import android.widget.ImageView;
10 import com.weibo.sina.ImageViewActivity;
12 public class LinkImageView extends ImageView implements OnClickListener{
14 private String mUrl;
15 private Context mContext;
16 public LinkImageView(Context context) {
17 super(context);
18 // TODO Auto-generated constructor stub
21 public LinkImageView(Context context, AttributeSet attrs) {
22 super(context, attrs);
23 setOnClickListener(this);
24 mContext = context;
27 public LinkImageView(Context context, AttributeSet attrs, int defStyle) {
28 super(context, attrs, defStyle);
29 // TODO Auto-generated constructor stub
32 public String getUrl() {
33 return mUrl;
36 public void setUrl(String mUrl) {
37 this.mUrl = mUrl;
40 public void onClick(View v) {
41 Intent intent = new Intent(mContext,ImageViewActivity.class);
42 intent.putExtra("url", mUrl);
43 mContext.startActivity(intent);