mirror of
https://github.com/KokaKiwi/BarInsta
synced 2025-12-16 00:36:30 +00:00
Changes: 1. Separate out view holders for feed post types. 2. Improve performance for binding. 4. Initiating migration from Glide to Fresco, as performance of Fresco is way better. 3. Prefetch feed view thumbnails to get aspect ratio, to improve layout performance. 4. If auto play is off, the videos in feed are not loaded until play is pressed. 5. Lots of optimizations here and there.
49 lines
No EOL
2.2 KiB
XML
49 lines
No EOL
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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/feedLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="start"
|
|
android:animateLayoutChanges="true"
|
|
android:tag="@android:string/yes">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@null"
|
|
app:elevation="0dp">
|
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:layout_scrollFlags="scroll|snap|enterAlways">
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/feedStories"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:clipToPadding="false"
|
|
android:orientation="horizontal"
|
|
android:paddingStart="5dp"
|
|
android:paddingLeft="5dp"
|
|
android:paddingTop="24dp"
|
|
android:paddingEnd="5dp"
|
|
android:paddingRight="5dp"
|
|
android:visibility="gone" />
|
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
android:id="@+id/feedSwipeRefreshLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/feedPosts"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:clipToPadding="false"
|
|
tools:listitem="@layout/item_feed_photo" />
|
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout> |