Updated on 2026-08-14
This commit is contained in:
parent
abf8e77643
commit
e362149f9e
11 changed files with 81 additions and 76 deletions
|
|
@ -24,7 +24,11 @@ import com.tangem.tap.domain.statePrinter.printScanResponseState
|
|||
import com.tangem.tap.domain.statePrinter.printWalletState
|
||||
import com.tangem.tap.domain.termsOfUse.CardTou
|
||||
import com.tangem.tap.features.details.redux.DetailsAction
|
||||
import com.tangem.tap.features.wallet.redux.*
|
||||
import com.tangem.tap.features.wallet.redux.Artwork
|
||||
import com.tangem.tap.features.wallet.redux.ErrorType
|
||||
import com.tangem.tap.features.wallet.redux.ProgressState
|
||||
import com.tangem.tap.features.wallet.redux.WalletAction
|
||||
import com.tangem.tap.features.wallet.redux.WalletState
|
||||
import com.tangem.tap.features.wallet.ui.adapters.WarningMessagesAdapter
|
||||
import com.tangem.tap.features.wallet.ui.wallet.MultiWalletView
|
||||
import com.tangem.tap.features.wallet.ui.wallet.SingleWalletView
|
||||
|
|
@ -78,7 +82,7 @@ class WalletFragment : Fragment(R.layout.fragment_wallet), StoreSubscriber<Walle
|
|||
(activity as? AppCompatActivity)?.setSupportActionBar(binding.toolbar)
|
||||
|
||||
binding.toolbar.setNavigationOnClickListener {
|
||||
store.dispatch(NavigationAction.PopBackTo(AppScreen.Home))
|
||||
store.dispatch(WalletAction.Scan)
|
||||
}
|
||||
setupWarningsRecyclerView()
|
||||
walletView.changeWalletView(this, binding)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ class MultiWalletView : WalletView {
|
|||
setFragment(fragment, binding)
|
||||
onViewCreated()
|
||||
showMultiWalletView(binding)
|
||||
setupButtons(binding)
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -52,7 +51,6 @@ class MultiWalletView : WalletView {
|
|||
lAddress.root.hide()
|
||||
lButtonsShort.root.hide()
|
||||
lButtonsLong.root.hide()
|
||||
btnScanMultiwallet.show()
|
||||
rvMultiwallet.show()
|
||||
btnAddToken.show()
|
||||
setupWalletCardNumber(binding)
|
||||
|
|
@ -70,11 +68,6 @@ class MultiWalletView : WalletView {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private fun setupButtons(binding: FragmentWalletBinding) = with(binding) {
|
||||
btnScanMultiwallet.setOnClickListener { store.dispatch(WalletAction.Scan) }
|
||||
}
|
||||
|
||||
override fun setFragment(fragment: WalletFragment, binding: FragmentWalletBinding) {
|
||||
this.fragment = fragment
|
||||
this.binding = binding
|
||||
|
|
@ -204,7 +197,6 @@ class MultiWalletView : WalletView {
|
|||
|
||||
private fun configureButtonsForEmptyWalletState(binding: FragmentWalletBinding) =
|
||||
with(binding) {
|
||||
btnScanMultiwallet.hide()
|
||||
lButtonsLong.root.show()
|
||||
lButtonsLong.btnScanLong.setOnClickListener { store.dispatch(WalletAction.Scan) }
|
||||
lButtonsLong.btnConfirmLong.setOnClickListener { store.dispatch(WalletAction.CreateWallet) }
|
||||
|
|
|
|||
|
|
@ -13,7 +13,13 @@ import com.tangem.tap.common.extensions.show
|
|||
import com.tangem.tap.common.redux.StateDialog
|
||||
import com.tangem.tap.features.onboarding.products.twins.redux.TwinCardsState
|
||||
import com.tangem.tap.features.wallet.models.PendingTransaction
|
||||
import com.tangem.tap.features.wallet.redux.*
|
||||
import com.tangem.tap.features.wallet.redux.Currency
|
||||
import com.tangem.tap.features.wallet.redux.TradeCryptoState
|
||||
import com.tangem.tap.features.wallet.redux.WalletAction
|
||||
import com.tangem.tap.features.wallet.redux.WalletData
|
||||
import com.tangem.tap.features.wallet.redux.WalletDialog
|
||||
import com.tangem.tap.features.wallet.redux.WalletMainButton
|
||||
import com.tangem.tap.features.wallet.redux.WalletState
|
||||
import com.tangem.tap.features.wallet.ui.BalanceWidget
|
||||
import com.tangem.tap.features.wallet.ui.MultipleAddressUiHelper
|
||||
import com.tangem.tap.features.wallet.ui.WalletFragment
|
||||
|
|
@ -51,7 +57,6 @@ class SingleWalletView : WalletView {
|
|||
private fun showSingleWalletView(binding: FragmentWalletBinding) = with(binding) {
|
||||
rvMultiwallet.hide()
|
||||
btnAddToken.hide()
|
||||
btnScanMultiwallet.hide()
|
||||
rvPendingTransaction.hide()
|
||||
lCardBalance.root.show()
|
||||
lAddress.root.show()
|
||||
|
|
|
|||
10
app/src/main/res/drawable/ic_more_vertical_24.xml
Normal file
10
app/src/main/res/drawable/ic_more_vertical_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12,8C13.1,8 14,7.1 14,6C14,4.9 13.1,4 12,4C10.9,4 10,4.9 10,6C10,7.1 10.9,8 12,8ZM12,10C10.9,10 10,10.9 10,12C10,13.1 10.9,14 12,14C13.1,14 14,13.1 14,12C14,10.9 13.1,10 12,10ZM12,16C10.9,16 10,16.9 10,18C10,19.1 10.9,20 12,20C13.1,20 14,19.1 14,18C14,16.9 13.1,16 12,16Z"
|
||||
android:fillColor="#000"
|
||||
android:fillType="evenOdd" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_scan_card_24.xml
Normal file
10
app/src/main/res/drawable/ic_scan_card_24.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M17,12C17,9.24 14.76,7 12,7C9.24,7 7,9.24 7,12C7,14.76 9.24,17 12,17C14.76,17 17,14.76 17,12ZM12,15C10.35,15 9,13.65 9,12C9,10.35 10.35,9 12,9C13.65,9 15,10.35 15,12C15,13.65 13.65,15 12,15ZM5,15H3V19C3,20.1 3.9,21 5,21H9V19H5V15ZM5,5H9V3H5C3.9,3 3,3.9 3,5V9H5V5ZM19,3H15V5H19V9H21V5C21,3.9 20.1,3 19,3ZM19,19H15V21H19C20.1,21 21,20.1 21,19V15H19V19Z"
|
||||
android:fillColor="#000"
|
||||
android:fillType="evenOdd" />
|
||||
</vector>
|
||||
|
|
@ -8,4 +8,4 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -18,12 +18,13 @@
|
|||
app:liftOnScroll="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:menu="@menu/wallet"
|
||||
app:navigationIcon="@drawable/ic_baseline_arrow_back_24"
|
||||
app:title="@string/wallet_title" />
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:menu="@menu/wallet"
|
||||
app:navigationIcon="@drawable/ic_scan_card_24"
|
||||
app:navigationIconTint="@color/iconGray"
|
||||
app:title="@string/wallet_title" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
|
@ -41,19 +42,20 @@
|
|||
android:overScrollMode="never">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_wallet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_card"
|
||||
android:id="@+id/cl_wallet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:paddingBottom="74dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:elevation="3dp"
|
||||
android:maxHeight="215dp"
|
||||
|
|
@ -149,26 +151,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_pending_transaction" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/btn_add_token"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:background="@android:color/white"
|
||||
android:elevation="3dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_multiwallet">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/wallet_button_add_tokens"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<include
|
||||
android:id="@+id/l_buttons_long"
|
||||
layout="@layout/layout_wallet_long_buttons"
|
||||
|
|
@ -186,27 +168,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="30dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/l_address"
|
||||
app:layout_constraintVertical_bias="1"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_scan_multiwallet"
|
||||
style="@style/TapBlackButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:minWidth="100dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="33dp"
|
||||
android:text="@string/wallet_button_scan"
|
||||
app:icon="@drawable/ic_scan"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_add_token"
|
||||
app:layout_constraintVertical_bias="1" />
|
||||
|
||||
android:layout_marginTop="30dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/l_address"
|
||||
app:layout_constraintVertical_bias="1"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
@ -214,4 +179,19 @@
|
|||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_add_token"
|
||||
style="@style/BaseTapButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="42dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/main_manage_tokens"
|
||||
android:elevation="4dp"
|
||||
app:cornerRadius="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/details_menu"
|
||||
android:title="@string/details_title"
|
||||
android:icon="@drawable/ic_settings"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
android:id="@+id/details_menu"
|
||||
android:title="@string/details_title"
|
||||
android:icon="@drawable/ic_more_vertical_24"
|
||||
app:iconTint="@color/iconGray"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -384,4 +384,5 @@
|
|||
<string name="feedback_data_collection_message">Информация ниже не является обязательной. Вы можете стереть её, если хотите.</string>
|
||||
<string name="main_page_balance">Баланс</string>
|
||||
<string name="main_processing_full_amount">Обработка полной суммы…</string>
|
||||
<string name="main_manage_tokens">Управление токенами</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
<dimen name="size_progress_bar_big">135dp</dimen>
|
||||
|
||||
<dimen name="btn_corner_radius">4dp</dimen>
|
||||
<dimen name="btn_corner_radius_medium">8dp</dimen>
|
||||
<dimen name="btn_rounded_size">44dp</dimen>
|
||||
|
||||
<dimen name="text_size_amount_to_send">32sp</dimen>
|
||||
|
|
|
|||
|
|
@ -208,4 +208,5 @@
|
|||
<string name="xtz_withdrawal_message_ignore">No, send all</string>
|
||||
<string name="main_page_balance">Total balance</string>
|
||||
<string name="main_processing_full_amount">Processing full amount…</string>
|
||||
<string name="main_manage_tokens">Manage tokens</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue