Updated on 2026-08-14
This commit is contained in:
commit
d0334c1a40
17 changed files with 239 additions and 158 deletions
|
|
@ -16,6 +16,7 @@ import com.tangem.tangem_sdk_new.ui.widget.leapfrogWidget.LeapfrogWidget
|
|||
*/
|
||||
class TwinsCardWidget(
|
||||
val leapfrogWidget: LeapfrogWidget,
|
||||
private val deviceScaleFactor: Float = 1f,
|
||||
val getTopOfAnchorViewForActivateState: () -> Float
|
||||
) {
|
||||
|
||||
|
|
@ -87,20 +88,20 @@ class TwinsCardWidget(
|
|||
return when (cardNumber) {
|
||||
TwinCardNumber.First -> {
|
||||
TwinsCardProperties(
|
||||
xTranslation = -120f,
|
||||
yTranslation = -220f,
|
||||
xTranslation = -120f * deviceScaleFactor,
|
||||
yTranslation = -220f * deviceScaleFactor,
|
||||
rotation = -3f,
|
||||
elevation = 1f,
|
||||
scale = 1f,
|
||||
scale = deviceScaleFactor,
|
||||
)
|
||||
}
|
||||
TwinCardNumber.Second -> {
|
||||
TwinsCardProperties(
|
||||
xTranslation = 170f,
|
||||
yTranslation = 170f,
|
||||
xTranslation = 170f * deviceScaleFactor,
|
||||
yTranslation = 170f * deviceScaleFactor,
|
||||
rotation = -3f,
|
||||
elevation = 0f,
|
||||
scale = 1f,
|
||||
scale = deviceScaleFactor,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -123,7 +124,7 @@ class TwinsCardWidget(
|
|||
xTranslation = twinProperties.xTranslation,
|
||||
yTranslation = twinProperties.yTranslation - topOfAnchorView,
|
||||
rotation = 0f,
|
||||
scale = twinProperties.scale - 0.5f,
|
||||
scale = (twinProperties.scale - 0.5f) * deviceScaleFactor,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.tap.features.onboarding.products.twins.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.TypedValue
|
||||
import android.view.View
|
||||
import android.view.animation.OvershootInterpolator
|
||||
import androidx.annotation.LayoutRes
|
||||
|
|
@ -38,6 +39,7 @@ import kotlinx.android.synthetic.main.view_bg_twins_welcome.*
|
|||
import kotlinx.android.synthetic.main.view_onboarding_progress.*
|
||||
import kotlinx.android.synthetic.main.view_onboarding_tv_balance.*
|
||||
|
||||
|
||||
class TwinsCardsFragment : BaseOnboardingFragment<TwinCardsState>() {
|
||||
|
||||
private var previousStep = TwinCardsStep.None
|
||||
|
|
@ -75,7 +77,14 @@ class TwinsCardsFragment : BaseOnboardingFragment<TwinCardsState>() {
|
|||
addBackPressHandler(this)
|
||||
|
||||
reconfigureLayoutForTwins()
|
||||
twinsWidget = TwinsCardWidget(LeapfrogWidget(cards_container)) { 285f }
|
||||
|
||||
val typedValue = TypedValue()
|
||||
resources.getValue(R.dimen.device_scale_factor_for_twins_welcome, typedValue, true)
|
||||
val deviceScaleFactorForWelcomeState = typedValue.float
|
||||
|
||||
twinsWidget = TwinsCardWidget(LeapfrogWidget(cards_container), deviceScaleFactorForWelcomeState) {
|
||||
285f * deviceScaleFactorForWelcomeState
|
||||
}
|
||||
btnRefreshBalanceWidget = RefreshBalanceWidget(onboarding_main_container)
|
||||
|
||||
toolbar.title = getText(R.string.twins_recreate_toolbar)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.tap.features.onboarding.products.wallet.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.TypedValue
|
||||
import android.view.*
|
||||
import android.widget.ImageView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
|
@ -13,6 +14,7 @@ import com.squareup.picasso.Picasso
|
|||
import com.tangem.common.CardIdFormatter
|
||||
import com.tangem.common.core.CardIdDisplayFormat
|
||||
import com.tangem.tangem_sdk_new.ui.widget.leapfrogWidget.LeapfrogWidget
|
||||
import com.tangem.tangem_sdk_new.ui.widget.leapfrogWidget.PropertyCalculator
|
||||
import com.tangem.tap.common.extensions.hide
|
||||
import com.tangem.tap.common.extensions.show
|
||||
import com.tangem.tap.features.FragmentOnBackPressedHandler
|
||||
|
|
@ -47,8 +49,15 @@ class OnboardingWalletFragment : Fragment(R.layout.fragment_onboarding_wallet),
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
val leapfrog = LeapfrogWidget(fl_cards_container)
|
||||
cardsWidget = WalletCardsWidget(leapfrog) { 200f }
|
||||
val typedValue = TypedValue()
|
||||
resources.getValue(R.dimen.device_scale_factor_for_twins_welcome, typedValue, true)
|
||||
val deviceScaleFactor = typedValue.float
|
||||
|
||||
val leapfrogCalculator = PropertyCalculator(
|
||||
yTranslationFactor = 25f * deviceScaleFactor,
|
||||
)
|
||||
val leapfrog = LeapfrogWidget(fl_cards_container, leapfrogCalculator)
|
||||
cardsWidget = WalletCardsWidget(leapfrog, deviceScaleFactor) { 200f * deviceScaleFactor }
|
||||
startPostponedEnterTransition()
|
||||
|
||||
view_pager_backup_info.adapter = BackupInfoAdapter()
|
||||
|
|
@ -121,8 +130,7 @@ class OnboardingWalletFragment : Fragment(R.layout.fragment_onboarding_wallet),
|
|||
tv_header.setText(R.string.onboarding_create_wallet_header)
|
||||
tv_body.setText(R.string.onboarding_create_wallet_body)
|
||||
|
||||
cardsWidget.toFolded()
|
||||
startPostponedEnterTransition()
|
||||
cardsWidget.toFolded(false) { startPostponedEnterTransition() }
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -379,7 +387,7 @@ class OnboardingWalletFragment : Fragment(R.layout.fragment_onboarding_wallet),
|
|||
|
||||
val shopMenuShouldBeVisible =
|
||||
(backupStep == BackupStep.ScanOriginCard || backupStep == BackupStep.AddBackupCards) &&
|
||||
backupState.buyAdditionalCardsUrl != null
|
||||
backupState.buyAdditionalCardsUrl != null
|
||||
menu.getItem(0).isVisible = shopMenuShouldBeVisible
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.tangem.tangem_sdk_new.ui.widget.leapfrogWidget.LeapfrogWidget
|
|||
|
||||
class WalletCardsWidget(
|
||||
val leapfrogWidget: LeapfrogWidget,
|
||||
private val deviceScaleFactor: Float = 1f,
|
||||
val getTopOfAnchorViewForActivateState: () -> Float,
|
||||
) {
|
||||
|
||||
|
|
@ -42,7 +43,7 @@ class WalletCardsWidget(
|
|||
createAnimator(BackupCardType.FIRST_BACKUP, createLeapfrogProperties(BackupCardType.FIRST_BACKUP)),
|
||||
createAnimator(BackupCardType.SECOND_BACKUP, createLeapfrogProperties(BackupCardType.SECOND_BACKUP))
|
||||
)
|
||||
leapfrogWidget.fold { animator.start() }
|
||||
leapfrogWidget.fold(animate) { animator.start() }
|
||||
}
|
||||
|
||||
fun toFan(animate: Boolean = true, onEnd: () -> Unit = {}) {
|
||||
|
|
@ -70,7 +71,7 @@ class WalletCardsWidget(
|
|||
)
|
||||
leapfrogWidget.fold {
|
||||
animator.doOnEnd {
|
||||
leapfrogWidget.initViews()
|
||||
// leapfrogWidget.initViews()
|
||||
leapfrogWidget.unfold()
|
||||
}
|
||||
animator.start()
|
||||
|
|
@ -98,26 +99,26 @@ class WalletCardsWidget(
|
|||
private fun createWelcomeProperties(cardType: BackupCardType): CardProperties {
|
||||
return when (cardType) {
|
||||
BackupCardType.ORIGIN -> CardProperties(
|
||||
xTranslation = 440f,
|
||||
yTranslation = 0f,
|
||||
rotation = 75f,
|
||||
elevation = 2f,
|
||||
scale = .9f,
|
||||
)
|
||||
xTranslation = 440f * deviceScaleFactor,
|
||||
yTranslation = 70f,
|
||||
rotation = 75f,
|
||||
elevation = 2f,
|
||||
scale = .85f * deviceScaleFactor,
|
||||
)
|
||||
BackupCardType.FIRST_BACKUP -> CardProperties(
|
||||
xTranslation = 10f,
|
||||
yTranslation = -100f,
|
||||
rotation = 100f,
|
||||
elevation = 1f,
|
||||
scale = .9f,
|
||||
)
|
||||
xTranslation = 10f * deviceScaleFactor,
|
||||
yTranslation = -30f,
|
||||
rotation = 100f,
|
||||
elevation = 1f,
|
||||
scale = .85f * deviceScaleFactor,
|
||||
)
|
||||
BackupCardType.SECOND_BACKUP -> CardProperties(
|
||||
xTranslation = -440f,
|
||||
yTranslation = -100f,
|
||||
rotation = 70f,
|
||||
elevation = 0f,
|
||||
scale = .9f,
|
||||
)
|
||||
xTranslation = -440f * deviceScaleFactor,
|
||||
yTranslation = -30f,
|
||||
rotation = 70f,
|
||||
elevation = 0f,
|
||||
scale = .85f * deviceScaleFactor,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -125,24 +126,24 @@ class WalletCardsWidget(
|
|||
return when (cardType) {
|
||||
BackupCardType.ORIGIN -> CardProperties(
|
||||
xTranslation = 0f,
|
||||
yTranslation = 0f,
|
||||
yTranslation = 30f,
|
||||
rotation = 5f,
|
||||
elevation = 2f,
|
||||
scale = 1f,
|
||||
scale = 1f * deviceScaleFactor,
|
||||
)
|
||||
BackupCardType.FIRST_BACKUP -> CardProperties(
|
||||
xTranslation = 0f,
|
||||
yTranslation = -80f,
|
||||
yTranslation = -50f,
|
||||
rotation = -5f,
|
||||
elevation = 1f,
|
||||
scale = 0.9f,
|
||||
scale = 0.9f * deviceScaleFactor,
|
||||
)
|
||||
BackupCardType.SECOND_BACKUP -> CardProperties(
|
||||
xTranslation = 10f,
|
||||
yTranslation = -170f,
|
||||
yTranslation = -120f,
|
||||
rotation = -20f,
|
||||
elevation = 0f,
|
||||
scale = 0.8f,
|
||||
scale = 0.8f * deviceScaleFactor,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -154,21 +155,21 @@ class WalletCardsWidget(
|
|||
yTranslation = 0f,
|
||||
rotation = 0f,
|
||||
elevation = 2f,
|
||||
scale = 1f,
|
||||
scale = 1f * deviceScaleFactor,
|
||||
)
|
||||
BackupCardType.FIRST_BACKUP -> CardProperties(
|
||||
xTranslation = 0f,
|
||||
yTranslation = 0f,
|
||||
rotation = 0f,
|
||||
elevation = 1f,
|
||||
scale = 0.9f,
|
||||
scale = 0.9f * deviceScaleFactor,
|
||||
)
|
||||
BackupCardType.SECOND_BACKUP -> CardProperties(
|
||||
xTranslation = 0f,
|
||||
yTranslation = 0f,
|
||||
rotation = 0f,
|
||||
elevation = 0f,
|
||||
scale = 0.8f,
|
||||
scale = 0.8f * deviceScaleFactor,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
android:id="@+id/onboarding_top_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.2"
|
||||
android:layout_weight="@dimen/home_top_weight"
|
||||
android:clipChildren="false" />
|
||||
|
||||
<include
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
layout="@layout/layout_onboarding_container_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="@dimen/home_bottom_weight" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:menu="@menu/shop"
|
||||
app:navigationIcon="@drawable/ic_baseline_arrow_back_24"
|
||||
app:title="@string/onboarding_getting_started"
|
||||
app:menu="@menu/shop"/>
|
||||
app:title="@string/onboarding_getting_started" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
android:id="@+id/onboarding_main_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<include
|
||||
|
|
@ -43,7 +44,6 @@
|
|||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
|
@ -51,28 +51,25 @@
|
|||
android:id="@+id/imv_card_background"
|
||||
android:layout_width="236dp"
|
||||
android:layout_height="236dp"
|
||||
android:layout_gravity="center"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/shape_circle"
|
||||
android:backgroundTint="@color/lightGray0"
|
||||
android:elevation="0dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintStart_toStartOf="@id/fl_cards_container"
|
||||
app:layout_constraintEnd_toEndOf="@id/fl_cards_container"
|
||||
app:layout_constraintTop_toTopOf="@id/fl_cards_container"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fl_cards_container"
|
||||
android:layout_marginBottom="16dp"
|
||||
/>
|
||||
app:layout_constraintEnd_toEndOf="@id/fl_cards_container"
|
||||
app:layout_constraintStart_toStartOf="@id/fl_cards_container"
|
||||
app:layout_constraintTop_toTopOf="@id/fl_cards_container" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_cards_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:clipChildren="false"
|
||||
app:layout_constraintBottom_toTopOf="@id/guideline2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pb_state">
|
||||
|
||||
|
|
@ -81,36 +78,33 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/card_placeholder_black"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:scaleType="fitCenter"
|
||||
|
||||
/>
|
||||
android:src="@drawable/card_placeholder_black"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/imv_first_backup_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/card_placeholder_black"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"/>
|
||||
android:src="@drawable/card_placeholder_black"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/imv_front_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/card_placeholder_black"
|
||||
android:transitionName="imv_front_card"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:scaleType="fitCenter"
|
||||
/>
|
||||
android:src="@drawable/card_placeholder_black"
|
||||
android:transitionName="imv_front_card" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
|
@ -119,12 +113,12 @@
|
|||
android:layout_width="142dp"
|
||||
android:layout_height="142dp"
|
||||
android:src="@drawable/ic_activation_success"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/guideline2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/pb_state"
|
||||
android:visibility="gone"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/pb_state" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll_header_body_container"
|
||||
|
|
@ -146,63 +140,62 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
tools:text="Header"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#060606"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.504"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/guideline2" />
|
||||
app:layout_constraintTop_toTopOf="@+id/guideline2"
|
||||
tools:text="Добавлена одна резервная карта" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="64dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="64dp"
|
||||
tools:text="Body"
|
||||
android:layout_marginStart="@dimen/home_bottom_tv_body_margin_start"
|
||||
android:layout_marginTop="@dimen/home_bottom_tv_body_margin_top"
|
||||
android:layout_marginEnd="@dimen/home_bottom_tv_body_margin_end"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#686868"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_header" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_header"
|
||||
tools:text="Body" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager_backup_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintHorizontal_bias="0.504"
|
||||
app:flow_verticalBias="0"
|
||||
app:layout_constraintTop_toTopOf="@+id/guideline2"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
app:layout_constraintTop_toTopOf="@+id/guideline2" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout_backup_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@color/backgroundLightGray"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_pager_backup_info"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_buttons_common"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_pager_backup_info"
|
||||
app:tabBackground="@drawable/selector_tabs_dots"
|
||||
app:tabGravity="center"
|
||||
app:tabIndicator="@null"
|
||||
app:tabPaddingStart="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:tabPaddingEnd="8dp"
|
||||
app:tabGravity="center"/>
|
||||
app:tabPaddingStart="8dp" />
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_buttons_common"
|
||||
layout="@layout/layout_onboarding_buttons_common"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_buttons_add_cards"
|
||||
|
|
@ -218,7 +211,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintGuide_percent="0.60"
|
||||
app:layout_constraintGuide_percent="@dimen/onboarding_wallet_top_guide_line_weight"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,36 +8,36 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/access_code_title"
|
||||
style="@style/heading"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="100dp"
|
||||
android:text="@string/onboarding_access_code_intro_title"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/access_code_title"
|
||||
style="@style/heading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/access_code_title_margin_top"
|
||||
android:text="@string/onboarding_access_code_intro_title"
|
||||
android:textAlignment="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_backup_access_code_info"
|
||||
layout="@layout/layout_backup_access_code_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/access_code_title" />
|
||||
<include
|
||||
android:id="@+id/layout_backup_access_code_info"
|
||||
layout="@layout/layout_backup_access_code_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/access_code_title" />
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_backup_access_code_submit"
|
||||
layout="@layout/layout_backup_access_code_submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/access_code_title" />
|
||||
<include
|
||||
android:id="@+id/layout_backup_access_code_submit"
|
||||
layout="@layout/layout_backup_access_code_submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/access_code_title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,18 +8,18 @@
|
|||
android:id="@+id/iv_access_code_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginTop="@dimen/access_code_info_protect_margin_top"
|
||||
android:src="@drawable/ic_access_code"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="20dp"
|
||||
android:id="@+id/tv_feature_1_title"
|
||||
style="@style/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/access_code_info_protect_margin_top"
|
||||
android:text="@string/onboarding_access_code_feature_1_title"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_feature_1_description"
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
style="@style/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginTop="@dimen/access_code_info_items_space"
|
||||
android:text="@string/onboarding_access_code_feature_2_title"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_feature_1_description"
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
style="@style/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginTop="@dimen/access_code_info_items_space"
|
||||
android:text="@string/onboarding_access_code_feature_3_title"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_feature_3_description"
|
||||
|
|
@ -119,9 +119,9 @@
|
|||
style="@style/TapButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="78dp"
|
||||
android:layout_marginEnd="78dp"
|
||||
android:layout_marginBottom="92dp"
|
||||
android:layout_marginStart="@dimen/access_code_btn_continue_margin_start"
|
||||
android:layout_marginEnd="@dimen/access_code_btn_continue_margin_start"
|
||||
android:layout_marginBottom="@dimen/access_code_btn_continue_margin_bottom"
|
||||
android:text="@string/common_continue"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
android:layout_marginTop="14dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:textAlignment="center"
|
||||
android:text="@string/onboarding_access_code_hint"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
|
|
@ -28,12 +28,12 @@
|
|||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:hint="@string/onboarding_wallet_info_title_third"
|
||||
android:theme="@style/EditTextThemeOverlay"
|
||||
app:boxStrokeColor="@color/selector_edit_text"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:endIconDrawable="@drawable/selector_password_toggle"
|
||||
app:endIconMode="password_toggle"
|
||||
app:hintTextColor="@color/accent"
|
||||
android:theme="@style/EditTextThemeOverlay"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_access_code_enter_description">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
|
|
@ -48,16 +48,15 @@
|
|||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_access_code_submit"
|
||||
style="@style/TapButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="78dp"
|
||||
android:layout_marginEnd="78dp"
|
||||
android:layout_marginBottom="92dp"
|
||||
android:layout_marginTop="32dp"
|
||||
app:layout_constraintTop_toTopOf="@id/til_access_code"
|
||||
app:layout_constraintVertical_bias="1"
|
||||
android:layout_marginStart="@dimen/access_code_btn_continue_margin_start"
|
||||
android:layout_marginEnd="@dimen/access_code_btn_continue_margin_end"
|
||||
android:layout_marginBottom="@dimen/access_code_btn_continue_margin_bottom"
|
||||
android:text="@string/common_create"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -1,33 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_main_action"
|
||||
style="@style/OnboardingButton"
|
||||
android:layout_width="204dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="92dp"
|
||||
tools:text="Main Action"
|
||||
android:layout_marginBottom="@dimen/home_bottom_fl_scan_card_container_margin_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="Main Action" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_alternative_action"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:textSize="16sp"
|
||||
android:layout_width="204dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
tools:text="Alternative action"
|
||||
android:layout_marginBottom="@dimen/home_bottom_btn_alternative_action_margin_bottom"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/tapButtonColorBlack"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="Alternative action" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -10,14 +10,14 @@
|
|||
android:id="@+id/linearLayoutCompat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginBottom="@dimen/home_bottom_llCompat_margin_bottom"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/fl_scan_card_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.1">
|
||||
app:layout_constraintVertical_bias="@dimen/home_bottom_llCompat_constraint_vertical_bias">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_header"
|
||||
|
|
@ -35,9 +35,9 @@
|
|||
style="@style/TextViewOnboarding.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="64dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="64dp"
|
||||
android:layout_marginStart="@dimen/home_bottom_tv_body_margin_start"
|
||||
android:layout_marginTop="@dimen/home_bottom_tv_body_margin_top"
|
||||
android:layout_marginEnd="@dimen/home_bottom_tv_body_margin_end"
|
||||
android:minLines="3"
|
||||
app:layout_constraintBottom_toTopOf="@+id/fl_scan_card_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
android:id="@+id/fl_scan_card_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="72dp"
|
||||
android:layout_marginBottom="@dimen/home_bottom_fl_scan_card_container_margin_bottom"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_alternative_action"
|
||||
style="@style/TapButtonText"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginBottom="@dimen/home_bottom_btn_alternative_action_margin_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@
|
|||
android:layout_height="174dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleX="@dimen/home_top_back_card_scaleX"
|
||||
android:scaleY="@dimen/home_top_back_card_scaleY"
|
||||
android:src="@drawable/card_placeholder_white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@
|
|||
android:layout_height="match_parent"
|
||||
android:clipChildren="false">
|
||||
|
||||
<include layout="@layout/view_bg_home" />
|
||||
<include
|
||||
layout="@layout/view_bg_home"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/imv_back_card"
|
||||
|
|
@ -16,8 +20,10 @@
|
|||
android:elevation="0dp"
|
||||
android:rotation="-21"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleX="@dimen/home_top_back_card_scaleX"
|
||||
android:scaleY="@dimen/home_top_back_card_scaleY"
|
||||
android:src="@drawable/card_placeholder_white"
|
||||
android:translationY="@dimen/home_back_card_translationY"
|
||||
android:translationY="@dimen/home_top_back_card_translationY"
|
||||
app:layout_constraintEnd_toEndOf="@+id/imv_front_card"
|
||||
app:layout_constraintStart_toStartOf="@+id/imv_front_card"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imv_front_card" />
|
||||
|
|
@ -29,8 +35,10 @@
|
|||
android:elevation="1dp"
|
||||
android:rotation="-3"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleX="@dimen/home_top_front_card_scaleX"
|
||||
android:scaleY="@dimen/home_top_front_card_scaleY"
|
||||
android:src="@drawable/card_placeholder_black"
|
||||
android:translationY="@dimen/home_front_card_translationY"
|
||||
android:translationY="@dimen/home_top_front_card_translationY"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/imv_card_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="230dp"
|
||||
android:layout_height="@dimen/onboarding_square_background_height"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="@dimen/onboarding_square_background_margin_top"
|
||||
android:layout_marginEnd="32dp"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/imv_card_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="230dp"
|
||||
android:layout_height="@dimen/onboarding_square_background_height"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="@dimen/onboarding_square_background_margin_top"
|
||||
android:layout_marginEnd="32dp"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,38 @@
|
|||
<resources>
|
||||
|
||||
<dimen name="home_back_card_translationY">-10dp</dimen>
|
||||
<dimen name="home_front_card_translationY">0dp</dimen>
|
||||
<dimen name="device_scale_factor_for_twins_welcome">1.0</dimen>
|
||||
|
||||
<!-- Home - TOP -->
|
||||
<item name="home_top_weight" format="float" type="dimen">1.1</item>
|
||||
<dimen name="home_top_back_card_translationY">-10dp</dimen>
|
||||
<item name="home_top_back_card_scaleX" format="float" type="dimen">1</item>
|
||||
<dimen name="home_top_back_card_scaleY">1</dimen>
|
||||
<dimen name="home_top_front_card_translationY">0dp</dimen>
|
||||
<item name="home_top_front_card_scaleY" format="float" type="dimen">1</item>
|
||||
<item name="home_top_front_card_scaleX" format="float" type="dimen">1</item>
|
||||
|
||||
<!-- Home - bottom -->
|
||||
<item name="home_bottom_weight" format="float" type="dimen">1</item>
|
||||
<dimen name="home_bottom_llCompat_margin_bottom">16dp</dimen>
|
||||
<item name="home_bottom_llCompat_constraint_vertical_bias" format="float" type="dimen">0.4</item>>
|
||||
<dimen name="home_bottom_tv_body_margin_top">14dp</dimen>
|
||||
<dimen name="home_bottom_tv_body_margin_start">64dp</dimen>
|
||||
<dimen name="home_bottom_tv_body_margin_end">64dp</dimen>
|
||||
<dimen name="home_bottom_fl_scan_card_container_margin_bottom">90dp</dimen>
|
||||
<dimen name="home_bottom_btn_alternative_action_margin_bottom">14dp</dimen>
|
||||
|
||||
<!-- Onboarding -->
|
||||
<dimen name="onboarding_progress_margin_top">16dp</dimen>
|
||||
<dimen name="onboarding_card_margin_top">106dp</dimen>
|
||||
<dimen name="onboarding_square_background_height">230dp</dimen>
|
||||
<dimen name="onboarding_square_background_margin_top">67dp</dimen>
|
||||
<item name="onboarding_wallet_top_guide_line_weight" type="dimen" format="float">0.56</item>
|
||||
|
||||
<!-- Onboarding - Wallet - Access code -->
|
||||
<dimen name="access_code_title_margin_top">80dp</dimen>
|
||||
<dimen name="access_code_imv_lock_margin_top">24dp</dimen>
|
||||
<dimen name="access_code_info_protect_margin_top">20dp</dimen>
|
||||
<dimen name="access_code_info_items_space">32dp</dimen>
|
||||
<dimen name="access_code_btn_continue_margin_bottom">80dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -35,10 +35,41 @@
|
|||
<dimen name="text_size_amount_to_send">32sp</dimen>
|
||||
<dimen name="dimen16">16dp</dimen>
|
||||
|
||||
<dimen name="home_back_card_translationY">-30dp</dimen>
|
||||
<dimen name="home_front_card_translationY">-20dp</dimen>
|
||||
<dimen name="onboarding_progress_margin_top">8dp</dimen>
|
||||
<dimen name="onboarding_card_margin_top">70dp</dimen>
|
||||
<item name="device_scale_factor_for_twins_welcome" format="float" type="dimen">0.85</item>
|
||||
|
||||
<!-- Home - TOP -->
|
||||
<item name="home_top_weight" format="float" type="dimen">0.9</item>
|
||||
<dimen name="home_top_back_card_translationY">-60dp</dimen>
|
||||
<item name="home_top_back_card_scaleX" format="float" type="dimen">0.9</item>
|
||||
<item name="home_top_back_card_scaleY" format="float" type="dimen">0.9</item>
|
||||
<dimen name="home_top_front_card_translationY">-40dp</dimen>
|
||||
<item name="home_top_front_card_scaleY" format="float" type="dimen">0.9</item>
|
||||
<item name="home_top_front_card_scaleX" format="float" type="dimen">0.9</item>
|
||||
|
||||
<!-- Home - bottom -->
|
||||
<item name="home_bottom_weight" format="float" type="dimen">1</item>
|
||||
<dimen name="home_bottom_llCompat_margin_bottom">8dp</dimen>
|
||||
<item name="home_bottom_llCompat_constraint_vertical_bias" format="float" type="dimen">0.1</item>
|
||||
<dimen name="home_bottom_tv_body_margin_top">10dp</dimen>
|
||||
<dimen name="home_bottom_tv_body_margin_start">34dp</dimen>
|
||||
<dimen name="home_bottom_tv_body_margin_end">34dp</dimen>
|
||||
<dimen name="home_bottom_fl_scan_card_container_margin_bottom">72dp</dimen>
|
||||
<dimen name="home_bottom_btn_alternative_action_margin_bottom">12dp</dimen>
|
||||
|
||||
<!-- Onboarding -->
|
||||
<dimen name="onboarding_progress_margin_top">0dp</dimen>
|
||||
<dimen name="onboarding_card_margin_top">50dp</dimen>
|
||||
<dimen name="onboarding_square_background_height">180dp</dimen>
|
||||
<dimen name="onboarding_square_background_margin_top">37dp</dimen>
|
||||
<item name="onboarding_wallet_top_guide_line_weight" type="dimen" format="float">0.48</item>>
|
||||
|
||||
<!-- Onboarding - Wallet - Access code -->
|
||||
<dimen name="access_code_title_margin_top">40dp</dimen>
|
||||
<dimen name="access_code_imv_lock_margin_top">12dp</dimen>
|
||||
<dimen name="access_code_info_protect_margin_top">8dp</dimen>
|
||||
<dimen name="access_code_info_items_space">16dp</dimen>
|
||||
<dimen name="access_code_btn_continue_margin_bottom">38dp</dimen>
|
||||
<dimen name="access_code_btn_continue_margin_start">78dp</dimen>
|
||||
<dimen name="access_code_btn_continue_margin_end">78dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue