On Android, how do you switch activities programmatically?

前端 未结 8 875
盖世英雄少女心
盖世英雄少女心 2020-12-01 06:29

It seems like every example I can find of switching between activities involves creating an Intent and passing in the context of a View via an OnClickListener associated wit

相关标签:
8条回答
  • 2020-12-01 06:50

    Use PreferenceChangeListener :)

    0 讨论(0)
  • 2020-12-01 06:54

    when ever u want to switch activity . u can call these code .

    Intent intent = new Intent(this, MyActivity.class);
    startActivity(intent);
    

    You can write this code in PreferenceChangeListener.

    0 讨论(0)
提交回复
热议问题