mirror of
https://github.com/KokaKiwi/BarInsta
synced 2026-03-14 00:11:40 +00:00
story viewmodel (wip)
hiding the storylist doesn't work yet but everything else should be good
This commit is contained in:
parent
31ea42d105
commit
bb5244665b
23 changed files with 1555 additions and 1458 deletions
10
app/src/main/res/drawable/ic_story_sticker.xml
Normal file
10
app/src/main/res/drawable/ic_story_sticker.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M22,10l-6,-6L4,4c-1.1,0 -2,0.9 -2,2v12.01c0,1.1 0.9,1.99 2,1.99l16,-0.01c1.1,0 2,-0.89 2,-1.99v-8zM15,5.5l5.5,5.5L15,11L15,5.5z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_story_viewer_list.xml
Normal file
10
app/src/main/res/drawable/ic_story_viewer_list.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,19h10L17,4L7,4v15zM2,17h4L6,6L2,6v11zM18,6v11h4L22,6h-4z"/>
|
||||
</vector>
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
android:id="@+id/story_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/postActions"
|
||||
app:layout_constraintBottom_toTopOf="@id/buttons_barrier"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
|
@ -38,132 +38,150 @@
|
|||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/postActions"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/storiesList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
app:layout_constraintTop_toBottomOf="@id/story_container"
|
||||
app:layout_constraintBottom_toTopOf="@id/storiesList"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintBottom_toTopOf="@id/buttons_barrier"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="#0000">
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/viewStoryPost"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/view_story_post"
|
||||
android:textColor="@color/btn_green_text_color"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/btn_green_background" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/poll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/vote_story_poll"
|
||||
android:textColor="@color/btn_blue_text_color"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/btn_blue_background" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/answer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/respond_story"
|
||||
android:textColor="@color/btn_blue_text_color"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/btn_blue_background" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/quiz"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/story_quiz"
|
||||
android:textColor="@color/btn_blue_text_color"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/btn_blue_background" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/slider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/story_slider"
|
||||
android:textColor="@color/btn_blue_text_color"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/btn_blue_background" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/swipeUp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="SAMPLE TEXT"
|
||||
android:textColor="@color/btn_blue_text_color"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/btn_blue_background" />
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/mention"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/story_mentions"
|
||||
android:textColor="@color/btn_orange_text_color"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/btn_orange_background" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/spotify"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/spotify"
|
||||
android:textColor="@color/btn_green_text_color"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/btn_green_background" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/buttons_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierAllowsGoneWidgets="true"
|
||||
app:barrierDirection="bottom"
|
||||
app:layout_constraintTop_toBottomOf="@id/story_container"
|
||||
app:layout_constraintBottom_toTopOf="@id/btnBackward"
|
||||
app:constraint_referenced_ids="story_container" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnBackward"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="@dimen/story_item_height"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:enabled="false"
|
||||
android:visibility="visible"
|
||||
app:icon="@drawable/exo_ic_skip_previous"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@color/ic_read_button_tint"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/storiesList"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnShare"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/storiesList" />
|
||||
app:layout_constraintTop_toBottomOf="@id/buttons_barrier"
|
||||
app:rippleColor="@color/grey_300" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/storiesList"
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnShare"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
app:layout_constraintTop_toBottomOf="@id/postActions"
|
||||
android:layout_height="48dp"
|
||||
android:enabled="false"
|
||||
android:visibility="visible"
|
||||
app:icon="?attr/actionModeShareDrawable"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@color/ic_read_button_tint"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/stickers"
|
||||
app:layout_constraintStart_toEndOf="@id/btnBackward"
|
||||
app:layout_constraintTop_toBottomOf="@id/buttons_barrier"
|
||||
app:rippleColor="@color/grey_300" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/stickers"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:enabled="false"
|
||||
android:visibility="visible"
|
||||
app:icon="@drawable/ic_story_sticker"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@color/ic_read_button_tint"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/list_toggle"
|
||||
app:layout_constraintStart_toEndOf="@id/btnShare"
|
||||
app:layout_constraintTop_toBottomOf="@id/buttons_barrier"
|
||||
app:rippleColor="@color/grey_300" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/list_toggle"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:enabled="false"
|
||||
android:visibility="visible"
|
||||
app:icon="@drawable/ic_story_viewer_list"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@color/ic_read_button_tint"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnDownload"
|
||||
app:layout_constraintStart_toEndOf="@id/stickers"
|
||||
app:layout_constraintTop_toBottomOf="@id/buttons_barrier"
|
||||
app:rippleColor="@color/grey_300" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnDownload"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:enabled="false"
|
||||
android:visibility="visible"
|
||||
app:icon="@drawable/ic_download"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@color/ic_read_button_tint"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnReply"
|
||||
app:layout_constraintStart_toEndOf="@id/list_toggle"
|
||||
app:layout_constraintTop_toBottomOf="@id/buttons_barrier"
|
||||
app:rippleColor="@color/grey_300" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnReply"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:enabled="false"
|
||||
android:visibility="visible"
|
||||
app:icon="@drawable/ic_round_send_24"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@color/ic_read_button_tint"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnForward"
|
||||
app:layout_constraintStart_toEndOf="@id/btnBackward" />
|
||||
app:layout_constraintStart_toEndOf="@id/btnDownload"
|
||||
app:layout_constraintTop_toBottomOf="@id/buttons_barrier"
|
||||
app:rippleColor="@color/grey_300" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnForward"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="@dimen/story_item_height"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:enabled="false"
|
||||
android:visibility="visible"
|
||||
app:icon="@drawable/exo_ic_skip_next"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@color/ic_read_button_tint"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/storiesList"
|
||||
app:layout_constraintTop_toTopOf="@id/storiesList" />
|
||||
app:layout_constraintStart_toEndOf="@id/btnReply"
|
||||
app:layout_constraintTop_toBottomOf="@id/buttons_barrier"
|
||||
app:rippleColor="@color/grey_300" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -2,21 +2,9 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_dms"
|
||||
android:icon="@drawable/ic_round_send_24"
|
||||
android:title="@string/reply_story"
|
||||
android:titleCondensed="@string/reply_story"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_profile"
|
||||
android:title="@string/open_profile"
|
||||
android:titleCondensed="@string/open_profile"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_download"
|
||||
android:icon="@drawable/ic_download"
|
||||
android:title="@string/action_download"
|
||||
android:titleCondensed="@string/action_download"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
|
|
@ -188,7 +188,6 @@
|
|||
<fragment
|
||||
android:id="@+id/storyViewerFragment"
|
||||
android:name="awais.instagrabber.fragments.StoryViewerFragment"
|
||||
android:label="StoryViewerFragment"
|
||||
tools:layout="@layout/fragment_story_viewer">
|
||||
<argument
|
||||
android:name="options"
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@
|
|||
<fragment
|
||||
android:id="@+id/storyViewerFragment"
|
||||
android:name="awais.instagrabber.fragments.StoryViewerFragment"
|
||||
android:label="StoryViewerFragment"
|
||||
tools:layout="@layout/fragment_story_viewer">
|
||||
<argument
|
||||
android:name="options"
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@
|
|||
<fragment
|
||||
android:id="@+id/storyViewerFragment"
|
||||
android:name="awais.instagrabber.fragments.StoryViewerFragment"
|
||||
android:label="StoryViewerFragment"
|
||||
tools:layout="@layout/fragment_story_viewer">
|
||||
<argument
|
||||
android:name="options"
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@
|
|||
<fragment
|
||||
android:id="@+id/storyViewerFragment"
|
||||
android:name="awais.instagrabber.fragments.StoryViewerFragment"
|
||||
android:label="StoryViewerFragment"
|
||||
tools:layout="@layout/fragment_story_viewer">
|
||||
<argument
|
||||
android:name="options"
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@
|
|||
<fragment
|
||||
android:id="@+id/storyViewerFragment"
|
||||
android:name="awais.instagrabber.fragments.StoryViewerFragment"
|
||||
android:label="StoryViewerFragment"
|
||||
tools:layout="@layout/fragment_story_viewer">
|
||||
<argument
|
||||
android:name="options"
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@
|
|||
<fragment
|
||||
android:id="@+id/storyViewerFragment"
|
||||
android:name="awais.instagrabber.fragments.StoryViewerFragment"
|
||||
android:label="StoryViewerFragment"
|
||||
tools:layout="@layout/fragment_story_viewer">
|
||||
|
||||
<argument
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
<fragment
|
||||
android:id="@+id/storyViewerFragment"
|
||||
android:name="awais.instagrabber.fragments.StoryViewerFragment"
|
||||
android:label="StoryViewerFragment"
|
||||
tools:layout="@layout/fragment_story_viewer">
|
||||
<argument
|
||||
android:name="options"
|
||||
|
|
|
|||
|
|
@ -8,4 +8,13 @@
|
|||
<item name="share_dm" type="id" />
|
||||
<item name="download_current" type="id" />
|
||||
<item name="download_all" type="id" />
|
||||
<!-- story stickers -->
|
||||
<item name="mentions" type="id" />
|
||||
<item name="spotify" type="id" />
|
||||
<item name="poll" type="id" />
|
||||
<item name="question" type="id" />
|
||||
<item name="quiz" type="id" />
|
||||
<item name="slider" type="id" />
|
||||
<item name="viewStoryPost" type="id" />
|
||||
<item name="swipeUp" type="id" />
|
||||
</resources>
|
||||
|
|
@ -69,8 +69,7 @@
|
|||
<string name="be_patient">Be patient!</string>
|
||||
<string name="view_story_post">View Post</string>
|
||||
<string name="view_post">View Post</string>
|
||||
<string name="spotify" translatable="false">Spotify</string>
|
||||
<string name="vote_story_poll">Vote</string>
|
||||
<string name="story_poll">Poll</string>
|
||||
<string name="votef_story_poll">Vote successful!</string>
|
||||
<string name="voted_story_poll">You have already voted!</string>
|
||||
<string name="respond_story">Respond</string>
|
||||
|
|
@ -87,6 +86,7 @@
|
|||
<string name="story_slider">Slider</string>
|
||||
<string name="story_quizzed">You have already answered!</string>
|
||||
<string name="story_mentions">Mentions</string>
|
||||
<string name="story_question">Question</string>
|
||||
<string name="priv_acc">This Account is Private</string>
|
||||
<string name="priv_acc_confirm">You won\'t be able to access posts after unfollowing! Are you sure?</string>
|
||||
<string name="are_you_sure">Are you sure?</string>
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
<string name="delete_collection">Delete collection</string>
|
||||
<string name="delete_collection_confirm">Are you sure you want to delete this collection?</string>
|
||||
<string name="delete_collection_note">All contained media will remain in other collections.</string>
|
||||
<string name="add_to_collection">Add to collection...</string>
|
||||
<string name="add_to_collection">Add to collection…</string>
|
||||
<string name="remove_from_collection">Remove from collection</string>
|
||||
<string name="liked">Liked</string>
|
||||
<string name="saved">Saved</string>
|
||||
|
|
@ -183,9 +183,9 @@
|
|||
<string name="dms_inbox_raven_media_screenshot">Screenshotted</string>
|
||||
<string name="dms_inbox_raven_media_cant_deliver">Cannot deliver</string>
|
||||
<string name="dms_inbox_error_null_count">Unseen count response is null!</string>
|
||||
<string name="dms_thread_message_hint">Message...</string>
|
||||
<string name="dms_thread_message_hint">Message…</string>
|
||||
<string name="dms_thread_audio_hint">Press and hold to record audio</string>
|
||||
<string name="dms_thread_updating">Updating...</string>
|
||||
<string name="dms_thread_updating">Updating…</string>
|
||||
<string name="dms_action_leave">Leave chat</string>
|
||||
<string name="dms_action_leave_question">Leave this chat?</string>
|
||||
<string name="dms_action_kick">Kick</string>
|
||||
|
|
@ -333,7 +333,7 @@
|
|||
<string name="comment">Comment</string>
|
||||
<string name="layout">Layout</string>
|
||||
<string name="feed_stories">Feed stories</string>
|
||||
<string name="opening_post">Opening post...</string>
|
||||
<string name="opening_post">Opening post…</string>
|
||||
<string name="share">Share</string>
|
||||
<string name="layout_style">Layout style</string>
|
||||
<string name="column_count">Column count</string>
|
||||
|
|
@ -511,7 +511,7 @@
|
|||
<string name="click_to_show_full">Click to show full like count</string>
|
||||
<string name="no_profile_pic_found">No profile pic found!</string>
|
||||
<string name="swipe_up_confirmation">Are you sure you want to open this link?</string>
|
||||
<string name="sending">Sending...</string>
|
||||
<string name="sending">Sending…</string>
|
||||
<string name="share_via_dm">Share via DM</string>
|
||||
<string name="share_link">Share link…</string>
|
||||
<string name="slide_to_cancel">Slide to Cancel</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue