Browse Source

layout adjustments

legacy
Austin Huang 4 years ago
parent
commit
8c9a9b39e7
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 4
      app/build.gradle
  2. 4
      app/src/main/java/awais/instagrabber/activities/StoryViewer.java
  3. 4
      app/src/main/java/awais/instagrabber/customviews/RemixDrawerLayout.java
  4. 31
      app/src/main/res/layout/activity_main.xml
  5. 11
      app/src/main/res/layout/item_feed_bottom.xml
  6. 1
      app/src/main/res/layout/layout_feed_view.xml
  7. 7
      fastlane/metadata/android/changelogs/42.txt

4
app/build.gradle

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

4
app/src/main/java/awais/instagrabber/activities/StoryViewer.java

@ -105,6 +105,7 @@ public final class StoryViewer extends BaseLanguageActivity {
private String url, username;
private int slidePos = 0, lastSlidePos = 0;
private final String cookie = settingsHelper.getString(Constants.COOKIE);
private boolean fetching = false;
@Override
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))
Toast.makeText(getApplicationContext(), R.string.no_more_stories, Toast.LENGTH_SHORT).show();
else {
boolean fetching = false;
final FeedStoryModel feedStoryModel = isRightSwipe ?
(index == 0 ? null : storyFeed[index - 1]) :
(storyFeed.length == index + 1 ? null : storyFeed[index + 1]);
@ -728,7 +728,7 @@ final String url = "https://www.instagram.com/stories/reel/seen";
protected Void doInBackground(String... rawAction) {
final String action = rawAction[0];
final String url = "https://i.instagram.com/api/v1/direct_v2/create_group_thread/";
try {
try {
final HttpURLConnection urlConnection = (HttpURLConnection) new URL(url).openConnection();
urlConnection.setRequestMethod("POST");
urlConnection.setRequestProperty("User-Agent", Constants.I_USER_AGENT);

4
app/src/main/java/awais/instagrabber/customviews/RemixDrawerLayout.java

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

31
app/src/main/res/layout/activity_main.xml

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

11
app/src/main/res/layout/item_feed_bottom.xml

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

1
app/src/main/res/layout/layout_feed_view.xml

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

7
fastlane/metadata/android/changelogs/42.txt

@ -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)
*
Loading…
Cancel
Save