Skip to content

Commit 4b5f336

Browse files
authored
Merge pull request #288 from android/e2e_pb
Make Predictive Back animations edge-to-edge
2 parents 68b9a01 + 6bdb702 commit 4b5f336

11 files changed

+19
-0
lines changed

samples/user-interface/predictiveback/src/main/java/com/example/platform/ui/predictiveback/PBCustomCrossActivityAnimation.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.example.platform.ui.predictiveback
1818

1919
import android.os.Bundle
20+
import androidx.activity.enableEdgeToEdge
2021
import androidx.annotation.RequiresApi
2122
import androidx.appcompat.app.AppCompatActivity
2223
import com.example.platform.ui.predictiveback.databinding.ActivityCustomCrossAnimationBinding
@@ -29,6 +30,8 @@ class PBCustomCrossActivityAnimation : AppCompatActivity() {
2930
override fun onCreate(savedInstanceState: Bundle?) {
3031
super.onCreate(savedInstanceState)
3132

33+
enableEdgeToEdge()
34+
3235
binding = ActivityCustomCrossAnimationBinding.inflate(layoutInflater)
3336
setContentView(binding.root)
3437

samples/user-interface/predictiveback/src/main/java/com/example/platform/ui/predictiveback/PBHostingActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
package com.example.platform.ui.predictiveback
1818

1919
import android.os.Bundle
20+
import androidx.activity.enableEdgeToEdge
21+
import androidx.appcompat.app.AppCompatActivity
2022
import androidx.fragment.app.FragmentActivity
2123
import com.example.platform.ui.predictiveback.databinding.HostingActivityBinding
2224

@@ -27,6 +29,8 @@ class PBHostingActivity : FragmentActivity() {
2729
override fun onCreate(savedInstanceState: Bundle?) {
2830
super.onCreate(savedInstanceState)
2931

32+
enableEdgeToEdge()
33+
3034
binding = HostingActivityBinding.inflate(layoutInflater)
3135
setContentView(binding.root)
3236
}

samples/user-interface/predictiveback/src/main/java/com/example/platform/ui/predictiveback/PBSetCustomAnimationsActivity.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package com.example.platform.ui.predictiveback
1818

1919
import androidx.appcompat.app.AppCompatActivity
2020
import android.os.Bundle
21+
import androidx.activity.enableEdgeToEdge
2122
import androidx.fragment.app.commit
2223
import com.example.platform.ui.predictiveback.databinding.ActivitySetCustomAnimationsBinding
2324

@@ -27,6 +28,8 @@ class PBSetCustomAnimationsActivity : AppCompatActivity() {
2728
override fun onCreate(savedInstanceState: Bundle?) {
2829
super.onCreate(savedInstanceState)
2930

31+
enableEdgeToEdge()
32+
3033
binding = ActivitySetCustomAnimationsBinding.inflate(layoutInflater)
3134
setContentView(binding.root)
3235

samples/user-interface/predictiveback/src/main/res/layout/activity_custom_cross_animation.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:app="http://schemas.android.com/apk/res-auto"
1919
xmlns:tools="http://schemas.android.com/tools"
20+
android:fitsSystemWindows="true"
2021
android:layout_width="match_parent"
2122
android:layout_height="match_parent"
2223
android:layout_margin="16dp"

samples/user-interface/predictiveback/src/main/res/layout/activity_set_custom_animations.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
1919
xmlns:app="http://schemas.android.com/apk/res-auto"
2020
xmlns:tools="http://schemas.android.com/tools"
21+
android:fitsSystemWindows="true"
2122
android:layout_width="match_parent"
2223
android:layout_height="match_parent"
2324
tools:context=".PBSetCustomAnimationsActivity">

samples/user-interface/predictiveback/src/main/res/layout/fragment_animation_list.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
1717
xmlns:tools="http://schemas.android.com/tools"
1818
android:id="@+id/scroll"
19+
android:fitsSystemWindows="true"
20+
android:clipToPadding="false"
1921
android:layout_width="match_parent"
2022
android:layout_height="match_parent"
2123
tools:context=".PBListFragment">

samples/user-interface/predictiveback/src/main/res/layout/fragment_material_shared_axis.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:app="http://schemas.android.com/apk/res-auto"
1919
xmlns:tools="http://schemas.android.com/tools"
20+
android:fitsSystemWindows="true"
2021
android:layout_width="match_parent"
2122
android:layout_height="match_parent"
2223
android:layout_margin="16dp"

samples/user-interface/predictiveback/src/main/res/layout/fragment_navigation_component_default_animations.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:app="http://schemas.android.com/apk/res-auto"
1919
xmlns:tools="http://schemas.android.com/tools"
20+
android:fitsSystemWindows="true"
2021
android:layout_width="match_parent"
2122
android:layout_height="match_parent"
2223
android:layout_margin="16dp"

samples/user-interface/predictiveback/src/main/res/layout/fragment_progress_api.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:app="http://schemas.android.com/apk/res-auto"
1919
xmlns:tools="http://schemas.android.com/tools"
20+
android:fitsSystemWindows="true"
2021
android:layout_width="match_parent"
2122
android:layout_height="match_parent"
2223
android:layout_margin="16dp"

samples/user-interface/predictiveback/src/main/res/layout/fragment_shared_element_transition.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<androidx.constraintlayout.widget.ConstraintLayout
1717
xmlns:app="http://schemas.android.com/apk/res-auto"
1818
xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:fitsSystemWindows="true"
1920
android:layout_width="match_parent"
2021
android:layout_height="match_parent">
2122

0 commit comments

Comments
 (0)