triggering build
This commit is contained in:
parent
edef5372ee
commit
dcf0dfc26d
Binary file not shown.
|
@ -248,6 +248,7 @@ class ScanFragment : BaseFragment() {
|
|||
|
||||
private var pendingSuccess = false
|
||||
private fun onScanSuccess(value: String) {
|
||||
binding.cameraView.stop()
|
||||
if (!pendingSuccess) {
|
||||
pendingSuccess = true
|
||||
with(binding.cameraView) {
|
||||
|
|
|
@ -9,6 +9,8 @@ import cash.z.android.wallet.R
|
|||
import dagger.Module
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
import cash.z.android.wallet.databinding.FragmentSettingsBinding
|
||||
import cash.z.android.wallet.extention.Toaster
|
||||
import cash.z.android.wallet.extention.alert
|
||||
|
||||
|
||||
class SettingsFragment : BaseFragment() {
|
||||
|
@ -26,6 +28,16 @@ class SettingsFragment : BaseFragment() {
|
|||
mainActivity.setToolbarShown(true)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
binding.buttonResetApp.setOnClickListener {
|
||||
view.context.alert(R.string.settings_alert_reset_app) {
|
||||
Toaster.short("Boom")
|
||||
mainActivity.navController.navigateUp()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Module
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/fragment_history_background">
|
||||
|
||||
<include
|
||||
android:id="@+id/main_app_bar"
|
||||
layout="@layout/include_main_app_bar"
|
||||
tools:ignore="MissingConstraints"
|
||||
android:visibility="invisible"/>
|
||||
android:visibility="invisible"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<!-- -->
|
||||
<!-- Guidelines -->
|
||||
|
@ -30,6 +31,84 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_demo_user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:text="Demo User"
|
||||
android:textColor="@color/zcashGray_dark"
|
||||
android:textSize="@dimen/text_size_caption"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_content_start"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_app_bar" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/spinner_demo_user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:entries="@array/demo_user_names"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_content_start"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_demo_user" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_server_selection"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:text="Server Selection"
|
||||
android:textColor="@color/zcashGray_dark"
|
||||
android:textSize="@dimen/text_size_caption"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_content_start"
|
||||
app:layout_constraintTop_toBottomOf="@id/spinner_demo_user" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_server_selection_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:fontFamily="sans-serif-thin"
|
||||
android:text="(host name or IP)"
|
||||
android:textColor="@color/zcashGray_dark"
|
||||
android:textSize="@dimen/text_size_caption"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/text_server_selection"
|
||||
app:layout_constraintStart_toEndOf="@id/text_server_selection" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/spinner_servers"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:entries="@array/server_names"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_content_start"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_server_selection" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_reset_application"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="Reset Application"
|
||||
android:textColor="@color/zcashGray_dark"
|
||||
android:textSize="@dimen/text_size_caption"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/button_reset_app"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_content_start" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_reset_app"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="@color/selector_red_button"
|
||||
android:text="Reset Application"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:textColor="@color/text_light"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/guideline_content_end"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_content_start" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
|
@ -89,4 +89,16 @@
|
|||
<string name="about_licensing">Licensing:</string>
|
||||
<string name="about_zcash_blog">Zcash Blog:</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="settings_alert_reset_app">Delete all data and reset like a new installation?</string>
|
||||
|
||||
<string-array name="demo_user_names">
|
||||
<item>Alice</item>
|
||||
<item>Bob</item>
|
||||
</string-array>
|
||||
<string-array name="server_names">
|
||||
<item>Localhost</item>
|
||||
<item>Zcash Testnet</item>
|
||||
<item>Bolt Labs Testnet</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
|
|
@ -15,9 +15,9 @@ import javax.inject.Singleton
|
|||
@Module
|
||||
internal object SynchronizerModule {
|
||||
|
||||
const val MOCK_LOAD_DURATION = 3_000L
|
||||
// const val MOCK_LOAD_DURATION = 30_000L
|
||||
const val MOCK_TX_INTERVAL = 5_000L
|
||||
// const val MOCK_LOAD_DURATION = 3_000L
|
||||
const val MOCK_LOAD_DURATION = 30_000L
|
||||
const val MOCK_TX_INTERVAL = 20_000L
|
||||
const val MOCK_ACTIVE_TX_STATE_CHANGE_INTERVAL = 5_000L
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue