am 5a201b78: Merge change 27473 into eclair

Merge commit '5a201b787233a7e2b9b4bf6f84ab14b2cd3eec74' into eclair-plus-aosp

* commit '5a201b787233a7e2b9b4bf6f84ab14b2cd3eec74':
  Rename empty view so that the standard list view implementation
This commit is contained in:
Suchi Amalapurapu
2009-09-28 13:19:01 -07:00
committed by Android Git Automerger
2 changed files with 1 additions and 17 deletions

View File

@@ -23,7 +23,7 @@
android:drawSelectorOnTop="false"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView android:id="@+id/empty_view"
<TextView android:id="@android:id/empty"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="20dip"

View File

@@ -212,9 +212,6 @@ public class ManageApplications extends ListActivity implements
// Cache application attributes
private AppInfoCache mCache = new AppInfoCache();
// empty message displayed when list is empty
private TextView mEmptyView;
// Boolean variables indicating state
private boolean mLoadLabels = false;
private boolean mSizesFirst = false;
@@ -776,17 +773,6 @@ public class ManageApplications extends ListActivity implements
}
}
private void showEmptyViewIfListEmpty() {
if (localLOGV) Log.i(TAG, "Checking for empty view");
if (mAppInfoAdapter.getCount() > 0) {
mListView.setVisibility(View.VISIBLE);
mEmptyView.setVisibility(View.GONE);
} else {
mListView.setVisibility(View.GONE);
mEmptyView.setVisibility(View.VISIBLE);
}
}
// internal structure used to track added and deleted packages when
// the activity has focus
static class AddRemoveInfo {
@@ -1192,7 +1178,6 @@ public class ManageApplications extends ListActivity implements
} else {
notifyDataSetChanged();
}
showEmptyViewIfListEmpty();
return true;
}
@@ -1594,7 +1579,6 @@ public class ManageApplications extends ListActivity implements
// initialize the inflater
mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mReceiver = new PackageIntentReceiver();
mEmptyView = (TextView) findViewById(R.id.empty_view);
mObserver = new PkgSizeObserver();
// Create adapter and list view here
List<ApplicationInfo> appList = getInstalledApps(mSortOrder);