Skip to content

Commit

Permalink
Merge pull request #13271 from woocommerce/13269-android-sdk-update-m…
Browse files Browse the repository at this point in the history
…in-sdk-to-35

[Android SDK] Update compile SDK to 35
  • Loading branch information
samiuelson authored Jan 16, 2025
2 parents c34c16b + 542c8f4 commit 9818b66
Show file tree
Hide file tree
Showing 18 changed files with 237 additions and 249 deletions.
2 changes: 1 addition & 1 deletion WooCommerce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def versionProperties = loadPropertiesFromFile(file("${rootDir}/version.properti
android {
namespace "com.woocommerce.android"

compileSdkVersion gradle.ext.compileSdkVersion
compileSdk gradle.ext.compileSdkVersion

defaultConfig {
applicationId "com.woocommerce.android"
Expand Down
3 changes: 2 additions & 1 deletion WooCommerce/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@
tools:replace="android:screenOrientation" />
<activity
android:name="com.woocommerce.android.ui.woopos.root.WooPosActivity"
android:theme="@style/Theme.WooPos"
android:exported="false" />
<activity
android:name="com.woocommerce.android.ui.woopos.cardreader.WooPosCardReaderActivity"
android:theme="@style/Theme.Woo.Transparent" />
android:theme="@style/Theme.WooPos.Transparent" />

<!-- Stats today app widget -->
<meta-data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ data class Order(
.firstOrNull()?.groupValues
?.takeIf { it.size == addonAttributeGroupSize }
?.toMutableList()
?.apply { removeFirst() }
?.apply { removeAt(0) }

@IgnoredOnParcel
val addonName = keyAsAddonRegexGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.FloatingActionButton
import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ModalBottomSheetLayout
import androidx.compose.material.ModalBottomSheetValue
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons.Filled
Expand Down Expand Up @@ -51,6 +50,7 @@ import com.woocommerce.android.ui.blaze.campaigs.BlazeCampaignListViewModel.Clic
import com.woocommerce.android.ui.compose.component.BottomSheetHandle
import com.woocommerce.android.ui.compose.component.InfiniteListHandler
import com.woocommerce.android.ui.compose.component.WCColoredButton
import com.woocommerce.android.ui.compose.component.WCModalBottomSheetLayout

@Composable
fun BlazeCampaignListScreen(viewModel: BlazeCampaignListViewModel) {
Expand Down Expand Up @@ -91,7 +91,7 @@ private fun BlazeCampaignListScreen(
}
}

ModalBottomSheetLayout(
WCModalBottomSheetLayout(
sheetState = bottomSheetState,
sheetContent = {
CampaignCelebrationSheet(onCampaignCelebrationDismissed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,42 +115,42 @@ private fun CampaignBudgetScreen(
skipHalfExpanded = true,
)

Scaffold(
topBar = {
Toolbar(
onNavigationButtonClick = onBackPressed,
navigationIcon = Icons.AutoMirrored.Filled.ArrowBack
)
},
modifier = Modifier.background(MaterialTheme.colors.surface)
) { paddingValues ->
WCModalBottomSheetLayout(
sheetState = modalSheetState,
sheetContent = {
Column {
Spacer(modifier = Modifier.height(dimensionResource(id = dimen.minor_100)))
BottomSheetHandle(Modifier.align(Alignment.CenterHorizontally))
when {
state.showImpressionsBottomSheet -> ImpressionsInfoBottomSheet(
onDoneTapped = { coroutineScope.launch { modalSheetState.hide() } }
)
WCModalBottomSheetLayout(
sheetState = modalSheetState,
sheetContent = {
Column {
Spacer(modifier = Modifier.height(dimensionResource(id = dimen.minor_100)))
BottomSheetHandle(Modifier.align(Alignment.CenterHorizontally))
when {
state.showImpressionsBottomSheet -> ImpressionsInfoBottomSheet(
onDoneTapped = { coroutineScope.launch { modalSheetState.hide() } }
)

state.showCampaignDurationBottomSheet -> EditDurationBottomSheet(
budgetUiState = state,
onStartDateChanged = { onStartDateChanged(it) },
onApplyTapped = { duration, isEndlessCampaign, startDate ->
onApplyDurationTapped(duration, isEndlessCampaign, startDate)
coroutineScope.launch { modalSheetState.hide() }
},
onCancelTapped = { coroutineScope.launch { modalSheetState.hide() } },
onDurationSliderUpdated = { duration, startDate ->
onDurationSliderUpdated(duration, startDate)
}
)
}
state.showCampaignDurationBottomSheet -> EditDurationBottomSheet(
budgetUiState = state,
onStartDateChanged = { onStartDateChanged(it) },
onApplyTapped = { duration, isEndlessCampaign, startDate ->
onApplyDurationTapped(duration, isEndlessCampaign, startDate)
coroutineScope.launch { modalSheetState.hide() }
},
onCancelTapped = { coroutineScope.launch { modalSheetState.hide() } },
onDurationSliderUpdated = { duration, startDate ->
onDurationSliderUpdated(duration, startDate)
}
)
}
}
) {
}
) {
Scaffold(
topBar = {
Toolbar(
onNavigationButtonClick = onBackPressed,
navigationIcon = Icons.AutoMirrored.Filled.ArrowBack
)
},
modifier = Modifier.background(MaterialTheme.colors.surface)
) { paddingValues ->
Column(
modifier = Modifier
.padding(paddingValues)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package com.woocommerce.android.ui.blaze.creation.destination
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imeNestedScroll
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
Expand All @@ -27,13 +29,13 @@ import com.woocommerce.android.R
import com.woocommerce.android.ui.blaze.creation.destination.BlazeCampaignCreationAdDestinationParametersViewModel.ViewState
import com.woocommerce.android.ui.blaze.creation.destination.BlazeCampaignCreationAdDestinationParametersViewModel.ViewState.ParameterBottomSheetState.Editing
import com.woocommerce.android.ui.compose.component.BottomSheetHandle
import com.woocommerce.android.ui.compose.component.ModalStatusBarBottomSheetLayout
import com.woocommerce.android.ui.compose.component.WCColoredButton
import com.woocommerce.android.ui.compose.component.WCModalBottomSheetLayout
import com.woocommerce.android.ui.compose.component.WCOutlinedTextField
import com.woocommerce.android.ui.compose.preview.LightDarkThemePreviews
import com.woocommerce.android.ui.compose.theme.WooThemeWithBackground

@OptIn(ExperimentalMaterialApi::class)
@OptIn(ExperimentalMaterialApi::class, ExperimentalLayoutApi::class)
@Composable
fun AdDestinationParametersBottomSheet(
viewState: ViewState,
Expand All @@ -56,7 +58,7 @@ fun AdDestinationParametersBottomSheet(
}
}

ModalStatusBarBottomSheetLayout(
WCModalBottomSheetLayout(
sheetState = modalSheetState,
sheetShape = RoundedCornerShape(topStart = roundedCornerRadius, topEnd = roundedCornerRadius),
sheetContent = {
Expand All @@ -65,10 +67,12 @@ fun AdDestinationParametersBottomSheet(
paramsState = viewState.bottomSheetState,
onParameterChanged = onParameterChanged,
onParameterSaved = onParameterSaved,
modifier = modifier.fillMaxWidth()
modifier = modifier
.fillMaxWidth()
)
}
}
},
modifier = Modifier.imeNestedScroll(),
) {
screenContent()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import com.woocommerce.android.ui.compose.component.WCColoredButton
import com.woocommerce.android.ui.compose.component.WCModalBottomSheetLayout
import com.woocommerce.android.ui.compose.component.WCTextButton
import com.woocommerce.android.ui.compose.theme.WooThemeWithBackground
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch

@Composable
Expand All @@ -78,41 +79,40 @@ fun BlazeCampaignCreationIntroScreen(
onDismissClick: () -> Unit,
onLearnMoreClick: () -> Unit,
) {
Scaffold(
topBar = {
Toolbar(
onNavigationButtonClick = onDismissClick,
navigationIcon = Icons.Default.Clear
val coroutineScope = rememberCoroutineScope()
val modalSheetState = rememberModalBottomSheetState(
initialValue = Hidden,
confirmValueChange = { it != HalfExpanded },
skipHalfExpanded = true
)

WCModalBottomSheetLayout(
sheetContent = {
BlazeCampaignBottomSheetContent(
onDismissClick = {
coroutineScope.launch { modalSheetState.hide() }
}
)
},
sheetState = modalSheetState,
modifier = Modifier.background(MaterialTheme.colors.surface)
) { paddingValues ->
val coroutineScope = rememberCoroutineScope()
val modalSheetState = rememberModalBottomSheetState(
initialValue = Hidden,
confirmValueChange = { it != HalfExpanded },
skipHalfExpanded = true
)

WCModalBottomSheetLayout(
sheetContent = {
BlazeCampaignBottomSheetContent(
onDismissClick = {
coroutineScope.launch { modalSheetState.hide() }
}
) {
Scaffold(
topBar = {
Toolbar(
onNavigationButtonClick = onDismissClick,
navigationIcon = Icons.Default.Clear
)
},
sheetState = modalSheetState,
modifier = Modifier
.background(MaterialTheme.colors.surface)
.padding(paddingValues)
) {
modifier = Modifier.background(MaterialTheme.colors.surface)
) { paddingValues ->
BlazeCampaignCreationIntroContent(
onContinueClick = onContinueClick,
onLearnMoreClick = {
coroutineScope.launch { modalSheetState.show() }
onLearnMoreClick()
}
},
modifier = Modifier.padding(paddingValues)
)
}
}
Expand Down

This file was deleted.

Loading

0 comments on commit 9818b66

Please sign in to comment.