Skip to content

Commit

Permalink
Updated to 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Sav22999 authored Sep 11, 2021
2 parents 55a67da + 12ad011 commit 7da5f82
Show file tree
Hide file tree
Showing 916 changed files with 14,280 additions and 2,662 deletions.
2 changes: 1 addition & 1 deletion .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 94 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions .idea/runConfigurations.xml

This file was deleted.

12 changes: 6 additions & 6 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,18 @@ You can specify these parameters:

#### Response

The system returns a `JSON` file, which has a counter from `1` , and it contains are two big section: `general` and `log`.
The system returns a `JSON` document, which has a counter from `1` , and it contains two big sections: `general` and `log`.

`general`:

| Key | Value | Explanation |
| ---------- | ---------- | ------------------------------------------------------------ |
| `id` | *Integer* | It's the id of the log in the database |
| `logDate` | *DateTime* | It's the data when the log was verified. |
| `date` | *DateTime* | It's the date when the log was added in the system |
| `id` | *Integer* | The id of the log entry in the database |
| `logDate` | *DateTime* | The date when the log happened. |
| `date` | *DateTime* | The log entry creation date |
| `language` | *String* | It's the language code you are using the app (`en`, `it`, ...) |
| `version` | *Integer* | It's the version code of the app (`90`, `91`, ...) |
| `source` | *String* | It indicates the source from you installed the app (GPS: Google Play Store, FD-GH: F-Droid/GitHub) |
| `version` | *Integer* | The version code of the app (`90`, `91`, ...) |
| `source` | *String* | It indicates the source from which you installed the app (`GPS`: Google Play Store, `FD-GH`: F-Droid/GitHub) |
| `logged` | `0` or `1` | It's an integer value `0` if you use the app "anonymously" (without log-in), `1` if you are logged in |

`log`:
Expand Down
Binary file modified app/GPS/release/app-GPS-release.aab
Binary file not shown.
10 changes: 3 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ android {

defaultConfig {
applicationId 'org.commonvoice.saverio'
minSdkVersion 23
minSdkVersion 26
targetSdkVersion 30
versionCode = 161
versionName '2.3.8'
versionCode = 173
versionName '2.4'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down Expand Up @@ -73,10 +73,6 @@ dependencies {
implementation Libs.constraintlayout
implementation Libs.navFragmentKtx
implementation Libs.navUiKtx
implementation Libs.viewModel
implementation Libs.viewModelSavedState
implementation Libs.liveData
implementation Libs.commonJava8
implementation Libs.legacySupport
testImplementation Libs.junit4
androidTestImplementation Libs.junitExt
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
android:name=".CommonVoice"
android:allowBackup="true"
android:configChanges="locale"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_cvproject_stable"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_cvproject_stable_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
android:hardwareAccelerated="true"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
<!--SplashScreen-->
<activity
Expand Down Expand Up @@ -53,15 +53,15 @@
<!-- SpeakActivity -->
<activity
android:name=".SpeakActivity"
android:hardwareAccelerated="true"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:label="@string/app_name"
android:theme="@style/AppTheme" />
<!-- ListenActivity -->
<activity
android:name=".ListenActivity"
android:hardwareAccelerated="true"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:label="@string/app_name"
android:theme="@style/AppTheme" />
<!-- LoginActivity -->
Expand Down Expand Up @@ -97,6 +97,8 @@
android:name=".NotAvailableNow"
android:label="@string/app_name"
android:theme="@style/AppTheme" />
<!-- NotificationReceiver -->
<receiver android:name=".utils.NotificationsDailyGoalReceiver" />
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
Expand Down
Binary file added app/src/main/ic_cvproject_beta-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 16 additions & 1 deletion app/src/main/java/org/commonvoice/saverio/DarkLightTheme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DarkLightTheme(
"dark" -> true
else -> {
val currentHour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY)
currentHour !in 8..17
currentHour !in mainPrefManager.hourTurnOnLightTheme..mainPrefManager.hourTurnOffLightTheme
}
}
}
Expand Down Expand Up @@ -392,6 +392,21 @@ class DarkLightTheme(
element.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize * transformTextSize)
}

fun setSpinner(
context: Context,
element: Spinner,
background_light: Int = R.drawable.spinner_background,
background_dark: Int = R.drawable.spinner_background_dark
) {
if (isDark) {
element.setBackgroundResource(background_dark)
element.setPopupBackgroundResource(background_dark)
} else {
element.setBackgroundResource(background_light)
element.setPopupBackgroundResource(background_light)
}
}

companion object {

private const val colorBackground: Int = R.color.colorBackground
Expand Down
Loading

0 comments on commit 7da5f82

Please sign in to comment.