2011-06-17 12 views

答えて

3

それはあなたのカスタムギャラリーであれば、あなたは以下の

ような何かを行うことができますonclickの方法で設定された画像

previousButton = (Button) findViewById(R.id.backButton); 
     previousButton.setOnClickListener(this); 

     nextButton = (Button) findViewById(R.id.nextButton); 
     nextButton.setOnClickListener(this); 

ボタンに

@Override 
public void onClick(View view) { 
    // TODO Auto-generated method stub 
    if (view == previousButton) { 
      --positionOfSelectedImage; 
      // set background image of 
     } else if (view == nextButton) { 
      ++positionOfSelectedImage; 
     } 

imageToBeSet.setImageURI(Uri.parse(absolutepathOfImage)); 
} 

おかげ ディーパック

をリスナーを追加します
関連する問題