SMD Final Notes
SMD Final Notes
Firestore:
When to Use:
Advantages:
When to Use:
● Saving user settings and preferences.
● Storing simple data like user login status, app theme, etc.
Q5: AppCompatActivity
● ListAdapter: Built-in support for handling data changes and diffing, reduces boilerplate
code.
● RecyclerView.Adapter: More flexible and customizable, but you need to handle data
changes manually.
ViewPager:
● The Application class is the base class for maintaining global application state.
● Override it to initialize resources, libraries, and settings that need to be shared across
the app.
You can use the split() method in Java to separate a string based on a token
To convert a byte[] into a Bitmap and then load it using Picasso, follow these steps:
● ItemView:
○ Pros: Simple, lightweight, good for individual views.
○ Cons: Not suitable for handling large lists of data efficiently.
● RecyclerView:
○ Pros: Efficient, supports large datasets, offers features like view recycling,
animations, item decorations.
○ Cons: More complex setup, requires creating adapters and view holders.
Q4: Add Icons at the Start of EditText (e.g., Email) and InputEditTextLayout
EditText ... android:drawableLeft="@drawable/my_icon" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:startIconDrawable="@drawable/ic_email">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Email" />
</com.google.android.material.textfield.TextInputLayout>
● APK (Android Package): The file format used to distribute and install applications on
Android devices. It contains all the app's code, resources, assets, and manifest.
● ListAdapter:
○ Pros: Built-in support for data changes and diffing.
○ Cons: Less flexible compared to RecyclerView.Adapter.
● RecyclerView.Adapter:
○ Pros: Highly customizable and flexible.
○ Cons: Requires more boilerplate code to handle data changes.
● Application Class: Base class for maintaining global application state. Override it to
initialize resources, libraries, and settings shared across the app.
You can use the split() method in Java to separate a string based on a token.