1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-18 04:37:30 +00:00

layout adjustments

This commit is contained in:
Austin Huang 2020-08-07 17:02:31 -04:00
parent a6c2356435
commit 8c9a9b39e7
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
7 changed files with 36 additions and 26 deletions

View File

@ -9,8 +9,8 @@ android {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 29 targetSdkVersion 29
versionCode 41 versionCode 42
versionName '17.5' versionName '17.6'
multiDexEnabled true multiDexEnabled true

View File

@ -105,6 +105,7 @@ public final class StoryViewer extends BaseLanguageActivity {
private String url, username; private String url, username;
private int slidePos = 0, lastSlidePos = 0; private int slidePos = 0, lastSlidePos = 0;
private final String cookie = settingsHelper.getString(Constants.COOKIE); private final String cookie = settingsHelper.getString(Constants.COOKIE);
private boolean fetching = false;
@Override @Override
protected void onCreate(@Nullable final Bundle savedInstanceState) { protected void onCreate(@Nullable final Bundle savedInstanceState) {
@ -152,7 +153,6 @@ public final class StoryViewer extends BaseLanguageActivity {
if ((isRightSwipe == true && index == 0) || (isRightSwipe == false && index == storyFeed.length - 1)) if ((isRightSwipe == true && index == 0) || (isRightSwipe == false && index == storyFeed.length - 1))
Toast.makeText(getApplicationContext(), R.string.no_more_stories, Toast.LENGTH_SHORT).show(); Toast.makeText(getApplicationContext(), R.string.no_more_stories, Toast.LENGTH_SHORT).show();
else { else {
boolean fetching = false;
final FeedStoryModel feedStoryModel = isRightSwipe ? final FeedStoryModel feedStoryModel = isRightSwipe ?
(index == 0 ? null : storyFeed[index - 1]) : (index == 0 ? null : storyFeed[index - 1]) :
(storyFeed.length == index + 1 ? null : storyFeed[index + 1]); (storyFeed.length == index + 1 ? null : storyFeed[index + 1]);

View File

@ -27,9 +27,7 @@ import awais.instagrabber.R;
public final class RemixDrawerLayout extends MouseDrawer implements MouseDrawer.DrawerListener { public final class RemixDrawerLayout extends MouseDrawer implements MouseDrawer.DrawerListener {
private final FrameLayout frameLayout; private final FrameLayout frameLayout;
private View drawerView; private View drawerView;
private RecyclerView highlightsList; private RecyclerView highlightsList, feedPosts, feedStories;
private RecyclerView feedPosts;
private RecyclerView feedStories;
private float startX; private float startX;
public RemixDrawerLayout(@NonNull final Context context) { public RemixDrawerLayout(@NonNull final Context context) {

View File

@ -32,30 +32,37 @@
layout="@layout/layout_feed_view" /> layout="@layout/layout_feed_view" />
<!-- Discover View --> <!-- Discover View -->
<LinearLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/discoverLayout" android:id="@+id/discoverLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="end" android:layout_gravity="end"
android:paddingTop="24dp"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:orientation="vertical"
android:tag="@android:string/yes"> android:tag="@android:string/yes">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|snap|enterAlways">
<androidx.appcompat.widget.AppCompatSpinner <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/discoverType" android:id="@+id/discoverType"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:entries="@array/discover_placeholder" android:entries="@array/discover_placeholder"/>
android:paddingTop="4dp" </com.google.android.material.appbar.CollapsingToolbarLayout>
android:paddingBottom="4dp" /> </com.google.android.material.appbar.AppBarLayout>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/discoverSwipeRefreshLayout" android:id="@+id/discoverSwipeRefreshLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="end" android:layout_gravity="end"
android:tag="@android:string/yes"> android:tag="@android:string/yes"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/discoverPosts" android:id="@+id/discoverPosts"
@ -64,7 +71,7 @@
android:clipToPadding="false" android:clipToPadding="false"
tools:listitem="@layout/item_feed" /> tools:listitem="@layout/item_feed" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</awais.instagrabber.customviews.RemixDrawerLayout> </awais.instagrabber.customviews.RemixDrawerLayout>
</LinearLayout> </LinearLayout>

View File

@ -15,9 +15,9 @@
android:orientation="horizontal"> android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="48dp" android:layout_width="32dp"
android:layout_marginLeft="4dp"
android:layout_height="48dp" android:layout_height="48dp"
android:padding="8dp"
app:srcCompat="@drawable/comments" /> app:srcCompat="@drawable/comments" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
@ -25,7 +25,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="4dp" android:padding="2dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
tools:text="690000" /> tools:text="690000" />
@ -40,9 +40,8 @@
android:orientation="horizontal"> android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="48dp" android:layout_width="32dp"
android:layout_height="48dp" android:layout_height="48dp"
android:padding="8dp"
app:srcCompat="@drawable/video_views" /> app:srcCompat="@drawable/video_views" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
@ -50,7 +49,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="4dp" android:padding="2dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
tools:text="690000" /> tools:text="690000" />

View File

@ -42,7 +42,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clipToPadding="false" android:clipToPadding="false"
android:paddingTop="8dp"
tools:listitem="@layout/item_feed" /> tools:listitem="@layout/item_feed" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -0,0 +1,7 @@
The Answer to the Ultimate Question of Life, the Universe, and Everything is 42.
This update mostly consists of layout changes.
* Implements #36 and #37, both massively improve the feed stories bar
* Story viewer will tell you to slow down if you scroll across users too fast (Instead of launching another window)
*