SlideShare a Scribd company logo
1 of 20
Android Design Support
Library
nuuneoi
android.support.design.widget.FloatingActionButton
android:fabSize – normal (56dp), mini (40dp)
android:src – Icon’s resource
android:backgroundTint – Background color (accent
color will be used if not set)
There is some bug on API Level 21+ (Lollipop)
Floating Action Button (FAB)
android.support.design.widget.Snackbar
Just like a Toast
Snackbar.make(rootLayout, "Hello. I am Snackbar!", Snackbar.LENGTH_SHORT)
.setAction("Undo", new View.OnClickListener() {
@Override
public void onClick(View v) {
}
})
.show();
Snackbar
CoordinatorLayout
building dependencies between sibling views and allowing easy
scrolling reactions between components
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Place Views Inside -->
</android.support.design.widget.CoordinatorLayout
AppBarLayout
a container for Toolbar to make it fit in CoordinatorLayout
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
</android.support.design.widget.AppBarLayout>
<!-- Other views -->
</android.support.design.widget.CoordinatorLayout>
CoordinatorLayout’s Content
You need to apply
app:layout_behavior="@string/appbar_scrolling_view_behavior"
to the content view inside Coordinator or it will be placed at
the same position as where Toolbar is
CoordinatorLayout’s Content
<android.support.design.widget.CoordinatorLayout ...>
<android.support.design.widget.AppBarLayout ...>
...
</android.support.design.widget.AppBarLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical“
app:layout_behavior="@string/appbar_scrolling_view_behavior" >
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
TabLayout
You could place tabs easily with TabLayout. Support for both
fixed and scrollable. Also works with ViewPager.
<android.support.design.widget.CoordinatorLayout ...>
<android.support.design.widget.AppBarLayout ...>
<android.support.v7.widget.Toolbar .../>
<android.support.design.widget.TabLayout
android:id=“@+id/tabLayout”
android:layout_width="match_parent“ android:layout_height="match_parent" />
</android.support.design.widget.AppBarLayout>
...
</android.support.design.widget.CoordinatorLayout>
TabLayout
tabLayout = (TabLayout) findViewById(R.id.tabLayout);
tabLayout.addTab(tabLayout.newTab().setText("Tab 1"));
tabLayout.addTab(tabLayout.newTab().setText("Tab 2"));
To manually add Tab(s)
TabLayout
Parameters:
app:tabMode – fixed (all tabs are shown concurrently)
– scrollable (show a subset of tabs)
app:tabGravity – fill (distribute all available space)
– center (position tabs in the center of
TabLayout)
CollapsingToolbarLayout
Make Toolbar collapsible
CollapsingToolbarLayout
Simply wrap Toolbar with this layout
<android.support.design.widget.AppBarLayout ...>
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent“ android:layout_height="match_parent“
app:contentScrim=“?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
app:layout_collapseMode=“pin“ .../>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
CollapsingToolbarLayout
Toolbar’s background is recommended to be removed
You can place another View inside at the same approach as
FrameLayout. Also with parallax support.
<android.support.design.widget.CollapsingToolbarLayout ...>
<ImageView
app:layout_collapseMode="parallax"
app:layout_collapseParallaxMultiplier="0.7“
...>
<android.support.v7.widget.Toolbar .../>
</android.support.design.widget.CollapsingToolbarLayout>
NavigationView
Implementing Navigation Drawer
contents in very easy way
NavigationView
Define XML Layout for Header View
res/layout/nav_header.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="192dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_margin="16dp"
android:text="nuuneoi"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
</FrameLayout>
NavigationView
Define XML for Menu Items
res/menu/navigation_drawer_items.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<group android:checkableBehavior="all">
<item
android:id="@+id/navigation_item_1"
android:icon="@drawable/ic_action_location_found_dark"
android:title="Toolbar"/>
<item
android:id="@+id/navigation_item_2"
android:icon="@drawable/ic_action_location_found_dark"
android:title="FloatActionButton"/>
<item
android:id="@+id/navigation_item_3"
android:icon="@drawable/ic_action_location_found_dark"
android:title="NavigationView"/>
</group>
</menu>
NavigationView
Place NavigationView as navigation drawer of DrawerLayout
</android.support.v4.widget.DrawerLayout ...>
<android.support.design.widget.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/nav_header"
app:itemIconTint="#333"
app:itemTextColor="#333"
app:menu="@menu/navigation_drawer_items" />
</android.support.v4.widget.DrawerLayout>
NavigationView
Result
TextInputLayout
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Username" />
</android.support.design.widget.TextInputLayout>
Wrap EditText with this layout to make hint and error text
shown as floating labels
Thank You
Q&A

