Skip to content

Commit

Permalink
Random pre-compose commit
Browse files Browse the repository at this point in the history
  • Loading branch information
D4rK7355608 committed May 2, 2024
1 parent eb3d481 commit 5805e68
Show file tree
Hide file tree
Showing 20 changed files with 126 additions and 81 deletions.
28 changes: 28 additions & 0 deletions .idea/appInsightsSettings.xml

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

17 changes: 5 additions & 12 deletions .idea/deploymentTargetDropDown.xml

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

5 changes: 2 additions & 3 deletions .idea/gradle.xml

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

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.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

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

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

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

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Version 3.1_r1:
- Made various under-the-hood improvements for a better overall app experience.

# Version 3.0_r3:
- Added tooltips for all buttons.
- Made minor under-the-hood improvements for a better overall app experience.
Expand Down
36 changes: 18 additions & 18 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId 'com.d4rk.cartcalculator'
minSdk 26
targetSdk 33
versionCode 18
versionName '3.0_r3'
versionCode 21
versionName '4.0.0'
archivesBaseName = "${applicationId}-v${versionName}"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
resourceConfigurations += ['en', 'de', 'es', 'fr', 'hi', 'hu', 'in', 'it', 'ja', 'ro', 'ru', 'tr', 'sv', 'bg', 'pl', 'uk']
Expand Down Expand Up @@ -52,29 +52,29 @@ android {
}
}
dependencies {
implementation 'com.google.firebase:firebase-crashlytics-ktx:18.3.7'
implementation 'com.google.firebase:firebase-analytics-ktx:21.3.0'
implementation 'com.google.firebase:firebase-perf:20.3.3'
implementation 'com.google.android.gms:play-services-ads:22.1.0'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.firebase:firebase-crashlytics-ktx:18.6.2'
implementation 'com.google.firebase:firebase-analytics-ktx:21.5.1'
implementation 'com.google.firebase:firebase-perf:20.5.2'
implementation 'com.google.android.gms:play-services-ads:22.2.0'
implementation 'com.google.android.material:material:1.11.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.1.0'
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
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'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.6.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.6.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.6.0'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
implementation 'androidx.lifecycle:lifecycle-process:2.7.0'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.7.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.7'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.airbnb.android:lottie:6.0.1'
implementation 'me.zhanghai.android.fastscroll:library:1.2.0'
implementation 'com.airbnb.android:lottie:6.1.0'
implementation 'me.zhanghai.android.fastscroll:library:1.3.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
Expand Down
Binary file not shown.
26 changes: 13 additions & 13 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
android:theme="@style/AppThemeActionBar"
android:localeConfig="@xml/locales_config"
tools:targetApi="33">
<activity
android:name=".ui.startup.StartupActivity"
android:theme="@style/AppThemeStartup" />
<activity
android:name=".MainActivity"
android:exported="true"
Expand All @@ -42,14 +45,6 @@
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts"/>
</activity>
<activity
android:name=".ui.startup.StartupActivity"
android:theme="@style/AppThemeStartup"/>
<activity
android:name=".ui.help.HelpActivity"
android:exported="false"
android:label="@string/help"
android:parentActivityName=".ui.help.HelpActivity"/>
<activity
android:name=".ui.settings.SettingsActivity"
android:exported="false"
Expand All @@ -59,6 +54,16 @@
<action android:name="android.intent.action.APPLICATION_PREFERENCES"/>
</intent-filter>
</activity>
<activity
android:name=".ui.settings.permissions.PermissionsActivity"
android:exported="false"
android:label="@string/permissions"
android:parentActivityName=".ui.settings.permissions.PermissionsActivity" />
<activity
android:name=".ui.help.HelpActivity"
android:exported="false"
android:label="@string/help"
android:parentActivityName=".ui.help.HelpActivity" />
<service
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
android:enabled="false"
Expand All @@ -67,11 +72,6 @@
android:name="autoStoreLocales"
android:value="true"/>
</service>
<activity
android:name=".ui.settings.permissions.PermissionsActivity"
android:exported="false"
android:label="@string/permissions"
android:parentActivityName=".ui.settings.permissions.PermissionsActivity"/>
<meta-data
android:name="firebase_performance_logcat_enabled"
android:value="true"/>
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/kotlin/com/d4rk/cartcalculator/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import com.d4rk.cartcalculator.databinding.ActivityMainBinding
import com.d4rk.cartcalculator.notifications.AppUpdateNotificationsManager
import com.d4rk.cartcalculator.notifications.AppUsageNotificationsManager
import com.d4rk.cartcalculator.ui.startup.StartupActivity
import com.google.android.gms.ads.AdRequest
import com.google.android.gms.ads.AdView
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.navigation.NavigationView
import com.google.android.material.textfield.TextInputEditText
Expand Down Expand Up @@ -84,6 +86,8 @@ class MainActivity : AppCompatActivity() {
override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
R.id.add_to_cart -> {
val dialogView = LayoutInflater.from(this).inflate(R.layout.dialog_add_to_cart, null)
val adView = dialogView.findViewById<AdView>(R.id.ad_view)
adView.loadAd(AdRequest.Builder().build())
MaterialAlertDialogBuilder(this)
.setView(dialogView)
.setPositiveButton(android.R.string.ok) { _, _ ->
Expand Down Expand Up @@ -154,7 +158,6 @@ class MainActivity : AppCompatActivity() {
.setTitle(R.string.close)
.setMessage(R.string.summary_close)
.setPositiveButton(android.R.string.ok) { _, _ ->
@Suppress("DEPRECATION")
super.onBackPressed()
moveTaskToBack(true)
}
Expand Down Expand Up @@ -192,7 +195,6 @@ class MainActivity : AppCompatActivity() {
}
@Deprecated("Deprecated in Java")
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
@Suppress("DEPRECATION")
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == requestUpdateCode) {
when (resultCode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import com.google.android.gms.ads.MobileAds
import com.google.android.gms.ads.appopen.AppOpenAd
import java.util.Date
private const val AD_UNIT_ID = "ca-app-pub-5294151573817700/9208287867"

class AppOpenAdManager : MultiDexApplication(), Application.ActivityLifecycleCallbacks,
LifecycleObserver {
LifecycleObserver {
private lateinit var appOpenAdManager: AppOpenAdManager
private var currentActivity: Activity? = null
override fun onCreate() {
Expand Down Expand Up @@ -79,9 +80,9 @@ class AppOpenAdManager : MultiDexApplication(), Application.ActivityLifecycleCal
return appOpenAd != null && wasLoadTimeLessThanNHoursAgo(4)
}
fun showAdIfAvailable(activity: Activity) {
showAdIfAvailable(activity, object : OnShowAdCompleteListener {
override fun onShowAdComplete() {
}
showAdIfAvailable(activity, object : OnShowAdCompleteListener {
override fun onShowAdComplete() {
}
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ import java.text.SimpleDateFormat
import java.util.Locale
import java.util.Calendar
class AboutFragment : Fragment() {
private lateinit var _binding: FragmentAboutBinding
private val binding get() = _binding
private lateinit var binding: FragmentAboutBinding
private val calendar: Calendar = Calendar.getInstance()
private var originalNavBarColor: Int? = null
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
ViewModelProvider(this)[ViewModel::class.java]
_binding = FragmentAboutBinding.inflate(inflater, container, false)
binding = FragmentAboutBinding.inflate(inflater, container, false)
originalNavBarColor = activity?.window?.navigationBarColor
setOriginalNavigationBarColor()
FastScrollerBuilder(binding.scrollView).useMd2Style().build()
Expand Down Expand Up @@ -75,7 +74,6 @@ class AboutFragment : Fragment() {
override fun onDestroyView() {
super.onDestroyView()
activity?.window?.navigationBarColor = originalNavBarColor!!
_binding
}

private fun setOriginalNavigationBarColor() {
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/layout/dialog_add_to_cart.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<me.zhanghai.android.fastscroll.FastScrollScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
Expand Down Expand Up @@ -50,5 +51,19 @@
android:layout_height="wrap_content"
android:hint="@string/hint_quantity"
android:inputType="number"/>

<com.google.android.material.card.MaterialCardView
android:id="@+id/card_view_ad"
style="@style/Widget.Material3.CardView.Outlined"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.google.android.gms.ads.AdView
android:id="@+id/ad_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adSize="FULL_BANNER"
ads:adUnitId="ca-app-pub-5294151573817700/8040893463" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</me.zhanghai.android.fastscroll.FastScrollScrollView>
10 changes: 5 additions & 5 deletions app/src/main/res/values/keys.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<resources>
<string name="key_theme" translatable="false">theme</string>
<string name="default_value_theme" translatable="false">MODE_NIGHT_FOLLOW_SYSTEM</string>
<string name="key_language" translatable="false">language</string>
<string name="default_value_language" translatable="false">en</string>
<string name="key_notifications_settings" translatable="false">notifications_settings</string>
<string name="key_firebase" translatable="false">firebase</string>
<string name="key_feedback" translatable="false">feedback</string>
<string name="key_changelog" translatable="false">changelog</string>
<string name="key_notifications_settings" translatable="false">notifications_settings</string>
<string name="key_open_source_licenses" translatable="false">open_source_licenses</string>
<string name="key_share" translatable="false">share</string>
<string name="key_device_info" translatable="false">device_info</string>
<string name="key_open_source_licenses" translatable="false">open_source_licenses</string>
<string name="default_value_theme" translatable="false">MODE_NIGHT_FOLLOW_SYSTEM</string>
<string name="default_value_language" translatable="false">en</string>
<string name="key_feedback" translatable="false">feedback</string>
</resources>
10 changes: 5 additions & 5 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<resources>
<string name="app_short_description">Efficiently manage and calculate your cart items with Cart Calculator. 🛒</string>
<string name="app_usage_notifications">App Usage Notifications</string>
<string name="update_notifications">Update Notifications</string>
<string name="welcome">Welcome</string>
<string name="browse_terms_of_service_and_privacy_policy">Browse the <i><u>Terms of Service</u></i> and <i><u>Privacy Policy</u></i></string>
<string name="agree">Agree</string>
<string name="home">Home</string>
<string name="refresh">Refresh</string>
<string name="add_to_cart">Add to Cart</string>
Expand Down Expand Up @@ -53,11 +58,6 @@
<string name="music">Music</string>
<string name="made_in">Made with ❤ in Romania!</string>
<string name="copyright">© Copyright %1$s, made by D4rK!</string>
<string name="app_usage_notifications">App Usage Notifications</string>
<string name="update_notifications">Update Notifications</string>
<string name="agree">Agree</string>
<string name="browse_terms_of_service_and_privacy_policy">Browse the <i><u>Terms of Service</u></i> and <i><u>Privacy Policy</u></i></string>
<string name="welcome">Welcome</string>
<string name="copied_to_clipboard">Copied to clipboard!</string>
<string name="close">Close?</string>
<string name="internet">Internet [INTERNET]</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values/untranslatable_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<string name="send_email_using" translatable="false">Send mail using:</string>
<string name="changelog_title" translatable="false">Changelog - Version %1s</string>
<string name="changes" translatable="false">\n
• Added tooltips for all buttons.\n\n
• Made minor under-the-hood improvements for a better overall app experience.
• Made various under-the-hood improvements for a better overall app experience.
</string>
</resources>
Loading

0 comments on commit 5805e68

Please sign in to comment.