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
{
15 private Context mContext
;
16 public LinkImageView(Context context
) {
18 // TODO Auto-generated constructor stub
21 public LinkImageView(Context context
, AttributeSet attrs
) {
22 super(context
, attrs
);
23 setOnClickListener(this);
27 public LinkImageView(Context context
, AttributeSet attrs
, int defStyle
) {
28 super(context
, attrs
, defStyle
);
29 // TODO Auto-generated constructor stub
32 public String
getUrl() {
36 public void setUrl(String mUrl
) {
40 public void onClick(View v
) {
41 Intent intent
= new Intent(mContext
,ImageViewActivity
.class);
42 intent
.putExtra("url", mUrl
);
43 mContext
.startActivity(intent
);