Skip to content

Commit

Permalink
Fix flickering 'about' section in group recipient preferences.
Browse files Browse the repository at this point in the history
Gotta disable those pesky layout animations.

Fixes #9092
  • Loading branch information
greyson-signal committed Oct 22, 2019
1 parent 350ca05 commit cee6736
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/org/thoughtcrime/securesms/RecipientPreferenceActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.RecyclerView;

import android.telephony.PhoneNumberUtils;

import org.thoughtcrime.securesms.components.SwitchPreferenceCompat;
Expand All @@ -40,8 +42,10 @@
import org.thoughtcrime.securesms.jobs.RotateProfileKeyJob;
import org.thoughtcrime.securesms.logging.Log;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
Expand Down Expand Up @@ -353,6 +357,14 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
}
}

@Override
public RecyclerView onCreateRecyclerView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
RecyclerView recyclerView = super.onCreateRecyclerView(inflater, parent, savedInstanceState);
recyclerView.setItemAnimator(null);
recyclerView.setLayoutAnimation(null);
return recyclerView;
}

private void initializeRecipients() {
this.recipient = Recipient.live(getArguments().getParcelable(RECIPIENT_ID));
this.recipient.observe(this, this::setSummaries);
Expand Down

0 comments on commit cee6736

Please sign in to comment.