SlideShare une entreprise Scribd logo
1  sur  112
Télécharger pour lire hors ligne
Material Design 
Backwards Compatibility
2 
About Me 
• Mobile Development 
• Android 
• iOS 
• REST-Api Design 
• Cloud Infrastructure 
+Angelo Rüggeberg 
@s3xy4ngyc 
http://s3xy4ngyc.github.io
Sample app 
• Source Available at 
Github: 
https://github.com/ 
s3xy4ngyc/Android-L-Samples 
• Available at Google Play: 
https://play.google.com/ 
store/apps/details? 
id=s3xy.de.lsamples 
3
4
Distribution 
5
Distribution 
6
Distribution 
• Devices having Android 5.0 officially: 
• Nexus 5 
• Nexus 7 
• Nexus 9 
• LG G3 
6
Distribution 
7
Distribution 
7
Dependencies 
8
9
9 
dependencies { 
compile 'com.android.support:support-v4:21.0.2' 
compile 'com.android.support:appcompat-v7:21.0.2' 
compile 'com.android.support:cardview-v7:21.0.2' 
compile 'com.android.support:recyclerview-v7:21.0.2' 
compile 'com.android.support:gridlayout-v7:21.0.2' 
compile 'com.android.support:mediarouter-v7:21.0.2' 
compile 'com.android.support:palette-v7:21.0.2' 
compile 'com.android.support:support-v13:21.0.2' 
compile 'com.android.support:leanback-v17:21.0.2' 
compile 'com.android.support:support-annotations:21.0.2' 
}
9 
dependencies { 
compile 'com.android.support:support-v4:21.0.2' 
compile 'com.android.support:appcompat-v7:21.0.2' 
compile 'com.android.support:cardview-v7:21.0.2' 
compile 'com.android.support:recyclerview-v7:21.0.2' 
compile 'com.android.support:gridlayout-v7:21.0.2' 
compile 'com.android.support:mediarouter-v7:21.0.2' 
compile 'com.android.support:palette-v7:21.0.2' 
compile 'com.android.support:support-v13:21.0.2' 
compile 'com.android.support:leanback-v17:21.0.2' 
compile 'com.android.support:support-annotations:21.0.2' 
} 
‚//material Theme, ActionBar, etc.
9 
dependencies { 
compile 'com.android.support:support-v4:21.0.2' 
compile 'com.android.support:appcompat-v7:21.0.2' 
compile 'com.android.support:cardview-v7:21.0.2' 
compile 'com.android.support:recyclerview-v7:21.0.2' 
compile 'com.android.support:gridlayout-v7:21.0.2' 
compile 'com.android.support:mediarouter-v7:21.0.2' 
compile 'com.android.support:palette-v7:21.0.2' 
compile 'com.android.support:support-v13:21.0.2' 
compile 'com.android.support:leanback-v17:21.0.2' 
compile 'com.android.support:support-annotations:21.0.2' 
} 
‚//material Theme, ActionBar, etc. 
‚//New Components for Pre 5.0
Apply Material 
Theme 
10
11
11 
android: 
Theme.Material
11 
android: 
Theme.Material 
android: 
Theme.Material.Light
Theme.AppCompat Theme.AppCompat.Light 
11 
android: 
Theme.Material 
android: 
Theme.Material.Light
Apply Material Theme 
12
Apply Material Theme 
• Custom Style Extending Appcompat Style 
12
Apply Material Theme 
• Custom Style Extending Appcompat Style 
• Things to note: 
12
Apply Material Theme 
• Custom Style Extending Appcompat Style 
• Things to note: 
• No more @android duplicates 
12
Apply Material Theme 
• Custom Style Extending Appcompat Style 
• Things to note: 
• No more @android duplicates 
• No more v14+ Style Folder 
12
13
13
13
13
13
13
13
Apply Material Theme 
14
Apply Material Theme 
• Ui Elements that Get Material Design: 
• EditText 
• Spinner 
• CheckBox 
• RadioButton 
• Switch 
• CheckedTextView 
14
Apply Material Theme 
• Ui Elements that Get Material Design: 
• EditText 
• Spinner 
• CheckBox 
• RadioButton 
• Switch 
• CheckedTextView 
• All Other UI Elements do not get Styled 
and Need Custom Styling/Views 
14
Action Bar Drawer 
Toggle 
15
16 
Action Bar Drawer Toggle
16 
Action Bar Drawer Toggle
Action Bar Drawer Toggle 
17
Action Bar Drawer Toggle 
• import 
android.support.v7.app.ActionBarDrawerT 
oggle 
• Extend from ActionBarActivity 
• Init DrawerToggle with Drawer Layout 
• Assign DrawerToggle to DrawerLayout 
17
18
18 
DrawerLayout mDrawerLayout; 
ActionBarDrawerToggle drawerToggle; 
@Override 
protected void onCreate(Bundle savedInstanceState) { 
super.onCreate(savedInstanceState); 
setContentView(R.layout.activity_my); 
drawerToggle = new ActionBarDrawerToggle(this, 
mDrawerLayout, 
R.string.app_name, 
R.string.app_name) { 
}; 
mDrawerLayout.setDrawerListener(drawerToggle); 
getSupportActionBar().setDisplayHomeAsUpEnabled(true); 
getSupportActionBar().setHomeButtonEnabled(true); 
}
18 
DrawerLayout mDrawerLayout; 
ActionBarDrawerToggle drawerToggle; 
@Override 
protected void onCreate(Bundle savedInstanceState) { 
super.onCreate(savedInstanceState); 
setContentView(R.layout.activity_my); 
drawerToggle = new ActionBarDrawerToggle(this, 
mDrawerLayout, 
R.string.app_name, 
R.string.app_name) { 
}; 
mDrawerLayout.setDrawerListener(drawerToggle); 
getSupportActionBar().setDisplayHomeAsUpEnabled(true); 
getSupportActionBar().setHomeButtonEnabled(true); 
}
18 
DrawerLayout mDrawerLayout; 
ActionBarDrawerToggle drawerToggle; 
@Override 
protected void onCreate(Bundle savedInstanceState) { 
super.onCreate(savedInstanceState); 
setContentView(R.layout.activity_my); 
drawerToggle = new ActionBarDrawerToggle(this, 
mDrawerLayout, 
R.string.app_name, 
R.string.app_name) { 
}; 
mDrawerLayout.setDrawerListener(drawerToggle); 
getSupportActionBar().setDisplayHomeAsUpEnabled(true); 
getSupportActionBar().setHomeButtonEnabled(true); 
}
18 
DrawerLayout mDrawerLayout; 
ActionBarDrawerToggle drawerToggle; 
@Override 
protected void onCreate(Bundle savedInstanceState) { 
super.onCreate(savedInstanceState); 
setContentView(R.layout.activity_my); 
drawerToggle = new ActionBarDrawerToggle(this, 
mDrawerLayout, 
R.string.app_name, 
R.string.app_name) { 
}; 
mDrawerLayout.setDrawerListener(drawerToggle); 
getSupportActionBar().setDisplayHomeAsUpEnabled(true); 
getSupportActionBar().setHomeButtonEnabled(true); 
}
18 
DrawerLayout mDrawerLayout; 
ActionBarDrawerToggle drawerToggle; 
@Override 
protected void onCreate(Bundle savedInstanceState) { 
super.onCreate(savedInstanceState); 
setContentView(R.layout.activity_my); 
drawerToggle = new ActionBarDrawerToggle(this, 
mDrawerLayout, 
R.string.app_name, 
R.string.app_name) { 
}; 
mDrawerLayout.setDrawerListener(drawerToggle); 
getSupportActionBar().setDisplayHomeAsUpEnabled(true); 
getSupportActionBar().setHomeButtonEnabled(true); 
}
Card View 
19
Card View 
20
Card View 
• Support for rounded Corners 
• Elevation Shadows 
20
Card View 
• Support for rounded Corners 
• Elevation Shadows 
• Limitations: 
• On Pre-L no Clipping for Children with 
Round Corners 
• On Pre-L Adds Padding to Draw 
Shadows 
20
21
22
22 
<?xml version="1.0" encoding="utf-8"?> 
<android.support.v7.widget.CardView 
xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
android:id="@+id/cardView" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:layout_margin="5dp" 
android:background="?android:selectableItemBackground" 
app:cardCornerRadius="2dp" 
app:cardElevation="5dp" 
app:cardPreventCornerOverlap="true" 
app:cardUseCompatPadding="true"> 
<!-- Place Your Textviews etc. in here --> 
<LinearLayout...> 
</android.support.v7.widget.CardView>
Recycler View 
23
Recycler View 
24
Recycler View 
• „Replacement“ for ListView 
• Implements the ViewHolderPattern 
• Improved Recycling 
• LayoutManager 
• Vertical List View 
• Horizontal List View 
• Staggered Grid View 
24
25
25 
Layout:
25 
Layout:
25 
Layout: 
Code:
25 
Layout: 
Code:
26
27 
Recycler View - Adapter
27 
Recycler View - Adapter 
Old Adapter: 
class MenuAdapterOld extends ArrayAdapter<String> {
27 
Recycler View - Adapter 
Old Adapter: 
class MenuAdapterOld extends ArrayAdapter<String> { 
New Adapter: 
import android.support.v7.widget.RecyclerView; 
public class MenuAdapter extends RecyclerView.Adapter<MenuAdapter.ViewHolder> {
28 
Recycler View - Adapter
28 
private ArrayList<String> mDataset; 
private OnItemClickListener mListener; 
public MenuAdapter(ArrayList<String> myDataset, OnItemClickListener listener) { 
mDataset = myDataset; 
mListener = listener; 
} 
Recycler View - Adapter
29 
Recycler View - Adapter
29 
private ArrayList<String> mDataset; 
private OnItemClickListener mListener; 
public MenuAdapter(ArrayList<String> myDataset, OnItemClickListener listener) { 
mDataset = myDataset; 
mListener = listener; 
} 
Recycler View - Adapter
29 
private ArrayList<String> mDataset; 
private OnItemClickListener mListener; 
public MenuAdapter(ArrayList<String> myDataset, OnItemClickListener listener) { 
mDataset = myDataset; 
mListener = listener; 
} 
Recycler View - Adapter
29 
private ArrayList<String> mDataset; 
private OnItemClickListener mListener; 
public MenuAdapter(ArrayList<String> myDataset, OnItemClickListener listener) { 
mDataset = myDataset; 
mListener = listener; 
} 
Recycler View - Adapter 
@Override 
public int getItemCount() { 
return mDataset.size(); 
}
30 
Recycler View - Adapter
30 
public static class ViewHolder extends RecyclerView.ViewHolder { 
ImageView mPhoto; 
TextView mPhotoTitle; 
CardView mCardView; 
public ViewHolder(View itemView) { 
super(itemView); 
mPhoto = (ImageView) itemView.findViewById(R.id.photo); 
mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); 
mCardView = (CardView) itemView.findViewById(R.id.cardView); 
} 
} 
Recycler View - Adapter
30 
public static class ViewHolder extends RecyclerView.ViewHolder { 
ImageView mPhoto; 
TextView mPhotoTitle; 
CardView mCardView; 
public ViewHolder(View itemView) { 
super(itemView); 
mPhoto = (ImageView) itemView.findViewById(R.id.photo); 
mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); 
mCardView = (CardView) itemView.findViewById(R.id.cardView); 
} 
} 
Recycler View - Adapter
30 
public static class ViewHolder extends RecyclerView.ViewHolder { 
ImageView mPhoto; 
TextView mPhotoTitle; 
CardView mCardView; 
public ViewHolder(View itemView) { 
super(itemView); 
mPhoto = (ImageView) itemView.findViewById(R.id.photo); 
mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); 
mCardView = (CardView) itemView.findViewById(R.id.cardView); 
} 
} 
Recycler View - Adapter
30 
public static class ViewHolder extends RecyclerView.ViewHolder { 
ImageView mPhoto; 
TextView mPhotoTitle; 
CardView mCardView; 
public ViewHolder(View itemView) { 
super(itemView); 
mPhoto = (ImageView) itemView.findViewById(R.id.photo); 
mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); 
mCardView = (CardView) itemView.findViewById(R.id.cardView); 
} 
} 
Recycler View - Adapter
30 
public static class ViewHolder extends RecyclerView.ViewHolder { 
ImageView mPhoto; 
TextView mPhotoTitle; 
CardView mCardView; 
public ViewHolder(View itemView) { 
super(itemView); 
mPhoto = (ImageView) itemView.findViewById(R.id.photo); 
mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); 
mCardView = (CardView) itemView.findViewById(R.id.cardView); 
} 
} 
Recycler View - Adapter
31 
Recycler View - Adapter
31 
@Override 
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { 
View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, 
false); 
return new ViewHolder(v); 
} 
@Override 
public void onBindViewHolder(final ViewHolder viewHolder, final int i) { 
Photo p = photos.get(i); 
mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. 
drawable.stat_notify_sync).into(viewHolder.mPhoto); 
viewHolder.mPhotoTitle.setText(p.getId()); 
if (viewHolder.mPhotographerTitle != null) { 
viewHolder.mPhotographerTitle.setText(p.getTitle()); 
} 
viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { 
@Override 
public void onClick(View v) { 
mListener.onClick(viewHolder.mPhoto, i); 
} 
}); 
} 
Recycler View - Adapter
31 
@Override 
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { 
View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, 
false); 
return new ViewHolder(v); 
} 
@Override 
public void onBindViewHolder(final ViewHolder viewHolder, final int i) { 
Photo p = photos.get(i); 
mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. 
drawable.stat_notify_sync).into(viewHolder.mPhoto); 
viewHolder.mPhotoTitle.setText(p.getId()); 
if (viewHolder.mPhotographerTitle != null) { 
viewHolder.mPhotographerTitle.setText(p.getTitle()); 
} 
viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { 
@Override 
public void onClick(View v) { 
mListener.onClick(viewHolder.mPhoto, i); 
} 
}); 
} 
Recycler View - Adapter
31 
@Override 
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { 
View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, 
false); 
return new ViewHolder(v); 
} 
@Override 
public void onBindViewHolder(final ViewHolder viewHolder, final int i) { 
Photo p = photos.get(i); 
mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. 
drawable.stat_notify_sync).into(viewHolder.mPhoto); 
viewHolder.mPhotoTitle.setText(p.getId()); 
if (viewHolder.mPhotographerTitle != null) { 
viewHolder.mPhotographerTitle.setText(p.getTitle()); 
} 
viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { 
@Override 
public void onClick(View v) { 
mListener.onClick(viewHolder.mPhoto, i); 
} 
}); 
} 
Recycler View - Adapter
31 
@Override 
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { 
View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, 
false); 
return new ViewHolder(v); 
} 
@Override 
public void onBindViewHolder(final ViewHolder viewHolder, final int i) { 
Photo p = photos.get(i); 
mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. 
drawable.stat_notify_sync).into(viewHolder.mPhoto); 
viewHolder.mPhotoTitle.setText(p.getId()); 
if (viewHolder.mPhotographerTitle != null) { 
viewHolder.mPhotographerTitle.setText(p.getTitle()); 
} 
viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { 
@Override 
public void onClick(View v) { 
mListener.onClick(viewHolder.mPhoto, i); 
} 
}); 
} 
Recycler View - Adapter
31 
@Override 
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { 
View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, 
false); 
return new ViewHolder(v); 
} 
@Override 
public void onBindViewHolder(final ViewHolder viewHolder, final int i) { 
Photo p = photos.get(i); 
mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. 
drawable.stat_notify_sync).into(viewHolder.mPhoto); 
viewHolder.mPhotoTitle.setText(p.getId()); 
if (viewHolder.mPhotographerTitle != null) { 
viewHolder.mPhotographerTitle.setText(p.getTitle()); 
} 
viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { 
@Override 
public void onClick(View v) { 
mListener.onClick(viewHolder.mPhoto, i); 
} 
}); 
} 
Recycler View - Adapter
32
32 
• Linear Layout 
Manager
32 
• Linear Layout 
Manager 
• Supports Smooth 
Scrolling
32 
• Linear Layout 
Manager 
• Supports Smooth 
Scrolling
33
33 
• Linear Layout 
Manager
33 
• Linear Layout 
Manager 
• Orientation 
Horizontal
33 
• Linear Layout 
Manager 
• Orientation 
Horizontal
34
34 
• Staggered Grid Layout 
Manager
34 
• Staggered Grid Layout 
Manager 
• Grid Size can be 
defined
34 
• Staggered Grid Layout 
Manager 
• Grid Size can be 
defined 
• Supports Vertical and 
Horizontal Scrolling
34 
• Staggered Grid Layout 
Manager 
• Grid Size can be 
defined 
• Supports Vertical and 
Horizontal Scrolling
Toolbar 
35
Toolbar 
37
Toolbar 
• ActionBar == Toolbar 
• Toolbar is a ViewGroup 
• Styleable 
• Positionable 
37
38 
Layout: 
Code:
39 
Standalone Widget:
Limitations 
40
Limitations 
41
Limitations 
• Activity Transitions are Possible, BUT 
won’t be applied on PRE 5.0 Devices 
• Many „New“ Ui Elements are not available 
in the API, thus require separate 
Implementation/Style. 
41
Limitations 
42
Limitations 
• Elements not Included: 
• Fancy Material Progressbars 
• Buttons 
• Flat 
• Raised 
• Round / Floating 
• Sliders 
• Snackbars 
42
Limitations 
43
Limitations 
• Things not Supported on Pre 5.0: 
• Activity transitions 
• Touch feedback 
• Reveal animations 
• Path-based animations 
• Vector drawables 
• Drawable tinting 
43
44 
Useful Links
Useful Links 
• Official Documentation: 
http://developer.android.com/tools/ 
support-library/index.html 
• Index for Open Source Libraries: 
https://android-arsenal.com/ 
• e.G. Missing Ui Elements 
45
Questions? 
AngeloRüggeberg 
twitter.com/ 
s3xy4ngyc 
google.com/+ 
s3xy4ngyc 
.github.io 
github.com/ 
s3xy4ngyc

