~repos /only-bible-app

#kotlin#android#ios

git clone https://pyrossh.dev/repos/only-bible-app.git

The only bible app you will ever need. No ads. No in-app purchases. No distractions.


a7b21d8a Peter John

1 year ago
improve icon
.idea/deploymentTargetSelector.xml CHANGED
@@ -4,10 +4,10 @@
4
4
  <selectionStates>
5
5
  <SelectionState runConfigName="app">
6
6
  <option name="selectionMode" value="DROPDOWN" />
7
- <DropdownSelection timestamp="2024-06-05T08:06:31.463811Z">
7
+ <DropdownSelection timestamp="2024-06-05T18:00:57.687011Z">
8
8
  <Target type="DEFAULT_BOOT">
9
9
  <handle>
10
- <DeviceId pluginId="LocalEmulator" identifier="path=/Users/peterjohn/.android/avd/Pixel_3a_API_34_extension_level_7_arm64-v8a.avd" />
10
+ <DeviceId pluginId="PhysicalDevice" identifier="serial=RZCW218W9CK" />
11
11
  </handle>
12
12
  </Target>
13
13
  </DropdownSelection>
app/src/main/AndroidManifest.xml CHANGED
@@ -6,8 +6,8 @@
6
6
  android:allowBackup="true"
7
7
  android:dataExtractionRules="@xml/data_extraction_rules"
8
8
  android:fullBackupContent="@xml/backup_rules"
9
- android:icon="@mipmap/ic_launcher"
10
9
  android:label="@string/app_name"
10
+ android:icon="@mipmap/ic_launcher"
11
11
  android:roundIcon="@mipmap/ic_launcher_round"
12
12
  android:supportsRtl="true"
13
13
  android:theme="@style/Theme.BibleApp"
@@ -15,7 +15,6 @@
15
15
  <activity
16
16
  android:name=".MainActivity"
17
17
  android:exported="true"
18
- android:label="@string/app_name"
19
18
  android:theme="@style/Theme.BibleApp">
20
19
  <intent-filter>
21
20
  <action android:name="android.intent.action.MAIN" />
app/src/main/java/dev/pyros/bibleapp/Drawer.kt CHANGED
@@ -92,6 +92,60 @@ fun NonlazyGrid(
92
92
  }
93
93
  }
94
94
 
95
+ //@Composable
96
+ //private fun DropDownSample() {
97
+ // var expanded by remember { mutableStateOf(false) }
98
+ // var touchPoint: Offset by remember { mutableStateOf(Offset.Zero) }
99
+ // val density = LocalDensity.current
100
+ //
101
+ // BoxWithConstraints(
102
+ // Modifier
103
+ // .fillMaxSize()
104
+ // .background(Color.Cyan)
105
+ // .pointerInput(Unit) {
106
+ // detectTapGestures {
107
+ // Log.d("TAG", "onCreate: ${it}")
108
+ // touchPoint = it
109
+ // expanded = true
110
+ //
111
+ // }
112
+ //
113
+ // }
114
+ // ) {
115
+ // val (xDp, yDp) = with(density) {
116
+ // (touchPoint.x.toDp()) to (touchPoint.y.toDp())
117
+ // }
118
+ // DropdownMenu(
119
+ // expanded = expanded,
120
+ // offset = DpOffset(xDp, -maxHeight + yDp),
121
+ // onDismissRequest = {
122
+ // expanded = false
123
+ // }
124
+ // ) {
125
+ //
126
+ // DropdownMenuItem(
127
+ // onClick = {
128
+ // expanded = false
129
+ // },
130
+ // interactionSource = MutableInteractionSource(),
131
+ // text = {
132
+ // Text("Copy")
133
+ // }
134
+ // )
135
+ //
136
+ // DropdownMenuItem(
137
+ // onClick = {
138
+ // expanded = false
139
+ // },
140
+ // interactionSource = MutableInteractionSource(),
141
+ // text = {
142
+ // Text("Get Balance")
143
+ // }
144
+ // )
145
+ // }
146
+ // }
147
+ //}
148
+
95
149
  @Composable
