From d3728a927e8f750250d57c35eac6713860c894d4 Mon Sep 17 00:00:00 2001 From: lado Date: Wed, 29 Jan 2014 01:23:46 +0100 Subject: Recording Sdtructur --- .../vdrmanager/gui/RecordingAdapter.java | 39 ++++++++++------------ 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'vdrmanager/src/de') diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingAdapter.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingAdapter.java index 9d537c1..892e857 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingAdapter.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingAdapter.java @@ -10,7 +10,6 @@ import de.bjusystems.vdrmanager.data.EventFormatter; import de.bjusystems.vdrmanager.data.EventListItem; import de.bjusystems.vdrmanager.data.RecordingListItem; - class RecordingAdapter extends BaseEventAdapter { protected final static int TYPE_FOLDER = 2; @@ -29,21 +28,20 @@ class RecordingAdapter extends BaseEventAdapter { public int getViewTypeCount() { return 3; } - + @Override protected boolean isHeader(EventListItem item) { - if(item instanceof RecordingListItem == false){ + if (item instanceof RecordingListItem == false) { return item.isHeader(); } - - if(((RecordingListItem)item).isFolder() ){ + + if (((RecordingListItem) item).isFolder()) { return false; } - + return item.isHeader(); } - @Override public int getItemViewType(int position) { @@ -58,8 +56,6 @@ class RecordingAdapter extends BaseEventAdapter { return TYPE_ITEM; } - - class EventListItemFolderHolder { public TextView folder; public TextView count; @@ -73,7 +69,6 @@ class RecordingAdapter extends BaseEventAdapter { return itemHolder; } - @Override public View getView(final int position, View convertView, final ViewGroup parent) { @@ -86,7 +81,8 @@ class RecordingAdapter extends BaseEventAdapter { } EventListItemFolderHolder holder = null; - if (convertView == null || (convertView != null && convertView.getTag() instanceof EventListItemFolderHolder) == false) { + if (convertView == null + || (convertView != null && convertView.getTag() instanceof EventListItemFolderHolder) == false) { convertView = inflater.inflate(R.layout.folder_item, null); holder = getFolderViewHolder(item, convertView); convertView.setTag(holder); @@ -94,8 +90,9 @@ class RecordingAdapter extends BaseEventAdapter { holder = (EventListItemFolderHolder) convertView.getTag(); } - holder.folder.setText(Utils.highlight(item.folder, highlight)); - holder.count.setText(String.valueOf(item.count)); + holder.folder + .setText(Utils.highlight(item.folder.getName(), highlight)); + holder.count.setText(String.valueOf(item.folder.size())); return convertView; } @@ -103,13 +100,13 @@ class RecordingAdapter extends BaseEventAdapter { public RecordingListItem getItem(int position) { return (RecordingListItem) super.getItem(position); } -// -// protected void addSuper(RecordingListItem item) { -// super.addSuper(item); -// } -// -// protected void clearSuper() { -// super.clear(); -// } + // + // protected void addSuper(RecordingListItem item) { + // super.addSuper(item); + // } + // + // protected void clearSuper() { + // super.clear(); + // } } \ No newline at end of file -- cgit v1.2.3