Contenu connexe

Similaire à Android Lollipop - Webinar am 11.12.2014

Android Support Library: Using ActionBarCompat
Android Support Library: Using ActionBarCompatAndroid Support Library: Using ActionBarCompat
Android Support Library: Using ActionBarCompatcbeyls
 
Android UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and TechniquesAndroid UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and TechniquesEdgar Gonzalez
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesAndroid UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesMarakana Inc.
 
Android Design Patterns
Android Design PatternsAndroid Design Patterns
Android Design PatternsGodfrey Nolan
 
Android TV: Building apps with Google’s Leanback Library
Android TV: Building apps with  Google’s Leanback LibraryAndroid TV: Building apps with  Google’s Leanback Library
Android TV: Building apps with Google’s Leanback LibraryJoe Birch
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesMichael Galpin
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in androidAngelo Rüggeberg
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android InfrastructureAlexey Buzdin
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android InfrastructureC.T.Co
 
Embracing the Lollipop
Embracing the LollipopEmbracing the Lollipop
Embracing the LollipopSonja Kesic
 
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...Fons Sonnemans
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best PracticesYekmer Simsek
 
Volley lab btc_bbit
Volley lab btc_bbitVolley lab btc_bbit
Volley lab btc_bbitCarWash1
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material DesignYasin Yildirim
 
