Skip to content

Commit

Permalink
Update 4.0_r1
Browse files Browse the repository at this point in the history
  • Loading branch information
D4rK7355608 committed May 6, 2023
1 parent 8b3ef08 commit ad5a796
Show file tree
Hide file tree
Showing 52 changed files with 206 additions and 762 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

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

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Version 4.0_r1:
- Added language support for Hungarian.
- Reworked language system, making it more accurate and user-friendly.
- Reworked and improved animations.
- Fixed various bugs and improved readability, consistency, app performance, and responsiveness by optimizing and styling the outdated code.
- Made various under-the-hood improvements for a better overall app experience.

# Version 3.2_r1:
- Made various under-the-hood improvements for a better overall app experience.

Expand Down
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ android {
applicationId 'com.d4rk.englishwithlidia.plus'
minSdk 26
targetSdk 33
versionCode 51
versionName '3.2_r1'
versionCode 53
versionName '4.0_r1'
archivesBaseName = "${applicationId}-v${versionName}"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
resConfigs 'en', 'de', 'es', 'fr', 'hi', 'in', 'it', 'ja', 'ro', 'ru', 'tr', 'sv', 'bg', 'pl', 'uk'
resourceConfigurations += ['en', 'de', 'es', 'fr', 'hi', 'in', 'it', 'ja', 'ro', 'ru', 'tr', 'sv', 'bg', 'pl', 'uk']
}
buildTypes {
release {
Expand Down Expand Up @@ -56,13 +56,13 @@ dependencies {
implementation 'com.google.firebase:firebase-analytics-ktx:21.2.2'
implementation 'com.google.firebase:firebase-perf:20.3.1'
implementation 'com.google.android.gms:play-services-ads:22.0.0'
implementation 'com.google.android.material:material:1.8.0'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.1'
implementation 'com.google.android.play:review-ktx:2.0.1'
implementation 'com.google.android.play:app-update-ktx:2.0.1'
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-splashscreen:1.0.0'
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-process:2.6.1'
Expand Down
13 changes: 8 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@
android:exported="false"
android:label="@string/permissions"
android:parentActivityName=".ui.settings.permissions.PermissionsActivity"/>
<activity
android:name=".ui.settings.language.LanguageActivity"
android:exported="false"
android:label="@string/language"
android:parentActivityName=".ui.settings.language.LanguageActivity"/>
<activity
android:name=".ui.settings.faq.FaqActivity"
android:exported="false"
Expand All @@ -83,6 +78,14 @@
<action android:name="android.intent.action.APPLICATION_PREFERENCES"/>
</intent-filter>
</activity>
<service
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
android:enabled="false"
android:exported="false">
<meta-data
android:name="autoStoreLocales"
android:value="true"/>
</service>
<meta-data
android:name="firebase_performance_logcat_enabled"
android:value="true"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package com.d4rk.englishwithlidia.plus.ui.settings
import android.content.*
import android.net.Uri
import android.content.SharedPreferences
import android.content.Intent
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.os.Build
import android.os.Bundle
import android.provider.Settings
import android.view.View
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.os.LocaleListCompat
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceManager
Expand All @@ -16,7 +19,6 @@ import com.d4rk.englishwithlidia.plus.R
import com.d4rk.englishwithlidia.plus.databinding.ActivitySettingsBinding
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textview.MaterialTextView
class SettingsActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceChangeListener {
private lateinit var binding: ActivitySettingsBinding
override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -40,34 +42,12 @@ class SettingsActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferen
}
}
}
val languageCode = sharedPreferences?.getString(getString(R.string.key_language), getString(R.string.default_value_language))
AppCompatDelegate.setApplicationLocales(LocaleListCompat.forLanguageTags(languageCode))
}
class SettingsFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.preferences_settings, rootKey)
val moreApps: Preference? = findPreference(getString(R.string.key_more_apps))
moreApps?.setOnPreferenceClickListener {
val view: View = layoutInflater.inflate(R.layout.dialog_more_apps, null)
MaterialAlertDialogBuilder(requireContext())
.setTitle(R.string.more_apps)
.setIcon(R.drawable.ic_shop)
.setNegativeButton(android.R.string.cancel, null)
.setView(view)
.create()
.show()
val textViewMusicSleepTimer: MaterialTextView = view.findViewById(R.id.text_view_music_sleep_timer)
val textViewQRCodeScanner: MaterialTextView = view.findViewById(R.id.text_view_qr_code_scanner)
val textViewLowBrightness: MaterialTextView = view.findViewById(R.id.text_view_low_brightness)
val textViewCleaner: MaterialTextView = view.findViewById(R.id.text_view_cleaner)
val textViewAndroidStudioTutorialsKotlin: MaterialTextView = view.findViewById(R.id.text_view_android_studio_tutorials_kotlin)
val textViewAndroidStudioTutorialsJava: MaterialTextView = view.findViewById(R.id.text_view_android_studio_tutorials_java)
val textViewCartCalculator: MaterialTextView = view.findViewById(R.id.text_view_cart_calculator)
val urls = mapOf(textViewCartCalculator to "https://play.google.com/store/apps/details?id=com.d4rk.cartcalculator", textViewAndroidStudioTutorialsJava to "https://play.google.com/store/apps/details?id=com.d4rk.androidtutorials.java", textViewAndroidStudioTutorialsKotlin to "https://play.google.com/store/apps/details?id=com.d4rk.androidtutorials", textViewCleaner to "https://play.google.com/store/apps/details?id=com.d4rk.cleaner.plus", textViewMusicSleepTimer to "https://play.google.com/store/apps/details?id=com.d4rk.musicsleeptimer.plus", textViewQRCodeScanner to "https://play.google.com/store/apps/details?id=com.d4rk.qrcodescanner.plus", textViewLowBrightness to "https://play.google.com/store/apps/details?id=com.d4rk.lowbrightness")
urls.forEach { (view, url) -> view.setOnClickListener {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
}
}
true
}
val sharePreference = findPreference<Preference>(getString(R.string.key_share))
sharePreference?.setOnPreferenceClickListener {
val sharingIntent = Intent(Intent.ACTION_SEND).apply {
Expand Down Expand Up @@ -101,14 +81,7 @@ class SettingsActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferen
true
}
val deviceInfoPreference = findPreference<Preference>(getString(R.string.key_device_info))
val version = String.format(
resources.getString(R.string.app_build),
"${resources.getString(R.string.manufacturer)} ${Build.MANUFACTURER}",
"${resources.getString(R.string.device_model)} ${Build.MODEL}",
"${resources.getString(R.string.android_version)} ${Build.VERSION.RELEASE}",
"${resources.getString(R.string.api_level)} ${Build.VERSION.SDK_INT}",
"${resources.getString(R.string.arch)} ${Build.SUPPORTED_ABIS.joinToString()}"
)
val version = String.format(resources.getString(R.string.app_build), "${resources.getString(R.string.manufacturer)} ${Build.MANUFACTURER}", "${resources.getString(R.string.device_model)} ${Build.MODEL}", "${resources.getString(R.string.android_version)} ${Build.VERSION.RELEASE}", "${resources.getString(R.string.api_level)} ${Build.VERSION.SDK_INT}", "${resources.getString(R.string.arch)} ${Build.SUPPORTED_ABIS.joinToString()}")
deviceInfoPreference?.summary = version
deviceInfoPreference?.setOnPreferenceClickListener {
val clipboard = requireContext().getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit ad5a796

Please sign in to comment.