Disable EntityHeaderController animation for item move down issue
EntityHeaderController include the RecyclerView and it has animation by default. When RecyclerView do the animation first then update the UI, it will cause the issue. Bug: 189071671 Test: manaul test Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDetailPreferenceController2Test Change-Id: Ieb7e0a8f7658bface9af090ea061ca7265099fcd
This commit is contained in:
@@ -63,6 +63,7 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.android.net.module.util.Inet4AddressUtils;
|
||||
import com.android.settings.R;
|
||||
@@ -513,6 +514,12 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
// Disable the animation of the EntityHeaderController
|
||||
final RecyclerView recyclerView = mFragment.getListView();
|
||||
if (recyclerView != null) {
|
||||
recyclerView.setItemAnimator(null);
|
||||
}
|
||||
|
||||
// Ensure mNetwork is set before any callbacks above are delivered, since our
|
||||
// NetworkCallback only looks at changes to mNetwork.
|
||||
updateNetworkInfo();
|
||||
|
Reference in New Issue
Block a user