mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01:00
Try fixing ViewPager2's IllegalStateException.
This commit is contained in:
parent
a5197d5e94
commit
dc248735c7
@ -33,7 +33,7 @@ import ml.docilealligator.infinityforreddit.utils.Utils;
|
||||
public class Infinity extends Application implements LifecycleObserver {
|
||||
private AppComponent mAppComponent;
|
||||
private NetworkWifiStatusReceiver mNetworkWifiStatusReceiver;
|
||||
private boolean lock = false;
|
||||
//private boolean lock = false;
|
||||
private boolean isSecureMode;
|
||||
@Inject
|
||||
@Named("default")
|
||||
|
@ -291,7 +291,7 @@ public class InboxActivity extends BaseActivity implements ActivityToolbarInterf
|
||||
}
|
||||
}).attach();
|
||||
if (savedInstanceState == null && getIntent().getBooleanExtra(EXTRA_VIEW_MESSAGE, false)) {
|
||||
viewPager2.setCurrentItem(1);
|
||||
viewPager2.setCurrentItem(1, false);
|
||||
}
|
||||
|
||||
fixViewPager2Sensitivity(viewPager2);
|
||||
|
@ -211,7 +211,7 @@ public class SubscribedThingListingActivity extends BaseActivity implements Acti
|
||||
tabLayout.setupWithViewPager(viewPager);
|
||||
|
||||
if (showMultiReddits) {
|
||||
viewPager.setCurrentItem(2);
|
||||
viewPager.setCurrentItem(2, false);
|
||||
}
|
||||
|
||||
loadSubscriptions(false);
|
||||
|
@ -1085,6 +1085,8 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
}
|
||||
|
||||
public class CommentViewHolder extends RecyclerView.ViewHolder {
|
||||
@BindView(R.id.linear_layout_item_comment)
|
||||
LinearLayout linearLayout;
|
||||
@BindView(R.id.author_text_view_item_post_comment)
|
||||
TextView authorTextView;
|
||||
@BindView(R.id.author_flair_text_view_item_post_comment)
|
||||
@ -1143,6 +1145,8 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
constraintSet.applyTo(bottomConstraintLayout);
|
||||
}
|
||||
|
||||
linearLayout.getLayoutTransition().setAnimateParentHierarchy(false);
|
||||
|
||||
if (mShowCommentDivider) {
|
||||
commentDivider.setBackgroundColor(mDividerColor);
|
||||
commentDivider.setVisibility(View.VISIBLE);
|
||||
|
@ -3265,6 +3265,8 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
constraintSet.applyTo(bottomConstraintLayout);
|
||||
}
|
||||
|
||||
((ViewGroup) itemView).getLayoutTransition().setAnimateParentHierarchy(false);
|
||||
|
||||
itemView.setBackgroundColor(mCardViewBackgroundColor);
|
||||
postTimeTextView.setTextColor(mSecondaryTextColor);
|
||||
titleTextView.setTextColor(mPostTitleColor);
|
||||
|
@ -227,6 +227,7 @@ public class PrivateMessagesDetailRecyclerViewAdapter extends RecyclerView.Adapt
|
||||
this.messageTextView = messageTextView;
|
||||
this.timeTextView = timeTextView;
|
||||
|
||||
((ViewGroup) itemView).getLayoutTransition().setAnimateParentHierarchy(false);
|
||||
messageTextView.setTextColor(Color.WHITE);
|
||||
timeTextView.setTextColor(mSecondaryTextColor);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_layout_item_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
|
Loading…
Reference in New Issue
Block a user