I am new here, so I apologise if this question is somewhat trivial!
I'm trying to set up a clickable ImageView
to link to a website, and am getting a syntax error on my setOnClickListener
, which I can't figure out. I'm sure it's a straight forward error, but if someone could just point me in the right direction, it would be greatly appreciated!
Here's my code below:
public class VideoActivity extends Activity {
ImageView blipImg = (ImageView)findViewById(R.id.videoBlip);
blipImg.setOnClickListener = (new View.OnClickListener(){
public void onClick(View v){
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_BROWSABLE);
intent.setData(Uri.parse("http://blip.tv"));
startActivity(intent);
}
});
}