More Related Content

What's hot

01 09 - graphical user interface - basic widgets
01  09 - graphical user interface - basic widgets01  09 - graphical user interface - basic widgets
01 09 - graphical user interface - basic widgetsSiva Kumar reddy Vasipally
 
12. Android Basic Google Map
12. Android Basic Google Map12. Android Basic Google Map
12. Android Basic Google MapOum Saokosal
 
Advance Android application development workshop day 2
Advance Android application development workshop day 2Advance Android application development workshop day 2
Advance Android application development workshop day 2cresco
 
Desenvolver para Chromecast
Desenvolver para ChromecastDesenvolver para Chromecast
Desenvolver para ChromecastPedro Veloso
 
2011 08-24 mobile web app
2011 08-24  mobile web app2011 08-24  mobile web app
2011 08-24 mobile web appSholto Maud
 
Android Layout
Android LayoutAndroid Layout
Android Layoutmcanotes
 
10 asp.net session14
10 asp.net session1410 asp.net session14
10 asp.net session14Vivek chan
 
04 user interfaces
04 user interfaces04 user interfaces
04 user interfacesC.o. Nieto
 
4.preference management
4.preference management 4.preference management
4.preference management maamir farooq
 
Designing and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tabletsDesigning and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tabletsTeddy Koornia
 
Android N Highligts
Android N HighligtsAndroid N Highligts
Android N HighligtsSercan Yusuf
 

What's hot (20)

01 09 - graphical user interface - basic widgets
01  09 - graphical user interface - basic widgets01  09 - graphical user interface - basic widgets
01 09 - graphical user interface - basic widgets
 
Chapter 10 - Views Part 2
Chapter 10 - Views Part 2Chapter 10 - Views Part 2
Chapter 10 - Views Part 2
 
Hierarchy viewer
Hierarchy viewerHierarchy viewer
Hierarchy viewer
 
01 08 - graphical user interface - layouts
01  08 - graphical user interface - layouts01  08 - graphical user interface - layouts
01 08 - graphical user interface - layouts
 
Android layouts
Android layoutsAndroid layouts
Android layouts
 
12. Android Basic Google Map
12. Android Basic Google Map12. Android Basic Google Map
12. Android Basic Google Map
 
Advance Android application development workshop day 2
Advance Android application development workshop day 2Advance Android application development workshop day 2
Advance Android application development workshop day 2
 
Desenvolver para Chromecast
Desenvolver para ChromecastDesenvolver para Chromecast
Desenvolver para Chromecast
 
Basic Android Layout
Basic Android LayoutBasic Android Layout
Basic Android Layout
 
2011 08-24 mobile web app
2011 08-24  mobile web app2011 08-24  mobile web app
2011 08-24 mobile web app
 
Android Widget
Android WidgetAndroid Widget
Android Widget
 
Android Layout
Android LayoutAndroid Layout
Android Layout
 
Android best practices
Android best practicesAndroid best practices
Android best practices
 
10 asp.net session14
10 asp.net session1410 asp.net session14
10 asp.net session14
 
04 user interfaces
04 user interfaces04 user interfaces
04 user interfaces
 
Activity
ActivityActivity
Activity
 
4.preference management
4.preference management 4.preference management
4.preference management
 
Designing and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tabletsDesigning and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tablets
 
Android development session 3 - layout
Android development   session 3 - layoutAndroid development   session 3 - layout
Android development session 3 - layout
 
Android N Highligts
Android N HighligtsAndroid N Highligts
Android N Highligts
 

Similar to I/O Rewind 2015 : Android Design Support Library

Fragments: Why, How, What For?
Fragments: Why, How, What For?Fragments: Why, How, What For?
Fragments: Why, How, What For?Brenda Cook
 
Android development for iOS developers
Android development for iOS developersAndroid development for iOS developers
Android development for iOS developersDarryl Bayliss
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentanistar sung
 
Infinum Android Talks #13 - Design Support Library by Ivan Markusi
Infinum Android Talks #13 - Design Support Library by Ivan MarkusiInfinum Android Talks #13 - Design Support Library by Ivan Markusi
Infinum Android Talks #13 - Design Support Library by Ivan MarkusiInfinum
 
Droidcon Moscow 2015. Support Design Library. Григорий Джанелидзе - e-Legion
Droidcon Moscow 2015. Support Design Library. Григорий Джанелидзе - e-LegionDroidcon Moscow 2015. Support Design Library. Григорий Джанелидзе - e-Legion
Droidcon Moscow 2015. Support Design Library. Григорий Джанелидзе - e-LegionMail.ru Group
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in AndroidRobert Cooper
 
Android ui patterns
Android ui patternsAndroid ui patterns
Android ui patternsMobile March
 
Android ui patterns
Android ui patternsAndroid ui patterns
Android ui patternsvpulec
 
GUI design using JAVAFX.ppt
GUI design using JAVAFX.pptGUI design using JAVAFX.ppt
GUI design using JAVAFX.pptTabassumMaktum
 
UI2code : A Neural Machine Translator to Bootstrap Mobile GUI Implementation
UI2code : A Neural Machine Translator to Bootstrap Mobile GUI ImplementationUI2code : A Neural Machine Translator to Bootstrap Mobile GUI Implementation
UI2code : A Neural Machine Translator to Bootstrap Mobile GUI ImplementationChunyang Chen
 
Native look and feel bbui & alicejs
Native look and feel bbui & alicejsNative look and feel bbui & alicejs
Native look and feel bbui & alicejs.toster
 
android layouts
android layoutsandroid layouts
android layoutsDeepa Rani
 
Android Material Design APIs/Tips
Android Material Design APIs/TipsAndroid Material Design APIs/Tips
Android Material Design APIs/TipsKen Yee
 
Taking control of Storyboard
Taking control of StoryboardTaking control of Storyboard
Taking control of Storyboardpitiphong_p
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdfImranS18
 
Modern Android UI, or not by Action Bar alone
Modern Android UI, or not by Action Bar aloneModern Android UI, or not by Action Bar alone
Modern Android UI, or not by Action Bar aloneAnton Rutkevich
 

Similar to I/O Rewind 2015 : Android Design Support Library (20)

Fragments: Why, How, What For?
Fragments: Why, How, What For?Fragments: Why, How, What For?
Fragments: Why, How, What For?
 
Android development for iOS developers
Android development for iOS developersAndroid development for iOS developers
Android development for iOS developers
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app development
 
Infinum Android Talks #13 - Design Support Library by Ivan Markusi
Infinum Android Talks #13 - Design Support Library by Ivan MarkusiInfinum Android Talks #13 - Design Support Library by Ivan Markusi
Infinum Android Talks #13 - Design Support Library by Ivan Markusi
 
Swift
SwiftSwift
Swift
 
Droidcon Moscow 2015. Support Design Library. Григорий Джанелидзе - e-Legion
Droidcon Moscow 2015. Support Design Library. Григорий Джанелидзе - e-LegionDroidcon Moscow 2015. Support Design Library. Григорий Джанелидзе - e-Legion
Droidcon Moscow 2015. Support Design Library. Григорий Джанелидзе - e-Legion
 
Support Design Library
Support Design LibrarySupport Design Library
Support Design Library
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in Android
 
Android ui patterns
Android ui patternsAndroid ui patterns
Android ui patterns
 
Android ui patterns
Android ui patternsAndroid ui patterns
Android ui patterns
 
GUI design using JAVAFX.ppt
GUI design using JAVAFX.pptGUI design using JAVAFX.ppt
GUI design using JAVAFX.ppt
 
UI2code : A Neural Machine Translator to Bootstrap Mobile GUI Implementation
UI2code : A Neural Machine Translator to Bootstrap Mobile GUI ImplementationUI2code : A Neural Machine Translator to Bootstrap Mobile GUI Implementation
UI2code : A Neural Machine Translator to Bootstrap Mobile GUI Implementation
 
Native look and feel bbui & alicejs
Native look and feel bbui & alicejsNative look and feel bbui & alicejs
Native look and feel bbui & alicejs
 
android layouts
android layoutsandroid layouts
android layouts
 
Android Material Design APIs/Tips
Android Material Design APIs/TipsAndroid Material Design APIs/Tips
Android Material Design APIs/Tips
 
Taking control of Storyboard
Taking control of StoryboardTaking control of Storyboard
Taking control of Storyboard
 
06 UI Layout
06 UI Layout06 UI Layout
06 UI Layout
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdf
 
