Updated on 2026-08-14
This commit is contained in:
parent
5eed89215c
commit
ed1012d315
17 changed files with 254 additions and 164 deletions
|
|
@ -2,8 +2,8 @@ package com.tangem.tap.features.home
|
|||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.transition.TransitionInflater
|
||||
import com.tangem.tap.common.extensions.hide
|
||||
import com.tangem.tap.common.redux.navigation.FragmentShareTransition
|
||||
import com.tangem.tap.common.redux.navigation.ShareElement
|
||||
import com.tangem.tap.common.toggleWidget.IndeterminateProgressButtonWidget
|
||||
|
|
@ -12,17 +12,20 @@ import com.tangem.tap.common.transitions.FrontCardEnterTransition
|
|||
import com.tangem.tap.common.transitions.FrontCardExitTransition
|
||||
import com.tangem.tap.features.home.redux.HomeAction
|
||||
import com.tangem.tap.features.home.redux.HomeState
|
||||
import com.tangem.tap.features.onboarding.products.BaseOnboardingFragment
|
||||
import com.tangem.tap.store
|
||||
import com.tangem.wallet.R
|
||||
import kotlinx.android.synthetic.main.fragment_home.*
|
||||
import kotlinx.android.synthetic.main.fragment_onboarding_main.*
|
||||
import kotlinx.android.synthetic.main.layout_onboarding_bottom_action_views.*
|
||||
import org.rekotlin.StoreSubscriber
|
||||
import kotlinx.android.synthetic.main.layout_onboarding_home.*
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
class HomeFragment : Fragment(R.layout.fragment_home), StoreSubscriber<HomeState> {
|
||||
class HomeFragment : BaseOnboardingFragment<HomeState>() {
|
||||
|
||||
private lateinit var btnScanCard: ViewStateWidget
|
||||
|
||||
override fun getOnboardingTopContainerId(): Int = R.layout.layout_onboarding_home
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
val inflater = TransitionInflater.from(requireContext())
|
||||
|
|
@ -33,10 +36,11 @@ class HomeFragment : Fragment(R.layout.fragment_home), StoreSubscriber<HomeState
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
toolbar.hide()
|
||||
val shareTransition = FragmentShareTransition(
|
||||
listOf(ShareElement(WeakReference(imv_front_card), imv_front_card.transitionName)),
|
||||
FrontCardEnterTransition(),
|
||||
FrontCardExitTransition()
|
||||
listOf(ShareElement(WeakReference(imv_front_card), imv_front_card.transitionName)),
|
||||
FrontCardEnterTransition(),
|
||||
FrontCardExitTransition()
|
||||
)
|
||||
|
||||
store.dispatch(HomeAction.SetFragmentShareTransition(shareTransition))
|
||||
|
|
@ -52,8 +56,7 @@ class HomeFragment : Fragment(R.layout.fragment_home), StoreSubscriber<HomeState
|
|||
btnScanCard = IndeterminateProgressButtonWidget(btn_main_action, progress)
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
override fun subscribeToStore() {
|
||||
store.subscribe(this) { state ->
|
||||
state.skipRepeats { oldState, newState ->
|
||||
oldState.homeState == newState.homeState
|
||||
|
|
@ -61,12 +64,6 @@ class HomeFragment : Fragment(R.layout.fragment_home), StoreSubscriber<HomeState
|
|||
}
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
store.unsubscribe(this)
|
||||
}
|
||||
|
||||
|
||||
override fun newState(state: HomeState) {
|
||||
if (activity == null) return
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import com.tangem.tap.features.onboarding.products.BaseOnboardingFragment
|
|||
import com.tangem.tap.features.onboarding.products.note.redux.*
|
||||
import com.tangem.tap.store
|
||||
import com.tangem.wallet.R
|
||||
import kotlinx.android.synthetic.main.fragment_onboarding_main.*
|
||||
import kotlinx.android.synthetic.main.layout_onboarding_bottom_action_views.*
|
||||
import kotlinx.android.synthetic.main.layout_onboarding_note.*
|
||||
import kotlinx.android.synthetic.main.view_onboarding_progress.*
|
||||
|
|
@ -40,6 +41,7 @@ class OnboardingNoteFragment : BaseOnboardingFragment<OnboardingNoteState>() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
toolbar.setTitle(R.string.onboarding_title)
|
||||
btnRefreshBalanceWidget = RefreshBalanceWidget(onboarding_main_container)
|
||||
val resources = AndroidResources(
|
||||
OnboardingStringResources(
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import com.tangem.tap.features.onboarding.products.otherCards.redux.OnboardingOt
|
|||
import com.tangem.tap.features.onboarding.products.otherCards.redux.OnboardingOtherCardsStep
|
||||
import com.tangem.tap.store
|
||||
import com.tangem.wallet.R
|
||||
import kotlinx.android.synthetic.main.fragment_onboarding_main.*
|
||||
import kotlinx.android.synthetic.main.layout_onboarding_bottom_action_views.*
|
||||
import kotlinx.android.synthetic.main.layout_onboarding_note.*
|
||||
import kotlinx.android.synthetic.main.view_onboarding_progress.*
|
||||
|
|
@ -30,6 +31,7 @@ class OnboardingOtherCardsFragment : BaseOnboardingFragment<OnboardingOtherCards
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
toolbar.setTitle(R.string.onboarding_title)
|
||||
store.dispatch(OnboardingOtherCardsAction.LoadCardArtwork)
|
||||
store.dispatch(OnboardingOtherCardsAction.DetermineStepOfScreen)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,86 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="320dp"
|
||||
android:clipChildren="false">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
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.4">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_header"
|
||||
style="@style/TextViewOnboarding.Header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="One wallet. Two cards." />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_body"
|
||||
style="@style/TextViewOnboarding.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="64dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="64dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/fl_scan_card_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_header"
|
||||
tools:text="This one that you are holding in your hands and the other one with number xxxxxxxxxxxx." />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_scan_card_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="90dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_main_action"
|
||||
style="@style/OnboardingButton"
|
||||
android:text="@string/home_button_scan" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:elevation="18dp"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateTint="@color/backgroundLightGray"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_alternative_action"
|
||||
style="@style/TapButtonText"
|
||||
android:layout_marginBottom="26dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="Atlernative action" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/coordinator_onboarding"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/backgroundWhite"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
style="@style/Widget.MaterialComponents.Toolbar.Surface"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="false"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/onboarding_top_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.3">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/imv_back_card"
|
||||
android:layout_width="215dp"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:elevation="0dp"
|
||||
android:rotation="-21"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_home_back_card"
|
||||
android:translationY="-20dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/imv_front_card"
|
||||
app:layout_constraintStart_toStartOf="@+id/imv_front_card"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imv_front_card" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/imv_front_card"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:elevation="1dp"
|
||||
android:rotation="-3"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_home_front_card"
|
||||
android:transitionName="imv_front_card"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/onboarding_action_container"
|
||||
layout="@layout/layout_onboarding_bottom_action_views"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/backgroundWhite"
|
||||
android:clipChildren="false"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
|
@ -20,18 +21,14 @@
|
|||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:navigationIcon="@drawable/ic_baseline_arrow_back_24"
|
||||
app:title="@string/onboarding_title" />
|
||||
|
||||
<include
|
||||
layout="@layout/layout_pseudo_toolbar"
|
||||
android:visibility="gone" />
|
||||
app:navigationIcon="@drawable/ic_baseline_arrow_back_24" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
|
|
@ -39,7 +36,8 @@
|
|||
android:id="@+id/onboarding_top_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.3" />
|
||||
android:layout_weight="1.2"
|
||||
android:clipChildren="false" />
|
||||
|
||||
<include
|
||||
android:id="@+id/onboarding_action_container"
|
||||
|
|
|
|||
|
|
@ -1,39 +1,56 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_header"
|
||||
style="@style/TextViewOnboarding.Header"
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Header"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/fl_scan_card_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.504"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_body"
|
||||
style="@style/TextViewOnboarding.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="64dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="64dp"
|
||||
android:text="Body"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_header" />
|
||||
<TextView
|
||||
android:id="@+id/tv_header"
|
||||
style="@style/TextViewOnboarding.Header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="One wallet. Two cards." />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_body"
|
||||
style="@style/TextViewOnboarding.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="64dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="64dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/fl_scan_card_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_header"
|
||||
tools:text="This one that you are holding in your hands and the other one with number xxxxxxxxxxxx." />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_scan_card_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="86dp"
|
||||
android:layout_marginBottom="72dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -41,13 +58,7 @@
|
|||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_main_action"
|
||||
style="@style/TapButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:minWidth="204dp"
|
||||
style="@style/OnboardingButton"
|
||||
android:text="@string/home_button_scan" />
|
||||
|
||||
<ProgressBar
|
||||
|
|
@ -55,27 +66,21 @@
|
|||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:elevation="18dp"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateTint="@color/backgroundLightGray"
|
||||
android:translationY="-4dp"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_alternative_action"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="295dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:text="Atlernative action"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/tapButtonColorBlack"
|
||||
style="@style/TapButtonText"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="Atlernative action" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
36
app/src/main/res/layout/layout_onboarding_home.xml
Normal file
36
app/src/main/res/layout/layout_onboarding_home.xml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/onboarding_main_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/imv_back_card"
|
||||
android:layout_width="215dp"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:elevation="0dp"
|
||||
android:rotation="-21"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_home_back_card"
|
||||
android:translationY="@dimen/home_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" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/imv_front_card"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="150dp"
|
||||
android:elevation="1dp"
|
||||
android:rotation="-3"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_home_front_card"
|
||||
android:transitionName="imv_front_card"
|
||||
android:translationY="@dimen/home_front_card_translationY"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -11,10 +11,9 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="@dimen/onboarding_progress_margin_top"
|
||||
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" />
|
||||
|
||||
|
|
@ -37,12 +36,11 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="106dp"
|
||||
android:layout_marginTop="@dimen/onboarding_card_margin_top"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:src="@drawable/ic_home_front_card"
|
||||
android:transitionName="imv_front_card"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,9 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="@dimen/onboarding_progress_margin_top"
|
||||
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" />
|
||||
|
||||
|
|
@ -37,12 +36,11 @@
|
|||
android:layout_width="296dp"
|
||||
android:layout_height="186dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="106dp"
|
||||
android:layout_marginTop="@dimen/onboarding_card_margin_top"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:src="@drawable/ic_home_front_card"
|
||||
android:transitionName="imv_front_card"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,9 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="@dimen/onboarding_progress_margin_top"
|
||||
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" />
|
||||
|
||||
|
|
@ -25,11 +24,11 @@
|
|||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="67dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/shape_rectangle_rounded_8"
|
||||
android:backgroundTint="@color/lightGray0"
|
||||
android:elevation="0dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/pb_state" />
|
||||
|
|
@ -44,7 +43,6 @@
|
|||
android:translationY="-30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/imv_card_background" />
|
||||
|
||||
|
|
@ -75,7 +73,7 @@
|
|||
android:id="@+id/imv_activation_success"
|
||||
android:layout_width="142dp"
|
||||
android:layout_height="142dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:layout_marginTop="@dimen/onboarding_card_margin_top"
|
||||
android:src="@drawable/ic_activation_success"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
|||
|
|
@ -11,10 +11,9 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="@dimen/onboarding_progress_margin_top"
|
||||
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" />
|
||||
|
||||
|
|
@ -23,7 +22,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="67dp"
|
||||
android:layout_marginTop="@dimen/onboarding_square_background_margin_top"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:background="@drawable/shape_rectangle_rounded_8"
|
||||
android:backgroundTint="@color/lightGray0"
|
||||
|
|
@ -43,7 +42,6 @@
|
|||
android:translationY="-30dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/imv_card_background" />
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,9 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="@dimen/onboarding_progress_margin_top"
|
||||
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" />
|
||||
|
||||
|
|
@ -23,7 +22,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="67dp"
|
||||
android:layout_marginTop="@dimen/onboarding_square_background_margin_top"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:background="@drawable/shape_rectangle_rounded_8"
|
||||
android:backgroundTint="@color/lightGray0"
|
||||
|
|
@ -43,7 +42,6 @@
|
|||
android:translationY="-30dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/imv_card_background" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:orientation="vertical">
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_balance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/onboarding_balance_title"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="#ABABAB"
|
||||
|
|
@ -18,10 +20,10 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tv_balance_value"
|
||||
style="@style/TextViewOnboarding.Header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textSize="28dp" />
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="0.000 BTC" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
9
app/src/main/res/values-h680dp/dimens.xml
Normal file
9
app/src/main/res/values-h680dp/dimens.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<resources>
|
||||
|
||||
<dimen name="home_back_card_translationY">-10dp</dimen>
|
||||
<dimen name="home_front_card_translationY">0dp</dimen>
|
||||
<dimen name="onboarding_progress_margin_top">16dp</dimen>
|
||||
<dimen name="onboarding_card_margin_top">106dp</dimen>
|
||||
<dimen name="onboarding_square_background_margin_top">67dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
@ -35,4 +35,10 @@
|
|||
<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>
|
||||
<dimen name="onboarding_square_background_margin_top">37dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -26,23 +26,45 @@
|
|||
<item name="colorControlNormal">#e34b1c</item>
|
||||
</style>
|
||||
|
||||
<style name="TapButton">
|
||||
<style name="BaseTapButton">
|
||||
<item name="android:insetTop">0dp</item>
|
||||
<item name="android:insetBottom">0dp</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/btn_tap_text_color</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:letterSpacing">0</item>
|
||||
<item name="android:backgroundTint">@color/selector_btn_green</item>
|
||||
<item name="cornerRadius">@dimen/btn_corner_radius</item>
|
||||
<item name="android:fontFamily">@font/saira_semi_condensed_regular</item>
|
||||
</style>
|
||||
|
||||
<style name="TapButton" parent="BaseTapButton">
|
||||
<item name="android:layout_width">93dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:minHeight">52dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:fontFamily">@font/saira_semi_condensed_regular</item>
|
||||
<item name="elevation">3dp</item>
|
||||
</style>
|
||||
|
||||
<style name="OnboardingButton" parent="BaseTapButton">
|
||||
<item name="android:layout_width">204dp</item>
|
||||
<item name="android:layout_height">48dp</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:fontFamily">sans-serif-medium</item>
|
||||
<item name="elevation">2dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TapButtonText" parent="@style/Widget.MaterialComponents.Button.TextButton">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:minWidth">204dp</item>
|
||||
<item name="android:layout_height">58dp</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:letterSpacing">0</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:textColor">#060606</item>
|
||||
<item name="cornerRadius">@dimen/btn_corner_radius</item>
|
||||
</style>
|
||||
|
||||
<style name="TapButtonWithIcon" parent="TapButton">
|
||||
<item name="android:gravity">start|center_vertical</item>
|
||||
<item name="iconTint">@color/btn_tap_text_color</item>
|
||||
|
|
@ -76,4 +98,11 @@
|
|||
<item name="android:textColor">#686868</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
<!-- android:fontFamily="sans-serif" // roboto regular -->
|
||||
<!-- android:fontFamily="sans-serif-light" // roboto light -->
|
||||
<!-- android:fontFamily="sans-serif-condensed" // roboto condensed -->
|
||||
<!-- android:fontFamily="sans-serif-black" // roboto black -->
|
||||
<!-- android:fontFamily="sans-serif-thin" // roboto thin (android 4.2) -->
|
||||
<!-- android:fontFamily="sans-serif-medium" // roboto medium (android 5.0) -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue