Applications Development | Week 1 - 4

studied byStudied by 34 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 48

49 Terms

1

Hint

  • A short message displayed in UI elements, like text fields, to guide users.

  • They typically appear as greyed-out text providing clues about the expected input.

New cards
2

Toast

  • Provides a simple feedback about an operation in a small popup.

  • They are used to show short messages and do not interfere with user interaction

New cards
3

Context

This term refers to an object that provides access to application-specific resources and information.

New cards
4

getApplicationContext()

This method is a way to obtain the global application context in Android.

New cards
5

Snackbar

  • You can use this for alternatives if you want to include user actionable options, which provide a better app experience.

  • Works best if they are displayed inside of a CoordinatorLayout.

New cards
6

CoordinatorLayout

Allows the snackbar to enable behavior like swipe-to-dismiss, as well as automatically moving widgets.

New cards
7

AutoCompleteTextView

  • It is a versatile Android widget that enhances user input by providing autosuggestions or completions as users type.

  • It can filter suggestions based on user input, providing a more tailored list of options as the user types.

New cards
8
  1. Improves user experience.

  2. Reduces typing errors.

  3. Accelerates data entry.

Importance of AutoComplete:

New cards
9

Implementating AutoComplete

  • It is straightforward

  • Works like a regular EditText but comes with a dropdown menu showing suggestions based on user input.

New cards
10

Suggestions

  • Provided through an adapter.

  • You can use ArrayAdapter for a simple list of suggestions or customize for more complex scenarios.

New cards
11

ArrayAdapter

  • Serves as a link between the UI Component and the Data Source.

  • It transforms data from the data sources into view items that may be shown in the UI Component.

New cards
12

.setThreshold()

Set the minimum number of characters to trigger suggestions

New cards
13

ListView

  • A ViewGroup that is used to display the list of items in multiple rows and contains an adapter that automatically inserts the items into the list.

  • The main purpose of the adapter is to fetch data from an array or database and insert each item that is placed into the list for the desired result.

New cards
14

AlertDialog

  • It is a pop-up interface that provides important information or prompts user interaction.

  • These pop-up interfaces act as a bridge between your application and its users, creating a seamless and interactive user experience

  • It serves to prevent accidental deletion of messages by confirming the user's intent before taking any action.

  • It provides a clear and concise prompt, enhancing user understanding and minimizing the risk of unintentional data loss.

New cards
15

setMessage("Your Message")

  • Sets the main message text in the alert dialog.

  • Provides clear and concise information to the user.

  • Syntax:

alertDialogBuilder.setMessage("Are you sure you want to say hello?")

New cards
16

setTitle(“Dialog Title”)

  • Sets the title of the alert dialog

  • Syntax:

alertDialogBuilder.setTitle("Enter Text")

New cards
17

.setPositiveButton(“Positive Button Text”, onClickListener)

  • Adds a positive button to the dialog with the specified text.

  • Handles the positive action

  • Syntax:

.setPositiveButton("Yes", new DialogInterface.OnClickListener(){}

New cards
18

.setNegativeButton(“Negative Button Text”, onClickListener)

  • Adds a negative button to the dialog with the specified text.

  • Handles the negative action

  • Syntax:

.setNegativeButton("No", new DialogInterface.OnClickListener(){}

New cards
19

.setCancelable(boolean)

  • Sets whether the dialog can be canceled using the back button or outside touch.

  • Use true for cancellable, false otherwise.

  • Syntax:

    .setCancelable(false)

New cards
20

.show()

  • Displays the alert dialog to the user.

  • This method should be called after configuring all necessary properties.

  • Syntax:

.show();

New cards
21

Notification

  • It is a message that Android displays outside your app's UI to provide the user with reminders, communication from other people, or other timely information from your app.

  • Users can tap the notification to open your app or take an action directly from the notification.

New cards
22

Notication in its Basic and Compact Form

  • Also known as collapsed form

  • Displays an icon, a title, and a small amount of text content

New cards
23
  1. Small Icon

  2. App name

  3. Time stamp

  4. Large Icon

  5. Title

  6. Text

Notification Anatomy

New cards
24

Small Icon

  • Required

  • set using setSmallIcon()

New cards
25

App name

Provided by the system

New cards
26

Time stamp

  • Also provided by the system; but

  • Can override it using setWhen(); or

  • Hide it using setShowWhen(false)

New cards
27

Large Icon

  • Optional;

  • Usually used only for contact photos.

  • Don't use it for your app icon.

  • Set using setLargeIcon()

New cards
28

Title

  • Also optional;

  • Set using setContentTitle()

New cards
29

Text

  • Also optional;

  • Set using setContentText()

New cards
30

PendingIntent

To make your notification clickable and open your application, you need to add a _____________ to your NotificationCompat.Builder.

New cards
31

addAction

To add an action button to your notification, you can use the _________ method of the NotificationCompat.Builder class.

New cards
32

Splash Screen

It is a screen that appears when you launch an app, typically displaying the app's logo or branding for a few seconds before transitioning to the main content.

New cards
33
new Handler().postDelayed

Creates a new instance of the Handler class and calls its ‘postDelayed’ method that is responsible for making the code to be run after the specified amount of time elapses.

New cards
34
(new Runnable()

Represents a task that can be executed

New cards
35
public void run(){

  • This is the run method of the Runnable interface

  • It contains the code that will be executed after the specified delay.

New cards
36

CardView

It is a UI component in Android that serves as a container for organizing and displaying information in a card-like structure.

New cards
37
  1. Rounded Corners (Ex. app:cardCornerRadius = “dp”)

  2. Elevation (Ex: app:cardElevation = “dp”)

Features of CardView:

New cards
38

RecyclerView

  • It makes it easy to efficiently display large sets of data.

  • You supply the data and define how each item looks, and the

    RecyclerView library dynamically creates the elements when they're needed.

  • It's an improvement over ListView, offering better performance and flexibility.

New cards
39

Constructor

  • It is a special method that is automatically called when an object of a class is created.

  • Its primary purpose is to initialize the object's state, setting initial values for the object's attributes or performing any necessary setup.

  • It is used to set initial values for object attributes or to perform any setup steps required when an object is created.

New cards
40

Getters

  • It is used to retrieve the value of a private field.

  • It is often named with the prefix "get" followed by the name of the attribute.

  • It allows you to read the value of a private field.

  • It is used in Java to retrieve the values of private fields from a class

New cards
41

RecyclerViewAdapter

Manages the list of planets and binds data to the views.

New cards
42

myViewHolder

Holds references to the views in each item layout.

New cards
43

Context

Used to inflate the layout and access resources.

New cards
44

onCreateViewHolder

Inflates the item

New cards
45

onBindViewHolder

Binds data to the views.

New cards
46

getItemCount

Returns the number of items in the list.

New cards
47

Interface

  • It is a contract between any class that implements it.

  • Refers to a programming construct that defines a contract for the methods that a class must implement.

  • It is used to achieve abstraction and provide a way for classes to interact with each other without exposing their internal details.

  • In the context of Android development, these are commonly used for implementing event listeners, callbacks, and other communication patterns between different components.

New cards
48
@Override
public void onItemClick(int position){
//** Code
}

This method will be added after you click Implement Methods

New cards
49
void onItemClick(int position);

Perform a few checks if the recycleView Interface is not null. And after knowing that the recyclerView is not null, we will grab the position from our adapter because it is needed in our interface method which is the ____

New cards
robot