2012-01-19 15 views
1

カメラの画像に1つのPNG画像が表示されています。画像をタッチまたはクリックしたときにタッチ/クリックイベントを生成したい場合は、イベントハンドラでURLをブラウザで開きます。アンドロイドカメラでの画像のタッチイベント

/** Called when the activity is first created. */ 
    @Override 

     ImageView iv=(ImageView) findViewById(R.id.test_image); 
     iv.setOnClickListener(new OnClickListener() { 


     public void onClick(View v) { 
      // TODO Auto-generated method stub 
      Intent browserIntent=new Intent(Intent.ACTION_VIEW,Uri.parse("http://www.cdacb.in")); 
      startActivityForResult(browserIntent,0); 
     } 

答えて

0

この意図は、あなたに役立つかもしれない:

Intent intent = new Intent(); 
    intent.setAction(Intent.ACTION_VIEW); 
    intent.addCategory(Intent.CATEGORY_BROWSABLE); 
    intent.setData(Uri.parse("http://www.cdacb.in")); 
    startActivity(intent); 
関連する問題