Modern Android UI, or not by Action Bar alone
Modern Android UI, or not by Action Bar aloneModern Android UI, or not by Action Bar alone
Modern Android UI, or not by Action Bar alone
 
Ux Example
Ux ExampleUx Example
Ux Example
 

More from Sittiphol Phanvilai

Smart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathonSmart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathonSittiphol Phanvilai
 
Firebase Dev Day Bangkok: Keynote
Firebase Dev Day Bangkok: KeynoteFirebase Dev Day Bangkok: Keynote
Firebase Dev Day Bangkok: KeynoteSittiphol Phanvilai
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Sittiphol Phanvilai
 
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]Sittiphol Phanvilai
 
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidI/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidSittiphol Phanvilai
 
The way Tech World is heading to and how to survive in this fast moving world
The way Tech World is heading to and how to survive in this fast moving worldThe way Tech World is heading to and how to survive in this fast moving world
The way Tech World is heading to and how to survive in this fast moving worldSittiphol Phanvilai
 
Mobile Dev Talk #0 Keynote & Mobile Trend 2015
Mobile Dev Talk #0 Keynote & Mobile Trend 2015Mobile Dev Talk #0 Keynote & Mobile Trend 2015
Mobile Dev Talk #0 Keynote & Mobile Trend 2015Sittiphol Phanvilai
 
Mobile Market : Past Present Now and Then
Mobile Market : Past Present Now and ThenMobile Market : Past Present Now and Then
Mobile Market : Past Present Now and ThenSittiphol Phanvilai
 
How to deal with Fragmentation on Android
How to deal with Fragmentation on AndroidHow to deal with Fragmentation on Android
How to deal with Fragmentation on AndroidSittiphol Phanvilai
 
GTUG Bangkok 2011 Android Ecosystem Session
GTUG Bangkok 2011 Android Ecosystem SessionGTUG Bangkok 2011 Android Ecosystem Session
GTUG Bangkok 2011 Android Ecosystem SessionSittiphol Phanvilai
 

More from Sittiphol Phanvilai (11)

Smart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathonSmart Contract programming 101 with Solidity #PizzaHackathon
Smart Contract programming 101 with Solidity #PizzaHackathon
 
Firebase Dev Day Bangkok: Keynote
Firebase Dev Day Bangkok: KeynoteFirebase Dev Day Bangkok: Keynote
Firebase Dev Day Bangkok: Keynote
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]
 
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]What’s new in aNdroid [Google I/O Extended Bangkok 2016]
What’s new in aNdroid [Google I/O Extended Bangkok 2016]
 
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidI/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in Android
 
The way Tech World is heading to and how to survive in this fast moving world
The way Tech World is heading to and how to survive in this fast moving worldThe way Tech World is heading to and how to survive in this fast moving world
The way Tech World is heading to and how to survive in this fast moving world
 
Mobile Dev Talk #0 Keynote & Mobile Trend 2015
Mobile Dev Talk #0 Keynote & Mobile Trend 2015Mobile Dev Talk #0 Keynote & Mobile Trend 2015
Mobile Dev Talk #0 Keynote & Mobile Trend 2015
 
Tech World 2015
Tech World 2015Tech World 2015
Tech World 2015
 
Mobile Market : Past Present Now and Then
Mobile Market : Past Present Now and ThenMobile Market : Past Present Now and Then
Mobile Market : Past Present Now and Then
 
How to deal with Fragmentation on Android
How to deal with Fragmentation on AndroidHow to deal with Fragmentation on Android
How to deal with Fragmentation on Android
 
GTUG Bangkok 2011 Android Ecosystem Session
GTUG Bangkok 2011 Android Ecosystem SessionGTUG Bangkok 2011 Android Ecosystem Session
GTUG Bangkok 2011 Android Ecosystem Session
 

Recently uploaded

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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 

Recently uploaded (20)

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
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

