-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from JetPack Navigation to Compose Navigation (#218)
* Bump compile sdk and target sdk version to 34 and add navigation-compose dependency to demo app. * Rename DemoActivity to main activity. * Rename DemoApplication to MainApplication. * Remove Jetpack Navigation configuration from MainActivity. * Add compose navigation view. * Add hilt navigation compose to project. * Migrate test card approve order to Jetpack navigation compose. * Remove ApproveOrderFragment. * Remove features fragment from project. * Add Card Vault destination to project. * Remove VaultCardFragment from project. * Add PayPalWebView and remove PayPalWebFragment. * Add PayPalButtons view to compose navigation configuration. * Add PayPal Native flow to jetpack compose navigation configuration. * Remove SelectCardFragment. * Add onNewIntent override to MainActivity. * Remove action bar. * Add app bar to project. * Update title text based on current back stack entry destination. * Conditionally add back button to app bar. * Revert build.gradle androidTargetVersion to 30. * Clean up lint errors and unused imports. * Suppress long method lint error in Demo app until we find a better way to reduce line count of this composable. * Make code more DRY and extract NavDestinationChangeDisposableEffect. * Fix lint errors. * Fix package naming. * Cleanup Android lint errors and remove unecessary resource files. * Remove old Jetpack navigation dependencies that are no longer used. * Add links to Jetpack compose sample repo maintained by Google. * Remove log statement. * Cleanup unused import.
- Loading branch information
1 parent
0ab3d4b
commit 227eed9
Showing
34 changed files
with
484 additions
and
664 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.paypal.android | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import androidx.activity.compose.setContent | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.compose.foundation.ExperimentalFoundationApi | ||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import com.paypal.android.ui.DemoApp | ||
import dagger.hilt.android.AndroidEntryPoint | ||
|
||
@AndroidEntryPoint | ||
class MainActivity : AppCompatActivity() { | ||
|
||
@ExperimentalMaterial3Api | ||
@ExperimentalFoundationApi | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
DemoApp() | ||
} | ||
} | ||
|
||
override fun onNewIntent(newIntent: Intent) { | ||
super.onNewIntent(newIntent) | ||
intent = newIntent | ||
} | ||
} |
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
Oops, something went wrong.