Android 10 Beta 3

Android Q beta three is here this version has several new updates including dark theme and gesture navigation let's dive in beta three adds a system setting to switch apps on a device to use a dark theme having a dark theme isn't just

aesthetic on some devices it can

extend battery life therefore when users switch to battery saver mode the dark theme will automatically be used on pixel and selected om devices to customize your app start theme extend your app theme from theme dot app compat day/night or material components from there you enable the feature by

calling app compat delegate dot set default night mode the recommended values for this are light night no dark night yes use system default night fellow system keep in mind that the past in value is not persisted so you need to set it each time your app becomes visible

you will also need to update your themes styles and layouts so that users can seamlessly switch between your apps light and dark themes using material design components makes this especially easy because its color theme system provides easy access to well defined colors Android Q also introduces gestural navigation

allowing you to perform sliding motions to both navigate back one screen and return to the home screen gestural navigation provides a system-wide edge-to-edge experience this means your apps can use more of the devices screen on beta 3 a swipe up shows the home screen and a horizontal edge

swipe will now take you back to the previous app if your app relies on similar gestures users may accidentally trigger the system gestures and alter the intended experience of your app for example a horizontal edge swipe by default takes you back to the previous app if you encountered

this sort of conflict youth gesture exclusion rectangles to override system gestures within particular areas along device edges when users perform a gesture inside of these rectangles the gesture will trigger an action in your app instead of the typical system action although gesture exclusion rectangles give you flexibility in

updating your apps experience you should keep the following best practices in mind avoid vertical swipes near the system navigation elements because this gesture will always be a way for users to exit the app we also don't recommend creating a gesture exclusion zone that covers the entire edge of

the screen which the system recognizes as a back action to enhance user privacy Android has created a sandbox view of external storage that app start getting Android cue used by default your app can access the files that it creates on external storage but access to other apps files

through runtime permissions is limited to common media types such as photos and music to access other files your app can request that the user give permission to access a particular file or directory by using either the action open document or action open document tree intent to help you

respond to your contacts questions more efficiently and RQ introduces smart actions smart actions can now automatically suggest actions and responses to conversations for example in this notification the system suggests replies to the message and since the message contains an address it includes a button to navigate to that

address the system provides several suggestions for you so you don't need to implement this functionality from scratch in your app you can analyze a list of messages to see if there are any actions associated with it using the suggests conversation actions API path and conversation text and the

API will provide a list of suggestions corresponding to possible actions it will also generate a list of possible replies but for now this reply feature is only supported in English we've also added an ability to detect languages and a piece of text developers can use the detect language

feature of the text classifier class to pass in text and see what language it is in enough of me talking go try it for yourself follow the link in the description to install Android cue beta which is now available on more than 15 devices release notes and support

resources can be found on the Android Q beta developer site let us know how you like android cue by leaving us feedback your feedback is important to us in building a platform for everyone happy coding [Music]

Nhận xét

Bài đăng phổ biến từ blog này