TP-68596 | Narayan | Changed logic of truncation in SR (#11164)
This commit is contained in:
committed by
GitHub
parent
8443c02344
commit
a8c338734b
@@ -17,11 +17,14 @@ import com.navi.common.screenshot.ShareBitmapImage
|
||||
import com.navi.common.utils.createBitmapFromView
|
||||
import com.navi.common.utils.setVisibility
|
||||
import com.navi.design.font.FontWeightEnum
|
||||
import com.navi.design.textview.model.NaviSpan
|
||||
import com.navi.design.textview.model.TextWithStyle
|
||||
import com.navi.design.utils.CornerRadius
|
||||
import com.navi.design.utils.DrawableShape
|
||||
import com.navi.design.utils.dpToPx
|
||||
import com.navi.design.utils.dpToPxInInt
|
||||
import com.navi.design.utils.getNaviDrawable
|
||||
import com.navi.design.utils.setSpannableString
|
||||
import com.navi.naviwidgets.extensions.setVisibilityState
|
||||
import com.navi.pay.R
|
||||
import com.navi.pay.databinding.LayoutShareTransactionDetailsBinding
|
||||
@@ -222,15 +225,28 @@ fun shareReceiptV2(
|
||||
} else {
|
||||
autoPayTag.visibility = GONE
|
||||
}
|
||||
key.apply {
|
||||
setText(getPayerPayeeFirstInfoKeyPreText())
|
||||
setFont(FontWeightEnum.TT_MEDIUM.name)
|
||||
}
|
||||
keySecond.apply {
|
||||
setText(getPayerPayeeFirstInfoKeyNameText())
|
||||
setFont(FontWeightEnum.TT_SEMI_BOLD.name)
|
||||
visibility = VISIBLE
|
||||
}
|
||||
val payerPayeeFirstInfoKeyPreText = getPayerPayeeFirstInfoKeyPreText()
|
||||
val data =
|
||||
TextWithStyle(
|
||||
text = payerPayeeFirstInfoKeyPreText + getPayerPayeeFirstInfoKeyNameText(),
|
||||
style =
|
||||
listOf(
|
||||
NaviSpan(
|
||||
startSpan = 0,
|
||||
endSpan = payerPayeeFirstInfoKeyPreText.length,
|
||||
fontName = FontWeightEnum.TT_MEDIUM.name,
|
||||
fontSize = 16.0,
|
||||
spanColor = "#191919"
|
||||
),
|
||||
NaviSpan(
|
||||
startSpan = payerPayeeFirstInfoKeyPreText.length + 1,
|
||||
fontName = FontWeightEnum.TT_SEMI_BOLD.name,
|
||||
fontSize = 16.0,
|
||||
spanColor = "#191919"
|
||||
)
|
||||
)
|
||||
)
|
||||
key.apply { setSpannableString(data) }
|
||||
value.apply {
|
||||
if (shareReceiptEntity.isUpiLiteTopUpTransaction) visibility = GONE
|
||||
else {
|
||||
@@ -256,15 +272,29 @@ fun shareReceiptV2(
|
||||
|
||||
fun LayoutShareTransactionDetailsV2Binding.setPayerPayeeSecondInfo() {
|
||||
payerPayeeSecondInfo.apply {
|
||||
key.apply {
|
||||
setText(getPayerPayeeSecondInfoKeyPreText())
|
||||
setFont(FontWeightEnum.TT_MEDIUM.name)
|
||||
}
|
||||
keySecond.apply {
|
||||
setText(getPayerPayeeSecondInfoKeyNameText())
|
||||
setFont(FontWeightEnum.TT_SEMI_BOLD.name)
|
||||
visibility = VISIBLE
|
||||
}
|
||||
val payerPayeeSecondInfoKeyPreText = getPayerPayeeSecondInfoKeyPreText()
|
||||
val data =
|
||||
TextWithStyle(
|
||||
text = payerPayeeSecondInfoKeyPreText + getPayerPayeeSecondInfoKeyNameText(),
|
||||
style =
|
||||
listOf(
|
||||
NaviSpan(
|
||||
startSpan = 0,
|
||||
endSpan = payerPayeeSecondInfoKeyPreText.length,
|
||||
fontName = FontWeightEnum.TT_MEDIUM.name,
|
||||
fontSize = 16.0,
|
||||
spanColor = "#191919"
|
||||
),
|
||||
NaviSpan(
|
||||
startSpan = payerPayeeSecondInfoKeyPreText.length + 1,
|
||||
fontName = FontWeightEnum.TT_SEMI_BOLD.name,
|
||||
fontSize = 16.0,
|
||||
spanColor = "#191919"
|
||||
)
|
||||
)
|
||||
)
|
||||
key.apply { setSpannableString(data) }
|
||||
|
||||
value.apply {
|
||||
if (shareReceiptEntity.isUpiLiteClosureTransaction) visibility = GONE
|
||||
else {
|
||||
|
||||
@@ -30,23 +30,11 @@
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:fontFamily="@font/tt_semi_bold"
|
||||
android:maxLines="1"
|
||||
android:maxLines="2"
|
||||
android:text="Key"
|
||||
android:textColor="#191919"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.navi.design.textview.NaviTextView
|
||||
android:id="@+id/key_second"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/tt_medium"
|
||||
android:maxLines="1"
|
||||
android:text="KeyBold"
|
||||
android:textColor="#191919"
|
||||
android:visibility="gone"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user