This document discusses various Google libraries that can help with app development on Android, including AppCompat, DrawableCompat, Palette, RecyclerView, NavigationView, and Snackbar. It provides definitions and differences for each library, examples of how they can be used, and motivations for using them such as achieving less fragmentation, better UIs, and more stability with less code. The libraries aim to help with backward compatibility, image tinting, content-driven coloring, efficient recycling of views, improved navigation drawers, and providing feedback to the user.
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
Helpful Android Libraries by Royi Benyossef
1. With a little help from my Libs
By Royi Benyossef (+royiby)
2. With a little help from my libs by Royi Benyossef (+royiby)
Android developer since 2009
GDG co-founder (Herzliya)
Android speaker and lecturer
Android Mentor (Google Launchpad, Zell, Siftech etc)
Android GDE 2013, 2014, 2015
Developer relations manager @ Stealth
Royi Benyossef
4. With a little help from my libs by Royi Benyossef (+royiby)
Motivation
5. With a little help from my libs by Royi Benyossef (+royiby)
Motivation
Less fragmentation
6. With a little help from my libs by Royi Benyossef (+royiby)
Motivation
- Less fragmentation
Better looking UIs
7. With a little help from my libs by Royi Benyossef (+royiby)
Motivation
- Less fragmentation
- Better looking UIs
More stability
8. With a little help from my libs by Royi Benyossef (+royiby)
Motivation
- Less fragmentation
- Better looking UIs
- More stability
Less boilerplate code
9. With a little help from my libs by Royi Benyossef (+royiby)
10. With a little help from my libs by Royi Benyossef (+royiby)
Google to
the rescue!
12. With a little help from my libs by Royi Benyossef (+royiby)
AppCompat
(Widgets and lifecycles)
13. With a little help from my libs by Royi Benyossef (+royiby)
App compat
Definition Views
14. With a little help from my libs by Royi Benyossef (+royiby)
App compat
Definition Views
Widgets
15. With a little help from my libs by Royi Benyossef (+royiby)
App compat
Definition Views
Widgets
Activities
16. With a little help from my libs by Royi Benyossef (+royiby)
App compat
Definition Views
Widgets
Activities
Dialogs
17. With a little help from my libs by Royi Benyossef (+royiby)
App compat
Definition Views
Widgets
Activities
Dialogs }Backward
Compatible
18. With a little help from my libs by Royi Benyossef (+royiby)
App compat
Definition Backward compatible app
components
19. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
AC*Activity
Replaces ActionBarActivity
20. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
AC*Activity
Replaces ActionBarActivity
Consistent theming
21. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
AC*Activity
Replaces ActionBarActivity
Consistent theming
Tinting
22. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
AC*Activity
Replaces ActionBarActivity
Consistent theming
Tinting
Lifecycle
23. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
AC*Activity
Replaces ActionBarActivity
Consistent theming
Tinting
Lifecycle
Appbar
24. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
- AC*Activity
AC*Delegate
AppCompat capabilities
25. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
- AC*Activity
AC*Delegate
AppCompat capabilities
Works on all Activities
26. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
- AC*Activity
- AC*Delegate
AC*Dialog
Material design
27. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
- AC*Activity
- AC*Delegate
AC*Dialog
Material design
Marshmallow lifecycle
28. With a little help from my libs by Royi Benyossef (+royiby)
App compat
- Definition
- AC*Activity
- AC*Delegate
AC*Dialog
Material design
Marshmallow lifecycle
New animations
29. With a little help from my libs by Royi Benyossef (+royiby)
DrawableCompat
(Image tinting)
30. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
Definition Tintable views (AppCompat)
31. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
Definition Tintable views (AppCompat):
>*AutoCompleteTextView
32. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
Definition Tintable views (AppCompat):
*AutoCompleteTextView
>*Button
33. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
Definition Tintable views (AppCompat):
*AutoCompleteTextView
*Button
>*Checkbox
34. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
Definition Tintable views (AppCompat):
*AutoCompleteTextView
*Button
*Checkbox
>*Spinner
35. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
Definition Tintable views (AppCompat):
*AutoCompleteTextView
*Button
*Checkbox
*Spinner
>...more!
36. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
- Definition
Usages
Branding
37. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
- Definition
Usages
Branding
Less drawables (less size)
38. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
- Definition
Usages
Branding
Less drawables (less size)
Reuse w/o repetition
39. With a little help from my libs by Royi Benyossef (+royiby)
DrawableCompat
(Example)
40. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
CustomView .wrap(drawable)
41. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
CustomView .wrap(drawable) =
> setTint()
42. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
CustomView .wrap(drawable) =
setTint()
> setTintList()
43. With a little help from my libs by Royi Benyossef (+royiby)
Drawable compat
CustomView .wrap(drawable) =
setTint()
setTintList()
> setTintMode()
44. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
(a.k.a palette)
45. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
Definition Match colors to content
46. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
Definition Match colors to content
Create diversity and interest
47. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
- Definition
Palette
Introduced in lollipop
48. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
- Definition
Palette
Introduced in lollipop
Retrieve color from content
49. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
- Definition
Palette
Introduced in lollipop
Retrieve color from content
Choose matching swatch
50. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
- Definition
Palette
Introduced in lollipop
Retrieve color from content
Choose matching swatch
= Profit
51. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
- Definition
Palette
Palette.from(bitmap)
52. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
- Definition
Palette
Palette.from(bitmap)
>6-8 times faster
53. With a little help from my libs by Royi Benyossef (+royiby)
Content driven coloring
- Definition
Palette
Palette.from(bitmap)
6-8 times faster
> sync and async
54. With a little help from my libs by Royi Benyossef (+royiby)
Interpolators
(Authentic motion is important)
55. With a little help from my libs by Royi Benyossef (+royiby)
Interpolators
Definition Controllers for animation
change rate
56. With a little help from my libs by Royi Benyossef (+royiby)
Interpolators
- Definition
Diff
Fast out linear in
57. With a little help from my libs by Royi Benyossef (+royiby)
Interpolators
- Definition
Diff
Fast out linear in
Fast out slow in
58. With a little help from my libs by Royi Benyossef (+royiby)
Interpolators
- Definition
Diff
Fast out linear in
Fast out slow in
Linear out slow in
59. With a little help from my libs by Royi Benyossef (+royiby)
Interpolators
- Definition
Diff
Fast out linear in
Fast out slow in
Linear out slow in
PathInterpolarCompat
60. With a little help from my libs by Royi Benyossef (+royiby)
RecyclerView
(ListView is just a fading memory)
61. With a little help from my libs by Royi Benyossef (+royiby)
RecyclerView
Definition Replaced ListView in Lollipop
62. With a little help from my libs by Royi Benyossef (+royiby)
RecyclerView
- Definition
SortedList
Sorted list of custom objects
63. With a little help from my libs by Royi Benyossef (+royiby)
RecyclerView
- Definition
SortedList
Sorted list of custom objects
Efficient CRUD event dispatch
64. With a little help from my libs by Royi Benyossef (+royiby)
RecyclerView
- Definition
SortedList
Sorted list of custom objects
Efficient CRUD event dispatch
Changes batching
65. With a little help from my libs by Royi Benyossef (+royiby)
Leanback
(AndroidTV best practices)
66. With a little help from my libs by Royi Benyossef (+royiby)
Leanback
Definition GuidanceView
67. With a little help from my libs by Royi Benyossef (+royiby)
Leanback
Definition GuidanceView
Classes & themes
68. With a little help from my libs by Royi Benyossef (+royiby)
Leanback
Definition GuidanceView
Classes & themes
Multi-step process
69. With a little help from my libs by Royi Benyossef (+royiby)
Leanback
Definition GuidanceView
Classes & themes
Multi-step process
App recommendation
support
71. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
(NavigationDrawer++)
72. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
Definition NavigationDrawer ++
73. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
Definition NavigationDrawer ++
Clearer navigation
74. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
Definition NavigationDrawer ++
Clearer navigation
Identity focal point
75. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
- Definition
Diff
Inflation from .xml
76. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
- Definition
Diff
Inflation from .xml
Runtime updates
77. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
- Definition
Diff
Inflation from .xml
Runtime updates
Callbacks
78. With a little help from my libs by Royi Benyossef (+royiby)
Navigation view
- Definition
Diff
Inflation from .xml
Runtime updates
Callbacks
Scrim protection
79. With a little help from my libs by Royi Benyossef (+royiby)
Navigation view
- Definition
Diff
Inflation from .xml
Runtime updates
Callbacks
Scrim protection
Subheaders
80. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
(Example)
81. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
Layout <android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<!-- your content layout -->
<android.support.design.widget.NavigationView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/drawer_header"
app:menu="@menu/drawer"/>
</android.support.v4.widget.DrawerLayout>
82. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
- Layout
Menu
<group android:checkableBehavior="single">
<item
android:id="@+id/navigation_item_1"
android:checked="true"
android:icon="@drawable/ic_android"
android:title="@string/navigation_item_1"/>
<item
android:id="@+id/navigation_item_2"
android:icon="@drawable/ic_android"
android:title="@string/navigation_item_2"/>
</group>
83. With a little help from my libs by Royi Benyossef (+royiby)
NavigationView
- Layout
- Menu
Subheaders
<item
android:id="@+id/navigation_subheader"
android:title="@string/navigation_subheader">
<menu>
<item
android:id="@+id/navigation_sub_item_1"
android:icon="@drawable/ic_android"
android:title="@string/navigation_sub_item_1"/>
<item
android:id="@+id/navigation_sub_item_2"
android:icon="@drawable/ic_android"
android:title="@string/navigation_sub_item_2"/>
</menu>
</item>
84. With a little help from my libs by Royi Benyossef (+royiby)
EditText
(Labels & hints)
85. With a little help from my libs by Royi Benyossef (+royiby)
EditText
Definition New labels and messages
86. With a little help from my libs by Royi Benyossef (+royiby)
EditText
Definition New labels and messages
More states
87. With a little help from my libs by Royi Benyossef (+royiby)
EditText
Definition New labels and messages
More states
More clarity
88. With a little help from my libs by Royi Benyossef (+royiby)
EditText
- Definition
Diff
Floating labels
89. With a little help from my libs by Royi Benyossef (+royiby)
EditText
- Definition
Diff
Floating labels
Error messages
90. With a little help from my libs by Royi Benyossef (+royiby)
FAB
(Absolutely FABulous)
91. With a little help from my libs by Royi Benyossef (+royiby)
Floating action button
Definition Primary action
92. With a little help from my libs by Royi Benyossef (+royiby)
Floating action button
Definition Primary action
Promoted action
93. With a little help from my libs by Royi Benyossef (+royiby)
Floating action button
Definition Primary action
Promoted action
Continuous (mini FAB)
94. With a little help from my libs by Royi Benyossef (+royiby)
Floating action button
- Definition
Diff
Standard implementation
95. With a little help from my libs by Royi Benyossef (+royiby)
SnackBar
(hmm… yum!)
96. With a little help from my libs by Royi Benyossef (+royiby)
Snack bar
Definition Toast++
97. With a little help from my libs by Royi Benyossef (+royiby)
Snack bar
- Definition
Diff
New addition!
98. With a little help from my libs by Royi Benyossef (+royiby)
Snack bar
- Definition
- Diff
Usages
Operation feedback
99. With a little help from my libs by Royi Benyossef (+royiby)
Snack bar
- Definition
- Diff
Usages
Operation feedback
Temporary state
100. With a little help from my libs by Royi Benyossef (+royiby)
Snack bar
- Definition
- Diff
Usages
Operation feedback
Temporary state
Long action result
101. With a little help from my libs by Royi Benyossef (+royiby)
SnackBar
(Example)
102. With a little help from my libs by Royi Benyossef (+royiby)
Snack bar
Show Snackbar
.make(parentLayout, R.string.snackbar_text, Snackbar.
LENGTH_LONG)
.setAction(R.string.snackbar_action, myOnClickListener)
.show(); // Don’t forget to show!
103. With a little help from my libs by Royi Benyossef (+royiby)
TabLayout
(Not just a material design thingy)
104. With a little help from my libs by Royi Benyossef (+royiby)
Tab layout
Definition Tabs 15.0
105. With a little help from my libs by Royi Benyossef (+royiby)
Tab layout
- Definition
Diff
Adding programmatically
106. With a little help from my libs by Royi Benyossef (+royiby)
Tab layout
- Definition
Diff
Adding programmatically
ViewPager integration
107. With a little help from my libs by Royi Benyossef (+royiby)
Tab layout
- Definition
Diff
Adding programmatically
ViewPager integration
Easy fixed size or scrollable
108. With a little help from my libs by Royi Benyossef (+royiby)
Tab layout
- Definition
- Diff
Usages
Top level nav. pattern
109. With a little help from my libs by Royi Benyossef (+royiby)
Tab layout
- Definition
- Diff
Usages
Top level nav. pattern
Content group organizing
110. With a little help from my libs by Royi Benyossef (+royiby)
Tab layout
- Definition
- Diff
Usages
Top level nav. pattern
Content group organizing
ViewPager mgmt.
111. With a little help from my libs by Royi Benyossef (+royiby)
CoordinatorLayout
(Because something needs to be)
112. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
Definition Child view touch event
control
113. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
- Definition
Diff
New!
114. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
- Definition
- Diff
Usages
Animated FAB
115. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
- Definition
- Diff
Usages
Animated FAB
layout_anchor
116. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
- Definition
- Diff
Usages
Animated FAB
layout_anchor
AppBar scrolling techniques
117. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
- Definition
- Diff
Usages
AppBar scrolling techniques:
> Scrol
118. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
- Definition
- Diff
Usages
AppBar scrolling techniques:
Scrol
> Enter always
119. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
- Definition
- Diff
Usages
AppBar scrolling techniques:
Scrol
Enter always
> Enter always collapsed
120. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
- Definition
- Diff
Usages
AppBar scrolling techniques:
Scrol
Enter always
Enter always collapsed
> Exit until collapsed
121. With a little help from my libs by Royi Benyossef (+royiby)
CoordinatorLayout
(Example)
122. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
AppBar <android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"...>
<! -- Your Scrollable View -->
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
app:layout_scrollFlags="scroll|enterAlways">
<android.support.design.widget.TabLayout
app:layout_scrollFlags="scroll|enterAlways">
</...AppBarLayout></...CoordinatorLayout>
123. With a little help from my libs by Royi Benyossef (+royiby)
CollapsingToolbar
(You prayers has been answered)
124. With a little help from my libs by Royi Benyossef (+royiby)
Collapsing toolbar layout
Definition Animation controls
125. With a little help from my libs by Royi Benyossef (+royiby)
Collapsing toolbar layout
- Definition
Diff
New!!!
126. With a little help from my libs by Royi Benyossef (+royiby)
Collapsing toolbar layout
- Definition
-Diff
Usages
Collapse mode
127. With a little help from my libs by Royi Benyossef (+royiby)
Collapsing toolbar layout
- Definition
-Diff
Usages
Collapse mode:
> Pin
128. With a little help from my libs by Royi Benyossef (+royiby)
Collapsing toolbar layout
- Definition
-Diff
Usages
Collapse mode:
Pin
> Parallax
129. With a little help from my libs by Royi Benyossef (+royiby)
Collapsing toolbar layout
- Definition
-Diff
Usages
Collapse mode:
Pin
Parallax
Layout parallax multiplier
130. With a little help from my libs by Royi Benyossef (+royiby)
CollapsingToolbar
(Example)
131. With a little help from my libs by Royi Benyossef (+royiby)
Coordinator layout
Pin <android.support.design.widget.AppBarLayout
android:layout_height="192dp"
android:layout_width="match_parent">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent"
app:layout_collapseMode="pin"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
133. With a little help from my libs by Royi Benyossef (+royiby)
Testing support library
Definition Backward compatible (API 8)
134. With a little help from my libs by Royi Benyossef (+royiby)
Testing support library
Definition Backward compatible (API 8)
All test tool dependencies
135. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
(Junit-¾ + testing framework)
136. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
Definition Junit 3/4 compatible
137. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
Definition Junit 3/4 compatible
Acts as testing framework
138. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
Definition Junit 3/4 compatible
Acts as testing framework
InstrumentationTestRunner
139. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
Jurisdiction
Load test pkgs to device
140. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
Jurisdiction
Load test pkgs to device
Runs test
141. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
Jurisdiction
Load test pkgs to device
Runs test
Reports results
142. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
Instrum. info.
Related to test run
143. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
Instrum. info.
Related to test run
Instrumentation obj
144. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
Instrum. info.
Related to test run
Instrumentation obj
Target app context
145. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
Instrum. info.
Related to test run
Instrumentation obj
Target app context
Test app context
146. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
Instrum. info.
Related to test run
Instrumentation obj
Target app context
Test app context
Cmd line args
147. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
Instrum. info.
Related to test run
Instrumentation obj
Target app context
Test app context
Cmd line args
= UIAutomator GOLD!
148. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
@RunWith(AndroidJUnit4.class)
public class CalculatorInstrumentationTest extends ActivityInstrumentationTestCase2<CalculatorActivity> {
@Before
public void setUp() throws Exception {
super.setUp();
injectInstrumentation(InstrumentationRegistry.getInstrumentation());
mActivity = getActivity();
}
@Test
public void typeOperandsAndPerformAddOperation() {}
@After
public void tearDown() throws Exception {
super.tearDown();
}
}
149. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
- Instrum. info.
Filtering
@RequiresDevice
150. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
- Instrum. info.
Filtering
@RequiresDevice
@SdkSupress
151. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
- Instrum. info.
Filtering
@RequiresDevice
@SdkSupress
@SdkSupress(minAPI)
152. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
- Instrum. info.
Filtering
@RequiresDevice
@SdkSupress
@SdkSupress(minAPI)
@Small/Medium/LargeTest
153. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
- Instrum. info.
- Filtering
Sharding
Test case subset ability
154. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
- Instrum. info.
- Filtering
Sharding
Test case subset ability
Run full suite or by shards
155. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
- Instrum. info.
- Filtering
Sharding
Test case subset ability
Run full suite or by shards
Identification by index
156. With a little help from my libs by Royi Benyossef (+royiby)
AndroidJunitRunner
- Definition
- Jurisdiction
- Instrum. info.
- Filtering
Sharding(Ex.)
adb shell am
instrument -w
-e numShards 10
-e shardIndex 2
157. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
(Short, intense and efficient UI testing)
158. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
Definition UI flow testing framework
159. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
Definition UI flow testing framework
White-box style
160. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
Definition UI flow testing framework
White-box style
(Reliant on target app code)
161. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
View matching
Use target app R.id.*
162. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
View matching
Use target app R.id.*
Matcher will search and find
163. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
View matching
onView(
withId
(
R.id.my_button
)
);
164. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
Adapters
Dynamic data
165. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
Adapters
Dynamic data
onView() might not work
166. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
Adapters
Dynamic data
onView() might not work
Espresso.onData()!
167. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
Adapters
Dynamic data
onView() might not work
Espresso.onData():
> data population event
168. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
Adapters
Dynamic data
onView() might not work
Espresso.onData():
data population event
> User action reference
169. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
Actions API
View clicks
170. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
Actions API
View clicks
Swipes
171. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
Actions API
View clicks
Swipes
Key & button press
172. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
Actions API
View clicks
Swipes
Key & button press
Text typing
173. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
Actions API
View clicks
Swipes
Key & button press
Text typing
Opening links
174. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
Actions API
// Type text into an EditText view, then close the soft
keyboard
onView(withId(R.id.editTextUserInput))
.perform(typeText(STRING_TO_BE_TYPED),
closeSoftKeyboard());
// Press the button to submit the text change
onView(withId(R.id.changeTextBt)).perform(click());
175. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
- Actions API
Thread sync
Fully integrated
176. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
- Actions API
Thread sync
Fully integrated
No sleep()
177. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
- Actions API
Thread sync
Fully integrated
No sleep()
No wait()
178. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
- Actions API
Thread sync
Fully integrated
No sleep()
No wait()
No to test flakiness!
179. With a little help from my libs by Royi Benyossef (+royiby)
Espresso
- Definition
- View matching
- Adapters
- Actions API
Thread sync
Fully integrated
No sleep()
No wait()
No to test flakiness!
Yes to determinism!!!
180. With a little help from my libs by Royi Benyossef (+royiby)
UIAutomator
(Because not all the names can be witty)
181. With a little help from my libs by Royi Benyossef (+royiby)
UIAutomator
Definition Black-box UI flow testing
182. With a little help from my libs by Royi Benyossef (+royiby)
UIAutomator
Definition Black-box UI flow testing
(No reliance on target code)
183. With a little help from my libs by Royi Benyossef (+royiby)
UIAutomator
- Definition
APIs
UIDevice (.pressHome())
184. With a little help from my libs by Royi Benyossef (+royiby)
UIAutomator
- Definition
APIs
UIDevice (.pressHome())
UICollection
185. With a little help from my libs by Royi Benyossef (+royiby)
UIAutomator
- Definition
APIs
UIDevice (.pressHome())
UICollection
UIObject
186. With a little help from my libs by Royi Benyossef (+royiby)
UIAutomator
- Definition
APIs
UIDevice (.pressHome())
UICollection
UIObject
UIScrollable
187. With a little help from my libs by Royi Benyossef (+royiby)
UIAutomator
- Definition
APIs
UIDevice (.pressHome())
UICollection
UIObject
UIScrollable
UISelector
188. With a little help from my libs by Royi Benyossef (+royiby)
UIAutomator
- Definition
APIs
UIDevice (.pressHome())
UICollection
UIObject
UIScrollable
UISelector
Configurer
190. With a little help from my libs by Royi Benyossef (+royiby)
Percent support library
(Percentage based layouts)
191. With a little help from my libs by Royi Benyossef (+royiby)
Percent support library
Definition Percentage based layouts
192. With a little help from my libs by Royi Benyossef (+royiby)
Percent support library
- Definition
P*Relative
<android.support.percent.PercentRelativeLayout ...>
<View ... android:layout_alignParentTop="true"
app:layout_heightPercent="20%"
app:layout_widthPercent="70%" />
<View ...
android:layout_alignParentTop="true"
app:layout_heightPercent="20%"
app:layout_widthPercent="30%" />
</android.support.percent.PercentRelativeLayout>
193. With a little help from my libs by Royi Benyossef (+royiby)
Percent support library
- Definition
- P*Relative
P*Linear
<com.juliengenoud.percentsamples.PercentLinearLayout ...>
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#ff44aacc"
app:layout_heightPercent="10%"
app:layout_widthPercent="60%"/>
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#ff4400cc"
app:layout_heightPercent="10%"
app:layout_widthPercent="70%"/>
</com.juliengenoud.percentsamples.PercentLinearLayout>
194. With a little help from my libs by Royi Benyossef (+royiby)
Percent support library
- Definition
- P*Relative
- P*Linear
P*Frame
<android.support.percent.PercentFrameLayout
xmlns:android="http://schemas.android.
com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- ... XML CODE -->
</android.support.percent.PercentFrameLayout>
195. With a little help from my libs by Royi Benyossef (+royiby)
Custom tabs support lib
(No more WebViews. No more tears shed)
196. With a little help from my libs by Royi Benyossef (+royiby)
Custom tabs support library
Definition Open links in browser
197. With a little help from my libs by Royi Benyossef (+royiby)
Custom tabs support library
Definition Open links in browser
Customize browser tabs
198. With a little help from my libs by Royi Benyossef (+royiby)
Custom tabs support library
- Definition
Usage
@Override protected void onCreate(Bundle
savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_preview);
mCustomTabHelper = new SimpleCustomChromeTabsHelper(this);
}
199. With a little help from my libs by Royi Benyossef (+royiby)
Custom tabs support library
- Definition
Usage
@Override protected void onCreate(Bundle
savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_preview);
mCustomTabHelper = new SimpleCustomChromeTabsHelper(this);
}
mCustomTabHelper.prepareUrl(mProduct.getRedirectUrl());
200. With a little help from my libs by Royi Benyossef (+royiby)
Custom tabs support library
- Definition
Usage
@Override protected void onCreate(Bundle
savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_preview);
mCustomTabHelper = new SimpleCustomChromeTabsHelper(this);
}
mCustomTabHelper.prepareUrl(mProduct.getRedirectUrl());
mCustomTabHelper.openUrl(mProduct.getRedirectUrl());
201. With a little help from my libs by Royi Benyossef (+royiby)
Data binding support lib
(Beta)
202. With a little help from my libs by Royi Benyossef (+royiby)
Data binding support library
Definition Data binding only for older
APIs!
203. With a little help from my libs by Royi Benyossef (+royiby)
Data binding support library
- Definition
Usage
Too long, Google it!
204. With a little help from my libs by Royi Benyossef (+royiby)
Summary
(What did we have here?)
205. With a little help from my libs by Royi Benyossef (+royiby)
Key points
AppCompat
206. With a little help from my libs by Royi Benyossef (+royiby)
Key points
- AppCompat
V4/V7/V13 support lib
207. With a little help from my libs by Royi Benyossef (+royiby)
Key points
- AppCompat
- V4/V7/V13 support lib
Design support lib
208. With a little help from my libs by Royi Benyossef (+royiby)
Key points
- AppCompat
- V4/V7/V13 support lib
- Design support lib
Testing support lib
209. With a little help from my libs by Royi Benyossef (+royiby)
Key points
- AppCompat
- V4/V7/V13 support lib
- Design support lib
- Testing support lib
Percent support lib
210. With a little help from my libs by Royi Benyossef (+royiby)
Key points
- AppCompat
- V4/V7/V13 support lib
- Design support lib
- Testing support lib
- Percent support lib
Custom tabs support libs
211. “We should be building great
things. Things that Don’t yet
exist”
212. I Hope You Liked It
Thank you for listening
By Royi Benyossef (+royiby)