SlideShare a Scribd company logo
Embracing the Lollipop
Sonja Kesic - PSTech
• PSTech
• We develop core apps on top of Vanilla
implementation
• Lollipop - the greatest update of them all
Why am I here?
Embracing the Lollipop
• Define custom colors using theme
attributes to brand the application:
colorPrimary,
colorPrimaryDark,
colorAccent
• Reduced color palette comprised
of bold vibrant colors
• Use opacity for text, icons and
dividers
@android:style/Theme.Material
http://www.materialpalette.com/
@android:style/Theme.Material
• Ripple effect as default touch feedback for buttons
• To apply ripple feedback for other views set view
background to
?android:attr/selectableItemBackground
• Using RippleDrawable from XML:
<ripple android:color=“@color/ripple_dark" >
<item android:drawable=“@drawable/my_drawable”
</ripple>
@android:style/Theme.Material
FAB
<FrameLayout
android:id="@+id/dialpad_floating_action_button_container"
android:layout_width="@dimen/floating_action_button_width"
android:layout_height="@dimen/floating_action_button_height"
android:layout_above="@id/dialpad_floating_action_button_margin_bottom"
android:layout_centerHorizontal="true"
android:background="@drawable/fab_green" >
<ImageButton
android:id="@+id/dialpad_floating_action_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/floating_action_button"
android:contentDescription="@string/description_dial_button"
android:src="@drawable/fab_ic_call" />
</FrameLayout>
FAB example implementation
Cards
• Display multiple heterogeneous data types
(mixed images, text, video...)
• It’s not a replacement for a list or a grid
• Cards content can be dismissible and user
could interact with it (like, comment, etc)
• FrameLayout
android.support.v7.widget.CardView
with built-in elevation and rounded corners
• Advanced ListView created with flexibility in mind
• RecyclerView.Adapter is required to supply the data. There is
no default implementation for CursorAdapter
• RecyclerView.ViewHolder enforces the use of view holder
• Need for supplying layout manager implementation. There is a
default implementation of RecyclerView.LayoutManager for
both vertical and horizontal linear layout
• Touch handling: RecyclerView.OnItemTouchListener
• RecyclerView.ItemAnimator responsible for animations
RecyclerView
public class DroidconRecyclerAdapter extends
RecyclerView.Adapter<DroidconRecyclerAdapter.DroidconViewHolder> {
…
}
public class DroidconViewHolder extends RecyclerView.ViewHolder {
public TextView text;
public DroidconViewHolder(View itemView) {
super(itemView);
text= itemView.findViewById(R.id.text);
}
}
RecyclerView example
public class DroidconRecyclerAdapter extends
RecyclerView.Adapter<DroidconRecyclerAdapter.DroidconViewHolder> {
…
@Override
public DroidconViewHolder onCreateViewHolder(ViewGroup parent, int
viewType) {
…
}
@Override
public void onBindViewHolder(DroidconViewHolder holder, int
position) {
…
}
}
RecyclerView example
public class DroidconRecyclerAdapter extends
RecyclerView.Adapter<DroidconRecyclerAdapter.DroidconViewHolder> {
…
@Override
public DroidconViewHolder onCreateViewHolder(ViewGroup parent, int
viewType) {
View v = mInflater.inflate(R.layout.item, parent, false);
return new DroidconViewHolder(v);
}
@Override
public void onBindViewHolder(DroidconViewHolder holder, int
position) {
holder.text.setText(mItems.get(position));
}
RecyclerView example
public class DroidconViewHolder extends RecyclerView.ViewHolder {
…
public DroidconViewHolder(View itemView) {
super(itemView);
…
itemView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// Do something
}
});
}
RecyclerView
recyclerView = (RecyclerView)findViewById(R.id.horizontal_list);
recyclerView.setAdapter(new DroidconRecyclerAdapter(mDroidconItems));
recyclerView.setLayoutManager(new LinearLayoutManager(this,
LinearLayoutManager.HORIZONTAL, false));
recyclerView.setItemAnimator(new DefaultItemAnimator());
…
RecyclerView
• Transition framework since KitKat
• Key concepts: Scene and Transition
• What’s new in the API?
• Support for animations when switching between
activities and fragments
• Shared element animations
Activity and Fragment Transitions
Content and shared element transitions
• Supported content transitions: Fade, Slide, Explode
• Howto do it?
• Setit in thetheme:
<!-- specify enter and exit transitions -->
<item name="android:windowEnterTransition">@transition/explode</item>
<item name="android:windowExitTransition">@transition/explode</item>
• Requestitin the code:
getWindow().setExitTransition(new Explode());
• Call correspondingFragment methodsorset it in FragmentXML:
<android:fragmentEnterTransition=“@transition/explode” />
ContentTransitions
• Supportedcontenttransitions:ChangeBounds, ChangeTransform, ChangeClipBounds, ChangeImageTransform
• Howtodoit?
1. Specify shared element transition in theme:
<!-- specify shared element transitions -->
<item name="android:windowSharedElementEnterTransition">@transition/image_transform</item>
2. Definetransitionin XML:
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
<changeImageTransform/>
</transitionSet>
SharedElement Transitions
3. Assign a common name for the shared views in both layouts by using
android:transitionName attribute.
4. Start the activity with a Bundle holding transitions and shared views:
// create the transition animation - the images in the layouts
// of both activities are defined with android:transitionName=“user_photos"
ActivityOptions options = ActivityOptions
.makeSceneTransitionAnimation(this, userPhotoView, “user_photos");
// start the new activity
startActivity(intent, options.toBundle());
5. To reverse the scene transition animation when you finish the second activity call the
finishAfterTransition()
SharedElement Transitions
• http://www.google.com/design/
• http://developer.android.com
• http://android-developers.blogspot.com
Sources
Embracing the Lollipop

More Related Content

PDF
Android 102 - Flow, Layouts and other things
Kai Koenig
 
PDF
Flutter
Dave Chao
 
PDF
[React-Native Tutorial] Map
Kobkrit Viriyayudhakorn
 
PDF
Errores en excel
WILMER CUJILEMA-- ESPOCH
 
PDF
Getting Started With Material Design
Yasin Yildirim
 
PPTX
Material Design Android
Samiullah Farooqui
 
PDF
Android Lollipop - Webinar am 11.12.2014
inovex GmbH
 
PDF
Material Design and Backwards Compatibility
Angelo Rüggeberg
 
Android 102 - Flow, Layouts and other things
Kai Koenig
 
Flutter
Dave Chao
 
[React-Native Tutorial] Map
Kobkrit Viriyayudhakorn
 
Errores en excel
WILMER CUJILEMA-- ESPOCH
 
Getting Started With Material Design
Yasin Yildirim
 
Material Design Android
Samiullah Farooqui
 
Android Lollipop - Webinar am 11.12.2014
inovex GmbH
 
Material Design and Backwards Compatibility
Angelo Rüggeberg
 

Similar to Embracing the Lollipop (20)

PPT
Getting the Magic on Android Tablets
Motorola Mobility - MOTODEV
 
PDF
Tips & Tricks to spice up your Android app
Jérémie Laval
 
PDF
Android Lollipop - Webinar vom 11.12.2014
inovex GmbH
 
PDF
Android app material design from dev's perspective
DeSmart Agile Software House
 
PPTX
What's New in Android
Robert Cooper
 
PDF
07_UIAndroid.pdf
ImranS18
 
PPTX
Android 3
Robert Cooper
 
PDF
Android Lollipop and Material Design
James Montemagno
 
PDF
Introducing Honeycomb
CommonsWare
 
PDF
FITC 2012 Jellybean Tips and Tricks
Faisal Abid
 
PPTX
Fernando F. Gallego - Efficient Android Resources 101
Fernando Gallego
 
PPT
Ui patterns
OSCON Byrum
 
PPT
Beautifully Usable, Multiple Screens Too
Motorola Mobility - MOTODEV
 
ODP
Day seven
Vivek Bhusal
 
PDF
Volley lab btc_bbit
CarWash1
 
PDF
Top Tips for Android UIs - Getting the Magic on Tablets
Motorola Mobility - MOTODEV
 
PDF
With a little help from my libs
Royi benyossef
 
PDF
Android Develpment vol. 3, MFF UK, 2015
Tomáš Kypta
 
KEY
Android workshop
Michael Galpin
 
PDF
Dinosaurs and Androids: The Listview Evolution
Fernando Cejas
 
Getting the Magic on Android Tablets
Motorola Mobility - MOTODEV
 
Tips & Tricks to spice up your Android app
Jérémie Laval
 
Android Lollipop - Webinar vom 11.12.2014
inovex GmbH
 
Android app material design from dev's perspective
DeSmart Agile Software House
 
What's New in Android
Robert Cooper
 
07_UIAndroid.pdf
ImranS18
 
Android 3
Robert Cooper
 
Android Lollipop and Material Design
James Montemagno
 
Introducing Honeycomb
CommonsWare
 
FITC 2012 Jellybean Tips and Tricks
Faisal Abid
 
Fernando F. Gallego - Efficient Android Resources 101
Fernando Gallego
 
Ui patterns
OSCON Byrum
 
Beautifully Usable, Multiple Screens Too
Motorola Mobility - MOTODEV
 
Day seven
Vivek Bhusal
 
Volley lab btc_bbit
CarWash1
 
Top Tips for Android UIs - Getting the Magic on Tablets
Motorola Mobility - MOTODEV
 
With a little help from my libs
Royi benyossef
 
Android Develpment vol. 3, MFF UK, 2015
Tomáš Kypta
 
Android workshop
Michael Galpin
 
Dinosaurs and Androids: The Listview Evolution
Fernando Cejas
 
Ad

Recently uploaded (20)

PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PDF
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
PDF
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PPTX
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Presentation about variables and constant.pptx
safalsingh810
 
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
Ad

Embracing the Lollipop