I/O Rewind 2015 : Android Design Support Library

  • 2. android.support.design.widget.FloatingActionButton android:fabSize – normal (56dp), mini (40dp) android:src – Icon’s resource android:backgroundTint – Background color (accent color will be used if not set) There is some bug on API Level 21+ (Lollipop) Floating Action Button (FAB)
  • 3. android.support.design.widget.Snackbar Just like a Toast Snackbar.make(rootLayout, "Hello. I am Snackbar!", Snackbar.LENGTH_SHORT) .setAction("Undo", new View.OnClickListener() { @Override public void onClick(View v) { } }) .show(); Snackbar
  • 4. CoordinatorLayout building dependencies between sibling views and allowing easy scrolling reactions between components <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <!-- Place Views Inside --> </android.support.design.widget.CoordinatorLayout
  • 5. AppBarLayout a container for Toolbar to make it fit in CoordinatorLayout <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:layout_collapseMode="pin" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" /> </android.support.design.widget.AppBarLayout> <!-- Other views --> </android.support.design.widget.CoordinatorLayout>
  • 6. CoordinatorLayout’s Content You need to apply app:layout_behavior="@string/appbar_scrolling_view_behavior" to the content view inside Coordinator or it will be placed at the same position as where Toolbar is
  • 7. CoordinatorLayout’s Content <android.support.design.widget.CoordinatorLayout ...> <android.support.design.widget.AppBarLayout ...> ... </android.support.design.widget.AppBarLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical“ app:layout_behavior="@string/appbar_scrolling_view_behavior" > </LinearLayout> </android.support.design.widget.CoordinatorLayout>
  • 8. TabLayout You could place tabs easily with TabLayout. Support for both fixed and scrollable. Also works with ViewPager. <android.support.design.widget.CoordinatorLayout ...> <android.support.design.widget.AppBarLayout ...> <android.support.v7.widget.Toolbar .../> <android.support.design.widget.TabLayout android:id=“@+id/tabLayout” android:layout_width="match_parent“ android:layout_height="match_parent" /> </android.support.design.widget.AppBarLayout> ... </android.support.design.widget.CoordinatorLayout>
  • 9. TabLayout tabLayout = (TabLayout) findViewById(R.id.tabLayout); tabLayout.addTab(tabLayout.newTab().setText("Tab 1")); tabLayout.addTab(tabLayout.newTab().setText("Tab 2")); To manually add Tab(s)
  • 10. TabLayout Parameters: app:tabMode – fixed (all tabs are shown concurrently) – scrollable (show a subset of tabs) app:tabGravity – fill (distribute all available space) – center (position tabs in the center of TabLayout)
  • 12. CollapsingToolbarLayout Simply wrap Toolbar with this layout <android.support.design.widget.AppBarLayout ...> <android.support.design.widget.CollapsingToolbarLayout android:layout_width="match_parent“ android:layout_height="match_parent“ app:contentScrim=“?attr/colorPrimary" app:layout_scrollFlags="scroll|exitUntilCollapsed"> <android.support.v7.widget.Toolbar app:layout_collapseMode=“pin“ .../> </android.support.design.widget.CollapsingToolbarLayout> </android.support.design.widget.AppBarLayout>
  • 13. CollapsingToolbarLayout Toolbar’s background is recommended to be removed You can place another View inside at the same approach as FrameLayout. Also with parallax support. <android.support.design.widget.CollapsingToolbarLayout ...> <ImageView app:layout_collapseMode="parallax" app:layout_collapseParallaxMultiplier="0.7“ ...> <android.support.v7.widget.Toolbar .../> </android.support.design.widget.CollapsingToolbarLayout>
  • 15. NavigationView Define XML Layout for Header View res/layout/nav_header.xml <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="192dp" android:theme="@style/ThemeOverlay.AppCompat.Dark" > <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_margin="16dp" android:text="nuuneoi" android:textAppearance="@style/TextAppearance.AppCompat.Body1"/> </FrameLayout>
  • 16. NavigationView Define XML for Menu Items res/menu/navigation_drawer_items.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <group android:checkableBehavior="all"> <item android:id="@+id/navigation_item_1" android:icon="@drawable/ic_action_location_found_dark" android:title="Toolbar"/> <item android:id="@+id/navigation_item_2" android:icon="@drawable/ic_action_location_found_dark" android:title="FloatActionButton"/> <item android:id="@+id/navigation_item_3" android:icon="@drawable/ic_action_location_found_dark" android:title="NavigationView"/> </group> </menu>
  • 17. NavigationView Place NavigationView as navigation drawer of DrawerLayout </android.support.v4.widget.DrawerLayout ...> <android.support.design.widget.NavigationView android:id="@+id/navigation" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" app:headerLayout="@layout/nav_header" app:itemIconTint="#333" app:itemTextColor="#333" app:menu="@menu/navigation_drawer_items" /> </android.support.v4.widget.DrawerLayout>