NTP-11357 | Shiv Natani | Design Fix (#13604)
This commit is contained in:
@@ -15,7 +15,7 @@ object NaviPmsColor {
|
||||
val colorShadow = Color(0x4DB0C0D9)
|
||||
|
||||
val coinBannerBorderGradient1 = Color(0XFF22A940)
|
||||
val coinBannerBorderGradient2 = Color(0XFF115520)
|
||||
val coinBannerBorderGradient2 = Color(0xFF17702B)
|
||||
val coinBannerGradient1 = Color(0XFF22A940)
|
||||
val coinBannerGradient2 = Color(0XFF115520)
|
||||
val coinUtilisationDesc = Color(0xFF47085D)
|
||||
|
||||
@@ -72,7 +72,7 @@ fun NPSNaviUpiWidget(
|
||||
bankAccountState = naviUpiPaymentState.bankAccountState,
|
||||
selectedBankAccount = naviUpiPaymentState.selectedBankAccount,
|
||||
userScrollEnabled = false,
|
||||
maxHeightPercentage = 1f,
|
||||
maxHeightPercentage = 2f,
|
||||
initialSpacing = 16.dp,
|
||||
onBankAccountSelected = { linkedAccountEntity ->
|
||||
onAction(
|
||||
|
||||
@@ -64,7 +64,7 @@ fun NpsCoinEarnBannerPrefix(
|
||||
Box(
|
||||
modifier =
|
||||
Modifier.height(16.dp)
|
||||
.width(1.dp)
|
||||
.width(1.5.dp)
|
||||
.background(
|
||||
color = NaviPmsColor.npsEarnBannerVector,
|
||||
shape = RoundedCornerShape(2.dp)
|
||||
|
||||
@@ -37,6 +37,7 @@ import androidx.compose.ui.graphics.Brush
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import androidx.compose.ui.text.SpanStyle
|
||||
import androidx.compose.ui.text.buildAnnotatedString
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
@@ -44,6 +45,7 @@ import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.navi.common.R as CommonR
|
||||
import com.navi.common.utils.EMPTY
|
||||
import com.navi.design.font.FontWeightEnum
|
||||
import com.navi.design.theme.getFontWeight
|
||||
import com.navi.design.theme.ttComposeFontFamily
|
||||
@@ -127,7 +129,7 @@ fun CoinBurnBanner(
|
||||
) {
|
||||
val titleText = coinBurnDetails?.getTitleText(context, isDiscountApplied)
|
||||
Text(
|
||||
text = titleText?.text.orEmpty(),
|
||||
text = titleText ?: AnnotatedString(EMPTY),
|
||||
fontFamily = ttComposeFontFamily,
|
||||
fontWeight = getFontWeight(FontWeightEnum.TT_SEMI_BOLD),
|
||||
fontSize = 14.sp,
|
||||
@@ -156,7 +158,9 @@ fun CoinBurnBanner(
|
||||
Image(
|
||||
painter = painterResource(id = CommonR.drawable.ic_np_coin),
|
||||
contentDescription = null,
|
||||
modifier = Modifier.padding(start = 3.dp, bottom = 1.dp).size(12.dp)
|
||||
modifier =
|
||||
Modifier.padding(start = 3.dp, bottom = 1.dp, end = 2.dp)
|
||||
.size(12.dp)
|
||||
)
|
||||
Text(
|
||||
text =
|
||||
@@ -164,7 +168,7 @@ fun CoinBurnBanner(
|
||||
fontFamily = ttComposeFontFamily,
|
||||
fontWeight = getFontWeight(FontWeightEnum.TT_SEMI_BOLD),
|
||||
fontSize = 12.sp,
|
||||
color = NaviPayColor.textPrimary
|
||||
color = NaviPayColor.textSecondary
|
||||
)
|
||||
if (coinBurnDetails?.isMinimumAmountToPayAvailable(paymentAmount) == true) {
|
||||
Text(
|
||||
|
||||
@@ -37,7 +37,7 @@ import com.navi.payment.nativepayment.model.CoinRewards
|
||||
@Composable
|
||||
fun CoinEarnBanner(coinEarnBannerDetails: CoinRewards) {
|
||||
Row(
|
||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp),
|
||||
modifier = Modifier.padding(horizontal = 16.dp).padding(top = 4.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.Center
|
||||
) {
|
||||
|
||||
@@ -341,7 +341,13 @@ private fun NpsMainScreen(
|
||||
modifier = Modifier.padding(vertical = 4.dp)
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
Spacer(
|
||||
modifier =
|
||||
Modifier.height(
|
||||
if (screenState.naviCoinState.coinBurnDetails.isNotNull()) 12.dp
|
||||
else 24.dp
|
||||
)
|
||||
)
|
||||
screenState.paymentInstrumentsOrderList?.forEach {
|
||||
when (it) {
|
||||
UpiLinkedAccountPaymentInstrument.PAYMENT_INSTRUMENT_TYPE -> {
|
||||
|
||||
@@ -9,6 +9,7 @@ package com.navi.payment.nativepayment.sharedviewmodel
|
||||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.google.gson.Gson
|
||||
import com.navi.base.AppServiceManager
|
||||
import com.navi.base.utils.orFalse
|
||||
import com.navi.common.network.models.isSuccessWithData
|
||||
import com.navi.common.upi.UpiDataType
|
||||
@@ -36,7 +37,9 @@ import com.navi.payment.network.util.PaymentsSdkRetrofit
|
||||
import com.navi.payment.paymentscreen.model.MPSErrorReason
|
||||
import com.navi.payment.paymentscreen.model.PaymentErrorData
|
||||
import com.navi.payment.utils.Constants
|
||||
import com.navi.payment.utils.Constants.DATA
|
||||
import com.navi.payment.utils.Constants.LITMUS_EXPERIMENT_NAVI_PMT_NPS_MIGRATION
|
||||
import com.navi.payment.utils.Constants.MIN_APP_VERSION
|
||||
import com.navi.payment.utils.getInstalledUpiApps
|
||||
import com.navi.paymentclients.model.thirdparty.UpiResultResponse
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
@@ -130,9 +133,11 @@ constructor(
|
||||
?.variant
|
||||
?.payload
|
||||
?.get("value") as? String)
|
||||
?.let { JSONObject(it) }
|
||||
?.let { JSONObject(it).optJSONObject(DATA) }
|
||||
val npsMigrationExperimentEnabled =
|
||||
npsMigrationExperimentPayloadJson?.optBoolean(paymentSource).orFalse()
|
||||
npsMigrationExperimentPayloadJson?.optBoolean(paymentSource).orFalse() &&
|
||||
npsMigrationExperimentPayloadJson?.optString(MIN_APP_VERSION).orEmpty() <=
|
||||
AppServiceManager.appVersionCode
|
||||
paymentDataProvider.add(
|
||||
LITMUS_EXPERIMENT_NAVI_PMT_NPS_MIGRATION,
|
||||
npsMigrationExperimentEnabled
|
||||
|
||||
@@ -94,6 +94,7 @@ object Constants {
|
||||
const val TRANSACTION_STATUS_REQUEST = "TRANSACTION_STATUS_REQUEST"
|
||||
const val TOKEN = "TOKEN"
|
||||
const val PAYMENT_CANCEL_SOURCE = "payment_cancel_source"
|
||||
const val MIN_APP_VERSION = "minAppVersion"
|
||||
|
||||
const val TURBO_CHECKOUT_SCREEN_NAME = "MPS"
|
||||
const val FULL_SCREEN_PAYMENT_SCREEN_NAME = "NPS"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:pathData="M6.975,0.959C7.552,0.42 8.448,0.42 9.025,0.959L9.976,1.85C10.242,2.098 10.588,2.242 10.952,2.254L12.254,2.297C13.043,2.323 13.677,2.957 13.703,3.746L13.746,5.048C13.758,5.412 13.902,5.758 14.15,6.024L15.041,6.975C15.58,7.552 15.58,8.448 15.041,9.025L14.15,9.976C13.902,10.242 13.758,10.588 13.746,10.952L13.703,12.254C13.677,13.043 13.043,13.677 12.254,13.703L10.952,13.746C10.588,13.758 10.242,13.902 9.976,14.15L9.025,15.041C8.448,15.58 7.552,15.58 6.975,15.041L6.024,14.15C5.758,13.902 5.412,13.758 5.048,13.746L3.746,13.703C2.957,13.677 2.323,13.043 2.297,12.254L2.254,10.952C2.242,10.588 2.098,10.242 1.85,9.976L0.959,9.025C0.42,8.448 0.42,7.552 0.959,6.975L1.85,6.024C2.098,5.758 2.242,5.412 2.254,5.048L2.297,3.746C2.323,2.957 2.957,2.323 3.746,2.297L5.048,2.254C5.412,2.242 5.758,2.098 6.024,1.85L6.975,0.959Z">
|
||||
android:pathData="M7.151,0.85C7.62,0.381 8.38,0.381 8.849,0.85L9.738,1.74C9.989,1.991 10.339,2.118 10.692,2.087L11.946,1.977C12.606,1.919 13.189,2.408 13.246,3.068L13.355,4.322C13.386,4.676 13.572,4.998 13.863,5.201L14.894,5.922C15.438,6.302 15.57,7.051 15.189,7.594L14.467,8.625C14.263,8.916 14.198,9.282 14.29,9.625L14.617,10.84C14.789,11.48 14.408,12.139 13.768,12.31L12.552,12.635C12.209,12.727 11.924,12.966 11.774,13.288L11.243,14.429C10.963,15.03 10.249,15.29 9.648,15.009L8.508,14.477C8.186,14.327 7.814,14.327 7.492,14.477L6.352,15.009C5.751,15.29 5.037,15.03 4.757,14.429L4.226,13.288C4.076,12.966 3.791,12.727 3.448,12.635L2.232,12.31C1.592,12.139 1.211,11.48 1.383,10.84L1.71,9.625C1.802,9.282 1.737,8.916 1.533,8.625L0.811,7.594C0.43,7.051 0.562,6.302 1.106,5.922L2.137,5.201C2.428,4.998 2.614,4.676 2.645,4.322L2.754,3.068C2.811,2.408 3.394,1.919 4.054,1.977L5.308,2.087C5.661,2.118 6.011,1.991 6.262,1.74L7.151,0.85Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startX="2.222"
|
||||
@@ -19,12 +19,15 @@
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M10.557,6.154L6.128,10.634C5.912,10.853 5.561,10.853 5.345,10.634C5.129,10.416 5.129,10.061 5.345,9.843L9.774,5.363C9.991,5.144 10.341,5.144 10.557,5.363C10.774,5.581 10.774,5.936 10.557,6.154Z"
|
||||
android:pathData="M9.766,6.227L6.227,9.766"
|
||||
android:strokeWidth="1.2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M9.547,9.547m-0.625,-0.625a0.884,0.884 90,1 1,1.25 1.25a0.884,0.884 90,1 1,-1.25 -1.25"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M6.477,7.251C6.885,7.251 7.215,6.917 7.215,6.504C7.215,6.092 6.885,5.758 6.477,5.758C6.069,5.758 5.739,6.092 5.739,6.504C5.739,6.917 6.069,7.251 6.477,7.251Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M9.427,10.239C9.835,10.239 10.165,9.904 10.165,9.492C10.165,9.08 9.835,8.745 9.427,8.745C9.019,8.745 8.689,9.08 8.689,9.492C8.689,9.904 9.019,10.239 9.427,10.239Z"
|
||||
android:pathData="M6.445,6.453m-0.625,-0.625a0.884,0.884 90,1 1,1.25 1.25a0.884,0.884 90,1 1,-1.25 -1.25"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
|
||||
Reference in New Issue
Block a user