Offer tag feature implemented
This commit is contained in:
@@ -397,6 +397,8 @@ dependencies {
|
||||
//one tap sms verification
|
||||
implementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1'
|
||||
|
||||
implementation shimmer.implementation
|
||||
|
||||
}
|
||||
|
||||
tasks.withType(Compiler) {
|
||||
|
||||
@@ -111,9 +111,7 @@ class NewHomeAdapter(
|
||||
holder.view.setListener(homeActionListener)
|
||||
}
|
||||
is SecondLoanWidgetViewHolder -> {
|
||||
val upcomingLoanStatus =
|
||||
(widgetConfig as? DashboardSecondLoanWidgetConfig)?.widgetBody?.upcomingLoanStatus
|
||||
holder.view.setData(upcomingLoanStatus)
|
||||
holder.view.setData(widgetConfig as? DashboardSecondLoanWidgetConfig)
|
||||
holder.view.setListener(homeActionListener)
|
||||
}
|
||||
is PaymentWidgetViewHolder -> {
|
||||
|
||||
@@ -19,16 +19,21 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.cardview.widget.CardView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import com.navi.common.model.CtaData
|
||||
import com.navi.insurance.util.CornerRadius
|
||||
import com.navi.insurance.util.DrawableShape
|
||||
import com.navi.insurance.util.getNaviDrawable
|
||||
import com.navi.naviwidgets.extensions.isValidHexColor
|
||||
import com.naviapp.R
|
||||
import com.naviapp.dashboard.listeners.HomeActionListener
|
||||
import com.naviapp.databinding.ItemDashboardLoanBinding
|
||||
import com.naviapp.models.CardStatus
|
||||
import com.naviapp.models.response.DashboardLoanWidgetConfig
|
||||
import com.naviapp.models.response.ImageDetail
|
||||
import com.naviapp.models.response.WidgetConfig
|
||||
import com.naviapp.models.response.*
|
||||
import com.naviapp.utils.Constants.PERSONAL_LOAN
|
||||
import com.naviapp.utils.IconUtils
|
||||
import com.naviapp.utils.spannableString
|
||||
|
||||
class DashboardLoanCardView(context: Context, attrs: AttributeSet? = null) :
|
||||
CardView(context, attrs) {
|
||||
@@ -71,6 +76,10 @@ class DashboardLoanCardView(context: Context, attrs: AttributeSet? = null) :
|
||||
setCta(widgetBody.ctaData, widgetConfig)
|
||||
setSecondCta(widgetBody.secondCtaData, widgetConfig)
|
||||
setImageDetail(widgetBody.imageDetail)
|
||||
|
||||
if (DashboardLoanWidgetConfig.widgetId == PERSONAL_LOAN) {
|
||||
setOfferTag(widgetBody)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,4 +184,23 @@ class DashboardLoanCardView(context: Context, attrs: AttributeSet? = null) :
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setOfferTag(widgetBody: DashboardLoanWidgetBody) {
|
||||
widgetBody.offerTag?.let { offerTag ->
|
||||
binding.tagLayout.offerTagContainer.isVisible = true
|
||||
if (isValidHexColor(offerTag.bgColor)) {
|
||||
binding.tagLayout.offerTagContainer.background = getNaviDrawable(
|
||||
shape = DrawableShape.RECTANGLE,
|
||||
backgroundColor = Color.parseColor(offerTag.bgColor),
|
||||
radii = CornerRadius(rightTop = resources.getDimension(R.dimen.dp_4))
|
||||
)
|
||||
}
|
||||
offerTag.title?.let {
|
||||
binding.tagLayout.tagTitle.spannableString(it)
|
||||
it.iconCode?.let { iconCode ->
|
||||
IconUtils.updateIcon(iconCode, binding.tagLayout.tagImg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,21 +8,31 @@
|
||||
package com.naviapp.dashboard.views.customView
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.cardview.widget.CardView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import com.navi.insurance.util.CornerRadius
|
||||
import com.navi.insurance.util.DrawableShape
|
||||
import com.navi.insurance.util.getNaviDrawable
|
||||
import com.navi.naviwidgets.extensions.isValidHexColor
|
||||
import com.naviapp.R
|
||||
import com.naviapp.dashboard.adapter.NewHomeWidgetType
|
||||
import com.naviapp.dashboard.binder.BasicDataBinder
|
||||
import com.naviapp.dashboard.listeners.HomeActionListener
|
||||
import com.naviapp.databinding.UpcomingLoanStatusCardBinding
|
||||
import com.naviapp.models.response.GenericWidgetConfig
|
||||
import com.naviapp.utils.orFalse
|
||||
import com.naviapp.models.response.*
|
||||
import com.naviapp.utils.IconUtils
|
||||
import com.naviapp.utils.spannableString
|
||||
|
||||
class TopUpLoanCardView(context: Context, attrs: AttributeSet? = null,
|
||||
private val isOnDemand: Boolean = false) : CardView(context, attrs) {
|
||||
class TopUpLoanCardView(
|
||||
context: Context, attrs: AttributeSet? = null,
|
||||
private val isOnDemand: Boolean = false
|
||||
) : CardView(context, attrs) {
|
||||
private var binding: UpcomingLoanStatusCardBinding
|
||||
|
||||
init {
|
||||
@@ -54,5 +64,28 @@ class TopUpLoanCardView(context: Context, attrs: AttributeSet? = null,
|
||||
)
|
||||
}
|
||||
}
|
||||
widgetConfig?.widgetBody?.let { body ->
|
||||
setOfferTag(body)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setOfferTag(widgetBody: GenericWidgetBody) {
|
||||
widgetBody.offerTag?.let { offerTag ->
|
||||
binding.tagLayout.offerTagContainer.isVisible = true
|
||||
if (isValidHexColor(offerTag.bgColor)) {
|
||||
binding.tagLayout.offerTagContainer.background = getNaviDrawable(
|
||||
shape = DrawableShape.RECTANGLE,
|
||||
backgroundColor = Color.parseColor(offerTag.bgColor),
|
||||
radii = CornerRadius(rightTop = resources.getDimension(R.dimen.dp_4))
|
||||
)
|
||||
}
|
||||
offerTag.title?.let {
|
||||
binding.tagLayout.tagTitle.spannableString(it)
|
||||
it.iconCode?.let { iconCode ->
|
||||
IconUtils.updateIcon(iconCode, binding.tagLayout.tagImg)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,16 +7,26 @@
|
||||
package com.naviapp.dashboard.views.customView
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import com.navi.insurance.util.CornerRadius
|
||||
import com.navi.insurance.util.DrawableShape
|
||||
import com.navi.insurance.util.getNaviDrawable
|
||||
import com.navi.naviwidgets.extensions.isValidHexColor
|
||||
import com.naviapp.R
|
||||
import com.naviapp.dashboard.binder.BasicDataBinder
|
||||
import com.naviapp.dashboard.listeners.HomeActionListener
|
||||
import com.naviapp.databinding.UpcomingLoanStatusCardBinding
|
||||
import com.naviapp.models.response.DashboardSecondLoanWidgetBody
|
||||
import com.naviapp.models.response.DashboardSecondLoanWidgetConfig
|
||||
import com.naviapp.payment.models.UpcomingLoanStatus
|
||||
import com.naviapp.utils.IconUtils
|
||||
import com.naviapp.utils.spannableString
|
||||
|
||||
class UpcomingLoanStatusCardView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
@@ -38,8 +48,11 @@ class UpcomingLoanStatusCardView @JvmOverloads constructor(
|
||||
layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)
|
||||
}
|
||||
|
||||
fun setData(data: UpcomingLoanStatus?) {
|
||||
data?.let {
|
||||
fun setData(dashboardSecondLoanWidgetConfig: DashboardSecondLoanWidgetConfig?) {
|
||||
dashboardSecondLoanWidgetConfig?.widgetBody?.upcomingLoanStatus?.let {
|
||||
dashboardSecondLoanWidgetConfig.widgetBody.let { offerTag ->
|
||||
setOfferTag(offerTag)
|
||||
}
|
||||
initUi(it)
|
||||
} ?: run {
|
||||
binding.upcomingLoanStatusCardView.visibility = View.GONE
|
||||
@@ -62,4 +75,24 @@ class UpcomingLoanStatusCardView @JvmOverloads constructor(
|
||||
listener?.onUpcomingLoanClick(data)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setOfferTag(widgetBody: DashboardSecondLoanWidgetBody) {
|
||||
widgetBody.offerTag?.let { offerTag ->
|
||||
binding.tagLayout.offerTagContainer.isVisible = true
|
||||
if (isValidHexColor(offerTag.bgColor)) {
|
||||
binding.tagLayout.offerTagContainer.background = getNaviDrawable(
|
||||
shape = DrawableShape.RECTANGLE,
|
||||
backgroundColor = Color.parseColor(offerTag.bgColor),
|
||||
radii = CornerRadius(rightTop = resources.getDimension(R.dimen.dp_4))
|
||||
)
|
||||
}
|
||||
offerTag.title?.let {
|
||||
binding.tagLayout.tagTitle.spannableString(it)
|
||||
it.iconCode?.let { iconCode ->
|
||||
IconUtils.updateIcon(iconCode, binding.tagLayout.tagImg)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,10 @@
|
||||
|
||||
package com.naviapp.models.response
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.navi.common.model.CtaData
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
|
||||
data class DashboardLoanWidgetConfig(
|
||||
@SerializedName("body")
|
||||
@@ -36,5 +38,17 @@ data class DashboardLoanWidgetBody(
|
||||
@SerializedName("descriptionBgColor")
|
||||
val descriptionBgColor: String? = null,
|
||||
@SerializedName("descriptionIconCode")
|
||||
val descriptionIconCode: String? =null
|
||||
)
|
||||
val descriptionIconCode: String? = null,
|
||||
@SerializedName("offerTag")
|
||||
val offerTag: OfferTag? = null,
|
||||
)
|
||||
|
||||
@Parcelize
|
||||
data class OfferTag(
|
||||
@SerializedName("bgColor")
|
||||
val bgColor: String? = null,
|
||||
@SerializedName("animationEnabled")
|
||||
val animationEnabled: Boolean? = false,
|
||||
@SerializedName("title")
|
||||
val title: StyledTextWithIconCode? = null
|
||||
) : Parcelable
|
||||
|
||||
@@ -17,5 +17,7 @@ data class DashboardSecondLoanWidgetConfig(
|
||||
|
||||
data class DashboardSecondLoanWidgetBody(
|
||||
@SerializedName("subsequentLoanCard")
|
||||
val upcomingLoanStatus: UpcomingLoanStatus? = null
|
||||
val upcomingLoanStatus: UpcomingLoanStatus? = null,
|
||||
@SerializedName("offerTag")
|
||||
val offerTag: OfferTag? = null,
|
||||
)
|
||||
|
||||
@@ -7,18 +7,29 @@
|
||||
|
||||
package com.naviapp.models.response
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class StyledTextWithIconCode(
|
||||
@SerializedName("iconCode") val iconCode: String? = null,
|
||||
@SerializedName("text") val text: String? = null,
|
||||
@SerializedName("bold") val boldText: List<String>? = null,
|
||||
@SerializedName("underline") val underlineText: List<String>? = null,
|
||||
@SerializedName("colorTextList") val colorTextList: List<TextColor>? = null,
|
||||
@SerializedName("hexColorCode") val hexColorCode: String? = null
|
||||
)
|
||||
@SerializedName("hexColorCode") val hexColorCode: String? = null,
|
||||
@SerializedName("boldTypeList") val boldTypeList: List<BoldTypeList>? = null,
|
||||
) : Parcelable
|
||||
|
||||
@Parcelize
|
||||
data class TextColor(
|
||||
@SerializedName("hexColorCode") val hexColorCode: String? = null,
|
||||
@SerializedName("text") val text: String? = null
|
||||
)
|
||||
@SerializedName("text") val text: String? = null,
|
||||
) : Parcelable
|
||||
|
||||
@Parcelize
|
||||
data class BoldTypeList(
|
||||
@SerializedName("text") val text: String? = null,
|
||||
@SerializedName("fontType") val fontType: String? = null
|
||||
) : Parcelable
|
||||
@@ -51,7 +51,9 @@ open class GenericWidgetBody(
|
||||
@SerializedName("cta")
|
||||
val cta: CtaData? = null,
|
||||
@SerializedName("documentUrl")
|
||||
val documentUrl: String? = null
|
||||
val documentUrl: String? = null,
|
||||
@SerializedName("offerTag")
|
||||
val offerTag : OfferTag? = null,
|
||||
) : Parcelable
|
||||
|
||||
@Parcelize
|
||||
|
||||
@@ -30,6 +30,7 @@ import androidx.constraintlayout.widget.Group
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.navi.common.utils.getFontAsset
|
||||
import com.naviapp.R
|
||||
import com.naviapp.app.NaviApplication
|
||||
import com.naviapp.common.customview.CustomTypefaceSpan
|
||||
@@ -174,6 +175,17 @@ fun TextView.spannableString(styledTextWithIconCode: StyledTextWithIconCode) {
|
||||
)
|
||||
}
|
||||
}
|
||||
styledTextWithIconCode.boldTypeList?.forEach { boldType->
|
||||
boldType.text?.let{
|
||||
val startIndex = data.indexOf(it)
|
||||
textData.setSpan(
|
||||
CustomTypefaceSpan(ResourcesCompat.getFont(context,getFontAsset(boldType.fontType))!!),
|
||||
startIndex,
|
||||
startIndex + it.length,
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
)
|
||||
}
|
||||
}
|
||||
this.setText(textData, TextView.BufferType.SPANNABLE)
|
||||
} catch (e: Exception) {
|
||||
e.log()
|
||||
|
||||
@@ -166,6 +166,7 @@ object IconUtils {
|
||||
const val ICON_DOWNLOAD_WHITE = "ICON_DOWNLOAD_WHITE"
|
||||
const val INFO_YELLOW = "INFO_YELLOW"
|
||||
const val ICON_INFO_GREY = "ICON_INFO_GREY"
|
||||
const val ICON_FLASH_RED = "ICON_FLASH_RED"
|
||||
|
||||
fun updateIcon(imageDetail: ImageDetail, imageView: ImageView) {
|
||||
imageDetail.iconCode?.let { iconCode ->
|
||||
@@ -341,6 +342,7 @@ object IconUtils {
|
||||
ICON_DOWNLOAD_WHITE -> R.drawable.ic_download_white
|
||||
INFO_YELLOW -> R.drawable.ic_info_yellow
|
||||
ICON_INFO_GREY -> R.drawable.ic_info_grey_svg
|
||||
ICON_FLASH_RED -> R.drawable.ic_flash_red
|
||||
else -> -1
|
||||
}
|
||||
}
|
||||
|
||||
13
app/src/main/res/drawable/ic_flash_red.xml
Normal file
13
app/src/main/res/drawable/ic_flash_red.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M0,0h16v16h-16z"/>
|
||||
<path
|
||||
android:pathData="M13.6269,6.1808C13.6002,6.126 13.5584,6.0799 13.5065,6.048C13.4545,6.0161 13.3945,5.9998 13.3335,6.0008H8.4135L9.6602,0.4075C9.6831,0.3278 9.6761,0.2424 9.6405,0.1676C9.6049,0.0927 9.5431,0.0334 9.4669,0.0008C9.3964,-0.0301 9.3174,-0.0358 9.2433,-0.0151C9.1692,0.0056 9.1045,0.0512 9.0602,0.1141L2.3935,9.4475C2.361,9.4994 2.3438,9.5595 2.3438,9.6208C2.3438,9.6821 2.361,9.7422 2.3935,9.7941C2.4155,9.8505 2.4527,9.8997 2.5009,9.9362C2.5492,9.9727 2.6066,9.9951 2.6669,10.0008H7.5869L6.3402,15.5941C6.3173,15.6738 6.3243,15.7592 6.3599,15.8341C6.3955,15.909 6.4573,15.9683 6.5335,16.0008C6.6043,16.0293 6.6826,16.0337 6.7561,16.0132C6.8296,15.9927 6.8944,15.9485 6.9402,15.8875L13.6069,6.5541C13.648,6.5014 13.672,6.4374 13.6756,6.3706C13.6791,6.3039 13.6621,6.2376 13.6269,6.1808Z"
|
||||
android:fillColor="#FF3333"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -15,6 +15,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_rounded_12">
|
||||
|
||||
<include
|
||||
android:id="@+id/tag_layout"
|
||||
layout="@layout/offer_tag_layout" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/description_view"
|
||||
android:layout_width="match_parent"
|
||||
@@ -24,7 +28,7 @@
|
||||
android:layout_marginEnd="@dimen/layout_dp_20"
|
||||
android:background="@drawable/bg_label_rounded_rect"
|
||||
android:padding="@dimen/dp_8"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tag_layout"
|
||||
tools:visibility="gone">
|
||||
|
||||
<TextView
|
||||
|
||||
49
app/src/main/res/layout/offer_tag_layout.xml
Normal file
49
app/src/main/res/layout/offer_tag_layout.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/offer_tag_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.facebook.shimmer.ShimmerFrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:shimmer_base_alpha="0.8"
|
||||
app:shimmer_duration="@integer/anim_dur_large_1000"
|
||||
app:shimmer_highlight_alpha="1">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/offer_tag_ll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tag_img"
|
||||
android:layout_width="@dimen/_16dp"
|
||||
android:layout_height="@dimen/_16dp"
|
||||
android:layout_marginStart="@dimen/_20dp"
|
||||
android:layout_marginTop="@dimen/_6dp"
|
||||
android:layout_marginBottom="@dimen/_6dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tag_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/_6dp"
|
||||
android:layout_marginEnd="@dimen/_16dp"
|
||||
android:textSize="@dimen/font_extra_small"
|
||||
tools:text="Limited time offer | 0 processing fee" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.facebook.shimmer.ShimmerFrameLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@@ -34,6 +34,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false">
|
||||
|
||||
<include
|
||||
android:id="@+id/tag_layout"
|
||||
layout="@layout/offer_tag_layout"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_tv"
|
||||
style="@style/DescriptionFontStyle"
|
||||
@@ -45,7 +49,7 @@
|
||||
android:textColor="@color/white"
|
||||
android:visibility="@{data.subTitle == null ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tag_layout"
|
||||
tools:text="Congratulations!"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<integer name="anim_dur_large_1000">1000</integer>
|
||||
<integer name="anim_dur_large">500</integer>
|
||||
<integer name="anim_dur_small">200</integer>
|
||||
<integer name="anim_dur">350</integer>
|
||||
|
||||
@@ -24,4 +24,8 @@ ext {
|
||||
implementation : "com.google.android.play:core-ktx:1.8.1"
|
||||
]
|
||||
|
||||
shimmer = [
|
||||
implementation : 'com.facebook.shimmer:shimmer:0.5.0'
|
||||
]
|
||||
|
||||
}
|
||||
@@ -16,4 +16,9 @@ object Constants {
|
||||
|
||||
const val LEFT_RIGHT = "LEFT_RIGHT"
|
||||
|
||||
const val BOLD = "BOLD"
|
||||
const val SEMI_BOLD = "SEMI_BOLD"
|
||||
const val REGULAR = "REGULAR"
|
||||
const val EXTRA_BOLD = "EXTRA_BOLD"
|
||||
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import android.os.Handler
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.EditText
|
||||
import com.navi.common.CommonLibManager
|
||||
import com.navi.common.R
|
||||
import com.navi.common.network.retrofit.RetrofitService
|
||||
import timber.log.Timber
|
||||
import java.util.*
|
||||
@@ -48,3 +49,14 @@ fun String.capitalize(): String {
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun getFontAsset(fontCode: String?): Int {
|
||||
return when (fontCode) {
|
||||
Constants.BOLD -> R.font.navi_bold
|
||||
Constants.SEMI_BOLD -> R.font.navi_semi_bold
|
||||
Constants.REGULAR -> R.font.navi_regular
|
||||
Constants.EXTRA_BOLD -> R.font.navi_extra_bold
|
||||
else -> R.font.navi_regular
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ dependencies {
|
||||
implementation 'com.google.android.gms:play-services-maps:17.0.0'
|
||||
implementation 'com.google.android.gms:play-services-location:17.1.0'
|
||||
|
||||
implementation 'com.facebook.shimmer:shimmer:0.5.0'
|
||||
implementation shimmer.implementation
|
||||
implementation 'in.payu:payu-checkout-pro:1.7.6'
|
||||
implementation 'com.google.android.play:core:1.10.0'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user