From 6251bb665ec88e40b8c26311bea948bf420461be Mon Sep 17 00:00:00 2001 From: the-weird-aquarian Date: Fri, 4 Aug 2023 15:49:16 +0000 Subject: [PATCH] Fixed #158(scrollbar issue) (#309) * fixed #158 * fixed margin bottom * constraint layout * reverted a_d_perms & rv_tracker_item layouts * fixed icon cropping * fixed icon cropping_2 * Bump org.jetbrains.kotlinx:kotlinx-coroutines-android (#310) Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.7.1 to 1.7.2. - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.7.1...1.7.2) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.jetbrains.kotlinx:kotlinx-coroutines-test from 1.7.1 to 1.7.2 (#311) Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-test](https://github.com/Kotlin/kotlinx.coroutines) from 1.7.1 to 1.7.2. - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.7.1...1.7.2) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-test dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jean-Baptiste <87148630+Jean-BaptisteC@users.noreply.github.com> * Bump hilt_version from 2.46.1 to 2.47 (#318) Bumps `hilt_version` from 2.46.1 to 2.47. Updates `com.google.dagger:hilt-compiler` from 2.46.1 to 2.47 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.46.1...dagger-2.47) Updates `com.google.dagger:hilt-android` from 2.46.1 to 2.47 - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.46.1...dagger-2.47) --- updated-dependencies: - dependency-name: com.google.dagger:hilt-compiler dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.google.dagger:hilt-android dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump com.google.dagger.hilt.android from 2.46.1 to 2.47 (#317) Bumps [com.google.dagger.hilt.android](https://github.com/google/dagger) from 2.46.1 to 2.47. - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.46.1...dagger-2.47) --- updated-dependencies: - dependency-name: com.google.dagger.hilt.android dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jean-Baptiste <87148630+Jean-BaptisteC@users.noreply.github.com> * Bump com.google.dagger:hilt-android-testing from 2.46.1 to 2.47 (#316) Bumps [com.google.dagger:hilt-android-testing](https://github.com/google/dagger) from 2.46.1 to 2.47. - [Release notes](https://github.com/google/dagger/releases) - [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/dagger/compare/dagger-2.46.1...dagger-2.47) --- updated-dependencies: - dependency-name: com.google.dagger:hilt-android-testing dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jean-Baptiste <87148630+Jean-BaptisteC@users.noreply.github.com> * Bump org.jetbrains.kotlinx:kotlinx-coroutines-test from 1.7.2 to 1.7.3 (#320) Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-test](https://github.com/Kotlin/kotlinx.coroutines) from 1.7.2 to 1.7.3. - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](https://github.com/Kotlin/kotlinx.coroutines/commits) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-test dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.jetbrains.kotlinx:kotlinx-coroutines-android (#319) Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.7.2 to 1.7.3. - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](https://github.com/Kotlin/kotlinx.coroutines/commits) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jean-Baptiste <87148630+Jean-BaptisteC@users.noreply.github.com> --- .../exodusprivacy/MainActivity.kt | 21 +- .../main/res/layout-land/fragment_about.xml | 104 +++-- app/src/main/res/layout/activity_main.xml | 31 +- .../main/res/layout/fragment_a_d_trackers.xml | 71 ++-- app/src/main/res/layout/fragment_about.xml | 6 +- .../main/res/layout/fragment_app_detail.xml | 371 ++++++++++-------- app/src/main/res/layout/fragment_apps.xml | 25 +- .../res/layout/fragment_tracker_detail.xml | 87 ++-- app/src/main/res/layout/fragment_trackers.xml | 18 +- .../res/layout/recycler_view_app_item.xml | 162 ++++---- .../layout/recycler_view_permission_item.xml | 60 +-- .../res/layout/shimmer_layout_app_item.xml | 163 ++++---- .../layout/shimmer_layout_tracker_item.xml | 40 +- app/src/main/res/values/styles.xml | 9 + 14 files changed, 602 insertions(+), 566 deletions(-) diff --git a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/MainActivity.kt b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/MainActivity.kt index 09190900..4c4842fb 100644 --- a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/MainActivity.kt +++ b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/MainActivity.kt @@ -40,19 +40,20 @@ class MainActivity : AppCompatActivity() { viewModel.networkConnection.observe(this) { connected -> Log.d(TAG, "Observing Network Connection.") if (!connected) { - Snackbar.make( - binding.fragmentCoordinator, R.string.not_connected, Snackbar.LENGTH_LONG - ).setAction(R.string.settings) { - try { - startActivity(Intent(Settings.ACTION_WIRELESS_SETTINGS)) - } catch (ex: android.content.ActivityNotFoundException) { + Snackbar + .make(binding.fragmentCoordinator, R.string.not_connected, Snackbar.LENGTH_LONG) + .setAnchorView(binding.bottomNavView) // Snackbar will appear above bottom nav view + .setAction(R.string.settings) { try { - startActivity(Intent(Settings.ACTION_WIFI_SETTINGS)) + startActivity(Intent(Settings.ACTION_WIRELESS_SETTINGS)) } catch (ex: android.content.ActivityNotFoundException) { - startActivity(Intent(Settings.ACTION_SETTINGS)) + try { + startActivity(Intent(Settings.ACTION_WIFI_SETTINGS)) + } catch (ex: android.content.ActivityNotFoundException) { + startActivity(Intent(Settings.ACTION_SETTINGS)) + } } - } - }.show() + }.show() } } diff --git a/app/src/main/res/layout-land/fragment_about.xml b/app/src/main/res/layout-land/fragment_about.xml index 52a7a22b..711c17a0 100644 --- a/app/src/main/res/layout-land/fragment_about.xml +++ b/app/src/main/res/layout-land/fragment_about.xml @@ -1,10 +1,11 @@ - @@ -13,60 +14,57 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" app:title="@string/title_about" /> - - - - - - - + - - - + - - + - + + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index e4aecddb..3942066c 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,33 +1,30 @@ - - - - - + android:layout_height="match_parent" + app:defaultNavHost="true" + app:navGraph="@navigation/navigation_resource" /> + app:menu="@menu/bottom_navigation" + app:itemTextAppearanceActive="@style/Theme.Exodus.BottomNavTextActive" + app:itemTextAppearanceInactive="@style/Theme.Exodus.BottomNavTextInactive"/> - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_a_d_trackers.xml b/app/src/main/res/layout/fragment_a_d_trackers.xml index 5105d571..fa07d000 100644 --- a/app/src/main/res/layout/fragment_a_d_trackers.xml +++ b/app/src/main/res/layout/fragment_a_d_trackers.xml @@ -1,42 +1,43 @@ - - - - + app:chipIcon="@drawable/ic_tracker" + tools:text="0" /> - - + - @@ -45,25 +46,29 @@ android:id="@+id/trackersRV" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_below="@+id/trackersStatusTV" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@id/trackersStatusTV" android:layout_marginTop="10dp" /> - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 47c3e198..b94612bd 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginBottom="80dp" android:gravity="center" android:orientation="vertical" tools:context=".fragments.about.AboutFragment" @@ -22,7 +23,7 @@ android:contentDescription="@string/app_logo" android:src="@drawable/ic_logo" /> - - - @@ -16,37 +16,30 @@ android:id="@+id/toolbarAD" android:layout_width="match_parent" android:layout_height="wrap_content" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" android:minHeight="?attr/actionBarSize" app:navigationIcon="@drawable/ic_back" /> - - - - - - + + - + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@id/appVersionTV" + android:layout_marginStart="30dp" + android:layout_marginTop="12dp" + android:text="@string/same_version" + android:textSize="15sp" + android:visibility="gone" + tools:visibility="visible"/> + + @@ -214,9 +245,11 @@ android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_below="@+id/tabLayout" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@id/tabLayout" android:paddingHorizontal="30dp" android:paddingVertical="10dp" /> - + diff --git a/app/src/main/res/layout/fragment_apps.xml b/app/src/main/res/layout/fragment_apps.xml index 469e3416..3978972b 100644 --- a/app/src/main/res/layout/fragment_apps.xml +++ b/app/src/main/res/layout/fragment_apps.xml @@ -1,23 +1,30 @@ - @@ -42,7 +49,10 @@ android:id="@+id/swipeRefreshLayout" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_below="@+id/toolbarApps" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@+id/toolbarApps" + android:layout_marginTop="?attr/actionBarSize" android:visibility="gone"> - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_tracker_detail.xml b/app/src/main/res/layout/fragment_tracker_detail.xml index d2fc6136..776f0f3b 100644 --- a/app/src/main/res/layout/fragment_tracker_detail.xml +++ b/app/src/main/res/layout/fragment_tracker_detail.xml @@ -9,7 +9,7 @@ tools:context=".fragments.trackerdetail.TrackerDetailFragment" tools:theme="@style/Theme.Exodus"> - @@ -17,15 +17,19 @@ android:id="@+id/toolbarTD" android:layout_width="match_parent" android:layout_height="wrap_content" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" android:minHeight="?attr/actionBarSize" app:navigationIcon="@drawable/ic_back" /> - - - - - - - - - - - + diff --git a/app/src/main/res/layout/fragment_trackers.xml b/app/src/main/res/layout/fragment_trackers.xml index 083f02e6..75058a55 100644 --- a/app/src/main/res/layout/fragment_trackers.xml +++ b/app/src/main/res/layout/fragment_trackers.xml @@ -1,9 +1,11 @@ - @@ -11,13 +13,18 @@ android:id="@+id/toolbarTrackers" android:layout_width="match_parent" android:layout_height="wrap_content" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" app:title="@string/title_trackers" /> @@ -43,7 +50,10 @@ android:id="@+id/swipeRefreshLayout" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_below="@+id/toolbarTrackers" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@+id/toolbarTrackers" + android:layout_marginTop="?attr/actionBarSize" android:visibility="gone"> - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/recycler_view_app_item.xml b/app/src/main/res/layout/recycler_view_app_item.xml index 810fa02c..00bdbb61 100644 --- a/app/src/main/res/layout/recycler_view_app_item.xml +++ b/app/src/main/res/layout/recycler_view_app_item.xml @@ -1,108 +1,94 @@ - - - - - - - - - - - + - + - - + - + app:layout_constraintStart_toEndOf="@id/appIconIV" + app:layout_constraintTop_toBottomOf="@id/appVersionTV" + android:layout_marginTop="8dp" + android:layout_marginStart="10dp" + app:chipIcon="@drawable/ic_tracker" + tools:text="0" /> - - - + - - + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/recycler_view_permission_item.xml b/app/src/main/res/layout/recycler_view_permission_item.xml index 1bc4670d..202a2850 100644 --- a/app/src/main/res/layout/recycler_view_permission_item.xml +++ b/app/src/main/res/layout/recycler_view_permission_item.xml @@ -1,53 +1,57 @@ - - - - + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toStartOf="@id/expandBT" + app:layout_constraintTop_toTopOf="parent" + android:layout_marginEnd="5dp" + android:textColor="?android:textColorPrimary" + android:textSize="17sp" + tools:text="CAMERA" /> - - + - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/shimmer_layout_app_item.xml b/app/src/main/res/layout/shimmer_layout_app_item.xml index 80d776e6..28e32402 100644 --- a/app/src/main/res/layout/shimmer_layout_app_item.xml +++ b/app/src/main/res/layout/shimmer_layout_app_item.xml @@ -1,110 +1,91 @@ - - - - - - - - - - - + - + - - + - + app:layout_constraintStart_toEndOf="@id/appIconIV" + app:layout_constraintTop_toBottomOf="@id/appVersionTV" + android:layout_marginTop="8dp" + android:layout_marginStart="10dp" + app:chipBackgroundColor="@color/colorGrey" + app:chipIcon="@drawable/ic_tracker" + app:chipIconTint="@color/colorGrey"/> - - - + - - + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/shimmer_layout_tracker_item.xml b/app/src/main/res/layout/shimmer_layout_tracker_item.xml index 73baa276..8c7d54c3 100644 --- a/app/src/main/res/layout/shimmer_layout_tracker_item.xml +++ b/app/src/main/res/layout/shimmer_layout_tracker_item.xml @@ -1,50 +1,34 @@ - - + android:layout_marginHorizontal="16dp" + android:background="@color/colorGrey"/> + app:trackThickness="30dp" /> - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 66f8ef59..f4d77a5e 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -40,4 +40,13 @@ + + + +