Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
trambui09 committed Nov 15, 2024
2 parents 14e2e69 + 4f28f06 commit c86103b
Showing 1 changed file with 34 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,37 +1,55 @@
/*
* Copyright 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.compose.snippets.predictiveback

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.rememberNavController
import androidx.navigation.NavHostController
import androidx.compose.animation.scaleOut
import androidx.compose.ui.graphics.TransformOrigin
import androidx.compose.animation.EnterTransition
import android.os.SystemClock
import androidx.activity.BackEventCompat
import androidx.activity.compose.PredictiveBackHandler
import androidx.compose.ui.unit.dp
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.core.Animatable
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.navigation.compose.composable
import androidx.compose.animation.scaleOut
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.pointer.util.VelocityTracker
import androidx.compose.ui.platform.LocalDensity
import kotlinx.coroutines.flow.Flow
import androidx.compose.ui.graphics.TransformOrigin
import androidx.compose.ui.input.pointer.util.VelocityTracker
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import kotlin.coroutines.cancellation.CancellationException


@Composable
private fun PredictiveBackOverrideExit(
modifier: Modifier,
Expand All @@ -45,7 +63,7 @@ private fun PredictiveBackOverrideExit(
popExitTransition = {
scaleOut(
targetScale = 0.9f,
transformOrigin = TransformOrigin(pivotFractionX = 0.5f, pivotFractionY = 0.5f)
transformOrigin = TransformOrigin(pivotFractionX = 0.5f, pivotFractionY = 0.5f)
)
},
popEnterTransition = {
Expand All @@ -72,16 +90,16 @@ private fun PredictiveBackOverrideExit(

@Composable
private fun HomeScreen(
modifier: Modifier = Modifier, navController: NavHostController
modifier: Modifier = Modifier,
navController: NavHostController
) {

}

@Composable
private fun SettingsScreen(
modifier: Modifier = Modifier, navController: NavHostController
modifier: Modifier = Modifier,
navController: NavHostController
) {

}

@Composable
Expand Down Expand Up @@ -166,7 +184,6 @@ private fun PredictiveBackHandlerManualProgress() {
velocityTracker.resetTracking()
}
// [END android_compose_predictivebackhandler_manualprogress]

}
}

Expand All @@ -175,4 +192,4 @@ private enum class DrawerState {
Closed
}

private val DrawerWidth = 300.dp
private val DrawerWidth = 300.dp

0 comments on commit c86103b

Please sign in to comment.