diff --git a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/MainActivity.kt b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/MainActivity.kt index a717ce4..fe9b48c 100644 --- a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/MainActivity.kt +++ b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/MainActivity.kt @@ -9,6 +9,7 @@ package com.microsoft.device.samples.dualscreenexperience.presentation import android.content.Intent import android.os.Bundle +import android.util.Log import android.view.Menu import android.view.MenuItem import android.view.View @@ -189,6 +190,7 @@ class MainActivity : AppCompatActivity() { if (windowLayoutInfo.isInDualMode() != layoutInfoViewModel.isDualMode.value) { tutorial.hide() invalidateOptionsMenu() + Log.i("HISTORY_TEST", "spanned") } layoutInfoViewModel.isDualMode.value = windowLayoutInfo.isInDualMode() layoutInfoViewModel.foldingFeature.value = windowLayoutInfo.getFoldingFeature() diff --git a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/MainNavigator.kt b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/MainNavigator.kt index 3762822..9fb45ce 100644 --- a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/MainNavigator.kt +++ b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/MainNavigator.kt @@ -7,6 +7,7 @@ package com.microsoft.device.samples.dualscreenexperience.presentation +import android.util.Log import androidx.navigation.FoldableNavController import androidx.navigation.FoldableNavOptions import com.microsoft.device.dualscreen.navigation.LaunchScreen @@ -33,62 +34,76 @@ class MainNavigator : StoreNavigator, CatalogNavigator, ProductNavigator, OrderN override fun navigateUp() { navController?.navigateUp() + Log.i("HISTORY_TEST", "navigateUp") } override fun navigateToStores() { val navOptions = FoldableNavOptions.Builder().setLaunchScreen(LaunchScreen.BOTH).build() navController?.navigate(R.id.navigation_stores_graph, null, navOptions) + Log.i("HISTORY_TEST", "navigateToStores") } override fun navigateToStoreList() { navController?.navigate(R.id.action_store_map_to_list) + Log.i("HISTORY_TEST", "navigateToStoreList") } override fun navigateToStoreDetailsFromList() { navController?.navigate(R.id.action_store_list_to_details) + Log.i("HISTORY_TEST", "navigateToStoreDetailsFromList") } override fun navigateToStoreDetailsFromMap() { navController?.navigate(R.id.action_store_map_to_details) + Log.i("HISTORY_TEST", "navigateToStoreDetailsFromMap") } override fun navigateToStoreListFromDetails() { navController?.navigate(R.id.action_store_details_to_list) + Log.i("HISTORY_TEST", "navigateToStoreListFromDetails") } override fun navigateToCatalog() { val navOptions = FoldableNavOptions.Builder().setLaunchScreen(LaunchScreen.BOTH).build() navController?.navigate(R.id.navigation_catalog_graph, null, navOptions) + Log.i("HISTORY_TEST", "navigateToCatalog") } override fun navigateToProducts() { val navOptions = FoldableNavOptions.Builder().setLaunchScreen(LaunchScreen.START).build() navController?.navigate(R.id.navigation_products_graph, null, navOptions) + Log.i("HISTORY_TEST", "navigateToProducts") } override fun navigateToProductDetails() { navController?.navigate(R.id.action_product_list_to_details) + Log.i("HISTORY_TEST", "navigateToProductDetails") } override fun navigateToProductCustomize() { navController?.navigate(R.id.action_product_details_to_customize) + Log.i("HISTORY_TEST", "navigateToProductCustomize") } override fun navigateToOrders() { val navOptions = FoldableNavOptions.Builder().setLaunchScreen(LaunchScreen.BOTH).build() navController?.navigate(R.id.navigation_orders_graph, null, navOptions) + Log.i("HISTORY_TEST", "navigateToOrders") } override fun navigateToOrderReceipt() { navController?.navigate(R.id.action_order_to_receipt) + Log.i("HISTORY_TEST", "navigateToOrderReceipt") } override fun navigateToHistory() { val navOptions = FoldableNavOptions.Builder().setLaunchScreen(LaunchScreen.BOTH).build() navController?.navigate(R.id.navigation_history_graph, null, navOptions) + Log.i("HISTORY_TEST", "navigateToHistory") } override fun navigateToHistoryDetails() { navController?.navigate(R.id.action_history_list_to_details) + Log.i("HISTORY_TEST", "navigateToHistoryDetails") } } diff --git a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/catalog/CatalogListFragment.kt b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/catalog/CatalogListFragment.kt index a672147..b973f31 100644 --- a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/catalog/CatalogListFragment.kt +++ b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/catalog/CatalogListFragment.kt @@ -8,6 +8,7 @@ package com.microsoft.device.samples.dualscreenexperience.presentation.catalog import android.content.Context import android.os.Bundle +import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -105,6 +106,12 @@ class CatalogListFragment : Fragment() { override fun onResume() { super.onResume() setupToolbar() + Log.i("HISTORY_TEST", "CatalogListFragment: onResume") + } + + override fun onPause() { + super.onPause() + Log.i("HISTORY_TEST", "CatalogListFragment: onPause") } private fun setupToolbar() { diff --git a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryDetailFragment.kt b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryDetailFragment.kt index 6821c4d..3fdd0c0 100644 --- a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryDetailFragment.kt +++ b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryDetailFragment.kt @@ -8,6 +8,7 @@ package com.microsoft.device.samples.dualscreenexperience.presentation.history import android.os.Bundle +import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -77,6 +78,12 @@ class HistoryDetailFragment : Fragment() { override fun onResume() { super.onResume() setupToolbar() + Log.i("HISTORY_TEST", "HistoryDetailFragment: onResume") + } + + override fun onPause() { + super.onPause() + Log.i("HISTORY_TEST", "HistoryDetailFragment: onPause") } private fun setupToolbar() { diff --git a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryListFragment.kt b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryListFragment.kt index 684062f..a39315a 100644 --- a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryListFragment.kt +++ b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryListFragment.kt @@ -9,6 +9,7 @@ package com.microsoft.device.samples.dualscreenexperience.presentation.history import android.content.Context import android.os.Bundle +import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -101,6 +102,12 @@ class HistoryListFragment : Fragment() { override fun onResume() { super.onResume() setupToolbar() + Log.i("HISTORY_TEST", "HistoryListFragment: onResume") + } + + override fun onPause() { + super.onPause() + Log.i("HISTORY_TEST", "HistoryListFragment: onPause") } private fun setupToolbar() { diff --git a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryViewModel.kt b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryViewModel.kt index bbc9c9e..9f616bd 100644 --- a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryViewModel.kt +++ b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/history/HistoryViewModel.kt @@ -7,6 +7,7 @@ package com.microsoft.device.samples.dualscreenexperience.presentation.history +import android.util.Log import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel @@ -30,6 +31,7 @@ class HistoryViewModel @Inject constructor( fun reset() { selectedOrder.value = null + Log.i("HISTORY_TEST", "HistoryViewModel reset") } fun onClick(model: Order) { diff --git a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/order/OrderFragment.kt b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/order/OrderFragment.kt index 3060cf2..6a594dc 100644 --- a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/order/OrderFragment.kt +++ b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/order/OrderFragment.kt @@ -9,6 +9,7 @@ package com.microsoft.device.samples.dualscreenexperience.presentation.order import android.content.Context import android.os.Bundle +import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -144,6 +145,12 @@ class OrderFragment : Fragment() { super.onResume() setupConfirmationObservers() changeToolbarTitle() + Log.i("HISTORY_TEST", "OrderFragment: onResume") + } + + override fun onPause() { + super.onPause() + Log.i("HISTORY_TEST", "OrderFragment: onPause") } private fun onWindowLayoutInfoChanged(windowLayoutInfo: WindowLayoutInfo) { diff --git a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/product/list/ProductListFragment.kt b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/product/list/ProductListFragment.kt index d2c5aa3..578d287 100644 --- a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/product/list/ProductListFragment.kt +++ b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/product/list/ProductListFragment.kt @@ -9,6 +9,7 @@ package com.microsoft.device.samples.dualscreenexperience.presentation.product.l import android.content.Context import android.os.Bundle +import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -75,6 +76,12 @@ class ProductListFragment : Fragment() { override fun onResume() { super.onResume() setupToolbar() + Log.i("HISTORY_TEST", "ProductListFragment: onResume") + } + + override fun onPause() { + super.onPause() + Log.i("HISTORY_TEST", "ProductListFragment: onPause") } private fun setupToolbar() { diff --git a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/store/map/StoreMapFragment.kt b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/store/map/StoreMapFragment.kt index ab58a24..89c2bed 100644 --- a/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/store/map/StoreMapFragment.kt +++ b/app/src/main/java/com/microsoft/device/samples/dualscreenexperience/presentation/store/map/StoreMapFragment.kt @@ -9,6 +9,7 @@ package com.microsoft.device.samples.dualscreenexperience.presentation.store.map import android.content.Context import android.os.Bundle +import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -281,11 +282,13 @@ class StoreMapFragment : Fragment() { override fun onResume() { super.onResume() mapController.onResume(mapView) + Log.i("HISTORY_TEST", "StoreMapFragment: onResume") } override fun onPause() { super.onPause() mapController.onPause(mapView) + Log.i("HISTORY_TEST", "StoreMapFragment: onPause") } override fun onStop() {