-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
159 additions
and
21 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/f0x1d/logfox/extensions/APIExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.f0x1d.logfox.extensions | ||
|
||
import android.os.Build | ||
|
||
val isAtLeastAndroid13 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU | ||
|
||
val gesturesAvailable = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q | ||
val contrastedNavBarAvailable = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1 | ||
|
||
val notificationsChannelsAvailable = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O | ||
val shouldRequestNotificationsPermission = Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU | ||
val startForegroundServiceAvailable = notificationsChannelsAvailable | ||
|
||
val canPickJSON = Build.VERSION.SDK_INT >= Build.VERSION_CODES.R | ||
|
||
val uiModeManagerAvailable = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S | ||
val mutablePendingIntentAvailable = uiModeManagerAvailable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<androidx.fragment.app.FragmentContainerView | ||
android:id="@+id/nav_host_fragment_content_main" | ||
android:name="androidx.navigation.fragment.NavHostFragment" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
app:defaultNavHost="true" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@id/navigation_rail" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:navGraph="@navigation/nav_graph" /> | ||
|
||
<com.f0x1d.logfox.ui.view.CustomApplyInsetsNavigationRailView | ||
android:id="@+id/navigation_rail" | ||
android:layout_width="wrap_content" | ||
android:layout_height="0dp" | ||
app:itemTextAppearanceActive="@style/LogFoxBottomNavigationViewTextStyle" | ||
app:itemTextAppearanceInactive="@style/LogFoxBottomNavigationViewTextStyle" | ||
app:menu="@menu/main_menu" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintEnd_toStartOf="parent" | ||
app:layout_constraintBottom_toBottomOf="parent"/> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<androidx.fragment.app.FragmentContainerView | ||
android:id="@+id/nav_host_fragment_content_main" | ||
android:name="androidx.navigation.fragment.NavHostFragment" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
app:defaultNavHost="true" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintBottom_toTopOf="@id/bottom_navigation" | ||
app:navGraph="@navigation/nav_graph" /> | ||
|
||
<com.google.android.material.bottomnavigation.BottomNavigationView | ||
android:id="@+id/bottom_navigation" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
app:itemTextAppearanceActive="@style/LogFoxBottomNavigationViewTextStyle" | ||
app:itemTextAppearanceInactive="@style/LogFoxBottomNavigationViewTextStyle" | ||
app:menu="@menu/main_menu" | ||
app:layout_constraintTop_toBottomOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |