mirror of
https://github.com/KokaKiwi/BarInsta
synced 2026-03-05 20:11:36 +00:00
Added post viewer fragment. Updated almost all places to use this
Remaining places are SavedViewer and DirectMessageThreadFragment
This commit is contained in:
parent
ded09ab237
commit
13cacf43f9
56 changed files with 2991 additions and 745 deletions
4
app/src/main/res/layout/fragment_post_view.xml
Normal file
4
app/src/main/res/layout/fragment_post_view.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.viewpager2.widget.ViewPager2 xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
|
@ -42,7 +42,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -77,7 +78,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="4dp"
|
||||
android:visibility="visible"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/ic_volume_up_24"
|
||||
app:tint="?android:textColorPrimary" />
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:gravity="center"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:weightSum="2">
|
||||
|
|
@ -46,7 +47,8 @@
|
|||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:textColor="@color/feed_text_primary_color"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="15sp"
|
||||
android:visibility="visible"
|
||||
tools:text="location" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
|
|||
105
app/src/main/res/layout/item_full_post_view.xml
Normal file
105
app/src/main/res/layout/item_full_post_view.xml
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="3.2"
|
||||
tools:context=".activities.PostViewer">
|
||||
|
||||
<include
|
||||
android:id="@+id/topPanel"
|
||||
layout="@layout/item_feed_top" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.9">
|
||||
|
||||
<awais.instagrabber.customviews.helpers.NestedScrollableHost
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/mediaViewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</awais.instagrabber.customviews.helpers.NestedScrollableHost>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/mediaCounter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:background="@drawable/rounder_corner_semi_black_bg"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||
android:textColor="@android:color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressView"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ivToggleFullScreen"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="end|top"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="4dp"
|
||||
app:srcCompat="@drawable/ic_fullscreen"
|
||||
app:tint="?android:textColorPrimary" />
|
||||
</FrameLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/bottomPanel"
|
||||
layout="@layout/item_feed_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/postActions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.3"
|
||||
android:background="#0000"
|
||||
android:weightSum="2">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnLike"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/btn_lightpink_text_color"
|
||||
android:textSize="18sp"
|
||||
app:backgroundTint="@color/btn_lightpink_background"
|
||||
tools:text="@string/like" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnBookmark"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/bookmark"
|
||||
android:textColor="@color/btn_lightorange_text_color"
|
||||
android:textSize="18sp"
|
||||
app:backgroundTint="@color/btn_lightorange_background" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
44
app/src/main/res/layout/activity_viewer.xml → app/src/main/res/layout/item_full_post_view_bk.xml
Executable file → Normal file
44
app/src/main/res/layout/activity_viewer.xml → app/src/main/res/layout/item_full_post_view_bk.xml
Executable file → Normal file
|
|
@ -4,25 +4,15 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="3.2"
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activities.PostViewer">
|
||||
android:weightSum="3.2"
|
||||
tools:context=".activities.PostViewer"
|
||||
android:layout_marginTop="?attr/actionBarSize">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<include
|
||||
android:id="@+id/topPanel"
|
||||
layout="@layout/item_feed_top" />
|
||||
</FrameLayout>
|
||||
<include
|
||||
android:id="@+id/topPanel"
|
||||
layout="@layout/item_feed_top" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
|
|
@ -38,7 +28,7 @@
|
|||
app:auto_show="true"
|
||||
app:repeat_toggle_modes="all" />
|
||||
|
||||
<com.github.chrisbanes.photoview.PhotoView
|
||||
<awais.instagrabber.customviews.drawee.ZoomableDraweeView
|
||||
android:id="@+id/imageViewer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -63,7 +53,8 @@
|
|||
android:layout_gravity="end|top"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="4dp"
|
||||
app:srcCompat="@drawable/ic_fullscreen" />
|
||||
app:srcCompat="@drawable/ic_fullscreen"
|
||||
app:tint="?android:textColorPrimary" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/btnDownload"
|
||||
|
|
@ -89,14 +80,15 @@
|
|||
android:paddingLeft="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingRight="5dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_child_post" />
|
||||
|
||||
<include
|
||||
android:id="@+id/bottomPanel"
|
||||
layout="@layout/item_feed_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_weight="1" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/postActions"
|
||||
|
|
@ -104,26 +96,26 @@
|
|||
android:layout_height="0dp"
|
||||
android:layout_weight="0.3"
|
||||
android:background="#0000"
|
||||
android:weightSum="2"
|
||||
android:layout_alignParentBottom="true">
|
||||
android:weightSum="2">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnLike"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/like"
|
||||
android:textColor="@color/btn_lightpink_text_color"
|
||||
android:textSize="18sp"
|
||||
app:backgroundTint="@color/btn_lightpink_background" />
|
||||
app:backgroundTint="@color/btn_lightpink_background"
|
||||
tools:text="@string/like" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnBookmark"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginRight="8dp"
|
||||
Loading…
Add table
Add a link
Reference in a new issue