What's new in Android (Google I/O'19)
Why Stack Overflow recommends it
Stack Overflow users link it as a primary source for announcements made at I/O 2019, such as ViewPager2, view binding in Android Studio 3.6 and the Bubble API.
Recommended by 2 people across 2 different months, 2016 to 2021.
What it is
The Android keynote session from Google I/O 2019, presented by Chet Haase, Romain Guy and Dan Sandler. It gives an overview of the new developer-facing features in Android, including announcements like ViewPager2, view binding and the Bubbles API.
What people said
Recommends Albert Vila Calvo · 2016-06 · Stack Overflow · on “RecyclerView horizontal scroll snap in center”
Google I/O 2019 Update ViewPager2 [LINK] is here! Google just announced [this video] at the talk 'What's New in Android' (aka 'The Android keynote') that they are working on a new ViewPager based on RecyclerView! From the slides: Like ViewPager, but better Easy migration from ViewPager Based on RecyclerView Right-to-Left mode support Allows vertical paging Improved dataset change notifications You can check the latest version here [LINK] and the release notes here [LINK] . There is also an official sample [LINK] . Update Dec. 2021: sample has moved to this other repo [LINK] . Personal opinion: I think this is a really needed addition. I've recently had a lot of trouble with the PagerSnapHelper os
Recommends SaadAAkash · 2019-07 · Stack Overflow · on “How to use view binding in Android”
ViewBindings are introduced at this moment [this video] of this talk at Google IO/19. It will be available with Android Studio 3.6 and as you mentioned, you're using Android Studio 3.4.2 so it's not working. Read the ViewBindings portion in this [LINK] article for more references.
Cites Albert Vila Calvo · 2019-09 · Stack Overflow · on “Android ViewPager - Show preview of page on left and right”
Solution with the new ViewPager2 Nowadays you should consider using ViewPager2 [LINK] which "replaces ViewPager, addressing most of its predecessor’s pain-points" : Based on RecyclerView RTL (right-to-left) layout support Vertical orientation support Reliable Fragment support (including handling changes to the underlying Fragment collection) Dataset change animations (including DiffUtil support) The result [LINK] The code In your Activity/Fragment, setup the ViewPager2: // MyRecyclerViewAdapter is an standard RecyclerView.Adapter :) viewPager2.adapter = MyRecyclerViewAdapter() // You need to retain one page on each side so that the next and previous items are visible viewPager2.offscreenPage
Cites Dickson the developer · 2020-01 · Stack Overflow · on “SYSTEM_ALERT_WINDOW - How to get this permission automatically on Android 6.0 and targetSdkVersion 23”
True @NoaDrach , that's why I said in the future Google will eventually deprecate SAW - i.e when Bubble API is stable. [this video]
Cites roman · 2021-01 · Stack Overflow · on “When using Jetpack view binding, should I keep referring to ids through R.id.something, or use binding.something.id instead?”
I want to retrieve the id of a Layout inside of one of my layout xmls, and it's possible to use both R.id.* and the binding for this - details below. Which is the preferred way? Given the following structure: app |-- java.org.romco.appname | |-- MainActivity.kt |-- res.layout | |-- main_activity.xml | |-- main_content.xml Let's say my main_activity.xml is a CoordinatorLayout and includes the main_content.xml with a defined id of "main_content", such as: android:id="@+id/main_content" layout="@layout/content_main" /> My content_main.xml then contains a FrameLayout with a defined if of "task_details_container", such as: <FrameLayout android:id="@+id/task_details_container" /> Following the off