96
150
  fun Drawer(
97
151
  navController: NavController,
@@ -101,6 +155,9 @@ fun Drawer(
101
155
  ) {
102
156
  val scope = rememberCoroutineScope()
103
157
  val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
158
+ var localBookIndex by rememberSaveable {
159
+ mutableStateOf(bookIndex)
160
+ }
104
161
  var menuType by rememberSaveable {
105
162
  mutableStateOf(MenuType.Chapter)
106
163
  }
@@ -176,15 +233,15 @@ fun Drawer(
176
233
  when (menuType) {
177
234
  MenuType.Bible -> ""
178
235
  MenuType.Book -> {
179
- setBookIndex(c)
236
+ localBookIndex = c
180
237
  menuType = MenuType.Chapter
181
238
  // navController.navigate(route = "/books/${c}/chapters/0")
182
239
  }
183
240
  MenuType.Chapter -> {
184
- navController.navigate(route = "/books/${bookIndex}/chapters/${c}")
241
+ navController.navigate(route = "/books/${localBookIndex}/chapters/${c}")
242
+ drawerState.close();
185
243
  }
186
244
  }
187
- drawerState.close();
188
245
  }
189
246
  }) {
190
247
  Text(
app/src/main/res/drawable/ic_launcher_background.xml CHANGED
@@ -5,166 +5,6 @@
5
5
  android:viewportWidth="108"
6
6
  android:viewportHeight="108">
7
7
  <path
8
- android:fillColor="#3DDC84"
8
+ android:fillColor="#AA504B"
9
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
10
  </vector>
app/src/main/res/drawable/ic_launcher_foreground.xml CHANGED
@@ -4,27 +4,14 @@
4
4
  android:height="108dp"
5
5
  android:viewportWidth="108"
6
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>
7
+ <group android:scaleX="0.8"
8
+ android:scaleY="0.8"
9
+ android:translateX="36"
10
+ android:translateY="24">
11
+ <path
12
+ android:pathData="M42.82,15.776L29.298,15.776L29.298,2.254C29.298,1.009 28.289,0 27.044,0L18.03,0C16.785,0 15.776,1.009 15.776,2.254L15.776,15.776L2.254,15.776C1.009,15.776 0,16.785 0,18.03L0,27.044C0,28.289 1.009,29.298 2.254,29.298L15.776,29.298L15.776,69.865C15.776,71.109 16.785,72.118 18.03,72.118L27.044,72.118C28.289,72.118 29.298,71.109 29.298,69.865L29.298,29.298L42.82,29.298C44.065,29.298 45.074,28.289 45.074,27.044L45.074,18.03C45.074,16.785 44.065,15.776 42.82,15.776Z"
13
+ android:fillColor="#FFB441"
14
+ android:fillType="nonZero"
15
+ android:strokeColor="#00000000"/>
16
+ </group>
17
+ </vector>
app/src/main/res/drawable/ic_launcher_monochrome.xml ADDED
@@ -0,0 +1,34 @@
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="30.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
+ <group android:scaleX="0.6"
25
+ android:scaleY="0.6"
26
+ android:translateX="40"
27
+ android:translateY="28">
28
+ <path
29
+ android:pathData="M42.82,15.776L29.298,15.776L29.298,2.254C29.298,1.009 28.289,0 27.044,0L18.03,0C16.785,0 15.776,1.009 15.776,2.254L15.776,15.776L2.254,15.776C1.009,15.776 0,16.785 0,18.03L0,27.044C0,28.289 1.009,29.298 2.254,29.298L15.776,29.298L15.776,69.865C15.776,71.109 16.785,72.118 18.03,72.118L27.044,72.118C28.289,72.118 29.298,71.109 29.298,69.865L29.298,29.298L42.82,29.298C44.065,29.298 45.074,28.289 45.074,27.044L45.074,18.03C45.074,16.785 44.065,15.776 42.82,15.776Z"
30
+ android:fillColor="#FFFFFF"
31
+ android:fillType="nonZero"
32
+ android:strokeColor="#00000000"/>
33
+ </group>
34
+ </vector>
app/src/main/res/mipmap-anydpi/ic_launcher.xml CHANGED
@@ -2,5 +2,5 @@
2
2
  <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3
3
  <background android:drawable="@drawable/ic_launcher_background" />
4
4
  <foreground android:drawable="@drawable/ic_launcher_foreground" />
5
- <monochrome android:drawable="@drawable/ic_launcher_foreground" />
5
+ <monochrome android:drawable="@drawable/ic_launcher_monochrome" />
6
6
  </adaptive-icon>
app/src/main/res/values/strings.xml CHANGED
@@ -1,3 +1,3 @@
1
1
  <resources>
2
- <string name="app_name">BibleApp</string>
2
+ <string name="app_name">Only Bible App</string>
3
3
  </resources>