AppCompatActivity class
The AppCompatActivity class is a subclass of Activity. It lives in the AppCompat Support Library, and…
The AppCompatActivity class is a subclass of Activity. It lives in the AppCompat Support Library, and…
The Android Support Libraries provide backward compatibility with older versions of Android. THey sit outside the…
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…
Add a cutom class to an Android project by going to File menu -> New ->…
string.xml is the default resource file used to hold name/value pairs of Strings sot that they…
A static variables value is the same for aALL instances of the class…The static duckCount variable…
Simple rules for building a better inheritance design. DO use inheritance when one class is a…
Remember that when one class inherits from another, we say that the subclass extends the superclass.…
An example how to design classes… Figure out what the class is supposed to do List…
XP emerged in the late 90’s and has been adopted by many Developers. The thrust of…
A method uses parameters. A caller passes arguments. Arguments are the things you pass into the…
Arrays are always objects, whether they’re declared to hold primitives…int[] nums;nums = new int[3];nums[0] = 4;nums[1]…
Variables come in two flawors: Primitives Reference Primitives Primitives hold fundamental values (think: simple bit patterns)…
Activities are the unique screen pages in Android! An activity is a single focused thing your…
SetContentView (): Set up the app’s user interface. You can consider your object or ID to…