pakstr 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/android-template/app/build.gradle.kts +59 -0
  2. package/android-template/app/proguard-rules.pro +21 -0
  3. package/android-template/app/src/androidTest/java/com/nostrappshell/app/ExampleInstrumentedTest.kt +24 -0
  4. package/android-template/app/src/main/AndroidManifest.xml +32 -0
  5. package/android-template/app/src/main/assets/nip07.js +35 -0
  6. package/android-template/app/src/main/assets/www/assets/hero-CLDdwZDr.png +0 -0
  7. package/android-template/app/src/main/assets/www/assets/index-CsUDhMuy.css +1 -0
  8. package/android-template/app/src/main/assets/www/assets/index-D-e3tQW5.js +56 -0
  9. package/android-template/app/src/main/assets/www/assets/vite-BF8QNONU.svg +1 -0
  10. package/android-template/app/src/main/assets/www/favicon.svg +1 -0
  11. package/android-template/app/src/main/assets/www/icons.svg +24 -0
  12. package/android-template/app/src/main/assets/www/index.html +14 -0
  13. package/android-template/app/src/main/assets/www/test.html +17 -0
  14. package/android-template/app/src/main/java/com/nostrappshell/app/ApplicationClass.kt +11 -0
  15. package/android-template/app/src/main/java/com/nostrappshell/app/Config.kt +7 -0
  16. package/android-template/app/src/main/java/com/nostrappshell/app/LocalServer.kt +51 -0
  17. package/android-template/app/src/main/java/com/nostrappshell/app/MainActivity.kt +160 -0
  18. package/android-template/app/src/main/java/com/nostrappshell/app/ShellRuntime.kt +125 -0
  19. package/android-template/app/src/main/java/com/nostrappshell/app/WebViewController.kt +139 -0
  20. package/android-template/app/src/main/java/com/nostrappshell/app/signer/AmberSigner.kt +167 -0
  21. package/android-template/app/src/main/java/com/nostrappshell/app/signer/BunkerSigner.kt +28 -0
  22. package/android-template/app/src/main/java/com/nostrappshell/app/signer/FakeSigner.kt +31 -0
  23. package/android-template/app/src/main/java/com/nostrappshell/app/signer/NostrBridge.kt +97 -0
  24. package/android-template/app/src/main/java/com/nostrappshell/app/signer/SignerManager.kt +155 -0
  25. package/android-template/app/src/main/java/com/nostrappshell/app/signer/SignerType.kt +9 -0
  26. package/android-template/app/src/main/java/com/nostrappshell/app/signer/interfaces/NostrSigner.kt +25 -0
  27. package/android-template/app/src/main/java/com/nostrappshell/app/ui/theme/Color.kt +11 -0
  28. package/android-template/app/src/main/java/com/nostrappshell/app/ui/theme/Theme.kt +57 -0
  29. package/android-template/app/src/main/java/com/nostrappshell/app/ui/theme/Type.kt +34 -0
  30. package/android-template/app/src/main/java/com/nostrappshell/app/utils/AppPreferences.kt +31 -0
  31. package/android-template/app/src/main/java/com/nostrappshell/app/utils/SignerPickerBottomSheet.kt +40 -0
  32. package/android-template/app/src/main/res/drawable/bg_bottom_sheet.xml +7 -0
  33. package/android-template/app/src/main/res/drawable/custom_loader.xml +25 -0
  34. package/android-template/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
  35. package/android-template/app/src/main/res/drawable/ic_launcher_foreground.xml +30 -0
  36. package/android-template/app/src/main/res/drawable/ic_menu_browser.xml +9 -0
  37. package/android-template/app/src/main/res/drawable/selector_radio_card.xml +17 -0
  38. package/android-template/app/src/main/res/drawable/selector_radio_checkmark.xml +5 -0
  39. package/android-template/app/src/main/res/drawable/selector_radio_tint.xml +5 -0
  40. package/android-template/app/src/main/res/layout/activity_layout.xml +21 -0
  41. package/android-template/app/src/main/res/layout/dialog_picker.xml +101 -0
  42. package/android-template/app/src/main/res/mipmap-anydpi/ic_launcher.xml +6 -0
  43. package/android-template/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml +6 -0
  44. package/android-template/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  45. package/android-template/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  46. package/android-template/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  47. package/android-template/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  48. package/android-template/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  49. package/android-template/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  50. package/android-template/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  51. package/android-template/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  52. package/android-template/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  53. package/android-template/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  54. package/android-template/app/src/main/res/values/colors.xml +10 -0
  55. package/android-template/app/src/main/res/values/dimes.xml +6 -0
  56. package/android-template/app/src/main/res/values/strings.xml +3 -0
  57. package/android-template/app/src/main/res/values/themes.xml +13 -0
  58. package/android-template/app/src/main/res/xml/backup_rules.xml +13 -0
  59. package/android-template/app/src/main/res/xml/data_extraction_rules.xml +19 -0
  60. package/android-template/app/src/main/res/xml/network_security_config.xml +7 -0
  61. package/android-template/app/src/test/java/com/nostrappshell/app/ExampleUnitTest.kt +17 -0
  62. package/android-template/build.gradle.kts +5 -0
  63. package/android-template/gradle/gradle-daemon-jvm.properties +12 -0
  64. package/android-template/gradle/libs.versions.toml +41 -0
  65. package/android-template/gradle/wrapper/gradle-wrapper.jar +0 -0
  66. package/android-template/gradle/wrapper/gradle-wrapper.properties +9 -0
  67. package/android-template/gradle.properties +15 -0
  68. package/android-template/gradlew +251 -0
  69. package/android-template/gradlew.bat +94 -0
  70. package/android-template/settings.gradle.kts +27 -0
  71. package/bin/cli.js +10 -0
  72. package/bin/cli.ts +5 -0
  73. package/package.json +49 -0
