Ammar Githam
3 years ago
27 changed files with 3528 additions and 705 deletions
-
148app/src/main/java/awais/instagrabber/activities/MainActivity.kt
-
77app/src/main/java/awais/instagrabber/customviews/PostsRecyclerView.java
-
29app/src/main/java/awais/instagrabber/customviews/helpers/PostFetcher.java
-
78app/src/main/java/awais/instagrabber/dialogs/PostLoadingDialogFragment.kt
-
2app/src/main/java/awais/instagrabber/dialogs/TabOrderPreferenceDialogFragment.java
-
2app/src/main/java/awais/instagrabber/fragments/TopicPostsFragment.java
-
49app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageInboxFragment.kt
-
39app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.kt
-
2app/src/main/java/awais/instagrabber/fragments/settings/GeneralPreferencesFragment.java
-
6app/src/main/java/awais/instagrabber/models/Tab.kt
-
23app/src/main/java/awais/instagrabber/utils/BarinstaDeepLinkHelper.kt
-
33app/src/main/java/awais/instagrabber/utils/KeywordsFilterUtils.kt
-
30app/src/main/java/awais/instagrabber/utils/NavigationHelper.kt
-
97app/src/main/java/awais/instagrabber/viewmodels/MediaViewModel.java
-
2app/src/main/java/awais/instagrabber/viewmodels/ProfileFragmentViewModel.kt
-
3app/src/main/res/layout/activity_main.xml
-
28app/src/main/res/menu/bottom_nav_menu.xml
-
333app/src/main/res/navigation/direct_messages_nav_graph.xml
-
518app/src/main/res/navigation/discover_nav_graph.xml
-
484app/src/main/res/navigation/favorites_nav_graph.xml
-
520app/src/main/res/navigation/feed_nav_graph.xml
-
539app/src/main/res/navigation/more_nav_graph.xml
-
495app/src/main/res/navigation/notification_viewer_nav_graph.xml
-
567app/src/main/res/navigation/profile_nav_graph.xml
-
12app/src/main/res/navigation/root_nav_graph.xml
-
108app/src/main/res/navigation/settings_nav_graph.xml
-
9app/src/main/res/values/ids.xml
@ -0,0 +1,78 @@ |
|||
package awais.instagrabber.dialogs |
|||
|
|||
import android.app.Dialog |
|||
import android.content.Context |
|||
import android.os.Bundle |
|||
import android.util.Log |
|||
import android.widget.Toast |
|||
import androidx.fragment.app.DialogFragment |
|||
import androidx.lifecycle.lifecycleScope |
|||
import androidx.navigation.fragment.findNavController |
|||
import awais.instagrabber.R |
|||
import awais.instagrabber.utils.* |
|||
import awais.instagrabber.utils.extensions.TAG |
|||
import awais.instagrabber.webservices.GraphQLRepository |
|||
import awais.instagrabber.webservices.MediaRepository |
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder |
|||
import kotlinx.coroutines.Dispatchers |
|||
import kotlinx.coroutines.launch |
|||
import kotlinx.coroutines.withContext |
|||
import java.util.* |
|||
|
|||
class PostLoadingDialogFragment : DialogFragment() { |
|||
private var isLoggedIn: Boolean = false |
|||
|
|||
private val mediaRepository: MediaRepository by lazy { MediaRepository.getInstance() } |
|||
private val graphQLRepository: GraphQLRepository by lazy { GraphQLRepository.getInstance() } |
|||
|
|||
override fun onCreate(savedInstanceState: Bundle?) { |
|||
super.onCreate(savedInstanceState) |
|||
val cookie = Utils.settingsHelper.getString(Constants.COOKIE) |
|||
var userId: Long = 0 |
|||
var csrfToken: String? = null |
|||
if (cookie.isNotBlank()) { |
|||
userId = getUserIdFromCookie(cookie) |
|||
csrfToken = getCsrfTokenFromCookie(cookie) |
|||
} |
|||
if (cookie.isBlank() || userId == 0L || csrfToken.isNullOrBlank()) { |
|||
isLoggedIn = false |
|||
return |
|||
} |
|||
isLoggedIn = true |
|||
} |
|||
|
|||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { |
|||
return MaterialAlertDialogBuilder(requireContext()) |
|||
.setCancelable(false) |
|||
.setView(R.layout.dialog_opening_post) |
|||
.create() |
|||
} |
|||
|
|||
override fun onAttach(context: Context) { |
|||
super.onAttach(context) |
|||
val arguments = PostLoadingDialogFragmentArgs.fromBundle(arguments ?: return) |
|||
val shortCode = arguments.shortCode |
|||
lifecycleScope.launch(Dispatchers.IO) { |
|||
try { |
|||
val media = if (isLoggedIn) mediaRepository.fetch(TextUtils.shortcodeToId(shortCode)) else graphQLRepository.fetchPost(shortCode) |
|||
withContext(Dispatchers.Main) { |
|||
if (media == null) { |
|||
Toast.makeText(context, R.string.post_not_found, Toast.LENGTH_SHORT).show() |
|||
return@withContext |
|||
} |
|||
try { |
|||
findNavController().navigate(PostLoadingDialogFragmentDirections.actionToPost(media, 0)) |
|||
} catch (e: Exception) { |
|||
Log.e(TAG, "showPostView: ", e) |
|||
} |
|||
} |
|||
} catch (e: Exception) { |
|||
Log.e(TAG, "showPostView: ", e) |
|||
} finally { |
|||
withContext(Dispatchers.Main) { |
|||
dismiss() |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
package awais.instagrabber.utils |
|||
|
|||
import android.net.Uri |
|||
import androidx.core.net.toUri |
|||
|
|||
private const val domain = "barinsta" |
|||
|
|||
fun getDirectThreadDeepLink(threadId: String, threadTitle: String, isPending: Boolean = false): Uri = |
|||
"$domain://dm_thread/$threadId/$threadTitle?pending=${isPending}".toUri() |
|||
|
|||
fun getProfileDeepLink(username: String): Uri = "$domain://profile/$username".toUri() |
|||
|
|||
fun getPostDeepLink(shortCode: String): Uri = "$domain://post/$shortCode".toUri() |
|||
|
|||
fun getLocationDeepLink(locationId: Long): Uri = "$domain://location/$locationId".toUri() |
|||
|
|||
fun getLocationDeepLink(locationId: String): Uri = "$domain://location/$locationId".toUri() |
|||
|
|||
fun getHashtagDeepLink(hashtag: String): Uri = "$domain://hashtag/$hashtag".toUri() |
|||
|
|||
fun getNotificationsDeepLink(type: String, targetId: Long = 0): Uri = "$domain://notifications/$type?targetId=$targetId".toUri() |
|||
|
|||
fun getSearchDeepLink(): Uri = "$domain://search".toUri() |
@ -1,19 +1,108 @@ |
|||
package awais.instagrabber.viewmodels; |
|||
|
|||
import android.util.Log; |
|||
|
|||
import androidx.annotation.NonNull; |
|||
import androidx.lifecycle.LiveData; |
|||
import androidx.lifecycle.MutableLiveData; |
|||
import androidx.lifecycle.ViewModel; |
|||
import androidx.lifecycle.ViewModelProvider; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
import awais.instagrabber.customviews.helpers.PostFetcher; |
|||
import awais.instagrabber.fragments.settings.PreferenceKeys; |
|||
import awais.instagrabber.interfaces.FetchListener; |
|||
import awais.instagrabber.repositories.responses.Media; |
|||
import awais.instagrabber.utils.KeywordsFilterUtilsKt; |
|||
|
|||
import static awais.instagrabber.utils.Utils.settingsHelper; |
|||
|
|||
public class MediaViewModel extends ViewModel { |
|||
private MutableLiveData<List<Media>> list; |
|||
private static final String TAG = MediaViewModel.class.getSimpleName(); |
|||
|
|||
private boolean refresh = true; |
|||
|
|||
private final PostFetcher postFetcher; |
|||
private final MutableLiveData<List<Media>> list = new MutableLiveData<>(); |
|||
|
|||
public MediaViewModel(@NonNull final PostFetcher.PostFetchService postFetchService) { |
|||
final FetchListener<List<Media>> fetchListener = new FetchListener<List<Media>>() { |
|||
@Override |
|||
public void onResult(final List<Media> result) { |
|||
if (refresh) { |
|||
list.postValue(filterResult(result, true)); |
|||
refresh = false; |
|||
return; |
|||
} |
|||
list.postValue(filterResult(result, false)); |
|||
} |
|||
|
|||
@Override |
|||
public void onFailure(final Throwable t) { |
|||
Log.e(TAG, "onFailure: ", t); |
|||
} |
|||
}; |
|||
postFetcher = new PostFetcher(postFetchService, fetchListener); |
|||
} |
|||
|
|||
public MutableLiveData<List<Media>> getList() { |
|||
if (list == null) { |
|||
list = new MutableLiveData<>(); |
|||
@NonNull |
|||
private List<Media> filterResult(final List<Media> result, final boolean isRefresh) { |
|||
final List<Media> models = list.getValue(); |
|||
final List<Media> modelsCopy = models == null || isRefresh ? new ArrayList<>() : new ArrayList<>(models); |
|||
if (settingsHelper.getBoolean(PreferenceKeys.TOGGLE_KEYWORD_FILTER)) { |
|||
final List<String> keywords = new ArrayList<>(settingsHelper.getStringSet(PreferenceKeys.KEYWORD_FILTERS)); |
|||
final List<Media> filter = KeywordsFilterUtilsKt.filter(keywords, result); |
|||
if (filter != null) { |
|||
modelsCopy.addAll(filter); |
|||
} |
|||
return modelsCopy; |
|||
} |
|||
modelsCopy.addAll(result); |
|||
return modelsCopy; |
|||
} |
|||
|
|||
public LiveData<List<Media>> getList() { |
|||
return list; |
|||
} |
|||
|
|||
public boolean hasMore() { |
|||
return postFetcher.hasMore(); |
|||
} |
|||
|
|||
public void fetch() { |
|||
postFetcher.fetch(); |
|||
} |
|||
|
|||
public void reset() { |
|||
postFetcher.reset(); |
|||
} |
|||
|
|||
public boolean isFetching() { |
|||
return postFetcher.isFetching(); |
|||
} |
|||
|
|||
public void refresh() { |
|||
refresh = true; |
|||
reset(); |
|||
fetch(); |
|||
} |
|||
|
|||
public static class ViewModelFactory implements ViewModelProvider.Factory { |
|||
|
|||
@NonNull |
|||
private final PostFetcher.PostFetchService postFetchService; |
|||
|
|||
public ViewModelFactory(@NonNull final PostFetcher.PostFetchService postFetchService) { |
|||
this.postFetchService = postFetchService; |
|||
} |
|||
|
|||
@NonNull |
|||
@Override |
|||
public <T extends ViewModel> T create(@NonNull final Class<T> modelClass) { |
|||
//noinspection unchecked |
|||
return (T) new MediaViewModel(postFetchService); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> |
|||
<item |
|||
android:id="@id/direct_messages_nav_graph" |
|||
android:icon="@drawable/ic_message_24" |
|||
android:contentDescription="@string/title_dm" |
|||
android:title="@string/title_dm" /> |
|||
<item |
|||
android:id="@id/feed_nav_graph" |
|||
android:icon="@drawable/ic_home_24" |
|||
android:contentDescription="@string/feed" |
|||
android:title="@string/feed" /> |
|||
<item |
|||
android:id="@id/profile_nav_graph" |
|||
android:icon="@drawable/ic_person_24" |
|||
android:contentDescription="@string/profile" |
|||
android:title="@string/profile" /> |
|||
<item |
|||
android:id="@id/discover_nav_graph" |
|||
android:icon="@drawable/ic_explore_24" |
|||
android:contentDescription="@string/title_discover" |
|||
android:title="@string/title_discover" /> |
|||
<item |
|||
android:id="@id/more_nav_graph" |
|||
android:icon="@drawable/ic_more_horiz_24" |
|||
android:contentDescription="@string/more" |
|||
android:title="@string/more" /> |
|||
</menu> |
@ -0,0 +1,518 @@ |
|||
<?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"> |
|||
|
|||
<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/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" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
</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> |
|||
|
|||
<!-- 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/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" /> |
|||
|
|||
<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/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> |
|||
</navigation> |
@ -0,0 +1,484 @@ |
|||
<?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"> |
|||
|
|||
<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> |
|||
|
|||
<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" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
</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> |
|||
|
|||
<!-- 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/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/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> |
|||
|
|||
<!-- 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> |
|||
</navigation> |
@ -0,0 +1,520 @@ |
|||
<?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"> |
|||
|
|||
<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" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
</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> |
|||
|
|||
<!-- 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> |
|||
|
|||
<!-- 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/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> |
|||
</navigation> |
@ -0,0 +1,539 @@ |
|||
<?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/more_nav_graph" |
|||
app:startDestination="@id/morePreferencesFragment"> |
|||
|
|||
<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> |
|||
|
|||
<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" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
</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> |
|||
|
|||
<!-- 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> |
|||
|
|||
<!-- 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> |
|||
|
|||
<!-- 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/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/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> |
|||
</navigation> |
@ -0,0 +1,495 @@ |
|||
<?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"> |
|||
|
|||
<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> |
|||
|
|||
<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" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
</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> |
|||
|
|||
<!-- 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> |
|||
|
|||
<!-- 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/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> |
|||
</navigation> |
@ -0,0 +1,567 @@ |
|||
<?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"> |
|||
|
|||
<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> |
|||
|
|||
<dialog |
|||
android:id="@+id/post_loading_dialog" |
|||
android:name="awais.instagrabber.dialogs.PostLoadingDialogFragment" |
|||
android:label="@string/direct_download_loading"> |
|||
|
|||
<argument |
|||
android:name="shortCode" |
|||
app:argType="string" /> |
|||
|
|||
<deepLink app:uri="barinsta://post/{shortCode}" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_post" |
|||
app:destination="@id/postViewFragment" /> |
|||
</dialog> |
|||
|
|||
<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" /> |
|||
|
|||
<action |
|||
android:id="@+id/action_to_user_search" |
|||
app:destination="@id/user_search" /> |
|||
</fragment> |
|||
|
|||
<fragment |
|||
android:id="@+id/searchFragment" |
|||
android:name="awais.instagrabber.fragments.search.SearchFragment" |
|||
android:label="@string/search" |
|||
tools:layout="@layout/fragment_search"> |
|||
|
|||
<deepLink app:uri="barinsta://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" /> |
|||
|
|||
<deepLink app:uri="barinsta://location/{locationId}" /> |
|||
|
|||
<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" /> |
|||
|
|||
<deepLink app:uri="barinsta://hashtag/{hashtag}" /> |
|||
|
|||
<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> |
|||
|
|||
<!-- 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" /> |
|||
|
|||
<deepLink app:uri="barinsta://profile/{username}" /> |
|||
|
|||
<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> |
|||
|
|||
<!-- 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" /> |
|||
|
|||
<deepLink app:uri="barinsta://notifications/{type}?targetId={targetId}" /> |
|||
|
|||
<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/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> |
|||
</navigation> |
@ -0,0 +1,12 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation> |
|||
|
|||
<!--android:id="@+id/root"--> |
|||
<!--app:startDestination="@id/profile_nav_graph"--> |
|||
|
|||
<!--<include app:graph="@navigation/dm_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/feed_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/profile_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/discover_nav_graph" />--> |
|||
<!--<include app:graph="@navigation/more_nav_graph" />--> |
|||
</navigation> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue