Intent from Fragment to Activity

后端 未结 11 1489
再見小時候
再見小時候 2021-02-03 23:22

I was trying to go to another page using button, but it always fail.

Here is my First Class with its XML:

public class Fin         


        
11条回答
  •  离开以前
    2021-02-03 23:56

    If you can get a View in that fragment, you can access the context from there:

    view.getContext().startActivity(intent);
    

提交回复
热议问题