@@ -0,0 +1,155 @@
1
+ package com.nostrappshell.app.signer
2
+
3
+ import android.app.Activity
4
+ import android.content.Context
5
+ import androidx.activity.result.ActivityResult
6
+ import com.nostrappshell.app.signer.interfaces.NostrSigner
7
+
8
+ class SignerManager(
9
+ private val context: Context,
10
+ private val launchAmber: (android.content.Intent) -> Unit
11
+ ) {
12
+
13
+ private val prefs =
14
+ context.getSharedPreferences(
15
+ "signer",
16
+ Context.MODE_PRIVATE
17
+ )
18
+
19
+
20
+ private var activeSigner: NostrSigner? = null
21
+
22
+
23
+ fun getActiveType(): SignerType? {
24
+
25
+ return prefs.getString(
26
+ "type",
27
+ null
28
+ )?.let {
29
+
30
+ SignerType.valueOf(it)
31
+
32
+ }
33
+
34
+ }
35
+
36
+
37
+ fun setActiveType(type: SignerType) {
38
+
39
+ prefs.edit()
40
+ .putString(
41
+ "type",
42
+ type.name
43
+ )
44
+ .apply()
45
+
46
+
47
+ activeSigner = null
48
+
49
+ }
50
+
51
+
52
+ fun getSigner(): NostrSigner {
53
+
54
+
55
+ if (activeSigner != null) {
56
+ return activeSigner!!
57
+ }
58
+
59
+
60
+ activeSigner =
61
+
62
+ when(getActiveType()) {
63
+
64
+ SignerType.AMBER -> {
65
+
66
+ if (!isAmberInstalled()) {
67
+
68
+ throw IllegalStateException(
69
+
70
+ "Amber signer is not installed. Please install Amber."
71
+
72
+ )
73
+
74
+ }
75
+
76
+ AmberSigner(
77
+
78
+ context,
79
+
80
+ launchAmber
81
+
82
+ )
83
+
84
+ }
85
+
86
+ SignerType.BUNKER -> {
87
+
88
+ FakeSigner()
89
+
90
+ }
91
+
92
+ null -> {
93
+
94
+ throw IllegalStateException(
95
+
96
+ "No signer selected"
97
+
98
+ )
99
+
100
+ }
101
+
102
+ else -> {
103
+
104
+ FakeSigner()
105
+
106
+ }
107
+
108
+ }
109
+
110
+
111
+ return activeSigner!!
112
+
113
+ }
114
+
115
+
116
+
117
+ fun handleAmberResult(
118
+ result: ActivityResult
119
+ ) {
120
+
121
+ val signer =
122
+ activeSigner
123
+
124
+
125
+ if (signer is AmberSigner) {
126
+
127
+ signer.handleResult(result)
128
+
129
+ }
130
+
131
+ }
132
+
133
+ private fun isAmberInstalled(): Boolean {
134
+
135
+ return try {
136
+
137
+ context.packageManager.getPackageInfo(
138
+
139
+ "com.greenart7c3.nostrsigner",
140
+
141
+ 0
142
+
143
+ )
144
+
145
+ true
146
+
147
+ } catch (e: Exception) {
148
+
149
+ false
150
+
151
+ }
152
+
153
+ }
154
+
155
+ }
@@ -0,0 +1,9 @@
1
+ package com.nostrappshell.app.signer
2
+
3
+ enum class SignerType {
4
+ AMBER,
5
+
6
+ BUNKER,
7
+ FAKE
8
+
9
+ }
@@ -0,0 +1,25 @@
1
+ package com.nostrappshell.app.signer.interfaces
2
+
3
+ interface NostrSigner {
4
+
5
+ suspend fun getPublicKey(): String
6
+
7
+ suspend fun signEvent(eventJson: String): String
8
+
9
+ suspend fun nip04Encrypt(
10
+
11
+ pubkey: String,
12
+
13
+ plaintext: String
14
+
15
+ ): String
16
+
17
+ suspend fun nip04Decrypt(
18
+
19
+ pubkey: String,
20
+
21
+ ciphertext: String
22
+
23
+ ): String
24
+
25
+ }
@@ -0,0 +1,11 @@
1
+ package com.nostrappshell.app.ui.theme
2
+
3
+ import androidx.compose.ui.graphics.Color
4
+
5
+ val Purple80 = Color(0xFFD0BCFF)
6
+ val PurpleGrey80 = Color(0xFFCCC2DC)
7
+ val Pink80 = Color(0xFFEFB8C8)
8
+
9
+ val Purple40 = Color(0xFF6650a4)
10
+ val PurpleGrey40 = Color(0xFF625b71)
11
+ val Pink40 = Color(0xFF7D5260)
@@ -0,0 +1,57 @@
1
+ package com.nostrappshell.app.ui.theme
2
+
3
+ import android.os.Build
4
+ import androidx.compose.foundation.isSystemInDarkTheme
5
+ import androidx.compose.material3.MaterialTheme
6
+ import androidx.compose.material3.darkColorScheme
7
+ import androidx.compose.material3.dynamicDarkColorScheme
8
+ import androidx.compose.material3.dynamicLightColorScheme
9
+ import androidx.compose.material3.lightColorScheme
10
+ import androidx.compose.runtime.Composable
11
+ import androidx.compose.ui.platform.LocalContext
12
+
13
+ private val DarkColorScheme = darkColorScheme(
14
+ primary = Purple80,
15
+ secondary = PurpleGrey80,
16
+ tertiary = Pink80
17
+ )
18
+
19
+ private val LightColorScheme = lightColorScheme(
20
+ primary = Purple40,
21
+ secondary = PurpleGrey40,
22
+ tertiary = Pink40
23
+
24
+ /* Other default colors to override
25
+ background = Color(0xFFFFFBFE),
26
+ surface = Color(0xFFFFFBFE),
27
+ onPrimary = Color.White,
28
+ onSecondary = Color.White,
29
+ onTertiary = Color.White,
30
+ onBackground = Color(0xFF1C1B1F),
31
+ onSurface = Color(0xFF1C1B1F),
32
+ */
33
+ )
34
+
35
+ @Composable
36
+ fun NostrAppShellTheme(
37
+ darkTheme: Boolean = isSystemInDarkTheme(),
38
+ // Dynamic color is available on Android 12+
39
+ dynamicColor: Boolean = true,
40
+ content: @Composable () -> Unit
41
+ ) {
42
+ val colorScheme = when {
43
+ dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
44
+ val context = LocalContext.current
45
+ if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
46
+ }
47
+
48
+ darkTheme -> DarkColorScheme
49
+ else -> LightColorScheme
50
+ }
51
+
52
+ MaterialTheme(
53
+ colorScheme = colorScheme,
54
+ typography = Typography,
55
+ content = content
56
+ )
57
+ }
@@ -0,0 +1,34 @@
1
+ package com.nostrappshell.app.ui.theme
2
+
3
+ import androidx.compose.material3.Typography
4
+ import androidx.compose.ui.text.TextStyle
5
+ import androidx.compose.ui.text.font.FontFamily
6
+ import androidx.compose.ui.text.font.FontWeight
7
+ import androidx.compose.ui.unit.sp
8
+
9
+ // Set of Material typography styles to start with
10
+ val Typography = Typography(
11
+ bodyLarge = TextStyle(
12
+ fontFamily = FontFamily.Default,
13
+ fontWeight = FontWeight.Normal,
14
+ fontSize = 16.sp,
15
+ lineHeight = 24.sp,
16
+ letterSpacing = 0.5.sp
17
+ )
18
+ /* Other default text styles to override
19
+ titleLarge = TextStyle(
20
+ fontFamily = FontFamily.Default,
21
+ fontWeight = FontWeight.Normal,
22
+ fontSize = 22.sp,
23
+ lineHeight = 28.sp,
24
+ letterSpacing = 0.sp
25
+ ),
26
+ labelSmall = TextStyle(
27
+ fontFamily = FontFamily.Default,
28
+ fontWeight = FontWeight.Medium,
29
+ fontSize = 11.sp,
30
+ lineHeight = 16.sp,
31
+ letterSpacing = 0.5.sp
32
+ )
33
+ */
34
+ )
@@ -0,0 +1,31 @@
1
+ package com.nostrappshell.app.utils
2
+
3
+ import android.content.Context
4
+ import android.content.SharedPreferences
5
+ import androidx.core.content.edit
6
+
7
+ object AppPreferences {
8
+ private const val NAME = "AppPreferences"
9
+ private const val MODE = Context.MODE_PRIVATE
10
+ private lateinit var preferences: SharedPreferences
11
+
12
+ fun init(context: Context) {
13
+ preferences = context.getSharedPreferences(NAME, MODE)
14
+ }
15
+
16
+ fun saveString(key: String, value: String) {
17
+ preferences.edit().putString(key, value).apply()
18
+ }
19
+
20
+ fun getString(key: String, defaultValue: String = ""): String {
21
+ return preferences.getString(key, defaultValue) ?: defaultValue
22
+ }
23
+
24
+ fun getBoolean(key: String, defaultValue: Boolean = true): Boolean {
25
+ return preferences.getBoolean(key, defaultValue) ?: defaultValue
26
+ }
27
+
28
+ fun saveBoolean(key: String, value: Boolean) {
29
+ preferences.edit { putBoolean(key, value) }
30
+ }
31
+ }
@@ -0,0 +1,40 @@
1
+ package com.nostrappshell.app.utils
2
+
3
+ import com.nostrappshell.app.R
4
+
5
+ import android.os.Bundle
6
+ import android.view.LayoutInflater
7
+ import android.view.View
8
+ import android.view.ViewGroup
9
+ import android.widget.Button
10
+ import android.widget.RadioGroup
11
+ import com.google.android.material.bottomsheet.BottomSheetDialogFragment
12
+ import com.nostrappshell.app.signer.SignerType
13
+
14
+ class SignerPickerBottomSheet (
15
+ private val onSignerSelected: (SignerType) -> Unit
16
+ ) : BottomSheetDialogFragment() {
17
+
18
+ override fun onCreateView(
19
+ inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
20
+ ): View? {
21
+ return inflater.inflate(R.layout.dialog_picker, container, false)
22
+ }
23
+
24
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
25
+ super.onViewCreated(view, savedInstanceState)
26
+
27
+ val radioGroup = view.findViewById<RadioGroup>(R.id.options_radio_group)
28
+ val btnConfirm = view.findViewById<Button>(R.id.button_confirm)
29
+
30
+ btnConfirm.setOnClickListener {
31
+ val selectedType = when (radioGroup.checkedRadioButtonId) {
32
+ R.id.radio_option_one -> SignerType.AMBER
33
+ R.id.radio_option_two -> SignerType.BUNKER
34
+ else -> SignerType.AMBER
35
+ }
36
+ onSignerSelected(selectedType)
37
+ dismiss()
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <shape xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <solid android:color="@android:color/white" />
4
+ <corners
5
+ android:topLeftRadius="24dp"
6
+ android:topRightRadius="24dp" />
7
+ </shape>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <rotate xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:fromDegrees="0"
4
+ android:pivotX="50%"
5
+ android:pivotY="50%"
6
+ android:toDegrees="360">
7
+
8
+ <shape
9
+ android:innerRadiusRatio="3"
10
+ android:shape="ring"
11
+ android:thicknessRatio="8"
12
+ android:useLevel="false">
13
+
14
+ <size
15
+ android:width="@dimen/loader_width"
16
+ android:height="@dimen/loader_height" />
17
+
18
+ <gradient
19
+ android:centerColor="#806200EE"
20
+ android:endColor="#FF6200EE"
21
+ android:startColor="@android:color/transparent"
22
+ android:type="sweep" />
23
+
24
+ </shape>
25
+ </rotate>
@@ -0,0 +1,170 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:width="108dp"
4
+ android:height="108dp"
5
+ android:viewportWidth="108"
6
+ android:viewportHeight="108">
7
+ <path
8
+ android:fillColor="#3DDC84"
9
+ android:pathData="M0,0h108v108h-108z" />
10
+ <path
11
+ android:fillColor="#00000000"
12
+ android:pathData="M9,0L9,108"
13
+ android:strokeWidth="0.8"
14
+ android:strokeColor="#33FFFFFF" />
15
+ <path
16
+ android:fillColor="#00000000"
17
+ android:pathData="M19,0L19,108"
18
+ android:strokeWidth="0.8"
19
+ android:strokeColor="#33FFFFFF" />
20
+ <path
21
+ android:fillColor="#00000000"
22
+ android:pathData="M29,0L29,108"
23
+ android:strokeWidth="0.8"
24
+ android:strokeColor="#33FFFFFF" />
25
+ <path
26
+ android:fillColor="#00000000"
27
+ android:pathData="M39,0L39,108"
28
+ android:strokeWidth="0.8"
29
+ android:strokeColor="#33FFFFFF" />
30
+ <path
31
+ android:fillColor="#00000000"
32
+ android:pathData="M49,0L49,108"
33
+ android:strokeWidth="0.8"
34
+ android:strokeColor="#33FFFFFF" />
35
+ <path
36
+ android:fillColor="#00000000"
37
+ android:pathData="M59,0L59,108"
38
+ android:strokeWidth="0.8"
39
+ android:strokeColor="#33FFFFFF" />
40
+ <path
41
+ android:fillColor="#00000000"
42
+ android:pathData="M69,0L69,108"
43
+ android:strokeWidth="0.8"
44
+ android:strokeColor="#33FFFFFF" />
45
+ <path
46
+ android:fillColor="#00000000"
47
+ android:pathData="M79,0L79,108"
48
+ android:strokeWidth="0.8"
49
+ android:strokeColor="#33FFFFFF" />
50
+ <path
51
+ android:fillColor="#00000000"
52
+ android:pathData="M89,0L89,108"
53
+ android:strokeWidth="0.8"
54
+ android:strokeColor="#33FFFFFF" />
55
+ <path
56
+ android:fillColor="#00000000"
57
+ android:pathData="M99,0L99,108"
58
+ android:strokeWidth="0.8"
59
+ android:strokeColor="#33FFFFFF" />
60
+ <path
61
+ android:fillColor="#00000000"
62
+ android:pathData="M0,9L108,9"
63
+ android:strokeWidth="0.8"
64
+ android:strokeColor="#33FFFFFF" />
65
+ <path
66
+ android:fillColor="#00000000"
67
+ android:pathData="M0,19L108,19"
68
+ android:strokeWidth="0.8"
69
+ android:strokeColor="#33FFFFFF" />
70
+ <path
71
+ android:fillColor="#00000000"
72
+ android:pathData="M0,29L108,29"
73
+ android:strokeWidth="0.8"
74
+ android:strokeColor="#33FFFFFF" />
75
+ <path
76
+ android:fillColor="#00000000"
77
+ android:pathData="M0,39L108,39"
78
+ android:strokeWidth="0.8"
79
+ android:strokeColor="#33FFFFFF" />
80
+ <path
81
+ android:fillColor="#00000000"
82
+ android:pathData="M0,49L108,49"
83
+ android:strokeWidth="0.8"
84
+ android:strokeColor="#33FFFFFF" />
85
+ <path
86
+ android:fillColor="#00000000"
87
+ android:pathData="M0,59L108,59"
88
+ android:strokeWidth="0.8"
89
+ android:strokeColor="#33FFFFFF" />
90
+ <path
91
+ android:fillColor="#00000000"
92
+ android:pathData="M0,69L108,69"
93
+ android:strokeWidth="0.8"
94
+ android:strokeColor="#33FFFFFF" />
95
+ <path
96
+ android:fillColor="#00000000"
97
+ android:pathData="M0,79L108,79"
98
+ android:strokeWidth="0.8"
99
+ android:strokeColor="#33FFFFFF" />
100
+ <path
101
+ android:fillColor="#00000000"
102
+ android:pathData="M0,89L108,89"
103
+ android:strokeWidth="0.8"
104
+ android:strokeColor="#33FFFFFF" />
105
+ <path
106
+ android:fillColor="#00000000"
107
+ android:pathData="M0,99L108,99"
108
+ android:strokeWidth="0.8"
109
+ android:strokeColor="#33FFFFFF" />
110
+ <path
111
+ android:fillColor="#00000000"
112
+ android:pathData="M19,29L89,29"
113
+ android:strokeWidth="0.8"
114
+ android:strokeColor="#33FFFFFF" />
115
+ <path
116
+ android:fillColor="#00000000"
117
+ android:pathData="M19,39L89,39"
118
+ android:strokeWidth="0.8"
119
+ android:strokeColor="#33FFFFFF" />
120
+ <path
121
+ android:fillColor="#00000000"
122
+ android:pathData="M19,49L89,49"
123
+ android:strokeWidth="0.8"
124
+ android:strokeColor="#33FFFFFF" />
125
+ <path
126
+ android:fillColor="#00000000"
127
+ android:pathData="M19,59L89,59"
128
+ android:strokeWidth="0.8"
129
+ android:strokeColor="#33FFFFFF" />
130
+ <path
131
+ android:fillColor="#00000000"
132
+ android:pathData="M19,69L89,69"
133
+ android:strokeWidth="0.8"
134
+ android:strokeColor="#33FFFFFF" />
135
+ <path
136
+ android:fillColor="#00000000"
137
+ android:pathData="M19,79L89,79"
138
+ android:strokeWidth="0.8"
139
+ android:strokeColor="#33FFFFFF" />
140
+ <path
141
+ android:fillColor="#00000000"
142
+ android:pathData="M29,19L29,89"
143
+ android:strokeWidth="0.8"
144
+ android:strokeColor="#33FFFFFF" />
145
+ <path
146
+ android:fillColor="#00000000"
147
+ android:pathData="M39,19L39,89"
148
+ android:strokeWidth="0.8"
149
+ android:strokeColor="#33FFFFFF" />
150
+ <path
151
+ android:fillColor="#00000000"
152
+ android:pathData="M49,19L49,89"
153
+ android:strokeWidth="0.8"
154
+ android:strokeColor="#33FFFFFF" />
155
+ <path
156
+ android:fillColor="#00000000"
157
+ android:pathData="M59,19L59,89"
158
+ android:strokeWidth="0.8"
159
+ android:strokeColor="#33FFFFFF" />
160
+ <path
161
+ android:fillColor="#00000000"
162
+ android:pathData="M69,19L69,89"
163
+ android:strokeWidth="0.8"
164
+ android:strokeColor="#33FFFFFF" />
165
+ <path
166
+ android:fillColor="#00000000"
167
+ android:pathData="M79,19L79,89"
168
+ android:strokeWidth="0.8"
169
+ android:strokeColor="#33FFFFFF" />
170
+ </vector>
@@ -0,0 +1,30 @@
1
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
2
+ xmlns:aapt="http://schemas.android.com/aapt"
3
+ android:width="108dp"
4
+ android:height="108dp"
5
+ android:viewportWidth="108"
6
+ android:viewportHeight="108">
7
+ <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
8
+ <aapt:attr name="android:fillColor">
9
+ <gradient
10
+ android:endX="85.84757"
11
+ android:endY="92.4963"
12
+ android:startX="42.9492"
13
+ android:startY="49.59793"
14
+ android:type="linear">
15
+ <item
16
+ android:color="#44000000"
17
+ android:offset="0.0" />
18
+ <item
19
+ android:color="#00000000"
20
+ android:offset="1.0" />
21
+ </gradient>
22
+ </aapt:attr>
23
+ </path>
24
+ <path
25
+ android:fillColor="#FFFFFF"
26
+ android:fillType="nonZero"
27
+ android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
28
+ android:strokeWidth="1"
29
+ android:strokeColor="#00000000" />
30
+ </vector>
@@ -0,0 +1,9 @@
1
+ <vector android:width="24dp"
2
+ android:height="24dp"
3
+ android:viewportWidth="24"
4
+ android:viewportHeight="24"
5
+ xmlns:android="http://schemas.android.com/apk/res/android">
6
+ <path
7
+ android:fillColor="#FF000000"
8
+ android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2设置 11.99,2zM18.92,8h-2.95c-0.32,-1.25 -0.78,-2.45 -1.38,-3.56 1.84,0.63 3.37,1.91 4.33,3.56zM12,4.04c0.83,1.2 1.48,2.53 1.91,3.96h-3.82c0.43,-1.43 1.08,-2.76 1.91,-3.96zM4.26,14c-0.16,-0.64 -0.26,-1.31 -0.26,-2s0.1,-1.36 0.26,-2h3.38c-0.08,0.66 -0.14,1.32 -0.14,2 0,0.68 0.06,1.34 0.14,2L4.26,14zM5.08,16h2.95c0.32,1.25 0.78,2.45 1.38,3.56 -1.84,-0.63 -3.37,-1.91 -4.33,-3.56zM8.03,8L5.08,8c0.96,-1.66 2.49,-2.93 4.33,-3.56 -0.6,1.11 -1.06,2.31 -1.38,3.56zM12,19.96c-0.83,-1.2 -1.48,-2.53 -1.91,-3.96h3.82c-0.43,1.43 -1.08,2.76 -1.91,3.96zM14.34,14L9.66,14c-0.09,-0.66 -0.16,-1.32 -0.16,-2 0,-0.68 0.07,-1.34 0.16,-2h4.68c0.09,0.66 0.16,1.32 0.16,2 0,0.68 -0.07,1.34 -0.16,2zM14.59,19.56c0.6,-1.11 1.06,-2.31 1.38,-3.56h2.95c-0.96,1.65 -2.49,2.93 -4.33,3.56zM16.36,14c0.08,-0.66 0.14,-1.32 0.14,-2 0,-0.68 -0.06,-1.34 -0.14,-2h3.38c0.16,0.64 0.26,1.31 0.26,2s-0.1,1.36 -0.26,2h-3.38z"/>
9
+ </vector>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <selector xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <item android:state_checked="true">
4
+ <shape>
5
+ <solid android:color="#F0F5FF" />
6
+ <stroke android:width="2dp" android:color="#2563EB" />
7
+ <corners android:radius="14dp" />
8
+ </shape>
9
+ </item>
10
+ <item android:state_checked="false">
11
+ <shape>
12
+ <solid android:color="#FFFFFF" />
13
+ <stroke android:width="1dp" android:color="#E5E7EB" />
14
+ <corners android:radius="14dp" />
15
+ </shape>
16
+ </item>
17
+ </selector>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <selector xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <item android:state_checked="true" android:drawable="@android:drawable/checkbox_on_background" />
4
+ <item android:state_checked="false" android:drawable="@android:color/transparent" />
5
+ </selector>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <selector xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <item android:state_checked="true" android:color="#2563EB" />
4
+ <item android:state_checked="false" android:color="#9CA3AF" />
5
+ </selector>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:id="@+id/mainContainer"
4
+ android:layout_width="match_parent"
5
+ android:layout_height="match_parent"
6
+ android:background="@color/white"
7
+ android:orientation="vertical">
8
+
9
+ <WebView
10
+ android:id="@+id/webView"
11
+ android:layout_width="match_parent"
12
+ android:layout_height="match_parent" />
13
+
14
+ <ProgressBar
15
+ android:id="@+id/loader"
16
+ android:layout_width="@dimen/loader_width"
17
+ android:layout_height="@dimen/loader_height"
18
+ android:layout_gravity="center"
19
+ android:indeterminateDrawable="@drawable/custom_loader" />
20
+
21
+ </FrameLayout>