-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create empty manage PMs screen (#8523)
* Create empty manage PMs screen * comment update * update string resources * Revert "update string resources" This reverts commit 050aa72. * put string in correct spot * reuse existing string * fix broken tests * separate new "Go to manage screen" button from NewPM layout * Add header text tests
- Loading branch information
1 parent
87b2464
commit b487d88
Showing
6 changed files
with
149 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ntsheet/src/main/java/com/stripe/android/paymentsheet/ui/PaymentMethodVerticalLayoutUI.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.stripe.android.paymentsheet.ui | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.material.Text | ||
import androidx.compose.material.TextButton | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
import com.stripe.android.lpmfoundations.luxe.SupportedPaymentMethod | ||
import com.stripe.android.uicore.image.StripeImageLoader | ||
|
||
@Composable | ||
internal fun PaymentMethodVerticalLayoutUI( | ||
paymentMethods: List<SupportedPaymentMethod>, | ||
selectedIndex: Int, | ||
isEnabled: Boolean, | ||
onViewMorePaymentMethods: () -> Unit, | ||
onItemSelectedListener: (SupportedPaymentMethod) -> Unit, | ||
imageLoader: StripeImageLoader, | ||
modifier: Modifier = Modifier, | ||
) { | ||
Column(modifier = modifier, verticalArrangement = Arrangement.spacedBy(12.dp)) { | ||
TextButton(onClick = { onViewMorePaymentMethods() }) { | ||
Text(text = "Go to manage screen") | ||
} | ||
|
||
NewPaymentMethodVerticalLayoutUI( | ||
paymentMethods = paymentMethods, | ||
selectedIndex = selectedIndex, | ||
isEnabled = isEnabled, | ||
onItemSelectedListener = onItemSelectedListener, | ||
imageLoader = imageLoader | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters