Mad Unit2
Mad Unit2
Mad Unit2
ANDROID UI DESIGN
Topics
package com.hfad.messenger;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.widget.TextView;
public class ReceiveMessageActivity extends Activity {
There are around six types of Android Adapters that are available to us.
Adapter View constructors
Adapter View -classes & interfaces
Methods involved in Android Adapters
MENU
A Menu is a crucial part of the User Interface that handles frequent functionalities of
the application.
The menu helps us provide a user-friendly interface that handles a lot of actions.
Types of Android Menu
Let us see the various types of menu in
Android:
A contextual menu is a
floating menu. It appears
only when the users long-
press an element or right
clicks on that.
It generally affects the
selected element.
App Bar
• Recycler View
• Card View
RecyclerView
• The RecyclerView class supports the display of a collection
of data.
• It is a modernized version of the ListView and
the GridView classes provided by the Android framework.
• Recycler view addresses several issues that the existing
widgets have.
• It enforced a programming style that results in good
performance.
• It also comes with default animations for removing and
adding elements.
RecyclerView
• RecyclerView allow to use different layout managers
for positioning items.
• Recycler view uses a ViewHolder to store references
to the views for one entry in the recycler view.
• A ViewHolder class is a static inner class in your
adapter which holds references to the relevant views.
• With these references your code can avoid the time-
consuming findViewById() method to update the
widgets with new data.
Card View
• CardViews can be used to display the row of data in a RecyclerView or ListView.
• A new material theme
• New widgets – particularly for displaying
collections of data
• APIs for creating view elevations and shadows
• APIs for clipping views
• Addition of vector drawables
• APIs for custom animations
Material Theme