How to use Fragments in Android

前端 未结 4 1082
我寻月下人不归
我寻月下人不归 2020-11-28 13:49

EDIT ::: Please refer to my answer below...

Question:::

I am very new to using Fragments in Android and I am completely messed up.

I am just trying t

4条回答
  •  醉话见心
    2020-11-28 14:27

    You need to add an empty public constructor to your Fragments, like it says in the stack trace:

    public class Fragment_2 extends Fragment{
    
        public Frament_2() {
            //BLAH!
        }
    
        // The rest of your code
    
    }
    

提交回复
热议问题