Building Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsBuilding Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsHassan Abid
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdfImranS18
 

Similaire à Android Lollipop - Webinar am 11.12.2014 (20)

Android Support Library: Using ActionBarCompat
Android Support Library: Using ActionBarCompatAndroid Support Library: Using ActionBarCompat
Android Support Library: Using ActionBarCompat
 
Action bar
Action barAction bar
Action bar
 
Android UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and TechniquesAndroid UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and Techniques
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesAndroid UI Tips, Tricks and Techniques
Android UI Tips, Tricks and Techniques
 
Android Design Patterns
Android Design PatternsAndroid Design Patterns
Android Design Patterns
 
Android TV: Building apps with Google’s Leanback Library
Android TV: Building apps with  Google’s Leanback LibraryAndroid TV: Building apps with  Google’s Leanback Library
Android TV: Building apps with Google’s Leanback Library
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in android
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android Infrastructure
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android Infrastructure
 
Embracing the Lollipop
Embracing the LollipopEmbracing the Lollipop
Embracing the Lollipop
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
 
Modern android development
Modern android developmentModern android development
Modern android development
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
Volley lab btc_bbit
Volley lab btc_bbitVolley lab btc_bbit
Volley lab btc_bbit
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material Design
 
Building Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsBuilding Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture Components
 
Android programming basics
Android programming basicsAndroid programming basics
Android programming basics
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdf
 

