Browse Source
change waterfall layout
change waterfall layout
location is bugged, does affect visually but should not affect userenovate/androidx.fragment-fragment-ktx-1.x
Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
10 changed files with 240 additions and 376 deletions
-
133app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedItemViewHolder.java
-
6app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedPhotoViewHolder.java
-
17app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedSliderViewHolder.java
-
44app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedVideoViewHolder.java
-
113app/src/main/res/layout/item_feed_bottom.xml
-
20app/src/main/res/layout/item_feed_photo.xml
-
20app/src/main/res/layout/item_feed_slider.xml
-
131app/src/main/res/layout/item_feed_top.xml
-
27app/src/main/res/layout/item_feed_video.xml
-
105app/src/main/res/layout/item_full_post_view.xml
@ -1,113 +0,0 @@ |
|||
<?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="wrap_content" |
|||
android:orientation="vertical"> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/top_container" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/btnComments" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="match_parent" |
|||
android:background="?android:selectableItemBackground" |
|||
android:gravity="center" |
|||
android:orientation="horizontal" |
|||
android:padding="4dp"> |
|||
|
|||
<androidx.appcompat.widget.AppCompatImageView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:padding="4dp" |
|||
app:srcCompat="@drawable/ic_outline_comments_24" |
|||
app:tint="?android:textColorPrimary" /> |
|||
|
|||
<androidx.appcompat.widget.AppCompatTextView |
|||
android:id="@+id/commentsCount" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:gravity="center_vertical" |
|||
android:textAppearance="?attr/textAppearanceButton" |
|||
tools:text="690000" /> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/btnViews" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="match_parent" |
|||
android:gravity="center" |
|||
android:orientation="horizontal" |
|||
android:padding="4dp"> |
|||
|
|||
<androidx.appcompat.widget.AppCompatImageView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:padding="4dp" |
|||
app:srcCompat="@drawable/ic_outline_views_24" |
|||
app:tint="?android:textColorPrimary" /> |
|||
|
|||
<androidx.appcompat.widget.AppCompatTextView |
|||
android:id="@+id/tvVideoViews" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:gravity="center_vertical" |
|||
android:textAppearance="?attr/textAppearanceButton" |
|||
tools:text="690000" /> |
|||
</LinearLayout> |
|||
|
|||
<androidx.appcompat.widget.AppCompatTextView |
|||
android:id="@+id/tvPostDate" |
|||
android:layout_width="0dp" |
|||
android:layout_height="match_parent" |
|||
android:layout_weight="1" |
|||
android:gravity="center_vertical" |
|||
android:maxLines="1" |
|||
android:padding="8dp" |
|||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" |
|||
tools:text="2020-01-01 12:00:00" /> |
|||
|
|||
<!--<androidx.appcompat.widget.AppCompatImageView--> |
|||
<!-- android:id="@+id/btnMute"--> |
|||
<!-- android:layout_width="wrap_content"--> |
|||
<!-- android:layout_height="match_parent"--> |
|||
<!-- android:background="?selectableItemBackgroundBorderless"--> |
|||
<!-- android:padding="4dp"--> |
|||
<!-- android:visibility="gone"--> |
|||
<!-- app:srcCompat="@drawable/ic_volume_up_24"--> |
|||
<!-- app:tint="?android:textColorPrimary"--> |
|||
<!-- tools:visibility="visible" />--> |
|||
|
|||
<androidx.appcompat.widget.AppCompatImageView |
|||
android:id="@+id/btnDownload" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="match_parent" |
|||
android:background="?selectableItemBackgroundBorderless" |
|||
android:padding="4dp" |
|||
app:srcCompat="@drawable/ic_download" |
|||
app:tint="?android:textColorPrimary" /> |
|||
</LinearLayout> |
|||
|
|||
<awais.instagrabber.customviews.RamboTextViewV2 |
|||
android:id="@+id/viewerCaption" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:background="?android:selectableItemBackground" |
|||
android:clickable="true" |
|||
android:clipToPadding="false" |
|||
android:ellipsize="end" |
|||
android:focusable="true" |
|||
android:maxLines="5" |
|||
android:paddingStart="8dp" |
|||
android:paddingLeft="8dp" |
|||
android:paddingEnd="8dp" |
|||
android:paddingRight="8dp" |
|||
android:paddingBottom="8dp" |
|||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" |
|||
tools:text="Bottom text with hashtags etc." /> |
|||
</LinearLayout> |
@ -1,63 +1,86 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
<merge 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/container" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:padding="8dp"> |
|||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"> |
|||
|
|||
<com.facebook.drawee.view.SimpleDraweeView |
|||
android:id="@+id/ivProfilePic" |
|||
android:layout_width="@dimen/profile_pic_size_regular" |
|||
android:layout_height="@dimen/profile_pic_size_regular" |
|||
android:background="?selectableItemBackgroundBorderless" |
|||
app:roundAsCircle="true" /> |
|||
<awais.instagrabber.customviews.ProfilePicView |
|||
android:id="@+id/profile_pic" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_margin="12dp" |
|||
android:transitionName="profile_pic" |
|||
app:layout_constraintBottom_toTopOf="@id/top_barrier" |
|||
app:layout_constraintEnd_toStartOf="@id/title" |
|||
app:layout_constraintHorizontal_bias="0" |
|||
app:layout_constraintHorizontal_chainStyle="packed" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" |
|||
app:size="regular" /> |
|||
|
|||
<RelativeLayout |
|||
android:id="@+id/infoContainer" |
|||
<androidx.appcompat.widget.AppCompatTextView |
|||
android:id="@+id/title" |
|||
android:layout_width="0dp" |
|||
android:layout_height="match_parent" |
|||
android:layout_weight="1" |
|||
android:animateLayoutChanges="true" |
|||
android:background="@null" |
|||
android:gravity="center" |
|||
android:orientation="vertical" |
|||
android:paddingStart="8dp" |
|||
android:paddingLeft="8dp" |
|||
android:paddingEnd="8dp" |
|||
android:paddingRight="8dp" |
|||
android:weightSum="2"> |
|||
android:layout_height="wrap_content" |
|||
android:ellipsize="marquee" |
|||
android:singleLine="true" |
|||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6" |
|||
app:layout_constrainedWidth="true" |
|||
app:layout_constraintBottom_toTopOf="@id/subtitle" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toEndOf="@id/profile_pic" |
|||
app:layout_constraintTop_toTopOf="@id/profile_pic" |
|||
tools:text="Username Username Username" /> |
|||
|
|||
<androidx.appcompat.widget.AppCompatTextView |
|||
android:id="@+id/title" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" |
|||
tools:text="username" /> |
|||
<androidx.appcompat.widget.AppCompatTextView |
|||
android:id="@+id/subtitle" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:ellipsize="end" |
|||
android:singleLine="true" |
|||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" |
|||
app:layout_constraintBottom_toBottomOf="@id/profile_pic" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="@id/title" |
|||
app:layout_constraintTop_toBottomOf="@id/title" |
|||
tools:text="Full name Full name Full name Full name Full name Full name Full name " |
|||
tools:visibility="gone" /> |
|||
|
|||
<androidx.appcompat.widget.AppCompatTextView |
|||
android:id="@+id/location" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_below="@+id/title" |
|||
android:ellipsize="end" |
|||
android:gravity="center_vertical" |
|||
android:maxLines="1" |
|||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" |
|||
android:textSize="15sp" |
|||
android:visibility="visible" |
|||
tools:text="location" /> |
|||
</RelativeLayout> |
|||
<androidx.constraintlayout.widget.Barrier |
|||
android:id="@+id/top_barrier" |
|||
android:layout_width="0dp" |
|||
android:layout_height="0dp" |
|||
app:barrierAllowsGoneWidgets="true" |
|||
app:barrierDirection="bottom"/> |
|||
|
|||
<!--<androidx.appcompat.widget.AppCompatImageView--> |
|||
<!-- android:id="@+id/viewStoryPost"--> |
|||
<!-- android:layout_width="wrap_content"--> |
|||
<!-- android:layout_height="match_parent"--> |
|||
<!-- android:layout_gravity="center"--> |
|||
<!-- android:background="?selectableItemBackgroundBorderless"--> |
|||
<!-- app:srcCompat="@drawable/ic_open_in_new_24"--> |
|||
<!-- app:tint="?android:textColorPrimary" />--> |
|||
</LinearLayout> |
|||
<com.google.android.material.button.MaterialButton |
|||
android:id="@+id/location" |
|||
style="?borderlessButtonStyle" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginTop="16dp" |
|||
android:layout_marginEnd="16dp" |
|||
android:elevation="0dp" |
|||
android:ellipsize="end" |
|||
android:insetTop="0dp" |
|||
android:insetBottom="0dp" |
|||
android:maxWidth="200dp" |
|||
android:maxLines="1" |
|||
android:minHeight="32dp" |
|||
android:paddingStart="8dp" |
|||
android:paddingEnd="8dp" |
|||
android:textAlignment="viewStart" |
|||
android:textAllCaps="false" |
|||
android:textColor="@android:color/white" |
|||
android:visibility="gone" |
|||
app:backgroundTint="@color/black_a50" |
|||
app:elevation="0dp" |
|||
app:icon="@drawable/ic_round_location_on_24" |
|||
app:iconSize="16dp" |
|||
app:iconTint="@color/white" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@id/top_barrier" |
|||
app:rippleColor="@color/grey_600" |
|||
tools:text="Location, Location, Location, Location, " |
|||
tools:visibility="visible" /> |
|||
</merge> |
@ -1,19 +1,20 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
<androidx.constraintlayout.widget.ConstraintLayout 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/videoHolder" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
android:layout_height="wrap_content"> |
|||
|
|||
<include |
|||
android:id="@+id/item_feed_top" |
|||
layout="@layout/item_feed_top" /> |
|||
<include layout="@layout/item_feed_top" /> |
|||
|
|||
<include |
|||
android:id="@+id/video_post" |
|||
layout="@layout/layout_video_player_with_thumbnail" /> |
|||
<FrameLayout |
|||
android:id="@+id/post_container" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
app:layout_constraintBottom_toTopOf="@id/buttons_top_barrier" |
|||
app:layout_constraintTop_toBottomOf="@id/top_barrier" |
|||
tools:layout_height="100dp" /> |
|||
|
|||
<include |
|||
android:id="@+id/item_feed_bottom" |
|||
layout="@layout/item_feed_bottom" /> |
|||
</LinearLayout> |
|||
<include layout="@layout/layout_post_view_bottom" /> |
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
@ -1,105 +0,0 @@ |
|||
<?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"> |
|||
|
|||
<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" /> |
|||
|
|||
<!-- Removing for now, will add in later versions --> |
|||
<!--<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> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue