Browse Source
Migrate Navigation to 2.4.0-alpha4
Migrate Navigation to 2.4.0-alpha4
1. 2.4.0 introduces multistack navigation. Which removes the need for NavigationExtensions 2. Organised all nav graphs into a single graph to remove global action redundancy.renovate/androidx.fragment-fragment-ktx-1.x
57 changed files with 2524 additions and 3208 deletions
-
7app/build.gradle
-
376app/src/main/java/awais/instagrabber/activities/MainActivity.kt
-
120app/src/main/java/awais/instagrabber/customviews/NavHostFragmentWithDefaultAnimations.java
-
20app/src/main/java/awais/instagrabber/dialogs/TabOrderPreferenceDialogFragment.java
-
83app/src/main/java/awais/instagrabber/fragments/CollectionPostsFragment.java
-
47app/src/main/java/awais/instagrabber/fragments/FavoritesFragment.kt
-
11app/src/main/java/awais/instagrabber/fragments/FollowViewerFragment.java
-
137app/src/main/java/awais/instagrabber/fragments/HashTagFragment.java
-
20app/src/main/java/awais/instagrabber/fragments/LikesViewerFragment.java
-
112app/src/main/java/awais/instagrabber/fragments/LocationFragment.java
-
34app/src/main/java/awais/instagrabber/fragments/NotificationsViewerFragment.java
-
103app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java
-
5app/src/main/java/awais/instagrabber/fragments/SavedCollectionsFragment.java
-
74app/src/main/java/awais/instagrabber/fragments/SavedViewerFragment.java
-
28app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java
-
25app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java
-
60app/src/main/java/awais/instagrabber/fragments/TopicPostsFragment.java
-
16app/src/main/java/awais/instagrabber/fragments/UserSearchFragment.java
-
7app/src/main/java/awais/instagrabber/fragments/UserSearchMode.kt
-
2app/src/main/java/awais/instagrabber/fragments/comments/CommentsViewerFragment.java
-
27app/src/main/java/awais/instagrabber/fragments/comments/Helper.java
-
28app/src/main/java/awais/instagrabber/fragments/comments/RepliesFragment.java
-
10app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageInboxFragment.kt
-
57app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageSettingsFragment.kt
-
161app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java
-
2app/src/main/java/awais/instagrabber/fragments/directmessages/DirectPendingInboxFragment.kt
-
26app/src/main/java/awais/instagrabber/fragments/main/DiscoverFragment.java
-
92app/src/main/java/awais/instagrabber/fragments/main/FeedFragment.java
-
118app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.kt
-
23app/src/main/java/awais/instagrabber/fragments/search/SearchFragment.java
-
27app/src/main/java/awais/instagrabber/fragments/settings/GeneralPreferencesFragment.java
-
136app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java
-
12app/src/main/java/awais/instagrabber/models/Tab.kt
-
494app/src/main/java/awais/instagrabber/utils/NavigationExtensions.java
-
162app/src/main/java/awais/instagrabber/utils/NavigationHelper.kt
-
120app/src/main/java/awais/instagrabber/utils/Utils.java
-
8app/src/main/java/awais/instagrabber/viewmodels/UserSearchViewModel.java
-
2app/src/main/res/layout/activity_main.xml
-
78app/src/main/res/navigation/comments_nav_graph.xml
-
216app/src/main/res/navigation/direct_messages_nav_graph.xml
-
155app/src/main/res/navigation/discover_nav_graph.xml
-
70app/src/main/res/navigation/favorites_nav_graph.xml
-
159app/src/main/res/navigation/feed_nav_graph.xml
-
130app/src/main/res/navigation/hashtag_nav_graph.xml
-
48app/src/main/res/navigation/likes_nav_graph.xml
-
129app/src/main/res/navigation/location_nav_graph.xml
-
205app/src/main/res/navigation/more_nav_graph.xml
-
894app/src/main/res/navigation/nav_graph.xml
-
126app/src/main/res/navigation/notification_viewer_nav_graph.xml
-
223app/src/main/res/navigation/profile_nav_graph.xml
-
119app/src/main/res/navigation/saved_nav_graph.xml
-
188app/src/main/res/navigation/settings_nav_graph.xml
-
49app/src/main/res/navigation/story_list_nav_graph.xml
-
80app/src/main/res/navigation/user_search_nav_graph.xml
-
54app/src/main/res/values/arrays.xml
-
11app/src/main/res/values/ids.xml
-
6build.gradle
@ -1,60 +1,60 @@ |
|||
package awais.instagrabber.customviews; |
|||
|
|||
import android.os.Bundle; |
|||
|
|||
import androidx.annotation.NavigationRes; |
|||
import androidx.annotation.NonNull; |
|||
import androidx.annotation.Nullable; |
|||
import androidx.navigation.NavController; |
|||
import androidx.navigation.Navigator; |
|||
import androidx.navigation.fragment.FragmentNavigator; |
|||
import androidx.navigation.fragment.NavHostFragment; |
|||
|
|||
public class NavHostFragmentWithDefaultAnimations extends NavHostFragment { |
|||
private static final String KEY_GRAPH_ID = "android-support-nav:fragment:graphId"; |
|||
private static final String KEY_START_DESTINATION_ARGS = |
|||
"android-support-nav:fragment:startDestinationArgs"; |
|||
private static final String KEY_NAV_CONTROLLER_STATE = |
|||
"android-support-nav:fragment:navControllerState"; |
|||
private static final String KEY_DEFAULT_NAV_HOST = "android-support-nav:fragment:defaultHost"; |
|||
|
|||
@NonNull |
|||
public static NavHostFragment create(@NavigationRes int graphResId) { |
|||
return create(graphResId, null); |
|||
} |
|||
|
|||
@NonNull |
|||
public static NavHostFragment create(@NavigationRes int graphResId, |
|||
@Nullable Bundle startDestinationArgs) { |
|||
Bundle b = null; |
|||
if (graphResId != 0) { |
|||
b = new Bundle(); |
|||
b.putInt(KEY_GRAPH_ID, graphResId); |
|||
} |
|||
if (startDestinationArgs != null) { |
|||
if (b == null) { |
|||
b = new Bundle(); |
|||
} |
|||
b.putBundle(KEY_START_DESTINATION_ARGS, startDestinationArgs); |
|||
} |
|||
|
|||
final NavHostFragmentWithDefaultAnimations result = new NavHostFragmentWithDefaultAnimations(); |
|||
if (b != null) { |
|||
result.setArguments(b); |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
@NonNull |
|||
@Override |
|||
protected Navigator<? extends FragmentNavigator.Destination> createFragmentNavigator() { |
|||
return new FragmentNavigatorWithDefaultAnimations(requireContext(), getChildFragmentManager(), getId()); |
|||
} |
|||
|
|||
@Override |
|||
protected void onCreateNavController(@NonNull final NavController navController) { |
|||
super.onCreateNavController(navController); |
|||
navController.getNavigatorProvider() |
|||
.addNavigator(new FragmentNavigatorWithDefaultAnimations(requireContext(), getChildFragmentManager(), getId())); |
|||
} |
|||
} |
|||
// package awais.instagrabber.customviews; |
|||
// |
|||
// import android.os.Bundle; |
|||
// |
|||
// import androidx.annotation.NavigationRes; |
|||
// import androidx.annotation.NonNull; |
|||
// import androidx.annotation.Nullable; |
|||
// import androidx.navigation.NavController; |
|||
// import androidx.navigation.Navigator; |
|||
// import androidx.navigation.fragment.FragmentNavigator; |
|||
// import androidx.navigation.fragment.NavHostFragment; |
|||
// |
|||
// public class NavHostFragmentWithDefaultAnimations extends NavHostFragment { |
|||
// private static final String KEY_GRAPH_ID = "android-support-nav:fragment:graphId"; |
|||
// private static final String KEY_START_DESTINATION_ARGS = |
|||
// "android-support-nav:fragment:startDestinationArgs"; |
|||
// private static final String KEY_NAV_CONTROLLER_STATE = |
|||
// "android-support-nav:fragment:navControllerState"; |
|||
// private static final String KEY_DEFAULT_NAV_HOST = "android-support-nav:fragment:defaultHost"; |
|||
// |
|||
// @NonNull |
|||
// public static NavHostFragment create(@NavigationRes int graphResId) { |
|||
// return create(graphResId, null); |
|||
// } |
|||
// |
|||
// @NonNull |
|||
// public static NavHostFragment create(@NavigationRes int graphResId, |
|||
// @Nullable Bundle startDestinationArgs) { |
|||
// Bundle b = null; |
|||
// if (graphResId != 0) { |
|||
// b = new Bundle(); |
|||
// b.putInt(KEY_GRAPH_ID, graphResId); |
|||
// } |
|||
// if (startDestinationArgs != null) { |
|||
// if (b == null) { |
|||
// b = new Bundle(); |
|||
// } |
|||
// b.putBundle(KEY_START_DESTINATION_ARGS, startDestinationArgs); |
|||
// } |
|||
// |
|||
// final NavHostFragmentWithDefaultAnimations result = new NavHostFragmentWithDefaultAnimations(); |
|||
// if (b != null) { |
|||
// result.setArguments(b); |
|||
// } |
|||
// return result; |
|||
// } |
|||
// |
|||
// @NonNull |
|||
// @Override |
|||
// protected Navigator<? extends FragmentNavigator.Destination> createFragmentNavigator() { |
|||
// return new FragmentNavigatorWithDefaultAnimations(requireContext(), getChildFragmentManager(), getId()); |
|||
// } |
|||
// |
|||
// @Override |
|||
// protected void onCreateNavController(@NonNull final NavController navController) { |
|||
// super.onCreateNavController(navController); |
|||
// navController.getNavigatorProvider() |
|||
// .addNavigator(new FragmentNavigatorWithDefaultAnimations(requireContext(), getChildFragmentManager(), getId())); |
|||
// } |
|||
// } |
@ -0,0 +1,7 @@ |
|||
package awais.instagrabber.fragments |
|||
|
|||
enum class UserSearchMode(name: String) { |
|||
USER_SEARCH("user_name"), |
|||
RAVEN("raven"), |
|||
RESHARE("reshare"); |
|||
} |
@ -1,247 +1,247 @@ |
|||
package awais.instagrabber.utils; |
|||
|
|||
import android.annotation.SuppressLint; |
|||
import android.content.Intent; |
|||
import android.util.Log; |
|||
import android.util.SparseArray; |
|||
|
|||
import androidx.annotation.NonNull; |
|||
import androidx.fragment.app.Fragment; |
|||
import androidx.fragment.app.FragmentManager; |
|||
import androidx.fragment.app.FragmentTransaction; |
|||
import androidx.lifecycle.LiveData; |
|||
import androidx.lifecycle.MutableLiveData; |
|||
import androidx.navigation.NavController; |
|||
import androidx.navigation.NavDestination; |
|||
import androidx.navigation.NavGraph; |
|||
import androidx.navigation.fragment.NavHostFragment; |
|||
|
|||
import com.google.android.material.bottomnavigation.BottomNavigationView; |
|||
|
|||
import java.util.List; |
|||
|
|||
import awais.instagrabber.R; |
|||
import awais.instagrabber.customviews.NavHostFragmentWithDefaultAnimations; |
|||
import awais.instagrabber.fragments.main.FeedFragment; |
|||
|
|||
/** |
|||
* This is a Java rewrite of <a href="https://github.com/android/architecture-components-samples/blob/master/NavigationAdvancedSample/app/src/main/java/com/example/android/navigationadvancedsample/NavigationExtensions.kt">NavigationExtensions</a> |
|||
* from architecture-components-samples. Some modifications have been done, check git history. |
|||
*/ |
|||
public class NavigationExtensions { |
|||
private static final String TAG = NavigationExtensions.class.getSimpleName(); |
|||
private static String selectedItemTag; |
|||
private static boolean isOnFirstFragment; |
|||
|
|||
@NonNull |
|||
public static LiveData<NavController> setupWithNavController(@NonNull final BottomNavigationView bottomNavigationView, |
|||
@NonNull List<Integer> navGraphIds, |
|||
@NonNull final FragmentManager fragmentManager, |
|||
final int containerId, |
|||
@NonNull Intent intent, |
|||
final int firstFragmentGraphIndex) { |
|||
final SparseArray<String> graphIdToTagMap = new SparseArray<>(); |
|||
final MutableLiveData<NavController> selectedNavController = new MutableLiveData<>(); |
|||
int firstFragmentGraphId = 0; |
|||
for (int i = 0; i < navGraphIds.size(); i++) { |
|||
final int navGraphId = navGraphIds.get(i); |
|||
final String fragmentTag = getFragmentTag(navGraphId); |
|||
final NavHostFragment navHostFragment = obtainNavHostFragment(fragmentManager, fragmentTag, navGraphId, containerId); |
|||
final NavController navController = navHostFragment.getNavController(); |
|||
final int graphId = navController.getGraph().getId(); |
|||
if (i == firstFragmentGraphIndex) { |
|||
firstFragmentGraphId = graphId; |
|||
} |
|||
graphIdToTagMap.put(graphId, fragmentTag); |
|||
if (bottomNavigationView.getSelectedItemId() == graphId) { |
|||
selectedNavController.setValue(navHostFragment.getNavController()); |
|||
attachNavHostFragment(fragmentManager, navHostFragment, i == firstFragmentGraphIndex); |
|||
} else { |
|||
detachNavHostFragment(fragmentManager, navHostFragment); |
|||
} |
|||
} |
|||
selectedItemTag = graphIdToTagMap.get(bottomNavigationView.getSelectedItemId()); |
|||
final String firstFragmentTag = graphIdToTagMap.get(firstFragmentGraphId); |
|||
isOnFirstFragment = selectedItemTag != null && selectedItemTag.equals(firstFragmentTag); |
|||
bottomNavigationView.setOnItemSelectedListener(item -> { |
|||
if (fragmentManager.isStateSaved()) { |
|||
return false; |
|||
} |
|||
String newlySelectedItemTag = graphIdToTagMap.get(item.getItemId()); |
|||
String tag = selectedItemTag; |
|||
if (tag != null && !tag.equals(newlySelectedItemTag)) { |
|||
fragmentManager.popBackStack(firstFragmentTag, FragmentManager.POP_BACK_STACK_INCLUSIVE); |
|||
Fragment fragment = fragmentManager.findFragmentByTag(newlySelectedItemTag); |
|||
if (fragment == null) { |
|||
return false; |
|||
// throw new RuntimeException("null cannot be cast to non-null NavHostFragment"); |
|||
} |
|||
final NavHostFragment selectedFragment = (NavHostFragment) fragment; |
|||
if (firstFragmentTag != null && !firstFragmentTag.equals(newlySelectedItemTag)) { |
|||
FragmentTransaction fragmentTransaction = fragmentManager |
|||
.beginTransaction() |
|||
.setCustomAnimations( |
|||
R.anim.nav_default_enter_anim, |
|||
R.anim.nav_default_exit_anim, |
|||
R.anim.nav_default_pop_enter_anim, |
|||
R.anim.nav_default_pop_exit_anim |
|||
) |
|||
.attach(selectedFragment) |
|||
.setPrimaryNavigationFragment(selectedFragment); |
|||
for (int i = 0; i < graphIdToTagMap.size(); i++) { |
|||
final int key = graphIdToTagMap.keyAt(i); |
|||
final String fragmentTagForId = graphIdToTagMap.get(key); |
|||
if (!fragmentTagForId.equals(newlySelectedItemTag)) { |
|||
final Fragment fragmentByTag = fragmentManager.findFragmentByTag(firstFragmentTag); |
|||
if (fragmentByTag == null) { |
|||
continue; |
|||
} |
|||
fragmentTransaction.detach(fragmentByTag); |
|||
} |
|||
} |
|||
fragmentTransaction.addToBackStack(firstFragmentTag) |
|||
.setReorderingAllowed(true) |
|||
.commit(); |
|||
} |
|||
selectedItemTag = newlySelectedItemTag; |
|||
isOnFirstFragment = selectedItemTag.equals(firstFragmentTag); |
|||
selectedNavController.setValue(selectedFragment.getNavController()); |
|||
return true; |
|||
} |
|||
return false; |
|||
}); |
|||
setupItemReselected(bottomNavigationView, graphIdToTagMap, fragmentManager); |
|||
setupDeepLinks(bottomNavigationView, navGraphIds, fragmentManager, containerId, intent); |
|||
final int finalFirstFragmentGraphId = firstFragmentGraphId; |
|||
fragmentManager.addOnBackStackChangedListener(() -> { |
|||
if (!isOnFirstFragment) { |
|||
if (firstFragmentTag == null) { |
|||
return; |
|||
} |
|||
if (!isOnBackStack(fragmentManager, firstFragmentTag)) { |
|||
bottomNavigationView.setSelectedItemId(finalFirstFragmentGraphId); |
|||
} |
|||
} |
|||
|
|||
final NavController navController = selectedNavController.getValue(); |
|||
if (navController != null && navController.getCurrentDestination() == null) { |
|||
final NavGraph navControllerGraph = navController.getGraph(); |
|||
navController.navigate(navControllerGraph.getId()); |
|||
} |
|||
}); |
|||
return selectedNavController; |
|||
} |
|||
|
|||
private static NavHostFragment obtainNavHostFragment(final FragmentManager fragmentManager, |
|||
final String fragmentTag, |
|||
final int navGraphId, |
|||
final int containerId) { |
|||
final NavHostFragment existingFragment = (NavHostFragment) fragmentManager.findFragmentByTag(fragmentTag); |
|||
if (existingFragment != null) { |
|||
return existingFragment; |
|||
} |
|||
final NavHostFragment navHostFragment = NavHostFragmentWithDefaultAnimations.create(navGraphId); |
|||
fragmentManager.beginTransaction() |
|||
.setReorderingAllowed(true) |
|||
.add(containerId, navHostFragment, fragmentTag) |
|||
.commitNow(); |
|||
return navHostFragment; |
|||
} |
|||
|
|||
private static void attachNavHostFragment(final FragmentManager fragmentManager, |
|||
final NavHostFragment navHostFragment, |
|||
final boolean isPrimaryNavFragment) { |
|||
final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction() |
|||
.attach(navHostFragment); |
|||
if (isPrimaryNavFragment) { |
|||
fragmentTransaction.setPrimaryNavigationFragment(navHostFragment); |
|||
} |
|||
fragmentTransaction.commitNow(); |
|||
} |
|||
|
|||
private static void detachNavHostFragment(final FragmentManager fragmentManager, final NavHostFragment navHostFragment) { |
|||
fragmentManager.beginTransaction() |
|||
.detach(navHostFragment) |
|||
.commitNow(); |
|||
} |
|||
|
|||
@SuppressLint("RestrictedApi") |
|||
private static void setupItemReselected(final BottomNavigationView bottomNavigationView, |
|||
final SparseArray<String> graphIdToTagMap, |
|||
final FragmentManager fragmentManager) { |
|||
bottomNavigationView.setOnItemReselectedListener(item -> { |
|||
final String newlySelectedItemTag = graphIdToTagMap.get(item.getItemId()); |
|||
final Fragment fragmentByTag = fragmentManager.findFragmentByTag(newlySelectedItemTag); |
|||
if (fragmentByTag == null) { |
|||
return; |
|||
} |
|||
final NavHostFragment selectedFragment = (NavHostFragment) fragmentByTag; |
|||
final NavController navController = selectedFragment.getNavController(); |
|||
final NavGraph navControllerGraph = navController.getGraph(); |
|||
final NavDestination currentDestination = navController.getCurrentDestination(); |
|||
final int startDestination = navControllerGraph.getStartDestination(); |
|||
int backStackSize = navController.getBackStack().size(); |
|||
if (currentDestination != null && backStackSize == 2 && currentDestination.getId() == startDestination) { |
|||
// scroll to top |
|||
final List<Fragment> fragments = selectedFragment.getChildFragmentManager().getFragments(); |
|||
if (fragments.isEmpty()) return; |
|||
final Fragment fragment = fragments.get(0); |
|||
if (fragment instanceof FeedFragment) { |
|||
((FeedFragment) fragment).scrollToTop(); |
|||
} |
|||
return; |
|||
} |
|||
final boolean popped = navController.popBackStack(startDestination, false); |
|||
backStackSize = navController.getBackStack().size(); |
|||
if (!popped || backStackSize > 2) { |
|||
try { |
|||
// try loop pop |
|||
do { |
|||
navController.popBackStack(); |
|||
backStackSize = navController.getBackStack().size(); |
|||
} while (backStackSize > 2); |
|||
} catch (Exception e) { |
|||
Log.e(TAG, "setupItemReselected: ", e); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
|
|||
private static void setupDeepLinks(final BottomNavigationView bottomNavigationView, |
|||
final List<Integer> navGraphIds, |
|||
final FragmentManager fragmentManager, |
|||
final int containerId, |
|||
final Intent intent) { |
|||
for (int i = 0; i < navGraphIds.size(); i++) { |
|||
final int navGraphId = navGraphIds.get(i); |
|||
final String fragmentTag = getFragmentTag(navGraphId); |
|||
final NavHostFragment navHostFragment = obtainNavHostFragment(fragmentManager, fragmentTag, navGraphId, containerId); |
|||
if (navHostFragment.getNavController().handleDeepLink(intent)) { |
|||
final int selectedItemId = bottomNavigationView.getSelectedItemId(); |
|||
NavController navController = navHostFragment.getNavController(); |
|||
NavGraph graph = navController.getGraph(); |
|||
if (selectedItemId != graph.getId()) { |
|||
navController = navHostFragment.getNavController(); |
|||
graph = navController.getGraph(); |
|||
bottomNavigationView.setSelectedItemId(graph.getId()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
private static boolean isOnBackStack(final FragmentManager fragmentManager, final String backStackName) { |
|||
int backStackCount = fragmentManager.getBackStackEntryCount(); |
|||
for (int i = 0; i < backStackCount; i++) { |
|||
final FragmentManager.BackStackEntry backStackEntry = fragmentManager.getBackStackEntryAt(i); |
|||
final String name = backStackEntry.getName(); |
|||
if (name != null && name.equals(backStackName)) { |
|||
return true; |
|||
} |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
private static String getFragmentTag(final int index) { |
|||
return "bottomNavigation#" + index; |
|||
} |
|||
} |
|||
// package awais.instagrabber.utils; |
|||
// |
|||
// import android.annotation.SuppressLint; |
|||
// import android.content.Intent; |
|||
// import android.util.Log; |
|||
// import android.util.SparseArray; |
|||
// |
|||
// import androidx.annotation.NonNull; |
|||
// import androidx.fragment.app.Fragment; |
|||
// import androidx.fragment.app.FragmentManager; |
|||
// import androidx.fragment.app.FragmentTransaction; |
|||
// import androidx.lifecycle.LiveData; |
|||
// import androidx.lifecycle.MutableLiveData; |
|||
// import androidx.navigation.NavController; |
|||
// import androidx.navigation.NavDestination; |
|||
// import androidx.navigation.NavGraph; |
|||
// import androidx.navigation.fragment.NavHostFragment; |
|||
// |
|||
// import com.google.android.material.bottomnavigation.BottomNavigationView; |
|||
// |
|||
// import java.util.List; |
|||
// |
|||
// import awais.instagrabber.R; |
|||
// import awais.instagrabber.customviews.NavHostFragmentWithDefaultAnimations; |
|||
// import awais.instagrabber.fragments.main.FeedFragment; |
|||
// |
|||
// /** |
|||
// * This is a Java rewrite of <a href="https://github.com/android/architecture-components-samples/blob/master/NavigationAdvancedSample/app/src/main/java/com/example/android/navigationadvancedsample/NavigationExtensions.kt">NavigationExtensions</a> |
|||
// * from architecture-components-samples. Some modifications have been done, check git history. |
|||
// */ |
|||
// public class NavigationExtensions { |
|||
// private static final String TAG = NavigationExtensions.class.getSimpleName(); |
|||
// private static String selectedItemTag; |
|||
// private static boolean isOnFirstFragment; |
|||
// |
|||
// @NonNull |
|||
// public static LiveData<NavController> setupWithNavController(@NonNull final BottomNavigationView bottomNavigationView, |
|||
// @NonNull List<Integer> navGraphIds, |
|||
// @NonNull final FragmentManager fragmentManager, |
|||
// final int containerId, |
|||
// @NonNull Intent intent, |
|||
// final int firstFragmentGraphIndex) { |
|||
// final SparseArray<String> graphIdToTagMap = new SparseArray<>(); |
|||
// final MutableLiveData<NavController> selectedNavController = new MutableLiveData<>(); |
|||
// int firstFragmentGraphId = 0; |
|||
// for (int i = 0; i < navGraphIds.size(); i++) { |
|||
// final int navGraphId = navGraphIds.get(i); |
|||
// final String fragmentTag = getFragmentTag(navGraphId); |
|||
// final NavHostFragment navHostFragment = obtainNavHostFragment(fragmentManager, fragmentTag, navGraphId, containerId); |
|||
// final NavController navController = navHostFragment.getNavController(); |
|||
// final int graphId = navController.getGraph().getId(); |
|||
// if (i == firstFragmentGraphIndex) { |
|||
// firstFragmentGraphId = graphId; |
|||
// } |
|||
// graphIdToTagMap.put(graphId, fragmentTag); |
|||
// if (bottomNavigationView.getSelectedItemId() == graphId) { |
|||
// selectedNavController.setValue(navHostFragment.getNavController()); |
|||
// attachNavHostFragment(fragmentManager, navHostFragment, i == firstFragmentGraphIndex); |
|||
// } else { |
|||
// detachNavHostFragment(fragmentManager, navHostFragment); |
|||
// } |
|||
// } |
|||
// selectedItemTag = graphIdToTagMap.get(bottomNavigationView.getSelectedItemId()); |
|||
// final String firstFragmentTag = graphIdToTagMap.get(firstFragmentGraphId); |
|||
// isOnFirstFragment = selectedItemTag != null && selectedItemTag.equals(firstFragmentTag); |
|||
// bottomNavigationView.setOnItemSelectedListener(item -> { |
|||
// if (fragmentManager.isStateSaved()) { |
|||
// return false; |
|||
// } |
|||
// String newlySelectedItemTag = graphIdToTagMap.get(item.getItemId()); |
|||
// String tag = selectedItemTag; |
|||
// if (tag != null && !tag.equals(newlySelectedItemTag)) { |
|||
// fragmentManager.popBackStack(firstFragmentTag, FragmentManager.POP_BACK_STACK_INCLUSIVE); |
|||
// Fragment fragment = fragmentManager.findFragmentByTag(newlySelectedItemTag); |
|||
// if (fragment == null) { |
|||
// return false; |
|||
// // throw new RuntimeException("null cannot be cast to non-null NavHostFragment"); |
|||
// } |
|||
// final NavHostFragment selectedFragment = (NavHostFragment) fragment; |
|||
// if (firstFragmentTag != null && !firstFragmentTag.equals(newlySelectedItemTag)) { |
|||
// FragmentTransaction fragmentTransaction = fragmentManager |
|||
// .beginTransaction() |
|||
// .setCustomAnimations( |
|||
// R.anim.nav_default_enter_anim, |
|||
// R.anim.nav_default_exit_anim, |
|||
// R.anim.nav_default_pop_enter_anim, |
|||
// R.anim.nav_default_pop_exit_anim |
|||
// ) |
|||
// .attach(selectedFragment) |
|||
// .setPrimaryNavigationFragment(selectedFragment); |
|||
// for (int i = 0; i < graphIdToTagMap.size(); i++) { |
|||
// final int key = graphIdToTagMap.keyAt(i); |
|||
// final String fragmentTagForId = graphIdToTagMap.get(key); |
|||
// if (!fragmentTagForId.equals(newlySelectedItemTag)) { |
|||
// final Fragment fragmentByTag = fragmentManager.findFragmentByTag(firstFragmentTag); |
|||
// if (fragmentByTag == null) { |
|||
// continue; |
|||
// } |
|||
// fragmentTransaction.detach(fragmentByTag); |
|||
// } |
|||
// } |
|||
// fragmentTransaction.addToBackStack(firstFragmentTag) |
|||
// .setReorderingAllowed(true) |
|||
// .commit(); |
|||
// } |
|||
// selectedItemTag = newlySelectedItemTag; |
|||
// isOnFirstFragment = selectedItemTag.equals(firstFragmentTag); |
|||
// selectedNavController.setValue(selectedFragment.getNavController()); |
|||
// return true; |
|||
// } |
|||
// return false; |
|||
// }); |
|||
// setupItemReselected(bottomNavigationView, graphIdToTagMap, fragmentManager); |
|||
// setupDeepLinks(bottomNavigationView, navGraphIds, fragmentManager, containerId, intent); |
|||
// final int finalFirstFragmentGraphId = firstFragmentGraphId; |
|||
// fragmentManager.addOnBackStackChangedListener(() -> { |
|||
// if (!isOnFirstFragment) { |
|||
// if (firstFragmentTag == null) { |
|||
// return; |
|||
// } |
|||
// if (!isOnBackStack(fragmentManager, firstFragmentTag)) { |
|||
// bottomNavigationView.setSelectedItemId(finalFirstFragmentGraphId); |
|||
// } |
|||
// } |
|||
// |
|||
// final NavController navController = selectedNavController.getValue(); |
|||
// if (navController != null && navController.getCurrentDestination() == null) { |
|||
// final NavGraph navControllerGraph = navController.getGraph(); |
|||
// navController.navigate(navControllerGraph.getId()); |
|||
// } |
|||
// }); |
|||
// return selectedNavController; |
|||
// } |
|||
// |
|||
// private static NavHostFragment obtainNavHostFragment(final FragmentManager fragmentManager, |
|||
// final String fragmentTag, |
|||
// final int navGraphId, |
|||
// final int containerId) { |
|||
// final NavHostFragment existingFragment = (NavHostFragment) fragmentManager.findFragmentByTag(fragmentTag); |
|||
// if (existingFragment != null) { |
|||
// return existingFragment; |
|||
// } |
|||
// final NavHostFragment navHostFragment = NavHostFragmentWithDefaultAnimations.create(navGraphId); |
|||
// fragmentManager.beginTransaction() |
|||
// .setReorderingAllowed(true) |
|||
// .add(containerId, navHostFragment, fragmentTag) |
|||
// .commitNow(); |
|||
// return navHostFragment; |
|||
// } |
|||
// |
|||
// private static void attachNavHostFragment(final FragmentManager fragmentManager, |
|||
// final NavHostFragment navHostFragment, |
|||
// final boolean isPrimaryNavFragment) { |
|||
// final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction() |
|||
// .attach(navHostFragment); |
|||
// if (isPrimaryNavFragment) { |
|||
// fragmentTransaction.setPrimaryNavigationFragment(navHostFragment); |
|||
// } |
|||
// fragmentTransaction.commitNow(); |
|||
// } |
|||
// |
|||
// private static void detachNavHostFragment(final FragmentManager fragmentManager, final NavHostFragment navHostFragment) { |
|||
// fragmentManager.beginTransaction() |
|||
// .detach(navHostFragment) |
|||
// .commitNow(); |
|||
// } |
|||
// |
|||
// @SuppressLint("RestrictedApi") |
|||
// private static void setupItemReselected(final BottomNavigationView bottomNavigationView, |
|||
// final SparseArray<String> graphIdToTagMap, |
|||
// final FragmentManager fragmentManager) { |
|||
// bottomNavigationView.setOnItemReselectedListener(item -> { |
|||
// final String newlySelectedItemTag = graphIdToTagMap.get(item.getItemId()); |
|||
// final Fragment fragmentByTag = fragmentManager.findFragmentByTag(newlySelectedItemTag); |
|||
// if (fragmentByTag == null) { |
|||
// return; |
|||
// } |
|||
// final NavHostFragment selectedFragment = (NavHostFragment) fragmentByTag; |
|||
// final NavController navController = selectedFragment.getNavController(); |
|||
// final NavGraph navControllerGraph = navController.getGraph(); |
|||
// final NavDestination currentDestination = navController.getCurrentDestination(); |
|||
// final int startDestination = navControllerGraph.getStartDestination(); |
|||
// int backStackSize = navController.getBackStack().size(); |
|||
// if (currentDestination != null && backStackSize == 2 && currentDestination.getId() == startDestination) { |
|||
// // scroll to top |
|||
// final List<Fragment> fragments = selectedFragment.getChildFragmentManager().getFragments(); |
|||
// if (fragments.isEmpty()) return; |
|||
// final Fragment fragment = fragments.get(0); |
|||
// if (fragment instanceof FeedFragment) { |
|||
// ((FeedFragment) fragment).scrollToTop(); |
|||
// } |
|||
// return; |
|||
// } |
|||
// final boolean popped = navController.popBackStack(startDestination, false); |
|||
// backStackSize = navController.getBackStack().size(); |
|||
// if (!popped || backStackSize > 2) { |
|||
// try { |
|||
// // try loop pop |
|||
// do { |
|||
// navController.popBackStack(); |
|||
// backStackSize = navController.getBackStack().size(); |
|||
// } while (backStackSize > 2); |
|||
// } catch (Exception e) { |
|||
// Log.e(TAG, "setupItemReselected: ", e); |
|||
// } |
|||
// } |
|||
// }); |
|||
// } |
|||
// |
|||
// private static void setupDeepLinks(final BottomNavigationView bottomNavigationView, |
|||
// final List<Integer> navGraphIds, |
|||
// final FragmentManager fragmentManager, |
|||
// final int containerId, |
|||
// final Intent intent) { |
|||
// for (int i = 0; i < navGraphIds.size(); i++) { |
|||
// final int navGraphId = navGraphIds.get(i); |
|||
// final String fragmentTag = getFragmentTag(navGraphId); |
|||
// final NavHostFragment navHostFragment = obtainNavHostFragment(fragmentManager, fragmentTag, navGraphId, containerId); |
|||
// if (navHostFragment.getNavController().handleDeepLink(intent)) { |
|||
// final int selectedItemId = bottomNavigationView.getSelectedItemId(); |
|||
// NavController navController = navHostFragment.getNavController(); |
|||
// NavGraph graph = navController.getGraph(); |
|||
// if (selectedItemId != graph.getId()) { |
|||
// navController = navHostFragment.getNavController(); |
|||
// graph = navController.getGraph(); |
|||
// bottomNavigationView.setSelectedItemId(graph.getId()); |
|||
// } |
|||
// } |
|||
// } |
|||
// } |
|||
// |
|||
// private static boolean isOnBackStack(final FragmentManager fragmentManager, final String backStackName) { |
|||
// int backStackCount = fragmentManager.getBackStackEntryCount(); |
|||
// for (int i = 0; i < backStackCount; i++) { |
|||
// final FragmentManager.BackStackEntry backStackEntry = fragmentManager.getBackStackEntryAt(i); |
|||
// final String name = backStackEntry.getName(); |
|||
// if (name != null && name.equals(backStackName)) { |
|||
// return true; |
|||
// } |
|||
// } |
|||
// return false; |
|||
// } |
|||
// |
|||
// private static String getFragmentTag(final int index) { |
|||
// return "bottomNavigation#" + index; |
|||
// } |
|||
// } |
@ -0,0 +1,162 @@ |
|||
package awais.instagrabber.utils |
|||
|
|||
import android.content.Context |
|||
import android.content.res.Resources |
|||
import androidx.annotation.ArrayRes |
|||
import awais.instagrabber.R |
|||
import awais.instagrabber.fragments.settings.PreferenceKeys |
|||
import awais.instagrabber.models.Tab |
|||
|
|||
var tabOrderString: String? = null |
|||
|
|||
private val NON_REMOVABLE_NAV_ROOT_IDS: List<Int> = listOf(R.id.profile_nav_graph, R.id.more_nav_graph) |
|||
|
|||
|
|||
fun getLoggedInNavTabs(context: Context): Pair<List<Tab>, List<Tab>> { |
|||
val navRootIds = getArrayResIds(context.resources, R.array.logged_in_nav_root_ids) |
|||
return getTabs(context, navRootIds) |
|||
} |
|||
|
|||
fun getAnonNavTabs(context: Context): List<Tab> { |
|||
val navRootIds = getArrayResIds(context.resources, R.array.anon_nav_root_ids) |
|||
val (tabs, _) = getTabs(context, navRootIds) |
|||
return tabs |
|||
} |
|||
|
|||
private fun getTabs( |
|||
context: Context, |
|||
navRootIds: IntArray, |
|||
isAnon: Boolean = false, |
|||
): Pair<List<Tab>, MutableList<Tab>> { |
|||
val navGraphNames = getResIdsForNavRootIds(navRootIds, ::geNavGraphNameForNavRootId) |
|||
val titleArray = getResIdsForNavRootIds(navRootIds, ::getTitleResIdForNavRootId) |
|||
val iconIds = getResIdsForNavRootIds(navRootIds, ::getIconResIdForNavRootId) |
|||
val startDestFragIds = getResIdsForNavRootIds(navRootIds, ::getStartDestFragIdForNavRootId) |
|||
val (orderedGraphNames, orderedNavRootIds) = if (isAnon) navGraphNames to navRootIds.toList() else getOrderedNavRootIdsFromPref(navGraphNames) |
|||
val tabs = mutableListOf<Tab>() |
|||
val otherTabs = mutableListOf<Tab>() // Will contain tabs not in current list |
|||
for (i in navRootIds.indices) { |
|||
val navRootId = navRootIds[i] |
|||
val navGraphName = navGraphNames[i] |
|||
val tab = Tab( |
|||
iconIds[i], |
|||
context.getString(titleArray[i]), |
|||
if(isAnon) false else !NON_REMOVABLE_NAV_ROOT_IDS.contains(navRootId), |
|||
navRootId, |
|||
startDestFragIds[i] |
|||
) |
|||
if (!isAnon && !orderedGraphNames.contains(navGraphName)) { |
|||
otherTabs.add(tab) |
|||
continue |
|||
} |
|||
tabs.add(tab) |
|||
} |
|||
val associateBy = tabs.associateBy { it.navigationRootId } |
|||
val orderedTabs = orderedNavRootIds.mapNotNull { associateBy[it] } |
|||
return orderedTabs to otherTabs |
|||
} |
|||
|
|||
private fun getArrayResIds(resources: Resources, @ArrayRes arrayRes: Int): IntArray { |
|||
val typedArray = resources.obtainTypedArray(arrayRes) |
|||
val length = typedArray.length() |
|||
val navRootIds = IntArray(length) |
|||
for (i in 0 until length) { |
|||
val resourceId = typedArray.getResourceId(i, 0) |
|||
if (resourceId == 0) continue |
|||
navRootIds[i] = resourceId |
|||
} |
|||
typedArray.recycle() |
|||
return navRootIds |
|||
} |
|||
|
|||
private fun <T> getResIdsForNavRootIds(navRootIds: IntArray, resMapper: Function1<Int, T>): List<T> = navRootIds |
|||
.asSequence() |
|||
.filterNot { it == 0 } |
|||
.map(resMapper) |
|||
.filterNot { it == 0 } |
|||
.toList() |
|||
|
|||
private fun getTitleResIdForNavRootId(id: Int): Int = when (id) { |
|||
R.id.direct_messages_nav_graph -> R.string.title_dm |
|||
R.id.feed_nav_graph -> R.string.feed |
|||
R.id.profile_nav_graph -> R.string.profile |
|||
R.id.discover_nav_graph -> R.string.title_discover |
|||
R.id.more_nav_graph -> R.string.more |
|||
R.id.favorites_nav_graph -> R.string.title_favorites |
|||
R.id.notification_viewer_nav_graph -> R.string.title_notifications |
|||
else -> 0 |
|||
} |
|||
|
|||
private fun getIconResIdForNavRootId(id: Int): Int = when (id) { |
|||
R.id.direct_messages_nav_graph -> R.drawable.ic_message_24 |
|||
R.id.feed_nav_graph -> R.drawable.ic_home_24 |
|||
R.id.profile_nav_graph -> R.drawable.ic_person_24 |
|||
R.id.discover_nav_graph -> R.drawable.ic_explore_24 |
|||
R.id.more_nav_graph -> R.drawable.ic_more_horiz_24 |
|||
R.id.favorites_nav_graph -> R.drawable.ic_star_24 |
|||
R.id.notification_viewer_nav_graph -> R.drawable.ic_not_liked |
|||
else -> 0 |
|||
} |
|||
|
|||
private fun getStartDestFragIdForNavRootId(id: Int): Int = when (id) { |
|||
R.id.direct_messages_nav_graph -> R.id.directMessagesInboxFragment |
|||
R.id.feed_nav_graph -> R.id.feedFragment |
|||
R.id.profile_nav_graph -> R.id.profileFragment |
|||
R.id.discover_nav_graph -> R.id.discoverFragment |
|||
R.id.more_nav_graph -> R.id.morePreferencesFragment |
|||
R.id.favorites_nav_graph -> R.id.favoritesFragment |
|||
R.id.notification_viewer_nav_graph -> R.id.notificationsViewer |
|||
else -> 0 |
|||
} |
|||
|
|||
fun geNavGraphNameForNavRootId(id: Int): String = when (id) { |
|||
R.id.direct_messages_nav_graph -> "direct_messages_nav_graph" |
|||
R.id.feed_nav_graph -> "feed_nav_graph" |
|||
R.id.profile_nav_graph -> "profile_nav_graph" |
|||
R.id.discover_nav_graph -> "discover_nav_graph" |
|||
R.id.more_nav_graph -> "more_nav_graph" |
|||
R.id.favorites_nav_graph -> "favorites_nav_graph" |
|||
R.id.notification_viewer_nav_graph -> "notification_viewer_nav_graph" |
|||
else -> "" |
|||
} |
|||
|
|||
private fun geNavGraphNameForNavRootId(navGraphName: String): Int = when (navGraphName) { |
|||
"direct_messages_nav_graph" -> R.id.direct_messages_nav_graph |
|||
"feed_nav_graph" -> R.id.feed_nav_graph |
|||
"profile_nav_graph" -> R.id.profile_nav_graph |
|||
"discover_nav_graph" -> R.id.discover_nav_graph |
|||
"more_nav_graph" -> R.id.more_nav_graph |
|||
"favorites_nav_graph" -> R.id.favorites_nav_graph |
|||
"notification_viewer_nav_graph" -> R.id.notification_viewer_nav_graph |
|||
else -> 0 |
|||
} |
|||
|
|||
private fun getOrderedNavRootIdsFromPref(navGraphNames: List<String>): Pair<List<String>, List<Int>> { |
|||
tabOrderString = Utils.settingsHelper.getString(PreferenceKeys.PREF_TAB_ORDER) |
|||
if (tabOrderString.isNullOrBlank()) { |
|||
// Use top 5 entries for default list |
|||
val top5navGraphNames: List<String> = navGraphNames.subList(0, 5) |
|||
val newOrderString = top5navGraphNames.joinToString(",") |
|||
Utils.settingsHelper.putString(PreferenceKeys.PREF_TAB_ORDER, newOrderString) |
|||
tabOrderString = newOrderString |
|||
return top5navGraphNames to top5navGraphNames.map(::geNavGraphNameForNavRootId) |
|||
} |
|||
val orderString = tabOrderString ?: return navGraphNames to navGraphNames.subList(0, 5).map(::geNavGraphNameForNavRootId) |
|||
// Make sure that the list from preference does not contain any invalid values |
|||
val orderGraphNames = orderString |
|||
.split(",") |
|||
.asSequence() |
|||
.filter(String::isNotBlank) |
|||
.filter(navGraphNames::contains) |
|||
.toList() |
|||
val graphNames = if (orderGraphNames.isEmpty()) { |
|||
// Use top 5 entries for default list |
|||
navGraphNames.subList(0, 5) |
|||
} else orderGraphNames |
|||
return graphNames to graphNames.map(::geNavGraphNameForNavRootId) |
|||
} |
|||
|
|||
fun isNavRootInCurrentTabs(navRootString: String?): Boolean { |
|||
val navRoot = navRootString ?: return false |
|||
return tabOrderString?.contains(navRoot) ?: false |
|||
} |
@ -1,78 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/comments_nav_graph" |
|||
app:startDestination="@id/commentsViewerFragment"> |
|||
|
|||
<!--<include app:graph="@navigation/hashtag_nav_graph" />--> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashtag_nav_graph"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<!--<include app:graph="@navigation/profile_nav_graph" />--> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<dialog |
|||
android:id="@+id/commentsViewerFragment" |
|||
android:name="awais.instagrabber.fragments.comments.CommentsViewerFragment" |
|||
android:label="Comments" |
|||
tools:layout="@layout/fragment_comments"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</dialog> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/commentsViewerFragment"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
</navigation> |
@ -1,216 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/direct_messages_nav_graph" |
|||
app:startDestination="@id/directMessagesInboxFragment"> |
|||
|
|||
<include app:graph="@navigation/profile_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph" /> |
|||
|
|||
<include app:graph="@navigation/location_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_locationFragment" |
|||
app:destination="@id/location_nav_graph"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/hashtag_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashtag_nav_graph"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/notification_viewer_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_notificationsViewerFragment" |
|||
app:destination="@id/notification_viewer_nav_graph"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/comments_nav_graph"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/saved_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_savedCollectionsFragment" |
|||
app:destination="@id/saved_nav_graph"> |
|||
<argument |
|||
android:name="isSaving" |
|||
app:argType="boolean" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_search" |
|||
app:destination="@id/searchFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<fragment |
|||
android:id="@+id/directMessagesInboxFragment" |
|||
android:name="awais.instagrabber.fragments.directmessages.DirectMessageInboxFragment" |
|||
android:label="@string/action_dms" |
|||
tools:layout="@layout/fragment_direct_messages_inbox"> |
|||
<action |
|||
android:id="@+id/action_inbox_to_thread" |
|||
app:destination="@id/directMessagesThreadFragment" /> |
|||
<action |
|||
android:id="@+id/action_inbox_to_pending_inbox" |
|||
app:destination="@id/directPendingInboxFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/directMessagesThreadFragment" |
|||
android:name="awais.instagrabber.fragments.directmessages.DirectMessageThreadFragment" |
|||
tools:layout="@layout/fragment_direct_messages_thread"> |
|||
<argument |
|||
android:name="threadId" |
|||
app:argType="string" /> |
|||
<argument |
|||
android:name="title" |
|||
app:argType="string" /> |
|||
<argument |
|||
android:name="pending" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
<action |
|||
android:id="@+id/action_thread_to_settings" |
|||
app:destination="@id/directMessagesSettingsFragment" /> |
|||
<action |
|||
android:id="@+id/action_thread_to_image_edit" |
|||
app:destination="@id/imageEditFragment" /> |
|||
<action |
|||
android:id="@+id/action_thread_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/directMessagesSettingsFragment" |
|||
android:name="awais.instagrabber.fragments.directmessages.DirectMessageSettingsFragment" |
|||
android:label="@string/details" |
|||
tools:layout="@layout/fragment_direct_messages_settings"> |
|||
<argument |
|||
android:name="threadId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="title" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
|
|||
<argument |
|||
android:name="pending" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_settings_to_inbox" |
|||
app:destination="@id/directMessagesInboxFragment" |
|||
app:popUpTo="@+id/directMessagesInboxFragment" |
|||
app:popUpToInclusive="true" /> |
|||
|
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/imageEditFragment" |
|||
android:name="awais.instagrabber.fragments.imageedit.ImageEditFragment" |
|||
android:label="Edit Photo" |
|||
tools:layout="@layout/fragment_image_edit"> |
|||
<argument |
|||
android:name="uri" |
|||
app:argType="android.net.Uri" |
|||
app:nullable="false" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/storyViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryViewerFragment" |
|||
android:label="StoryViewerFragment" |
|||
tools:layout="@layout/fragment_story_viewer"> |
|||
<argument |
|||
android:name="options" |
|||
app:argType="awais.instagrabber.repositories.requests.StoryViewerOptions" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/directPendingInboxFragment" |
|||
android:name="awais.instagrabber.fragments.directmessages.DirectPendingInboxFragment" |
|||
android:label="@string/pending_requests" |
|||
tools:layout="@layout/fragment_direct_pending_inbox"> |
|||
<action |
|||
android:id="@+id/action_pending_inbox_to_thread" |
|||
app:destination="@id/directMessagesThreadFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/searchFragment" |
|||
android:name="awais.instagrabber.fragments.search.SearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_search" /> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" |
|||
tools:layout="@layout/dialog_post_view" /> |
|||
</navigation> |
@ -1,155 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/discover_nav_graph" |
|||
app:startDestination="@id/discoverFragment"> |
|||
|
|||
<include app:graph="@navigation/hashtag_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashtag_nav_graph"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/profile_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/location_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_locationFragment" |
|||
app:destination="@id/location_nav_graph"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/comments_nav_graph"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/saved_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_savedCollectionsFragment" |
|||
app:destination="@id/saved_nav_graph"> |
|||
<argument |
|||
android:name="isSaving" |
|||
app:argType="boolean" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/notification_viewer_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_notificationsViewerFragment" |
|||
app:destination="@id/notification_viewer_nav_graph"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_search" |
|||
app:destination="@id/searchFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search_nav_graph" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/discoverFragment" |
|||
android:name="awais.instagrabber.fragments.main.DiscoverFragment" |
|||
android:label="@string/title_discover" |
|||
tools:layout="@layout/fragment_discover"> |
|||
<action |
|||
android:id="@+id/action_discoverFragment_to_topicPostsFragment" |
|||
app:destination="@id/topicPostsFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/topicPostsFragment" |
|||
android:name="awais.instagrabber.fragments.TopicPostsFragment" |
|||
tools:layout="@layout/fragment_topic_posts"> |
|||
<argument |
|||
android:name="topicCluster" |
|||
app:argType="awais.instagrabber.repositories.responses.discover.TopicCluster" /> |
|||
|
|||
<argument |
|||
android:name="titleColor" |
|||
app:argType="integer" /> |
|||
|
|||
<argument |
|||
android:name="backgroundColor" |
|||
app:argType="integer" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/searchFragment" |
|||
android:name="awais.instagrabber.fragments.search.SearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_search" /> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" |
|||
tools:layout="@layout/dialog_post_view" /> |
|||
</navigation> |
@ -1,70 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/favorites_nav_graph" |
|||
app:startDestination="@id/favoritesFragment"> |
|||
|
|||
<include app:graph="@navigation/profile_nav_graph" /> |
|||
<include app:graph="@navigation/hashtag_nav_graph" /> |
|||
<include app:graph="@navigation/location_nav_graph" /> |
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashtag_nav_graph"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_locationFragment" |
|||
app:destination="@id/location_nav_graph"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_search" |
|||
app:destination="@id/searchFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<fragment |
|||
android:id="@+id/favoritesFragment" |
|||
android:name="awais.instagrabber.fragments.FavoritesFragment" |
|||
android:label="@string/title_favorites" |
|||
tools:layout="@layout/fragment_favorites" /> |
|||
<fragment |
|||
android:id="@+id/searchFragment" |
|||
android:name="awais.instagrabber.fragments.search.SearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_search" /> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" /> |
|||
</navigation> |
@ -1,159 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/feed_nav_graph" |
|||
app:startDestination="@id/feedFragment"> |
|||
|
|||
<include app:graph="@navigation/hashtag_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashtag_nav_graph"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/profile_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/location_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_locationFragment" |
|||
app:destination="@id/location_nav_graph"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/comments_nav_graph"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/saved_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_savedCollectionsFragment" |
|||
app:destination="@id/saved_nav_graph"> |
|||
<argument |
|||
android:name="isSaving" |
|||
app:argType="boolean" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/notification_viewer_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_notificationsViewerFragment" |
|||
app:destination="@id/notification_viewer_nav_graph"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/story_list_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_storyListViewerFragment" |
|||
app:destination="@id/story_list_nav_graph"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_search" |
|||
app:destination="@id/searchFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search_nav_graph" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/feedFragment" |
|||
android:name="awais.instagrabber.fragments.main.FeedFragment" |
|||
android:label="@string/feed" |
|||
tools:layout="@layout/fragment_feed"> |
|||
<action |
|||
android:id="@+id/action_feedFragment_to_storyViewerFragment" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/storyViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryViewerFragment" |
|||
android:label="StoryViewerFragment" |
|||
tools:layout="@layout/fragment_story_viewer"> |
|||
<argument |
|||
android:name="options" |
|||
app:argType="awais.instagrabber.repositories.requests.StoryViewerOptions" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/searchFragment" |
|||
android:name="awais.instagrabber.fragments.search.SearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_search" /> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" |
|||
tools:layout="@layout/dialog_post_view" /> |
|||
</navigation> |
@ -1,130 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/hashtag_nav_graph" |
|||
app:startDestination="@id/hashTagFragment"> |
|||
|
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/comments_nav_graph"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/saved_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_savedCollectionsFragment" |
|||
app:destination="@id/saved_nav_graph"> |
|||
<argument |
|||
android:name="isSaving" |
|||
app:argType="boolean" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_locationFragment" |
|||
app:destination="@id/location_nav_graph"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_search" |
|||
app:destination="@id/searchFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search_nav_graph" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/hashTagFragment" |
|||
android:name="awais.instagrabber.fragments.HashTagFragment" |
|||
android:label="" |
|||
tools:layout="@layout/fragment_hashtag"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<action |
|||
android:id="@+id/action_hashtagFragment_to_storyViewerFragment" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/storyViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryViewerFragment" |
|||
android:label="StoryViewerFragment" |
|||
tools:layout="@layout/fragment_story_viewer"> |
|||
<argument |
|||
android:name="options" |
|||
app:argType="awais.instagrabber.repositories.requests.StoryViewerOptions" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/searchFragment" |
|||
android:name="awais.instagrabber.fragments.search.SearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_search" /> |
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashTagFragment"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" |
|||
tools:layout="@layout/dialog_post_view" /> |
|||
</navigation> |
@ -1,48 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/likes_nav_graph" |
|||
app:startDestination="@id/likesViewerFragment"> |
|||
|
|||
<!--<include app:graph="@navigation/hashtag_nav_graph" />--> |
|||
|
|||
<!--<include app:graph="@navigation/profile_nav_graph" />--> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<dialog |
|||
android:id="@+id/likesViewerFragment" |
|||
android:name="awais.instagrabber.fragments.LikesViewerFragment" |
|||
android:label="Comments" |
|||
tools:layout="@layout/fragment_likes"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</dialog> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likesViewerFragment"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
</navigation> |
@ -1,129 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/location_nav_graph" |
|||
app:startDestination="@id/locationFragment"> |
|||
|
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/comments_nav_graph"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/saved_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_savedCollectionsFragment" |
|||
app:destination="@id/saved_nav_graph"> |
|||
<argument |
|||
android:name="isSaving" |
|||
app:argType="boolean" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashtag_nav_graph"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_search" |
|||
app:destination="@id/searchFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search_nav_graph" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/locationFragment" |
|||
android:name="awais.instagrabber.fragments.LocationFragment" |
|||
android:label="" |
|||
tools:layout="@layout/fragment_location"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
<action |
|||
android:id="@+id/action_locationFragment_to_storyViewerFragment" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
</fragment> |
|||
<action |
|||
android:id="@+id/action_global_locationFragment" |
|||
app:destination="@id/locationFragment"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
</action> |
|||
<fragment |
|||
android:id="@+id/storyViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryViewerFragment" |
|||
android:label="StoryViewerFragment" |
|||
tools:layout="@layout/fragment_story_viewer"> |
|||
<argument |
|||
android:name="options" |
|||
app:argType="awais.instagrabber.repositories.requests.StoryViewerOptions" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/searchFragment" |
|||
android:name="awais.instagrabber.fragments.search.SearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_search" /> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" |
|||
tools:layout="@layout/dialog_post_view" /> |
|||
</navigation> |
@ -1,205 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
android:id="@+id/more_nav_graph" |
|||
app:startDestination="@id/morePreferencesFragment"> |
|||
|
|||
<include app:graph="@navigation/profile_nav_graph" /> |
|||
<include app:graph="@navigation/hashtag_nav_graph" /> |
|||
<include app:graph="@navigation/location_nav_graph" /> |
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
<include app:graph="@navigation/notification_viewer_nav_graph" /> |
|||
<include app:graph="@navigation/story_list_nav_graph" /> |
|||
<include app:graph="@navigation/discover_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/comments_nav_graph"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashtag_nav_graph"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_locationFragment" |
|||
app:destination="@id/location_nav_graph"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_storyListViewerFragment" |
|||
app:destination="@id/story_list_nav_graph"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_notificationsViewerFragment" |
|||
app:destination="@id/notification_viewer_nav_graph"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search_nav_graph" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/morePreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.MorePreferencesFragment" |
|||
android:label="@string/more"> |
|||
<action |
|||
android:id="@+id/action_morePreferencesFragment_to_settingsPreferencesFragment" |
|||
app:destination="@id/settingsPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_morePreferencesFragment_to_aboutFragment" |
|||
app:destination="@id/aboutFragment" /> |
|||
<action |
|||
android:id="@+id/action_morePreferencesFragment_to_favoritesFragment" |
|||
app:destination="@id/favoritesFragment" /> |
|||
<action |
|||
android:id="@+id/action_morePreferencesFragment_to_backupPreferencesFragment" |
|||
app:destination="@id/backupPreferencesFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/settingsPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.SettingsPreferencesFragment" |
|||
android:label="@string/action_settings"> |
|||
<action |
|||
android:id="@+id/action_settings_to_theme" |
|||
app:destination="@id/themePreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_locale" |
|||
app:destination="@id/localePreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_general" |
|||
app:destination="@id/generalPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_downloads" |
|||
app:destination="@id/downloadsPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_dm" |
|||
app:destination="@id/DMPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_stories" |
|||
app:destination="@id/storiesPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_notifications" |
|||
app:destination="@id/notificationsPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_post" |
|||
app:destination="@id/postPreferencesFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/aboutFragment" |
|||
android:name="awais.instagrabber.fragments.settings.AboutFragment" |
|||
android:label="@string/action_about" /> |
|||
<fragment |
|||
android:id="@+id/themePreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.ThemePreferencesFragment" |
|||
android:label="@string/theme_settings" /> |
|||
<fragment |
|||
android:id="@+id/favoritesFragment" |
|||
android:name="awais.instagrabber.fragments.FavoritesFragment" |
|||
android:label="@string/title_favorites" /> |
|||
<fragment |
|||
android:id="@+id/backupPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.BackupPreferencesFragment" |
|||
android:label="@string/backup_and_restore" /> |
|||
<fragment |
|||
android:id="@+id/localePreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.LocalePreferencesFragment" |
|||
android:label="@string/pref_category_locale" /> |
|||
<fragment |
|||
android:id="@+id/generalPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.GeneralPreferencesFragment" |
|||
android:label="@string/pref_category_general" /> |
|||
<fragment |
|||
android:id="@+id/downloadsPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.DownloadsPreferencesFragment" |
|||
android:label="@string/pref_category_downloads" /> |
|||
<fragment |
|||
android:id="@+id/DMPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.DMPreferencesFragment" |
|||
android:label="@string/pref_category_dm" /> |
|||
<fragment |
|||
android:id="@+id/storiesPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.StoriesPreferencesFragment" |
|||
android:label="@string/pref_category_stories" /> |
|||
<fragment |
|||
android:id="@+id/notificationsPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.NotificationsPreferencesFragment" |
|||
android:label="@string/pref_category_notifications" /> |
|||
<fragment |
|||
android:id="@+id/postPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.PostPreferencesFragment" |
|||
android:label="@string/pref_category_post" /> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" /> |
|||
</navigation> |
@ -0,0 +1,894 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/nav_graph" |
|||
app:startDestination="@id/feedFragment"> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_notifications" |
|||
app:destination="@id/notifications_viewer_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_search" |
|||
app:destination="@id/searchFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_direct_thread" |
|||
app:destination="@id/directMessagesThreadFragment" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/feedFragment" |
|||
android:name="awais.instagrabber.fragments.main.FeedFragment" |
|||
android:label="@string/feed" |
|||
tools:layout="@layout/fragment_feed"> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_comments" |
|||
app:destination="@id/commentsViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story_list" |
|||
app:destination="@id/storyListViewerFragment" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/storyViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryViewerFragment" |
|||
android:label="StoryViewerFragment" |
|||
tools:layout="@layout/fragment_story_viewer"> |
|||
|
|||
<argument |
|||
android:name="options" |
|||
app:argType="awais.instagrabber.repositories.requests.StoryViewerOptions" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/searchFragment" |
|||
android:name="awais.instagrabber.fragments.search.SearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_search"> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" |
|||
tools:layout="@layout/dialog_post_view"> |
|||
|
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_comments" |
|||
app:destination="@id/commentsViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_likes" |
|||
app:destination="@id/likesViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_saved_collections" |
|||
app:destination="@id/savedCollectionsFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/locationFragment" |
|||
android:name="awais.instagrabber.fragments.LocationFragment" |
|||
android:label="" |
|||
tools:layout="@layout/fragment_location"> |
|||
|
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_comments" |
|||
app:destination="@id/commentsViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/hashTagFragment" |
|||
android:name="awais.instagrabber.fragments.HashTagFragment" |
|||
android:label="" |
|||
tools:layout="@layout/fragment_hashtag"> |
|||
|
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_comments" |
|||
app:destination="@id/commentsViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<dialog |
|||
android:id="@+id/commentsViewerFragment" |
|||
android:name="awais.instagrabber.fragments.comments.CommentsViewerFragment" |
|||
android:label="Comments" |
|||
tools:layout="@layout/fragment_comments"> |
|||
|
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_likes" |
|||
app:destination="@id/likesViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</dialog> |
|||
|
|||
<fragment |
|||
android:id="@+id/profileFragment" |
|||
android:name="awais.instagrabber.fragments.main.ProfileFragment" |
|||
android:label="@string/profile" |
|||
tools:layout="@layout/fragment_profile"> |
|||
|
|||
<argument |
|||
android:name="username" |
|||
android:defaultValue="" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_saved" |
|||
app:destination="@id/savedViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_saved_collections" |
|||
app:destination="@id/savedCollectionsFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_follow_viewer" |
|||
app:destination="@id/followViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_comments" |
|||
app:destination="@id/commentsViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_notifications" |
|||
app:destination="@id/notifications_viewer_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<!-- Copy of profile fragment tag --> |
|||
<!-- Required to get back arrow in action bar --> |
|||
<!-- See https://issuetracker.google.com/issues/192395936 --> |
|||
<fragment |
|||
android:id="@+id/profile_non_top" |
|||
android:name="awais.instagrabber.fragments.main.ProfileFragment" |
|||
android:label="@string/profile" |
|||
tools:layout="@layout/fragment_profile"> |
|||
|
|||
<argument |
|||
android:name="username" |
|||
android:defaultValue="" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_saved" |
|||
app:destination="@id/savedViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_saved_collections" |
|||
app:destination="@id/savedCollectionsFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_follow_viewer" |
|||
app:destination="@id/followViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_comments" |
|||
app:destination="@id/commentsViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_notifications" |
|||
app:destination="@id/notifications_viewer_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/savedViewerFragment" |
|||
android:name="awais.instagrabber.fragments.SavedViewerFragment" |
|||
android:label="Saved" |
|||
tools:layout="@layout/fragment_saved"> |
|||
|
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="profileId" |
|||
app:argType="long" /> |
|||
|
|||
<argument |
|||
android:name="type" |
|||
app:argType="awais.instagrabber.models.enums.PostItemType" |
|||
app:nullable="false" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_comments" |
|||
app:destination="@id/commentsViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/followViewerFragment" |
|||
android:name="awais.instagrabber.fragments.FollowViewerFragment" |
|||
android:label="" |
|||
tools:layout="@layout/fragment_followers_viewer"> |
|||
|
|||
<argument |
|||
android:name="profileId" |
|||
app:argType="long" /> |
|||
|
|||
<argument |
|||
android:name="isFollowersList" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<dialog |
|||
android:id="@+id/likesViewerFragment" |
|||
android:name="awais.instagrabber.fragments.LikesViewerFragment" |
|||
android:label="Comments" |
|||
tools:layout="@layout/fragment_likes"> |
|||
|
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</dialog> |
|||
|
|||
<fragment |
|||
android:id="@+id/discoverFragment" |
|||
android:name="awais.instagrabber.fragments.main.DiscoverFragment" |
|||
android:label="@string/title_discover" |
|||
tools:layout="@layout/fragment_discover"> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_topic_posts" |
|||
app:destination="@id/topicPostsFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/topicPostsFragment" |
|||
android:name="awais.instagrabber.fragments.TopicPostsFragment" |
|||
tools:layout="@layout/fragment_topic_posts"> |
|||
|
|||
<argument |
|||
android:name="topicCluster" |
|||
app:argType="awais.instagrabber.repositories.responses.discover.TopicCluster" /> |
|||
|
|||
<argument |
|||
android:name="titleColor" |
|||
app:argType="integer" /> |
|||
|
|||
<argument |
|||
android:name="backgroundColor" |
|||
app:argType="integer" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_comments" |
|||
app:destination="@id/commentsViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/favoritesFragment" |
|||
android:name="awais.instagrabber.fragments.FavoritesFragment" |
|||
android:label="@string/title_favorites" |
|||
tools:layout="@layout/fragment_favorites"> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
</fragment> |
|||
|
|||
<!-- Copy of favorites fragment tag --> |
|||
<!-- Required to get back arrow in action bar --> |
|||
<!-- See https://issuetracker.google.com/issues/192395936 --> |
|||
<fragment |
|||
android:id="@+id/favorites_non_top" |
|||
android:name="awais.instagrabber.fragments.FavoritesFragment" |
|||
android:label="@string/title_favorites" |
|||
tools:layout="@layout/fragment_favorites"> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/notificationsViewer" |
|||
android:name="awais.instagrabber.fragments.NotificationsViewerFragment" |
|||
android:label="@string/title_notifications" |
|||
tools:layout="@layout/fragment_notifications_viewer"> |
|||
|
|||
<argument |
|||
android:name="type" |
|||
android:defaultValue="notif" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
</fragment> |
|||
|
|||
<!-- Copy of notification viewer fragment tag --> |
|||
<!-- Required to get back arrow in action bar --> |
|||
<!-- See https://issuetracker.google.com/issues/192395936 --> |
|||
<fragment |
|||
android:id="@+id/notifications_viewer_non_top" |
|||
android:name="awais.instagrabber.fragments.NotificationsViewerFragment" |
|||
android:label="@string/title_notifications" |
|||
tools:layout="@layout/fragment_notifications_viewer"> |
|||
|
|||
<argument |
|||
android:name="type" |
|||
android:defaultValue="notif" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/savedCollectionsFragment" |
|||
android:name="awais.instagrabber.fragments.SavedCollectionsFragment" |
|||
android:label="@string/saved" |
|||
tools:layout="@layout/fragment_saved_collections"> |
|||
|
|||
<argument |
|||
android:name="isSaving" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_collection_posts" |
|||
app:destination="@id/collectionPostsFragment" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/collectionPostsFragment" |
|||
android:name="awais.instagrabber.fragments.CollectionPostsFragment" |
|||
tools:layout="@layout/fragment_collection_posts"> |
|||
|
|||
<argument |
|||
android:name="savedCollection" |
|||
app:argType="awais.instagrabber.repositories.responses.saved.SavedCollection" /> |
|||
|
|||
<argument |
|||
android:name="titleColor" |
|||
app:argType="integer" /> |
|||
|
|||
<argument |
|||
android:name="backgroundColor" |
|||
app:argType="integer" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_comments" |
|||
app:destination="@id/commentsViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/storyListViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryListViewerFragment" |
|||
android:label="Stories" |
|||
tools:layout="@layout/fragment_story_list_viewer"> |
|||
|
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/directMessagesInboxFragment" |
|||
android:name="awais.instagrabber.fragments.directmessages.DirectMessageInboxFragment" |
|||
android:label="@string/action_dms" |
|||
tools:layout="@layout/fragment_direct_messages_inbox"> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_thread" |
|||
app:destination="@id/directMessagesThreadFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_pending_inbox" |
|||
app:destination="@id/directPendingInboxFragment" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/directMessagesThreadFragment" |
|||
android:name="awais.instagrabber.fragments.directmessages.DirectMessageThreadFragment" |
|||
tools:layout="@layout/fragment_direct_messages_thread"> |
|||
|
|||
<argument |
|||
android:name="threadId" |
|||
app:argType="string" /> |
|||
|
|||
<argument |
|||
android:name="title" |
|||
app:argType="string" /> |
|||
|
|||
<argument |
|||
android:name="pending" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_settings" |
|||
app:destination="@id/directMessagesSettingsFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_image_edit" |
|||
app:destination="@id/imageEditFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_hashtag" |
|||
app:destination="@id/hashTagFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_location" |
|||
app:destination="@id/locationFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/directMessagesSettingsFragment" |
|||
android:name="awais.instagrabber.fragments.directmessages.DirectMessageSettingsFragment" |
|||
android:label="@string/details" |
|||
tools:layout="@layout/fragment_direct_messages_settings"> |
|||
<argument |
|||
android:name="threadId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
|
|||
<argument |
|||
android:name="title" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
|
|||
<argument |
|||
android:name="pending" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_inbox" |
|||
app:destination="@id/directMessagesInboxFragment" |
|||
app:popUpTo="@+id/directMessagesInboxFragment" |
|||
app:popUpToInclusive="true" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_profile" |
|||
app:destination="@id/profile_non_top" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/imageEditFragment" |
|||
android:name="awais.instagrabber.fragments.imageedit.ImageEditFragment" |
|||
android:label="Edit Photo" |
|||
tools:layout="@layout/fragment_image_edit"> |
|||
<argument |
|||
android:name="uri" |
|||
app:argType="android.net.Uri" |
|||
app:nullable="false" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/directPendingInboxFragment" |
|||
android:name="awais.instagrabber.fragments.directmessages.DirectPendingInboxFragment" |
|||
android:label="@string/pending_requests" |
|||
tools:layout="@layout/fragment_direct_pending_inbox"> |
|||
<action |
|||
android:id="@+id/action_to_thread" |
|||
app:destination="@id/directMessagesThreadFragment" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/user_search" |
|||
android:name="awais.instagrabber.fragments.UserSearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_user_search"> |
|||
<argument |
|||
android:name="multiple" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
|
|||
<argument |
|||
android:name="title" |
|||
android:defaultValue="@null" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
|
|||
<argument |
|||
android:name="action_label" |
|||
android:defaultValue="@null" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
|
|||
<argument |
|||
android:name="show_groups" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
|
|||
<argument |
|||
android:name="search_mode" |
|||
android:defaultValue="USER_SEARCH" |
|||
app:argType="awais.instagrabber.fragments.UserSearchMode" /> |
|||
|
|||
<argument |
|||
android:name="hideUserIds" |
|||
android:defaultValue="@null" |
|||
app:argType="long[]" |
|||
app:nullable="true" /> |
|||
|
|||
<argument |
|||
android:name="hideThreadIds" |
|||
android:defaultValue="@null" |
|||
app:argType="string[]" |
|||
app:nullable="true" /> |
|||
</fragment> |
|||
|
|||
<include app:graph="@navigation/settings_nav_graph" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/morePreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.MorePreferencesFragment" |
|||
android:label="@string/more"> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_settings" |
|||
app:destination="@id/settings_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_about" |
|||
app:destination="@id/aboutFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_favorites" |
|||
app:destination="@id/favorites_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_backup" |
|||
app:destination="@id/backupPreferencesFragment" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_notifications" |
|||
app:destination="@id/notifications_viewer_non_top" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_story_list" |
|||
app:destination="@id/storyListViewerFragment" /> |
|||
</fragment> |
|||
</navigation> |
@ -1,126 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/notification_viewer_nav_graph" |
|||
app:startDestination="@id/notificationsViewer"> |
|||
|
|||
<include app:graph="@navigation/profile_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_notificationsViewerFragment" |
|||
app:destination="@id/notificationsViewer"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/comments_nav_graph"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/saved_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_savedCollectionsFragment" |
|||
app:destination="@id/saved_nav_graph"> |
|||
<argument |
|||
android:name="isSaving" |
|||
app:argType="boolean" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search_nav_graph" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/storyViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryViewerFragment" |
|||
android:label="StoryViewerFragment" |
|||
tools:layout="@layout/fragment_story_viewer"> |
|||
<argument |
|||
android:name="options" |
|||
app:argType="awais.instagrabber.repositories.requests.StoryViewerOptions" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/notificationsViewer" |
|||
android:name="awais.instagrabber.fragments.NotificationsViewerFragment" |
|||
android:label="@string/title_notifications" |
|||
tools:layout="@layout/fragment_notifications_viewer"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" |
|||
android:defaultValue="notif"/> |
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
<action |
|||
android:id="@+id/action_notifications_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" |
|||
tools:layout="@layout/dialog_post_view" /> |
|||
</navigation> |
@ -1,223 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/profile_nav_graph" |
|||
app:startDestination="@id/profileFragment"> |
|||
|
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/comments_nav_graph"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/hashtag_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashtag_nav_graph"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/location_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_locationFragment" |
|||
app:destination="@id/location_nav_graph"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_notificationsViewerFragment" |
|||
app:destination="@id/notificationsViewer"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
<action |
|||
android:id="@+id/action_notifications_to_story" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search_nav_graph" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/notificationsViewer" |
|||
android:name="awais.instagrabber.fragments.NotificationsViewerFragment" |
|||
android:label="@string/title_notifications" |
|||
tools:layout="@layout/fragment_notifications_viewer"> |
|||
<argument |
|||
android:name="type" |
|||
android:defaultValue="notif" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="targetId" |
|||
android:defaultValue="0L" |
|||
app:argType="long" /> |
|||
</fragment> |
|||
|
|||
<include app:graph="@navigation/saved_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_savedCollectionsFragment" |
|||
app:destination="@id/saved_nav_graph"> |
|||
<argument |
|||
android:name="isSaving" |
|||
app:argType="boolean" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_search" |
|||
app:destination="@id/searchFragment" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/profileFragment" |
|||
android:name="awais.instagrabber.fragments.main.ProfileFragment" |
|||
android:label="@string/profile" |
|||
tools:layout="@layout/fragment_profile"> |
|||
<argument |
|||
android:name="username" |
|||
android:defaultValue="" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
<action |
|||
android:id="@+id/action_profileFragment_to_savedViewerFragment" |
|||
app:destination="@id/savedViewerFragment" /> |
|||
<action |
|||
android:id="@+id/action_profileFragment_to_followViewerFragment" |
|||
app:destination="@id/followViewerFragment" /> |
|||
<action |
|||
android:id="@+id/action_profileFragment_to_storyViewerFragment" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
<action |
|||
android:id="@+id/action_profileFragment_to_dMThreadFragment" |
|||
app:destination="@id/directMessagesThreadFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/savedViewerFragment" |
|||
android:name="awais.instagrabber.fragments.SavedViewerFragment" |
|||
android:label="Saved" |
|||
tools:layout="@layout/fragment_saved"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="profileId" |
|||
app:argType="long" /> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="awais.instagrabber.models.enums.PostItemType" |
|||
app:nullable="false" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/followViewerFragment" |
|||
android:name="awais.instagrabber.fragments.FollowViewerFragment" |
|||
android:label="" |
|||
tools:layout="@layout/fragment_followers_viewer"> |
|||
<argument |
|||
android:name="profileId" |
|||
app:argType="long" /> |
|||
<argument |
|||
android:name="isFollowersList" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<action |
|||
android:id="@+id/action_followViewerFragment_to_profileFragment" |
|||
app:destination="@id/profileFragment"> |
|||
<argument |
|||
android:name="username" |
|||
android:defaultValue="" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/storyViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryViewerFragment" |
|||
android:label="StoryViewerFragment" |
|||
tools:layout="@layout/fragment_story_viewer"> |
|||
|
|||
<argument |
|||
android:name="options" |
|||
app:argType="awais.instagrabber.repositories.requests.StoryViewerOptions" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/searchFragment" |
|||
android:name="awais.instagrabber.fragments.search.SearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_search" /> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" |
|||
tools:layout="@layout/dialog_post_view" /> |
|||
</navigation> |
@ -1,119 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/saved_nav_graph" |
|||
app:startDestination="@id/savedCollectionsFragment"> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_hashTagFragment" |
|||
app:destination="@id/hashtag_nav_graph"> |
|||
<argument |
|||
android:name="hashtag" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_locationFragment" |
|||
app:destination="@id/location_nav_graph"> |
|||
<argument |
|||
android:name="locationId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/comments_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_commentsViewerFragment" |
|||
app:destination="@id/comments_nav_graph"> |
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="postUserId" |
|||
app:argType="long" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/likes_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_likesViewerFragment" |
|||
app:destination="@id/likes_nav_graph"> |
|||
<argument |
|||
android:name="postId" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="isComment" |
|||
app:argType="boolean" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_post_view" |
|||
app:destination="@id/postViewFragment"> |
|||
<argument |
|||
android:name="media" |
|||
app:argType="awais.instagrabber.repositories.responses.Media" |
|||
app:nullable="false" /> |
|||
<argument |
|||
android:name="position" |
|||
app:argType="integer" /> |
|||
</action> |
|||
|
|||
<include app:graph="@navigation/user_search_nav_graph" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search_nav_graph" /> |
|||
|
|||
<fragment |
|||
android:id="@+id/savedCollectionsFragment" |
|||
android:name="awais.instagrabber.fragments.SavedCollectionsFragment" |
|||
android:label="@string/saved" |
|||
tools:layout="@layout/fragment_saved_collections"> |
|||
<argument |
|||
android:name="isSaving" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
<action |
|||
android:id="@+id/action_savedCollectionsFragment_to_collectionPostsFragment" |
|||
app:destination="@id/collectionPostsFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/collectionPostsFragment" |
|||
android:name="awais.instagrabber.fragments.CollectionPostsFragment" |
|||
tools:layout="@layout/fragment_collection_posts"> |
|||
<argument |
|||
android:name="savedCollection" |
|||
app:argType="awais.instagrabber.repositories.responses.saved.SavedCollection" /> |
|||
|
|||
<argument |
|||
android:name="titleColor" |
|||
app:argType="integer" /> |
|||
|
|||
<argument |
|||
android:name="backgroundColor" |
|||
app:argType="integer" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/postViewFragment" |
|||
android:name="awais.instagrabber.fragments.PostViewV2Fragment" |
|||
android:label="@string/post" |
|||
tools:layout="@layout/dialog_post_view" /> |
|||
</navigation> |
@ -0,0 +1,188 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
android:id="@+id/settings_nav_graph" |
|||
app:startDestination="@id/settingsPreferencesFragment"> |
|||
|
|||
<!--<include app:graph="@navigation/profile_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/hashtag_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/location_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/comments_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/likes_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/notification_viewer_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/story_list_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/discover_nav_graph" />--> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_commentsViewerFragment"--> |
|||
<!-- app:destination="@id/comments_nav_graph">--> |
|||
<!-- <argument--> |
|||
<!-- android:name="shortCode"--> |
|||
<!-- app:argType="string"--> |
|||
<!-- app:nullable="false" />--> |
|||
<!-- <argument--> |
|||
<!-- android:name="postId"--> |
|||
<!-- app:argType="string"--> |
|||
<!-- app:nullable="false" />--> |
|||
<!-- <argument--> |
|||
<!-- android:name="postUserId"--> |
|||
<!-- app:argType="long" />--> |
|||
<!--</action>--> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_likesViewerFragment"--> |
|||
<!-- app:destination="@id/likes_nav_graph">--> |
|||
<!-- <argument--> |
|||
<!-- android:name="postId"--> |
|||
<!-- app:argType="string"--> |
|||
<!-- app:nullable="false" />--> |
|||
<!-- <argument--> |
|||
<!-- android:name="isComment"--> |
|||
<!-- app:argType="boolean"--> |
|||
<!-- app:nullable="false" />--> |
|||
<!--</action>--> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_profileFragment"--> |
|||
<!-- app:destination="@id/profile_nav_graph">--> |
|||
<!-- <argument--> |
|||
<!-- android:name="username"--> |
|||
<!-- app:argType="string"--> |
|||
<!-- app:nullable="true" />--> |
|||
<!--</action>--> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_hashTagFragment"--> |
|||
<!-- app:destination="@id/hashtag_nav_graph">--> |
|||
<!-- <argument--> |
|||
<!-- android:name="hashtag"--> |
|||
<!-- app:argType="string"--> |
|||
<!-- app:nullable="false" />--> |
|||
<!--</action>--> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_locationFragment"--> |
|||
<!-- app:destination="@id/location_nav_graph">--> |
|||
<!-- <argument--> |
|||
<!-- android:name="locationId"--> |
|||
<!-- app:argType="long" />--> |
|||
<!--</action>--> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_storyListViewerFragment"--> |
|||
<!-- app:destination="@id/story_list_nav_graph">--> |
|||
<!-- <argument--> |
|||
<!-- android:name="type"--> |
|||
<!-- app:argType="string"--> |
|||
<!-- app:nullable="false" />--> |
|||
<!--</action>--> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_notificationsViewerFragment"--> |
|||
<!-- app:destination="@id/notification_viewer_nav_graph">--> |
|||
<!-- <argument--> |
|||
<!-- android:name="type"--> |
|||
<!-- app:argType="string"--> |
|||
<!-- app:nullable="false" />--> |
|||
<!-- <argument--> |
|||
<!-- android:name="targetId"--> |
|||
<!-- android:defaultValue="0L"--> |
|||
<!-- app:argType="long" />--> |
|||
<!--</action>--> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_post_view"--> |
|||
<!-- app:destination="@id/postViewFragment">--> |
|||
<!-- <argument--> |
|||
<!-- android:name="media"--> |
|||
<!-- app:argType="awais.instagrabber.repositories.responses.Media"--> |
|||
<!-- app:nullable="false" />--> |
|||
<!-- <argument--> |
|||
<!-- android:name="position"--> |
|||
<!-- app:argType="integer" />--> |
|||
<!--</action>--> |
|||
|
|||
<!--<include app:graph="@navigation/user_search_nav_graph" />--> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_user_search"--> |
|||
<!-- app:destination="@id/user_search_nav_graph" />--> |
|||
|
|||
<fragment |
|||
android:id="@+id/settingsPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.SettingsPreferencesFragment" |
|||
android:label="@string/action_settings"> |
|||
<action |
|||
android:id="@+id/action_settings_to_theme" |
|||
app:destination="@id/themePreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_locale" |
|||
app:destination="@id/localePreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_general" |
|||
app:destination="@id/generalPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_downloads" |
|||
app:destination="@id/downloadsPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_dm" |
|||
app:destination="@id/DMPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_stories" |
|||
app:destination="@id/storiesPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_notifications" |
|||
app:destination="@id/notificationsPreferencesFragment" /> |
|||
<action |
|||
android:id="@+id/action_settings_to_post" |
|||
app:destination="@id/postPreferencesFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/aboutFragment" |
|||
android:name="awais.instagrabber.fragments.settings.AboutFragment" |
|||
android:label="@string/action_about" /> |
|||
<fragment |
|||
android:id="@+id/themePreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.ThemePreferencesFragment" |
|||
android:label="@string/theme_settings" /> |
|||
<fragment |
|||
android:id="@+id/favoritesFragment" |
|||
android:name="awais.instagrabber.fragments.FavoritesFragment" |
|||
android:label="@string/title_favorites" /> |
|||
<fragment |
|||
android:id="@+id/backupPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.BackupPreferencesFragment" |
|||
android:label="@string/backup_and_restore" /> |
|||
<fragment |
|||
android:id="@+id/localePreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.LocalePreferencesFragment" |
|||
android:label="@string/pref_category_locale" /> |
|||
<fragment |
|||
android:id="@+id/generalPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.GeneralPreferencesFragment" |
|||
android:label="@string/pref_category_general" /> |
|||
<fragment |
|||
android:id="@+id/downloadsPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.DownloadsPreferencesFragment" |
|||
android:label="@string/pref_category_downloads" /> |
|||
<fragment |
|||
android:id="@+id/DMPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.DMPreferencesFragment" |
|||
android:label="@string/pref_category_dm" /> |
|||
<fragment |
|||
android:id="@+id/storiesPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.StoriesPreferencesFragment" |
|||
android:label="@string/pref_category_stories" /> |
|||
<fragment |
|||
android:id="@+id/notificationsPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.NotificationsPreferencesFragment" |
|||
android:label="@string/pref_category_notifications" /> |
|||
<fragment |
|||
android:id="@+id/postPreferencesFragment" |
|||
android:name="awais.instagrabber.fragments.settings.PostPreferencesFragment" |
|||
android:label="@string/pref_category_post" /> |
|||
<!--<fragment--> |
|||
<!-- android:id="@+id/postViewFragment"--> |
|||
<!-- android:name="awais.instagrabber.fragments.PostViewV2Fragment"--> |
|||
<!-- android:label="@string/post" />--> |
|||
</navigation> |
@ -1,49 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/story_list_nav_graph" |
|||
app:startDestination="@id/storyListViewerFragment"> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_profileFragment" |
|||
app:destination="@id/profile_nav_graph"> |
|||
<argument |
|||
android:name="username" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
</action> |
|||
|
|||
<fragment |
|||
android:id="@+id/storyListViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryListViewerFragment" |
|||
android:label="Stories" |
|||
tools:layout="@layout/fragment_story_list_viewer"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
<action |
|||
android:id="@+id/action_storyListFragment_to_storyViewerFragment" |
|||
app:destination="@id/storyViewerFragment" /> |
|||
</fragment> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_storyListViewerFragment" |
|||
app:destination="@id/storyListViewerFragment"> |
|||
<argument |
|||
android:name="type" |
|||
app:argType="string" |
|||
app:nullable="false" /> |
|||
</action> |
|||
|
|||
<fragment |
|||
android:id="@+id/storyViewerFragment" |
|||
android:name="awais.instagrabber.fragments.StoryViewerFragment" |
|||
android:label="StoryViewerFragment" |
|||
tools:layout="@layout/fragment_story_viewer"> |
|||
<argument |
|||
android:name="options" |
|||
app:argType="awais.instagrabber.repositories.requests.StoryViewerOptions" /> |
|||
</fragment> |
|||
</navigation> |
@ -1,80 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation 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/user_search_nav_graph" |
|||
app:startDestination="@id/user_search"> |
|||
|
|||
<fragment |
|||
android:id="@+id/user_search" |
|||
android:name="awais.instagrabber.fragments.UserSearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_user_search"> |
|||
<argument |
|||
android:name="multiple" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
|
|||
<argument |
|||
android:name="title" |
|||
android:defaultValue="@null" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
|
|||
<argument |
|||
android:name="action_label" |
|||
android:defaultValue="@null" |
|||
app:argType="string" |
|||
app:nullable="true" /> |
|||
|
|||
<argument |
|||
android:name="show_groups" |
|||
android:defaultValue="false" |
|||
app:argType="boolean" /> |
|||
|
|||
<argument |
|||
android:name="search_mode" |
|||
android:defaultValue="USER_SEARCH" |
|||
app:argType="awais.instagrabber.fragments.UserSearchFragment$SearchMode" /> |
|||
|
|||
<argument |
|||
android:name="hideUserIds" |
|||
android:defaultValue="@null" |
|||
app:argType="long[]" |
|||
app:nullable="true" /> |
|||
|
|||
<argument |
|||
android:name="hideThreadIds" |
|||
android:defaultValue="@null" |
|||
app:argType="string[]" |
|||
app:nullable="true" /> |
|||
|
|||
|
|||
</fragment> |
|||
|
|||
<action |
|||
android:id="@+id/action_global_user_search" |
|||
app:destination="@id/user_search" /> |
|||
|
|||
<!--<action--> |
|||
<!-- android:id="@+id/action_global_user_search"--> |
|||
<!-- app:destination="@id/user_search_nav_graph">--> |
|||
<!-- <argument--> |
|||
<!-- android:name="multiple"--> |
|||
<!-- app:argType="boolean" />--> |
|||
|
|||
<!-- <argument--> |
|||
<!-- android:name="title"--> |
|||
<!-- app:argType="string"--> |
|||
<!-- app:nullable="true" />--> |
|||
|
|||
<!-- <argument--> |
|||
<!-- android:name="action_label"--> |
|||
<!-- app:argType="string"--> |
|||
<!-- app:nullable="true" />--> |
|||
|
|||
<!-- <argument--> |
|||
<!-- android:name="hideUserIds"--> |
|||
<!-- app:argType="long[]" />--> |
|||
<!--</action>--> |
|||
</navigation> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue