Question : how to start activity in adapter android
Answered by : thoughtless-tiger-c3x1ygl2w4x3
button.setOnClickListener(v -> { Intent intent = new Intent(v.getContext(), SecondActivity.class); v.getContext().startActivity(intent); });
//how to start activity in adapter android
Source : | Last Update : Sun, 18 Jul 21
Question : start an activity in adapter
Answered by : shy-stork-dkb240etja9v
override fun onClick(v: View?) { val intent = Intent(v.context, TimerActivity::class.java) v.context.startActivity(intent)
}
Source : | Last Update : Tue, 28 Apr 20