From 5e8c603ad3b02ed54bc96106fc0aa382d022f8ee Mon Sep 17 00:00:00 2001 From: lado Date: Thu, 4 Apr 2013 03:02:07 +0200 Subject: haveing recording infos --- .../vdrmanager/gui/RecordingListActivity.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'vdrmanager/src/de/bjusystems') diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java index c19e7ae..ab31d19 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java @@ -20,6 +20,7 @@ import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemLongClickListener; import android.widget.ListView; +import android.widget.TextView; import de.bjusystems.vdrmanager.R; import de.bjusystems.vdrmanager.data.Event; import de.bjusystems.vdrmanager.data.EventFormatter; @@ -64,6 +65,10 @@ public class RecordingListActivity extends BaseEventListActivity private Stack stack = new Stack(); + private TextView folderInfo; + + private TextView currentCount; + @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -72,6 +77,8 @@ public class RecordingListActivity extends BaseEventListActivity // attach adapter to ListView listView = (ListView) findViewById(R.id.recording_list); + folderInfo = (TextView) findViewById(R.id.folder_info); + currentCount = (TextView) findViewById(R.id.current_count); listView.setAdapter(adapter); // set click listener @@ -150,6 +157,12 @@ public class RecordingListActivity extends BaseEventListActivity } } + private void updateCurrentFolderInfo() { + folderInfo.setText("/" + currentFolder.replaceAll("~", "/")); + List list = CACHE.get(currentFolder); + currentCount.setText(String.valueOf(list.size())); + } + /* * (non-Javadoc) * @@ -305,6 +318,8 @@ public class RecordingListActivity extends BaseEventListActivity return; } + updateCurrentFolderInfo(); + sort(); Calendar cal = Calendar.getInstance(); @@ -315,7 +330,8 @@ public class RecordingListActivity extends BaseEventListActivity for (String f : folders) { RecordingListItem recordingListItem = new RecordingListItem(f); recordingListItem.folder = f; - String sf = currentFolder.length() > 0 ? currentFolder + Recording.FOLDERDELIMCHAR + f : f; + String sf = currentFolder.length() > 0 ? currentFolder + + Recording.FOLDERDELIMCHAR + f : f; List list2 = CACHE.get(sf); if (list2 != null) { recordingListItem.count = list2.size(); -- cgit v1.2.3