Updated on 2026-08-14
This commit is contained in:
parent
e39c848809
commit
0755c923c8
7 changed files with 48 additions and 60 deletions
|
|
@ -68,9 +68,16 @@ fun View.hide(invokeBeforeStateChanged: (() -> Unit)? = null) {
|
|||
this.visibility = View.GONE
|
||||
}
|
||||
|
||||
fun View.makeInvisible() {
|
||||
if (this.visibility == View.INVISIBLE) return
|
||||
this.visibility = View.INVISIBLE
|
||||
fun View.invisible(invisible: Boolean = true, invokeBeforeStateChanged: (() -> Unit)? = null) {
|
||||
if (invisible) {
|
||||
if (this.visibility == View.INVISIBLE) return
|
||||
|
||||
invokeBeforeStateChanged?.invoke()
|
||||
this.visibility = View.INVISIBLE
|
||||
} else {
|
||||
this.show(invokeBeforeStateChanged)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun Context.dpToPixels(dp: Int): Int =
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@ fun ViewGroup.beginDelayedTransition(transition: Transition = AutoTransition())
|
|||
TransitionManager.beginDelayedTransition(this, transition)
|
||||
}
|
||||
|
||||
fun View.beginDelayedTransition(transition: Transition = AutoTransition()) {
|
||||
(this as? ViewGroup)?.beginDelayedTransition(transition)
|
||||
}
|
||||
|
||||
fun ChipGroup.fitChipsByGroupWidth() {
|
||||
val layoutStateHandler = GlobalLayoutStateHandler(this)
|
||||
layoutStateHandler.onStateChanged = stateHandler@{
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class AddressInfoBottomSheetDialog(
|
|||
btn_fl_share.setOnClickListener {
|
||||
store.dispatchShare(data.shareUrl)
|
||||
}
|
||||
tv_recieve_message.text = getQRReceiveMessage(tv_recieve_message.context, stateDialog.currency)
|
||||
tv_receive_message.text = getQRReceiveMessage(tv_receive_message.context, stateDialog.currency)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ import com.tangem.tap.features.wallet.ui.dialogs.AmountToSendDialog
|
|||
import com.tangem.tap.store
|
||||
import com.tangem.wallet.R
|
||||
import kotlinx.android.synthetic.main.fragment_wallet_details.*
|
||||
import kotlinx.android.synthetic.main.item_currency_wallet.view.*
|
||||
import kotlinx.android.synthetic.main.item_popular_token.view.*
|
||||
import kotlinx.android.synthetic.main.layout_balance_error.*
|
||||
import kotlinx.android.synthetic.main.layout_balance_wallet_details.*
|
||||
import kotlinx.android.synthetic.main.layout_wallet_details.*
|
||||
|
|
@ -197,7 +195,7 @@ class WalletDetailsFragment : Fragment(R.layout.fragment_wallet_details), StoreS
|
|||
requireContext()))
|
||||
}
|
||||
iv_qr_code.setImageBitmap(state.walletAddresses.selectedAddress.shareUrl.toQrCode())
|
||||
tv_recieve_message.text = getQRReceiveMessage(tv_recieve_message.context, state.currency)
|
||||
tv_receive_message.text = getQRReceiveMessage(tv_receive_message.context, state.currency)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
app:layout_constraintTop_toBottomOf="@+id/pseudo_toolbar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_recieve_message"
|
||||
android:id="@+id/tv_receive_message"
|
||||
style="@style/TextViewOnboarding.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="24dp">
|
||||
android:layout_height="120dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
|
|
@ -48,12 +47,13 @@
|
|||
android:layout_margin="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/shape_circle"/>
|
||||
tools:src="@drawable/shape_circle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_token_letter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold"
|
||||
|
|
@ -61,8 +61,7 @@
|
|||
app:layout_constraintEnd_toEndOf="@id/iv_currency"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_currency"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_currency"
|
||||
android:layout_marginBottom="2dp"
|
||||
tools:text="J"/>
|
||||
tools:text="J" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_status_verified"
|
||||
|
|
@ -131,6 +130,4 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_fiat_amount" />
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -71,19 +71,15 @@
|
|||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_qr_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:scaleType="fitStart"
|
||||
app:layout_constraintEnd_toEndOf="@id/guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/chip_group_address_type"
|
||||
app:layout_constraintBottom_toBottomOf="@id/v_qr_lower_end"
|
||||
tools:src="@drawable/ic_qr_code_show" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
|
|
@ -92,22 +88,20 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintGuide_percent="0.4" />
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:ellipsize="middle"
|
||||
android:textColor="@color/darkGray1"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_qr_code"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_qr_code"
|
||||
tools:text="139mrsJgyWnJjkljlkhiuojlkljkjljljlkjlkfsdkdsjflsdkjflsdkjfffffffljlkjkljlkjlkjkljky9BV"
|
||||
android:singleLine="true" />
|
||||
tools:text="139mrsJgyWnJjkljlkhiuojlkljkjljljlkjlkfsdkdsjflsdkjflsdkjfffffffljlkjkljlkjlkjkljky9BV" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_explore"
|
||||
|
|
@ -126,72 +120,60 @@
|
|||
app:layout_constraintStart_toEndOf="@id/iv_qr_code"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_address" />
|
||||
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/btn_copy"
|
||||
style="@style/Widget.MaterialComponents.Chip.Action"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/ic_inactive"
|
||||
android:text="@string/wallet_address_button_copy"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorSecondary"
|
||||
app:chipBackgroundColor="@color/blue_pale"
|
||||
app:chipIcon="@drawable/ic_copy_chip"
|
||||
app:iconStartPadding="12dp"
|
||||
app:iconEndPadding="0dp"
|
||||
app:chipIconSize="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_explore"
|
||||
app:layout_constraintEnd_toStartOf="@id/btn_share"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_qr_code" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_qr_lower_end"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_copy"
|
||||
app:layout_constraintStart_toStartOf="@id/btn_copy"
|
||||
android:layout_marginTop="5dp"
|
||||
/>
|
||||
|
||||
app:iconEndPadding="0dp"
|
||||
app:iconStartPadding="12dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btn_share"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_qr_code" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/btn_share"
|
||||
style="@style/Widget.MaterialComponents.Chip.Action"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:src="@drawable/ic_inactive"
|
||||
android:text="@string/wallet_address_button_share"
|
||||
app:chipIcon="@drawable/ic_share_chip"
|
||||
app:iconStartPadding="12dp"
|
||||
app:iconEndPadding="0dp"
|
||||
app:chipIconSize="16dp"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorSecondary"
|
||||
app:chipBackgroundColor="@color/blue_pale"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_explore"
|
||||
app:chipIcon="@drawable/ic_share_chip"
|
||||
app:chipIconSize="16dp"
|
||||
app:iconEndPadding="0dp"
|
||||
app:iconStartPadding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/btn_copy" />
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/btn_copy"
|
||||
app:layout_constraintTop_toTopOf="@+id/btn_copy" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_recieve_message"
|
||||
android:id="@+id/tv_receive_message"
|
||||
style="@style/TextViewOnboarding.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:textAlignment="center"
|
||||
android:textAllCaps="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_qr_code"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_copy"
|
||||
tools:text="@string/address_qr_code_message_token_format" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue