diff options
author | lado <herrlado@gmail.com> | 2013-04-04 03:02:07 +0200 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2013-04-04 03:02:07 +0200 |
commit | 5e8c603ad3b02ed54bc96106fc0aa382d022f8ee (patch) | |
tree | 925a2ad363f86e36219aecdd52b4f79572cc0ef6 /vdrmanager/src | |
parent | c5470a329c2f04ce48058de460fdb79deb91b8cf (diff) | |
download | vdr-manager-5e8c603ad3b02ed54bc96106fc0aa382d022f8ee.tar.gz vdr-manager-5e8c603ad3b02ed54bc96106fc0aa382d022f8ee.tar.bz2 |
haveing recording infos
Diffstat (limited to 'vdrmanager/src')
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java | 18 |
1 files changed, 17 insertions, 1 deletions
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<Recording> private Stack<String> stack = new Stack<String>(); + 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<Recording> // 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<Recording> } } + private void updateCurrentFolderInfo() { + folderInfo.setText("/" + currentFolder.replaceAll("~", "/")); + List<Recording> list = CACHE.get(currentFolder); + currentCount.setText(String.valueOf(list.size())); + } + /* * (non-Javadoc) * @@ -305,6 +318,8 @@ public class RecordingListActivity extends BaseEventListActivity<Recording> return; } + updateCurrentFolderInfo(); + sort(); Calendar cal = Calendar.getInstance(); @@ -315,7 +330,8 @@ public class RecordingListActivity extends BaseEventListActivity<Recording> 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<Recording> list2 = CACHE.get(sf); if (list2 != null) { recordingListItem.count = list2.size(); |