forked from mutualmobile/Praxis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mutualmobile#35 from mutualmobile/praxis_slack
added slack features as sample feature modules and fixed styling and problems with navigation
- Loading branch information
Showing
194 changed files
with
4,802 additions
and
2,322 deletions.
There are no files selected for viewing
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,37 @@ | ||
name: Minimal Android CI Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: Run Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Unit tests | ||
run: bash ./gradlew test --stacktrace | ||
build_apk: | ||
name: Generate APK | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Setup JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Build APK | ||
run: bash ./gradlew assembleRelease --stacktrace | ||
- name: Upload APK | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build_release_apk | ||
path: app/build/outputs/apk/release/app-release.apk | ||
retention-days: 2 |
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 was deleted.
Oops, something went wrong.
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
48 changes: 38 additions & 10 deletions
48
app/src/main/java/com/mutualmobile/praxis/root/MainActivity.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 |
---|---|---|
@@ -1,30 +1,58 @@ | ||
package com.mutualmobile.praxis.root | ||
|
||
import android.os.Bundle | ||
import androidx.activity.compose.setContent | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.compose.runtime.LaunchedEffect | ||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen | ||
import androidx.core.view.WindowCompat | ||
import androidx.databinding.DataBindingUtil | ||
import com.mutualmobile.praxis.R | ||
import com.mutualmobile.praxis.databinding.ActivityMainBinding | ||
import androidx.navigation.compose.NavHost | ||
import androidx.navigation.compose.rememberNavController | ||
import com.google.accompanist.insets.ProvideWindowInsets | ||
import com.mutualmobile.feat.jokes.nav.jokesNavGraph | ||
import dagger.hilt.android.AndroidEntryPoint | ||
import com.mutualmobile.praxis.navigator.ComposeNavigator | ||
import com.mutualmobile.praxis.navigator.PraxisRoute | ||
import com.mutualmobile.praxis.uidashboard.nav.dashboardNavigation | ||
import com.mutualmobile.praxis.uionboarding.nav.onboardingNavigation | ||
import com.praxis.feat.authentication.nav.authNavGraph | ||
import javax.inject.Inject | ||
|
||
@AndroidEntryPoint | ||
class MainActivity : AppCompatActivity() { | ||
|
||
private lateinit var binding: ActivityMainBinding | ||
@Inject | ||
lateinit var composeNavigator: ComposeNavigator | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
WindowCompat.setDecorFitsSystemWindows(window, false) | ||
|
||
// Installing the Splash Screen here | ||
installSplashScreen() | ||
setContent { | ||
val navController = rememberNavController() | ||
|
||
LaunchedEffect(Unit) { | ||
composeNavigator.handleNavigationCommands(navController) | ||
} | ||
|
||
ProvideWindowInsets(windowInsetsAnimationsEnabled = true) { | ||
NavHost( | ||
navController = navController, | ||
startDestination = PraxisRoute.OnBoarding.name, | ||
) { | ||
onboardingNavigation( | ||
composeNavigator = composeNavigator, | ||
) | ||
dashboardNavigation( | ||
composeNavigator = composeNavigator | ||
) | ||
authNavGraph() | ||
jokesNavGraph() | ||
} | ||
} | ||
|
||
// Displaying edge-to-edge | ||
// Turn off the decor fitting system windows, which allows us to handle insets, including IME animations | ||
// This app draws behind the system bars, so we want to handle fitting system windows | ||
WindowCompat.setDecorFitsSystemWindows(window, false) | ||
binding = DataBindingUtil.setContentView(this, R.layout.activity_main) | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.