Don't show empty list message until cursor finishes loading.
Also forceably hid the "update all" button in the update tab. This is because on my crapy LG Tracphone android-10 device, it is slow enough that I can see that button appear and then disappear.
This commit is contained in:
parent
8b7a9f215c
commit
0174b4ca00
@ -31,6 +31,11 @@ abstract public class AppListAdapter extends CursorAdapter {
|
|||||||
init(context);
|
init(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return mDataValid && super.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
public AppListAdapter(Context context, Cursor c, boolean autoRequery) {
|
public AppListAdapter(Context context, Cursor c, boolean autoRequery) {
|
||||||
super(context, c, autoRequery);
|
super(context, c, autoRequery);
|
||||||
init(context);
|
init(context);
|
||||||
|
@ -139,6 +139,7 @@ public class CanUpdateAppsFragment extends AppListFragment {
|
|||||||
mUpdateAllButton.setText(R.string.update_all);
|
mUpdateAllButton.setText(R.string.update_all);
|
||||||
mUpdateAllButton.setCompoundDrawablesWithIntrinsicBounds(
|
mUpdateAllButton.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
getResources().getDrawable(R.drawable.ic_menu_refresh), null, null, null);
|
getResources().getDrawable(R.drawable.ic_menu_refresh), null, null, null);
|
||||||
|
mUpdateAllButton.setVisibility(View.GONE);
|
||||||
|
|
||||||
linearLayout.addView(mUpdateAllButton, new FrameLayout.LayoutParams(
|
linearLayout.addView(mUpdateAllButton, new FrameLayout.LayoutParams(
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user