Android - setOnClickListener for TextView

后端 未结 6 1956
孤街浪徒
孤街浪徒 2021-02-05 10:47

It should be straightforward, but I am not sure where something is wrong. I try to catch the click on the TextView with:

public void runNextTask(){
         


        
6条回答
  •  伪装坚强ぢ
    2021-02-05 11:40

     super.onCreate(savedInstanceState);
     setContentView(R.layout.other_activity);
     findViewById(R.id.TextView).setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
    
        }
    });
    

提交回复
热议问题