Skip to content

Commit

Permalink
Fixed #158(scrollbar issue) (#309)
Browse files Browse the repository at this point in the history
* 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](Kotlin/kotlinx.coroutines@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] <[email protected]>
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](Kotlin/kotlinx.coroutines@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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jean-Baptiste <[email protected]>

* 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](google/dagger@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](google/dagger@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] <[email protected]>
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](google/dagger@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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jean-Baptiste <[email protected]>

* 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](google/dagger@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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jean-Baptiste <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jean-Baptiste <[email protected]>
  • Loading branch information
3 people authored Aug 4, 2023
1 parent 0187544 commit 6251bb6
Show file tree
Hide file tree
Showing 14 changed files with 602 additions and 566 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down
104 changes: 51 additions & 53 deletions app/src/main/res/layout-land/fragment_about.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginBottom="80dp"
android:gravity="start"
tools:context=".fragments.about.AboutFragment"
tools:theme="@style/Theme.Exodus">
Expand All @@ -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" />

<LinearLayout
android:orientation="horizontal"
android:gravity="start"
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:gravity="center"
android:paddingHorizontal="20dp"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
android:id="@+id/imageView"
android:layout_width="96dp"
android:layout_height="96dp"
android:contentDescription="@string/app_logo"
android:src="@drawable/ic_logo" />

<TextView
android:id="@+id/appNameTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAlignment="center"
android:textColor="?android:textColorPrimary"
android:textSize="20sp" />
<ImageView
android:id="@+id/imageView"
android:layout_width="96dp"
android:layout_height="96dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar"
android:layout_marginStart="50dp"
android:contentDescription="@string/app_logo"
android:src="@drawable/ic_logo" />

<TextView
android:id="@+id/appVersionTV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:textAlignment="center"
android:textColor="?android:textColorPrimary"
android:textSize="15sp" />

</LinearLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/appNameTV"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="@id/imageView"
app:layout_constraintEnd_toEndOf="@id/imageView"
app:layout_constraintTop_toBottomOf="@id/imageView"
android:text="@string/app_name"
android:textAlignment="center"
android:textColor="?android:textColorPrimary"
android:textSize="20sp" />

<!--
Required ViewGroup for PreferenceFragmentCompat
False positive for id not in API < 24
-->
<FrameLayout
android:id="@android:id/list_container"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
tools:targetApi="n" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/appVersionTV"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="@id/imageView"
app:layout_constraintEnd_toEndOf="@id/imageView"
app:layout_constraintTop_toBottomOf="@id/appNameTV"
android:layout_marginTop="4dp"
android:textAlignment="center"
android:textColor="?android:textColorPrimary"
android:textSize="15sp" />

</LinearLayout>
<!--
Required ViewGroup for PreferenceFragmentCompat
False positive for id not in API < 24
-->
<FrameLayout
android:id="@android:id/list_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toEndOf="@id/imageView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar"
android:layout_marginStart="30dp"
tools:targetApi="n" />

</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
31 changes: 14 additions & 17 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragmentCoordinator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity"
tools:theme="@style/Theme.Exodus">

<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/fragmentCoordinator"
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragmentContainerView"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">

<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragmentContainerView"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultNavHost="true"
app:navGraph="@navigation/navigation_resource" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
android:layout_height="match_parent"
app:defaultNavHost="true"
app:navGraph="@navigation/navigation_resource" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:labelVisibilityMode="labeled"
app:menu="@menu/bottom_navigation" />
app:menu="@menu/bottom_navigation"
app:itemTextAppearanceActive="@style/Theme.Exodus.BottomNavTextActive"
app:itemTextAppearanceInactive="@style/Theme.Exodus.BottomNavTextInactive"/>

</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
71 changes: 38 additions & 33 deletions app/src/main/res/layout/fragment_a_d_trackers.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:context=".fragments.appdetail.subfrags.ADTrackersFragment"
tools:theme="@style/Theme.Exodus">

<LinearLayout
android:id="@+id/trackerTitleTV"
android:layout_width="match_parent"
<com.google.android.material.chip.Chip
android:id="@+id/trackersChip"
style="@style/Theme.Exodus.Chip"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">

<com.google.android.material.chip.Chip
android:id="@+id/trackersChip"
style="@style/Theme.Exodus.Chip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:chipIcon="@drawable/ic_tracker"
tools:text="0" />
app:chipIcon="@drawable/ic_tracker"
tools:text="0" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/trackers"
android:textColor="?android:textColorPrimary"
android:textSize="18sp" />
</LinearLayout>
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toEndOf="@id/trackersChip"
app:layout_constraintTop_toTopOf="@id/trackersChip"
app:layout_constraintBottom_toBottomOf="@id/trackersChip"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/trackers"
android:textColor="?android:textColorPrimary"
android:textSize="18sp" />

<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/trackersStatusTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/trackerTitleTV"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/trackersChip"
android:layout_marginTop="5dp"
android:text="@string/code_signature_not_found"
android:textSize="15sp" />
Expand All @@ -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" />

<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/trackersInfoTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/trackersRV"
android:layout_marginTop="15dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/trackersRV" android:layout_marginTop="15dp"
android:text="@string/tracker_info"
android:textSize="15sp" />

<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/trackersLearnTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/trackersInfoTV"
android:text="@string/learn_more"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/trackersInfoTV" android:text="@string/learn_more"
android:textColor="?android:textColorPrimary"
android:textSize="15sp" />

</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
6 changes: 4 additions & 2 deletions app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -22,7 +23,7 @@
android:contentDescription="@string/app_logo"
android:src="@drawable/ic_logo" />

<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/appNameTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -31,10 +32,11 @@
android:textColor="?android:textColorPrimary"
android:textSize="20sp" />

<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/appVersionTV"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginBottom="15dp"
android:textAlignment="center"
android:textColor="?android:textColorPrimary"
Expand Down
Loading

0 comments on commit 6251bb6

Please sign in to comment.