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