forked from hush/SilentDragonAndroid-old
16 changed files with 2369 additions and 165 deletions
@ -1,9 +1,11 @@ |
|||
// Copyright 2019-2020 The Hush developers |
|||
package org.myhush.silentdragon |
|||
package org.myhush.silentdragon.ui |
|||
|
|||
import androidx.appcompat.app.AppCompatActivity |
|||
import android.os.Bundle |
|||
import kotlinx.android.synthetic.main.activity_about.lblVersionName |
|||
import org.myhush.silentdragon.BuildConfig |
|||
import org.myhush.silentdragon.R |
|||
|
|||
class AboutActivity : AppCompatActivity() { |
|||
|
@ -1,53 +1,62 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<androidx.constraintlayout.widget.ConstraintLayout |
|||
xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
<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:id="@+id/camPreview" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
app:layout_behavior="@string/appbar_scrolling_view_behavior" |
|||
tools:context="org.myhush.silentdragon.QrReaderActivity" |
|||
tools:showIn="@layout/activity_qr_reader"> |
|||
|
|||
<com.journeyapps.barcodescanner.DecoratedBarcodeView |
|||
android:id="@+id/barcodeView" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
app:layout_behavior="@string/appbar_scrolling_view_behavior" |
|||
tools:showIn="@layout/activity_qr_code_reader" |
|||
tools:context=".QrCodeReaderActivity" android:id="@+id/camPreview"> |
|||
android:layout_height="0dp" |
|||
app:layout_constraintBottom_toTopOf="@+id/txtQrCodeHelp" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" |
|||
app:zxing_scanner_layout="@layout/custom_qrcode_layout" /> |
|||
|
|||
<SurfaceView |
|||
android:layout_width="0dp" |
|||
android:layout_height="0dp" |
|||
android:id="@+id/camera_view" |
|||
app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent"/> |
|||
<ImageView |
|||
android:src="#ee000000" |
|||
android:layout_width="0dp" |
|||
android:layout_height="200dp" android:id="@+id/imageView4" |
|||
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintBottom_toBottomOf="parent"/> |
|||
<TextView |
|||
android:text="@string/how_to_connect_sd2sda" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:id="@+id/txtQrCodeHelp" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" |
|||
android:layout_marginEnd="8dp" android:textAlignment="center" |
|||
android:layout_marginBottom="16dp" app:layout_constraintBottom_toTopOf="@+id/btnQrCodeCancel" |
|||
android:textColor="@android:color/white"/> |
|||
android:id="@+id/txtQrCodeHelp" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="8dp" |
|||
android:layout_marginEnd="8dp" |
|||
android:layout_marginBottom="16dp" |
|||
android:text="@string/how_to_connect_sd2sda" |
|||
android:textAlignment="center" |
|||
android:textColor="@android:color/white" |
|||
app:layout_constraintBottom_toTopOf="@+id/btnQrCodeCancel" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" /> |
|||
|
|||
<Button |
|||
android:text="@string/cancel" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:id="@+id/btnQrCodeCancel" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" |
|||
android:layout_marginEnd="8dp" android:background="@color/colorPrimary" |
|||
android:textColor="@android:color/white" android:layout_marginBottom="16dp" |
|||
app:layout_constraintBottom_toTopOf="@+id/lblErrorMsg"/> |
|||
android:id="@+id/btnQrCodeCancel" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="8dp" |
|||
android:layout_marginEnd="8dp" |
|||
android:layout_marginBottom="16dp" |
|||
android:background="@color/colorPrimary" |
|||
android:text="@string/cancel" |
|||
android:textColor="@android:color/white" |
|||
app:layout_constraintBottom_toTopOf="@+id/lblErrorMsg" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" /> |
|||
|
|||
<TextView |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:id="@+id/lblErrorMsg" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
android:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" |
|||
android:layout_marginEnd="8dp" android:textAlignment="center" android:textColor="@color/colorAccent" |
|||
android:layout_marginBottom="32dp" |
|||
app:layout_constraintBottom_toBottomOf="parent"/> |
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
|||
android:id="@+id/lblErrorMsg" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="8dp" |
|||
android:layout_marginEnd="8dp" |
|||
android:layout_marginBottom="32dp" |
|||
android:textAlignment="center" |
|||
android:textColor="@color/colorAccent" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" /> |
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
|||
|
@ -0,0 +1,24 @@ |
|||
<?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:layout_width="match_parent" |
|||
android:layout_height="match_parent"> |
|||
|
|||
<com.journeyapps.barcodescanner.BarcodeView |
|||
android:id="@+id/zxing_barcode_surface" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
app:zxing_framing_rect_height="300dp" |
|||
app:zxing_framing_rect_width="300dp" /> |
|||
|
|||
<com.journeyapps.barcodescanner.ViewfinderView |
|||
android:id="@+id/zxing_viewfinder_view" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
app:zxing_possible_result_points="@color/zxing_custom_possible_result_points" |
|||
app:zxing_result_view="@color/zxing_custom_result_view" |
|||
app:zxing_viewfinder_laser="@color/zxing_custom_viewfinder_laser" |
|||
app:zxing_viewfinder_mask="@color/zxing_custom_viewfinder_mask" /> |
|||
|
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
File diff suppressed because it is too large
@ -0,0 +1,7 @@ |
|||
plugins { |
|||
`kotlin-dsl` |
|||
} |
|||
|
|||
repositories { |
|||
jcenter() |
|||
} |
@ -0,0 +1,55 @@ |
|||
package org.myhush.silentdragon |
|||
|
|||
object Deps { |
|||
const val kotlinVersion = "1.3.72" |
|||
|
|||
const val compileSdkVersion = 29 |
|||
const val buildToolsVersion = "29.0.3" |
|||
const val minSdkVersion = 17 |
|||
const val targetSdkVersion = 29 |
|||
|
|||
object Kotlin : Version(kotlinVersion) { |
|||
val STDLIB = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$version" |
|||
object Coroutines : Version("1.3.2") { |
|||
val ANDROID = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version" |
|||
val CORE = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version" |
|||
} |
|||
} |
|||
object AndroidX { |
|||
//const val ANNOTATION = "androidx.annotation:annotation:1.0.0" |
|||
const val APPCOMPAT = "androidx.appcompat:appcompat:1.0.0" |
|||
const val CONSTRAINT_LAYOUT = "androidx.constraintlayout:constraintlayout:1.1.3" |
|||
const val CORE_KTX = "androidx.core:core-ktx:1.3.0" |
|||
const val FRAGMENT_KTX = "androidx.fragment:fragment-ktx:1.1.0-beta01" |
|||
const val LEGACY = "androidx.legacy:legacy-support-v4:1.0.0" |
|||
const val MULTIDEX = "androidx.multidex:multidex:2.0.1" |
|||
const val PAGING = "androidx.paging:paging-runtime-ktx:2.1.2" |
|||
const val VECTOR_DRAWABLE = "androidx.vectordrawable:vectordrawable:1.0.0" |
|||
|
|||
object Navigation : Version("2.1.0") { |
|||
val FRAGMENT_KTX = "androidx.navigation:navigation-fragment-ktx:$version" |
|||
val UI_KTX = "androidx.navigation:navigation-ui-ktx:$version" |
|||
} |
|||
object Room : Version("2.2.5") { |
|||
val ROOM_COMPILER = "androidx.room:room-compiler:$version" |
|||
val ROOM_KTX = "androidx.room:room-ktx:$version" |
|||
} |
|||
} |
|||
// from Demo App SDK |
|||
object Hush { |
|||
val ANDROID_WALLET_PLUGINS = "cash.z.ecc.android:zcash-android-wallet-plugins:1.0.0" |
|||
val KOTLIN_BIP39 = "cash.z.ecc.android:kotlin-bip39:1.0.0-beta09" |
|||
object Sdk : Version("1.1.0-beta02") { |
|||
val MAINNET = "cash.z.ecc.android:sdk-mainnet:$version" |
|||
//val TESTNET = "cash.z.ecc.android:sdk-testnet:$version" |
|||
} |
|||
} |
|||
object Grpc : Version("1.25.0") { |
|||
val ANDROID = "io.grpc:grpc-android:$version" |
|||
val OKHTTP = "io.grpc:grpc-okhttp:$version" |
|||
val PROTOBUG ="io.grpc:grpc-protobuf-lite:$version" |
|||
val STUB = "io.grpc:grpc-stub:$version" |
|||
} |
|||
} |
|||
|
|||
open class Version(@JvmField val version: String) |
Loading…
Reference in new issue