Plus de inovex GmbH

lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegeninovex GmbH
 
Are you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AIAre you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AIinovex GmbH
 
Why natural language is next step in the AI evolution
Why natural language is next step in the AI evolutionWhy natural language is next step in the AI evolution
Why natural language is next step in the AI evolutioninovex GmbH
 
Network Policies
Network PoliciesNetwork Policies
Network Policiesinovex GmbH
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learninginovex GmbH
 
Jenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen UmgebungenJenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen Umgebungeninovex GmbH
 
AI auf Edge-Geraeten
AI auf Edge-GeraetenAI auf Edge-Geraeten
AI auf Edge-Geraeteninovex GmbH
 
Prometheus on Kubernetes
Prometheus on KubernetesPrometheus on Kubernetes
Prometheus on Kubernetesinovex GmbH
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systemsinovex GmbH
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreiheninovex GmbH
 
Talk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale AssistentenTalk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale Assistenteninovex GmbH
 
Künstlich intelligent?
Künstlich intelligent?Künstlich intelligent?
Künstlich intelligent?inovex GmbH
 
Das Android Open Source Project
Das Android Open Source ProjectDas Android Open Source Project
Das Android Open Source Projectinovex GmbH
 
Machine Learning Interpretability
Machine Learning InterpretabilityMachine Learning Interpretability
Machine Learning Interpretabilityinovex GmbH
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use caseinovex GmbH
 
People & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessPeople & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessinovex GmbH
 
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with PulumiInfrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with Pulumiinovex GmbH
 

Plus de inovex GmbH (20)

lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegen
 
Are you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AIAre you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AI
 
Why natural language is next step in the AI evolution
Why natural language is next step in the AI evolutionWhy natural language is next step in the AI evolution
Why natural language is next step in the AI evolution
 
WWDC 2019 Recap
WWDC 2019 RecapWWDC 2019 Recap
WWDC 2019 Recap
 
Network Policies
Network PoliciesNetwork Policies
Network Policies
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
Jenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen UmgebungenJenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen Umgebungen
 
AI auf Edge-Geraeten
AI auf Edge-GeraetenAI auf Edge-Geraeten
AI auf Edge-Geraeten
 
Prometheus on Kubernetes
Prometheus on KubernetesPrometheus on Kubernetes
Prometheus on Kubernetes
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
 
Azure IoT Edge
Azure IoT EdgeAzure IoT Edge
Azure IoT Edge
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreihen
 
Talk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale AssistentenTalk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale Assistenten
 
Künstlich intelligent?
Künstlich intelligent?Künstlich intelligent?
Künstlich intelligent?
 
Dev + Ops = Go
Dev + Ops = GoDev + Ops = Go
Dev + Ops = Go
 
Das Android Open Source Project
Das Android Open Source ProjectDas Android Open Source Project
Das Android Open Source Project
 
Machine Learning Interpretability
Machine Learning InterpretabilityMachine Learning Interpretability
Machine Learning Interpretability
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
People & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessPeople & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madness
 
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with PulumiInfrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
 

Dernier

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Android Lollipop - Webinar am 11.12.2014

  • 2. 2 About Me • Mobile Development • Android • iOS • REST-Api Design • Cloud Infrastructure +Angelo Rüggeberg @s3xy4ngyc http://s3xy4ngyc.github.io
  • 3. Sample app • Source Available at Github: https://github.com/ s3xy4ngyc/Android-L-Samples • Available at Google Play: https://play.google.com/ store/apps/details? id=s3xy.de.lsamples 3
  • 4. 4
  • 7. Distribution • Devices having Android 5.0 officially: • Nexus 5 • Nexus 7 • Nexus 9 • LG G3 6
  • 11. 9
  • 12. 9 dependencies { compile 'com.android.support:support-v4:21.0.2' compile 'com.android.support:appcompat-v7:21.0.2' compile 'com.android.support:cardview-v7:21.0.2' compile 'com.android.support:recyclerview-v7:21.0.2' compile 'com.android.support:gridlayout-v7:21.0.2' compile 'com.android.support:mediarouter-v7:21.0.2' compile 'com.android.support:palette-v7:21.0.2' compile 'com.android.support:support-v13:21.0.2' compile 'com.android.support:leanback-v17:21.0.2' compile 'com.android.support:support-annotations:21.0.2' }
  • 13. 9 dependencies { compile 'com.android.support:support-v4:21.0.2' compile 'com.android.support:appcompat-v7:21.0.2' compile 'com.android.support:cardview-v7:21.0.2' compile 'com.android.support:recyclerview-v7:21.0.2' compile 'com.android.support:gridlayout-v7:21.0.2' compile 'com.android.support:mediarouter-v7:21.0.2' compile 'com.android.support:palette-v7:21.0.2' compile 'com.android.support:support-v13:21.0.2' compile 'com.android.support:leanback-v17:21.0.2' compile 'com.android.support:support-annotations:21.0.2' } ‚//material Theme, ActionBar, etc.
  • 14. 9 dependencies { compile 'com.android.support:support-v4:21.0.2' compile 'com.android.support:appcompat-v7:21.0.2' compile 'com.android.support:cardview-v7:21.0.2' compile 'com.android.support:recyclerview-v7:21.0.2' compile 'com.android.support:gridlayout-v7:21.0.2' compile 'com.android.support:mediarouter-v7:21.0.2' compile 'com.android.support:palette-v7:21.0.2' compile 'com.android.support:support-v13:21.0.2' compile 'com.android.support:leanback-v17:21.0.2' compile 'com.android.support:support-annotations:21.0.2' } ‚//material Theme, ActionBar, etc. ‚//New Components for Pre 5.0
  • 16. 11
  • 18. 11 android: Theme.Material android: Theme.Material.Light
  • 19. Theme.AppCompat Theme.AppCompat.Light 11 android: Theme.Material android: Theme.Material.Light
  • 21. Apply Material Theme • Custom Style Extending Appcompat Style 12
  • 22. Apply Material Theme • Custom Style Extending Appcompat Style • Things to note: 12
  • 23. Apply Material Theme • Custom Style Extending Appcompat Style • Things to note: • No more @android duplicates 12
  • 24. Apply Material Theme • Custom Style Extending Appcompat Style • Things to note: • No more @android duplicates • No more v14+ Style Folder 12
  • 25. 13
  • 26. 13
  • 27. 13
  • 28. 13
  • 29. 13
  • 30. 13
  • 31. 13
  • 33. Apply Material Theme • Ui Elements that Get Material Design: • EditText • Spinner • CheckBox • RadioButton • Switch • CheckedTextView 14
  • 34. Apply Material Theme • Ui Elements that Get Material Design: • EditText • Spinner • CheckBox • RadioButton • Switch • CheckedTextView • All Other UI Elements do not get Styled and Need Custom Styling/Views 14
  • 35. Action Bar Drawer Toggle 15
  • 36. 16 Action Bar Drawer Toggle
  • 37. 16 Action Bar Drawer Toggle
  • 38. Action Bar Drawer Toggle 17
  • 39. Action Bar Drawer Toggle • import android.support.v7.app.ActionBarDrawerT oggle • Extend from ActionBarActivity • Init DrawerToggle with Drawer Layout • Assign DrawerToggle to DrawerLayout 17
  • 40. 18
  • 41. 18 DrawerLayout mDrawerLayout; ActionBarDrawerToggle drawerToggle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); drawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.app_name, R.string.app_name) { }; mDrawerLayout.setDrawerListener(drawerToggle); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); }
  • 42. 18 DrawerLayout mDrawerLayout; ActionBarDrawerToggle drawerToggle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); drawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.app_name, R.string.app_name) { }; mDrawerLayout.setDrawerListener(drawerToggle); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); }
  • 43. 18 DrawerLayout mDrawerLayout; ActionBarDrawerToggle drawerToggle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); drawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.app_name, R.string.app_name) { }; mDrawerLayout.setDrawerListener(drawerToggle); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); }
  • 44. 18 DrawerLayout mDrawerLayout; ActionBarDrawerToggle drawerToggle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); drawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.app_name, R.string.app_name) { }; mDrawerLayout.setDrawerListener(drawerToggle); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); }
  • 45. 18 DrawerLayout mDrawerLayout; ActionBarDrawerToggle drawerToggle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my); drawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.app_name, R.string.app_name) { }; mDrawerLayout.setDrawerListener(drawerToggle); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); }
  • 48. Card View • Support for rounded Corners • Elevation Shadows 20
  • 49. Card View • Support for rounded Corners • Elevation Shadows • Limitations: • On Pre-L no Clipping for Children with Round Corners • On Pre-L Adds Padding to Draw Shadows 20
  • 50. 21
  • 51. 22
  • 52. 22 <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/cardView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:background="?android:selectableItemBackground" app:cardCornerRadius="2dp" app:cardElevation="5dp" app:cardPreventCornerOverlap="true" app:cardUseCompatPadding="true"> <!-- Place Your Textviews etc. in here --> <LinearLayout...> </android.support.v7.widget.CardView>
  • 55. Recycler View • „Replacement“ for ListView • Implements the ViewHolderPattern • Improved Recycling • LayoutManager • Vertical List View • Horizontal List View • Staggered Grid View 24
  • 56. 25
  • 61. 26
  • 62. 27 Recycler View - Adapter
  • 63. 27 Recycler View - Adapter Old Adapter: class MenuAdapterOld extends ArrayAdapter<String> {
  • 64. 27 Recycler View - Adapter Old Adapter: class MenuAdapterOld extends ArrayAdapter<String> { New Adapter: import android.support.v7.widget.RecyclerView; public class MenuAdapter extends RecyclerView.Adapter<MenuAdapter.ViewHolder> {
  • 65. 28 Recycler View - Adapter
  • 66. 28 private ArrayList<String> mDataset; private OnItemClickListener mListener; public MenuAdapter(ArrayList<String> myDataset, OnItemClickListener listener) { mDataset = myDataset; mListener = listener; } Recycler View - Adapter
  • 67. 29 Recycler View - Adapter
  • 68. 29 private ArrayList<String> mDataset; private OnItemClickListener mListener; public MenuAdapter(ArrayList<String> myDataset, OnItemClickListener listener) { mDataset = myDataset; mListener = listener; } Recycler View - Adapter
  • 69. 29 private ArrayList<String> mDataset; private OnItemClickListener mListener; public MenuAdapter(ArrayList<String> myDataset, OnItemClickListener listener) { mDataset = myDataset; mListener = listener; } Recycler View - Adapter
  • 70. 29 private ArrayList<String> mDataset; private OnItemClickListener mListener; public MenuAdapter(ArrayList<String> myDataset, OnItemClickListener listener) { mDataset = myDataset; mListener = listener; } Recycler View - Adapter @Override public int getItemCount() { return mDataset.size(); }
  • 71. 30 Recycler View - Adapter
  • 72. 30 public static class ViewHolder extends RecyclerView.ViewHolder { ImageView mPhoto; TextView mPhotoTitle; CardView mCardView; public ViewHolder(View itemView) { super(itemView); mPhoto = (ImageView) itemView.findViewById(R.id.photo); mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); mCardView = (CardView) itemView.findViewById(R.id.cardView); } } Recycler View - Adapter
  • 73. 30 public static class ViewHolder extends RecyclerView.ViewHolder { ImageView mPhoto; TextView mPhotoTitle; CardView mCardView; public ViewHolder(View itemView) { super(itemView); mPhoto = (ImageView) itemView.findViewById(R.id.photo); mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); mCardView = (CardView) itemView.findViewById(R.id.cardView); } } Recycler View - Adapter
  • 74. 30 public static class ViewHolder extends RecyclerView.ViewHolder { ImageView mPhoto; TextView mPhotoTitle; CardView mCardView; public ViewHolder(View itemView) { super(itemView); mPhoto = (ImageView) itemView.findViewById(R.id.photo); mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); mCardView = (CardView) itemView.findViewById(R.id.cardView); } } Recycler View - Adapter
  • 75. 30 public static class ViewHolder extends RecyclerView.ViewHolder { ImageView mPhoto; TextView mPhotoTitle; CardView mCardView; public ViewHolder(View itemView) { super(itemView); mPhoto = (ImageView) itemView.findViewById(R.id.photo); mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); mCardView = (CardView) itemView.findViewById(R.id.cardView); } } Recycler View - Adapter
  • 76. 30 public static class ViewHolder extends RecyclerView.ViewHolder { ImageView mPhoto; TextView mPhotoTitle; CardView mCardView; public ViewHolder(View itemView) { super(itemView); mPhoto = (ImageView) itemView.findViewById(R.id.photo); mPhotoTitle = (TextView) itemView.findViewById(R.id.photoTitle); mCardView = (CardView) itemView.findViewById(R.id.cardView); } } Recycler View - Adapter
  • 77. 31 Recycler View - Adapter
  • 78. 31 @Override public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, false); return new ViewHolder(v); } @Override public void onBindViewHolder(final ViewHolder viewHolder, final int i) { Photo p = photos.get(i); mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. drawable.stat_notify_sync).into(viewHolder.mPhoto); viewHolder.mPhotoTitle.setText(p.getId()); if (viewHolder.mPhotographerTitle != null) { viewHolder.mPhotographerTitle.setText(p.getTitle()); } viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mListener.onClick(viewHolder.mPhoto, i); } }); } Recycler View - Adapter
  • 79. 31 @Override public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, false); return new ViewHolder(v); } @Override public void onBindViewHolder(final ViewHolder viewHolder, final int i) { Photo p = photos.get(i); mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. drawable.stat_notify_sync).into(viewHolder.mPhoto); viewHolder.mPhotoTitle.setText(p.getId()); if (viewHolder.mPhotographerTitle != null) { viewHolder.mPhotographerTitle.setText(p.getTitle()); } viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mListener.onClick(viewHolder.mPhoto, i); } }); } Recycler View - Adapter
  • 80. 31 @Override public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, false); return new ViewHolder(v); } @Override public void onBindViewHolder(final ViewHolder viewHolder, final int i) { Photo p = photos.get(i); mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. drawable.stat_notify_sync).into(viewHolder.mPhoto); viewHolder.mPhotoTitle.setText(p.getId()); if (viewHolder.mPhotographerTitle != null) { viewHolder.mPhotographerTitle.setText(p.getTitle()); } viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mListener.onClick(viewHolder.mPhoto, i); } }); } Recycler View - Adapter
  • 81. 31 @Override public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, false); return new ViewHolder(v); } @Override public void onBindViewHolder(final ViewHolder viewHolder, final int i) { Photo p = photos.get(i); mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. drawable.stat_notify_sync).into(viewHolder.mPhoto); viewHolder.mPhotoTitle.setText(p.getId()); if (viewHolder.mPhotographerTitle != null) { viewHolder.mPhotographerTitle.setText(p.getTitle()); } viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mListener.onClick(viewHolder.mPhoto, i); } }); } Recycler View - Adapter
  • 82. 31 @Override public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { View v = LayoutInflater.from(viewGroup.getContext()).inflate(rowLayout, viewGroup, false); return new ViewHolder(v); } @Override public void onBindViewHolder(final ViewHolder viewHolder, final int i) { Photo p = photos.get(i); mPicasso.load(p.getUrl()).error(android.R.drawable.stat_notify_error).placeholder(android.R. drawable.stat_notify_sync).into(viewHolder.mPhoto); viewHolder.mPhotoTitle.setText(p.getId()); if (viewHolder.mPhotographerTitle != null) { viewHolder.mPhotographerTitle.setText(p.getTitle()); } viewHolder.mCardView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mListener.onClick(viewHolder.mPhoto, i); } }); } Recycler View - Adapter
  • 83. 32
  • 84. 32 • Linear Layout Manager
  • 85. 32 • Linear Layout Manager • Supports Smooth Scrolling
  • 86. 32 • Linear Layout Manager • Supports Smooth Scrolling
  • 87. 33
  • 88. 33 • Linear Layout Manager
  • 89. 33 • Linear Layout Manager • Orientation Horizontal
  • 90. 33 • Linear Layout Manager • Orientation Horizontal
  • 91. 34
  • 92. 34 • Staggered Grid Layout Manager
  • 93. 34 • Staggered Grid Layout Manager • Grid Size can be defined
  • 94. 34 • Staggered Grid Layout Manager • Grid Size can be defined • Supports Vertical and Horizontal Scrolling
  • 95. 34 • Staggered Grid Layout Manager • Grid Size can be defined • Supports Vertical and Horizontal Scrolling
  • 97.
  • 99. Toolbar • ActionBar == Toolbar • Toolbar is a ViewGroup • Styleable • Positionable 37
  • 104. Limitations • Activity Transitions are Possible, BUT won’t be applied on PRE 5.0 Devices • Many „New“ Ui Elements are not available in the API, thus require separate Implementation/Style. 41
  • 106. Limitations • Elements not Included: • Fancy Material Progressbars • Buttons • Flat • Raised • Round / Floating • Sliders • Snackbars 42
  • 108. Limitations • Things not Supported on Pre 5.0: • Activity transitions • Touch feedback • Reveal animations • Path-based animations • Vector drawables • Drawable tinting 43
  • 110. Useful Links • Official Documentation: http://developer.android.com/tools/ support-library/index.html • Index for Open Source Libraries: https://android-arsenal.com/ • e.G. Missing Ui Elements 45
  • 111.
  • 112. Questions? AngeloRüggeberg twitter.com/ s3xy4ngyc google.com/+ s3xy4ngyc .github.io github.com/ s3xy4ngyc