Fragments lifecycle
Activity states Fragment callbacks Activity created onAttach() onCreate() onCreateView() onActivityCreated() onAttach(Context)This happens when the fragment is…
Activity states Fragment callbacks Activity created onAttach() onCreate() onCreateView() onActivityCreated() onAttach(Context)This happens when the fragment is…
When you create a fragment, Android Studio creates two files for you: Java code for the…
To add a fragment to your project… highlight the folder “app/src/main/java Go to “File” in menu…
What if you want your app to look and behave differently depending on whether itÄs running…
android:gravity=”value” android:gravity lets you say where you want the view’s contents to appear inside the view…
android:layout_gravity lets you say where you want views to appear in their available space. android:layout_gravity deals…
How you specify a linear layout You specify a linear layout using <LinearLayout>. You must specify…
When Android creates and destroys an activity, the activity moves from being launched to running to…
In non-Android Java, you can perform tasks like using a background thread. In Android, that approach…
Every Android app must include a file called AndroidManifest.xml. You can find it in the app/src/main…