Fix for blinking while getting back to the computers activity.

Change-Id: I5ce3c6462b0d4c1e1fed98cc0510ec9383523458
This commit is contained in:
Artur Dryomov
2013-09-06 22:01:40 +03:00
parent 8e33646304
commit 710fc4728f

View File

@@ -133,9 +133,14 @@ public class ComputersFragment extends SherlockListFragment implements ServiceCo
private void hideComputersList() {
ViewAnimator aViewAnimator = getViewAnimator();
ViewGroup aProgressBarLayout = getProgressBarLayout();
aViewAnimator.setDisplayedChild(aViewAnimator.indexOfChild(aProgressBarLayout));
int aProgressBarLayoutIndex = aViewAnimator.indexOfChild(getProgressBarLayout());
if (aViewAnimator.getDisplayedChild() == aProgressBarLayoutIndex) {
return;
}
aViewAnimator.setDisplayedChild(aProgressBarLayoutIndex);
}
private ViewAnimator getViewAnimator() {
@@ -193,7 +198,7 @@ public class ComputersFragment extends SherlockListFragment implements ServiceCo
}
private void tearDownComputersAdapter() {
getComputesList().setAdapter(null);
setListAdapter(null);
}
private ListView getComputesList() {