嘿伙计们,这是我的问题。我试图能够单击 aTextView并检测到该触摸事件(如果我不包括 则该事件有效setMovementMethod)。当我包括 时setMovementMethod,onClick根本不起作用。我想同时使用能够向下滚动我的TextView,但也能够单击它并处理该事件。谢谢。
public class SQLView extends Activity implements OnClickListener{
    public static final String KEY_ROWID = "_id";
    public static final String KEY_FRONT = "card_front";
    public static final String KEY_BACK = "card_back";
    private Cursor myCursor;
    private TextView tv, card_info;
    private int iRow;
    private int iFront;
    private int iBack;
    private String info = null;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.sqlview);
        tv = (TextView)findViewById(R.id.flashcard);
        tv.setMovementMethod(new ScrollingMovementMethod());
        tv.setOnClickListener(this);
        Flashcards Cards = new Flashcards(this);
        Cards.open();//open DB
        myCursor = Cards.getCursor();
        iRow = myCursor.getColumnIndex(KEY_ROWID);
        iFront = myCursor.getColumnIndex(KEY_FRONT);
        iBack = myCursor.getColumnIndex(KEY_BACK);
        myCursor.moveToFirst();
        intialize();
        tv.setText(myCursor.getString(iFront));
    }
    private void intialize(){
        Button add = (Button) findViewById(R.id.add_new);
        Button next = (Button) findViewById(R.id.next);
        Button prev = (Button) findViewById(R.id.prev);
        add.setOnClickListener(this);
        next.setOnClickListener(this);
        prev.setOnClickListener(this);
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.next:
                if(myCursor.isLast()){
                    myCursor.moveToFirst();
                    tv.setText(myCursor.getString(iFront));
                }else{
                    myCursor.moveToNext();
                    tv.setText(myCursor.getString(iFront));
                }
                break;
            case R.id.prev:
                if(myCursor.isFirst()){
                    myCursor.moveToLast();
                    tv.setText(myCursor.getString(iFront));
                }else{
                    myCursor.moveToPrevious();
                    tv.setText(myCursor.getString(iFront));
                }
                break;
            case R.id.flashcard:
                if(tv.getText().equals(myCursor.getString(iFront))){
                    tv.setText(myCursor.getString(iBack));
                    break;
                }
                tv.setText(myCursor.getString(iFront));
                break;
            case R.id.add_new:
                Intent list = new Intent("com.example.flashcards.ADD_FLASHCARD");
                startActivity(list);
                break;
        }
    }
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
    android:id="@+id/flashcard"
    android:layout_width="fill_parent"
    android:layout_height="34dp"
    android:layout_weight="0.17"
    android:gravity="center"
    android:maxLines="300"
    android:scrollbars="vertical"
    android:textSize="30dp" />
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content" >
    <Button
        android:id="@+id/add_new"
        android:layout_width="wrap_content"
        android:layout_height="64dp"
        android:layout_weight="0.51"
        android:text="Add New"/>
    <Button
        android:id="@+id/next"
        android:layout_width="wrap_content"
        android:layout_height="64dp"
        android:layout_weight="0.51"
        android:text="Next"/>
    <Button
        android:id="@+id/prev"
        android:layout_width="wrap_content"
        android:layout_height="64dp"
        android:layout_weight="0.51"
        android:text="Previous" />
</LinearLayout>
</LinearLayout>