You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I went through the other issues but really couldn't find my response.
So far, I understand that onSwitch is where I handle when each icon is clicked and replaceFragment uses getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, contentFragment).commit(); and eventually returns ContentFragment object.
My question is: how do I create multiple fragments that each has its own textView & imageView elements. For instance, when BUILDING icon is clicked, it should open a dashboard view with textView and editView elements. When ABOUT is clicked, it should open a static text view.
I've tried multiple approaches including:
**adding a FrameLayout to activity_main.xml but I couldn't create another contentFragment for getSupportFragmentManager( ) so got errors.
**I created a new Fragment class to extend ContentFragment but still got errors w
**Created custom class to extend Fragment and implement ScreenShotable and still errors
Any tip / guidance will be super appreciated. Thanks.
The text was updated successfully, but these errors were encountered:
Hi, @fnokeke! Yours third option was right. You need to create your own fragment, and implement ScreenShotable interface.
Can you provide logs of what went wrong?
Hi,
I went through the other issues but really couldn't find my response.
So far, I understand that onSwitch is where I handle when each icon is clicked and replaceFragment uses getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, contentFragment).commit(); and eventually returns ContentFragment object.
My question is: how do I create multiple fragments that each has its own textView & imageView elements. For instance, when BUILDING icon is clicked, it should open a dashboard view with textView and editView elements. When ABOUT is clicked, it should open a static text view.
I've tried multiple approaches including:
**adding a FrameLayout to activity_main.xml but I couldn't create another contentFragment for getSupportFragmentManager( ) so got errors.
**I created a new Fragment class to extend ContentFragment but still got errors w
**Created custom class to extend Fragment and implement ScreenShotable and still errors
Any tip / guidance will be super appreciated. Thanks.
The text was updated successfully, but these errors were encountered: