how to start activity in adapter android

Solutions on MaxInterview for how to start activity in adapter android by the best coders in the world

showing results for - "how to start activity in adapter android"
Nico
19 Aug 2016
1 button.setOnClickListener(v -> {
2	Intent intent = new Intent(v.getContext(), SecondActivity.class);
3    v.getContext().startActivity(intent);
4 });
5
6//how to start activity in adapter android
Federica
06 Apr 2019
1override fun onClick(v: View?) {
2	val intent = Intent(v.context, TimerActivity::class.java)
3
4	v.context.startActivity(intent)
5}