7. #dfkutahya
Drag And Drop
android.view.DragAndDropPermissions
Token object responsible for specifying the permissions granted to
the app that receives a drop.
View.startDragAndDrop()
View.DRAG_FLAG_GLOBAL
View.DRAG_FLAG_GLOBAL_URI_READ
View.DRAG_FLAG_GLOBAL_URI_WRITE
View.cancelDragAndDrop()
View.updateDragShadow()
Activity.requestDragAndDropPermissions()
Requests the permissions for the content URIs passed
with the ClipData contained in a DragEvent.
12. #dfkutahya
Required notification contents
A Notification object must contain the following:
• A small icon, set by setSmallIcon()
• A title, set by setContentTitle()
• Detail text, set by setContentText()
Notification.DecoratedCustomViewStyle()
Notification.DecoratedMediaCustomViewStyle()
Builder.setCustomContentView()
18. #dfkutahya
Quick Settings Tile
holds the state of a tile that will be displayed in Quick Settings
•TileService
provides the user a tile that can be added to Quick Settings
•Tile
27. #dfkutahya
ConnectivityManager connMgr = (ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
if (connMgr.isActiveNetworkMetered()) {
switch (connMgr.getRestrictBackgroundStatus) {
case RESTRICT_BACKGROUND_STATUS_ENABLED:
// background data blocked, use less data in foreground
too
break;
case RESTRICT_BACKGROUND_STATUS_WHITELISTED:
// App should limit usage in fg and bg
break;
case RESTRICT_BACKGROUND_STATUS_DISABLED:
// data saver disabled, but still on metered network
break; }
Data Saver
33. #dfkutahya
ConstraintLayout
● Designed to reduce nesting
● Small - 100 kb
● Compatible since Gingerbread(2.3) (%99.9 percent of
devices)
● First Layout in conjunction with tool (Android Studio)
● Designed to reduce nesting
34. #dfkutahya
1. Ensure you have the latest Android Support Repository (version 32 or higher):
a. Click Tools > Android > SDK Manager.
b. Click the SDK Tools tab.
c. Select Android Support Repository, then click OK.
2. Add the Constraint Layout library as a dependency in your build.gradle file:
dependencies {
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha5'
}
3. In the toolbar or sync notification, click Sync Project with Gradle Files.
——
To add a new constraint layout to your project:
1. Right-click on your module's layout directory, then click New > XML > Layout XML.
2. Enter a name for the layout and enter "android.support.constraint.ConstraintLayout" for the Root
Tag.
3. Click Finish.
47. #dfkutahya
ConstraintLayout Attributes
● layout_constraintTop_toTopOf — Align the top of the desired view to the top of another.
● layout_constraintTop_toBottomOf — Align the top of the desired view to the bottom of another.
● layout_constraintBottom_toTopOf — Align the bottom of the desired view to the top of another.
● layout_constraintBottom_toBottomOf — Align the bottom of the desired view to the bottom of another.
● layout_constraintLeft_toTopOf — Align the left of the desired view to the top of another.
● layout_constraintLeft_toBottomOf — Align the left of the desired view to the bottom of another.
● layout_constraintLeft_toLeftOf — Align the left of the desired view to the left of another.
● layout_constraintLeft_toRightOf — Align the left of the desired view to the right of another.
● layout_constraintRight_toTopOf — Align the right of the desired view to the top of another.
● layout_constraintRight_toBottomOf — Align the right of the desired view to the bottom of another.
● layout_constraintRight_toLeftOf — Align the right of the desired view to the left of another.
● layout_constraintRight_toRightOf — Align the right of the desired view to the right of another.
53. #dfkutahya
Using Dynamic Shortcuts
Dynamic shortcuts should provide links to
specific, context-sensitive actions within
your app. These actions can change
between uses of your app, and they can
change even while your app is running. Good
candidates for dynamic shortcuts include
calling a specific person, navigating to a
specific location, and viewing the current
score for a specific game.
54. #dfkutahya
The ShortcutManager API allows you to complete the following
operations on dynamic shortcuts:
• Publish: Use setDynamicShortcuts(List) to redefine the entire
list of dynamic shortcuts, or use addDynamicShortcuts(List)
to augment an existing list of dynamic shortcuts.
• Update: Use the updateShortcuts(List) method.
• Remove: Remove a set of dynamic shortcuts using
removeDynamicShortcuts(List), or remove all dynamic
shortcuts using removeAllDynamicShortcuts().
57. #dfkutahya
• Enhanced Live Wallpaper Metadata
• Round Icon Resources
When a launcher requests an app icon, the
framework returns either android:icon or
android:roundIcon, depending on the device
build configuration.
58. #dfkutahya
• Storage Manager Intent
• Improved VR Thread Scheduling
• Demo User Hint
Apps can now check to see if the device is running as the demo user.
• APIs for Carriers and Calling Apps
• New Screen Densities for Wear Devices
• DENSITY_260
• DENSITY_300
• DENSITY_340