Minor tweaks.
Improved spannable ext function Updated wallet details to wallet history
This commit is contained in:
parent
9550cdbbc7
commit
3d4ae2ae63
|
@ -5,7 +5,7 @@ import android.text.Spanned
|
||||||
import android.text.style.ForegroundColorSpan
|
import android.text.style.ForegroundColorSpan
|
||||||
import androidx.core.text.toSpannable
|
import androidx.core.text.toSpannable
|
||||||
|
|
||||||
fun String.toColoredSpan(colorResId: Int, coloredPortion: String): Spannable {
|
fun CharSequence.toColoredSpan(colorResId: Int, coloredPortion: String): Spannable {
|
||||||
return toSpannable().apply {
|
return toSpannable().apply {
|
||||||
val start = this@toColoredSpan.indexOf(coloredPortion)
|
val start = this@toColoredSpan.indexOf(coloredPortion)
|
||||||
setSpan(ForegroundColorSpan(colorResId.toAppColor()), start, start + coloredPortion.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
setSpan(ForegroundColorSpan(colorResId.toAppColor()), start, start + coloredPortion.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
|
|
@ -92,7 +92,6 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
|
||||||
buttonNumberPadBack.asKey()
|
buttonNumberPadBack.asKey()
|
||||||
)
|
)
|
||||||
hitAreaReceive.onClickNavTo(R.id.action_nav_home_to_nav_profile) { tapped(HOME_PROFILE) }
|
hitAreaReceive.onClickNavTo(R.id.action_nav_home_to_nav_profile) { tapped(HOME_PROFILE) }
|
||||||
iconDetail.onClickNavTo(R.id.action_nav_home_to_nav_detail) { tapped(HOME_DETAIL) }
|
|
||||||
textDetail.onClickNavTo(R.id.action_nav_home_to_nav_detail) { tapped(HOME_DETAIL) }
|
textDetail.onClickNavTo(R.id.action_nav_home_to_nav_detail) { tapped(HOME_DETAIL) }
|
||||||
hitAreaScan.setOnClickListener {
|
hitAreaScan.setOnClickListener {
|
||||||
mainActivity?.maybeOpenScan().also { tapped(HOME_SCAN) }
|
mainActivity?.maybeOpenScan().also { tapped(HOME_SCAN) }
|
||||||
|
|
|
@ -241,18 +241,6 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/button_number_pad_9"
|
app:layout_constraintTop_toBottomOf="@id/button_number_pad_9"
|
||||||
app:layout_constraintWidth_percent="@dimen/calculator_button_width_percent" />
|
app:layout_constraintWidth_percent="@dimen/calculator_button_width_percent" />
|
||||||
|
|
||||||
<!-- <com.google.android.material.button.MaterialButton-->
|
|
||||||
<!-- android:id="@+id/button_send"-->
|
|
||||||
<!-- android:layout_width="0dp"-->
|
|
||||||
<!-- android:layout_height="0dp"-->
|
|
||||||
<!-- style="@style/Zcash.Button"-->
|
|
||||||
<!-- android:text=""-->
|
|
||||||
<!-- android:enabled="false"-->
|
|
||||||
<!-- app:layout_constraintEnd_toEndOf="@id/guide_keys"-->
|
|
||||||
<!-- app:layout_constraintStart_toStartOf="@id/guide_keys"-->
|
|
||||||
<!-- app:layout_constraintTop_toTopOf="@id/lottie_button_loading"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="@id/lottie_button_loading"/>-->
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/layer_lock"
|
android:id="@+id/layer_lock"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -307,7 +295,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:elevation="6dp"
|
android:elevation="6dp"
|
||||||
android:tint="@color/colorAccent"
|
app:tint="@color/colorAccent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHeight_percent="0.052"
|
app:layout_constraintHeight_percent="0.052"
|
||||||
|
@ -333,21 +321,6 @@
|
||||||
app:layout_constraintWidth_percent="0.08"
|
app:layout_constraintWidth_percent="0.08"
|
||||||
app:srcCompat="@drawable/ic_account_circle" />
|
app:srcCompat="@drawable/ic_account_circle" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/icon_detail"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:elevation="6dp"
|
|
||||||
android:tint="@color/colorAccent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/text_detail"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/text_detail"
|
|
||||||
app:layout_constraintHeight_percent="0.044"
|
|
||||||
app:layout_constraintHorizontal_chainStyle="packed"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/text_detail"
|
|
||||||
app:layout_constraintWidth_percent="0.0887"
|
|
||||||
app:srcCompat="@drawable/ic_receipt_24dp" />
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/hit_area_scan"
|
android:id="@+id/hit_area_scan"
|
||||||
android:layout_width="68dp"
|
android:layout_width="68dp"
|
||||||
|
@ -376,13 +349,13 @@
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:elevation="6dp"
|
android:elevation="6dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:text="Wallet Details"
|
android:text="Wallet History"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||||
android:textColor="@color/colorAccent"
|
android:textColor="@color/colorAccent"
|
||||||
android:tint="@color/colorAccent"
|
android:tint="@color/colorAccent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/icon_detail"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/lottie_button_loading" />
|
app:layout_constraintTop_toBottomOf="@id/lottie_button_loading" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -223,7 +223,7 @@
|
||||||
android:id="@+id/group_transparent"
|
android:id="@+id/group_transparent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:visibility="visible"
|
tools:visibility="gone"
|
||||||
app:constraint_referenced_ids="sad_description, sad_icon, sad_title, sad_checkbox" />
|
app:constraint_referenced_ids="sad_description, sad_icon, sad_title, sad_checkbox" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
<androidx.constraintlayout.widget.Group
|
||||||
|
@ -231,5 +231,5 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:constraint_referenced_ids="clear_memo, background_memo, input_memo, check_include_address, text_info_shielded"
|
app:constraint_referenced_ids="clear_memo, background_memo, input_memo, check_include_address, text_info_shielded"
|
||||||
tools:visibility="gone" />
|
tools:visibility="visible" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue