0
HorizontalScrollViewで2つのボタン(左に1つ、右に1つ)を使用してスクロールしようとしています。 私は連続したスクロールを手に入れることはできません。 誰かを助けることができますか?ボタンでスクロールする
どちらの例ではなく、連続ではない、仕事:
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
switch(v.getId()){
case R.id.bRight:
if(event.getAction() == MotionEvent.ACTION_DOWN){
sw.smoothScrollBy(20, 0);
}
break;
case R.id.bLeft:
sw.smoothScrollBy(-20, 0);
break;
}
return false;
}
は良いが、私はチェックして、私はあなたがsayd何しようとした – Oliver
ことなかったです、アプリがクラッシュします。理由は分かりません。 –
を教えて、答えを編集した – Oliver