Hide the sorting button when download list is empty
Jaekyun Seok [Mon, 15 Apr 2013 03:35:13 +0000 (12:35 +0900)]
Bug: 8515801
Change-Id: Id5ff6d56eb07de6b76bdb6bc3fa75af6ddd59a39

ui/src/com/android/providers/downloads/ui/DownloadList.java

index ed36993..29ea60e 100644 (file)
@@ -431,8 +431,10 @@ public class DownloadList extends Activity {
 
         if (mDateSortedCursor == null || mDateSortedCursor.getCount() == 0) {
             mEmptyView.setVisibility(View.VISIBLE);
+            mSortOption.setVisibility(View.GONE);
         } else {
             mEmptyView.setVisibility(View.GONE);
+            mSortOption.setVisibility(View.VISIBLE);
             ListView lv = activeListView();
             lv.setVisibility(View.VISIBLE);
             lv.invalidateViews(); // ensure checkboxes get updated