summaryrefslogtreecommitdiff
path: root/vdrmanager/src
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2013-04-08 00:06:46 +0200
committerlado <herrlado@gmail.com>2013-04-08 00:06:46 +0200
commit9ec1a03caba363c6b8d06aac89b02607c352a007 (patch)
tree5cf05ddc43dd78b5b813654116eb82524bc9521b /vdrmanager/src
parent5e8c603ad3b02ed54bc96106fc0aa382d022f8ee (diff)
downloadvdr-manager-9ec1a03caba363c6b8d06aac89b02607c352a007.tar.gz
vdr-manager-9ec1a03caba363c6b8d06aac89b02607c352a007.tar.bz2
Fixed recording Folder searching
Diffstat (limited to 'vdrmanager/src')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Event.java2
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/RecordingListItem.java8
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventAdapter.java6
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingAdapter.java30
4 files changed, 36 insertions, 10 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Event.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Event.java
index dcfb010..ef3fe0e 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Event.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Event.java
@@ -111,7 +111,7 @@ public abstract class Event {
}
return TextUtils.substring(description, 0, 30) + "…";
}
- return shortText;
+ return "";
}
public String getDescription() {
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/RecordingListItem.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/RecordingListItem.java
index 486b1a3..58d798c 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/RecordingListItem.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/RecordingListItem.java
@@ -17,6 +17,14 @@ public class RecordingListItem extends EventListItem {
+ @Override
+ public String getTitle() {
+ if(isFolder()){
+ return folder;
+ }
+ return super.getTitle();
+ }
+
public boolean isFolder() {
return folder != null;
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventAdapter.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventAdapter.java
index 2f5dce5..b022311 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventAdapter.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventAdapter.java
@@ -277,6 +277,10 @@ abstract class BaseEventAdapter<T extends EventListItem> extends ArrayAdapter<T>
public void setHideChannelName(boolean hideChannelName) {
this.hideChannelName = hideChannelName;
}
+
+ protected boolean isHeader(EventListItem item){
+ return item.isHeader();
+ }
// TODO implement locking in performFiltering, check the parent class
// http://stackoverflow.com/questions/5846385/how-to-update-android-listview-with-dynamic-data-in-real-time
@@ -292,7 +296,7 @@ abstract class BaseEventAdapter<T extends EventListItem> extends ArrayAdapter<T>
highlight = arg0.toString().toLowerCase();
ArrayList<EventListItem> result = new ArrayList<EventListItem>();
for (EventListItem event : items) {
- if (event.isHeader()) {
+ if (isHeader(event)) {
prevHead = event;
// result.add(event);
continue;
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingAdapter.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingAdapter.java
index ff69795..9d537c1 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingAdapter.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingAdapter.java
@@ -29,16 +29,21 @@ class RecordingAdapter extends BaseEventAdapter<EventListItem> {
public int getViewTypeCount() {
return 3;
}
-
+
@Override
- public void add(EventListItem object) {
- items.add(object);
- // if (object.isHeader()) {
- // sections.add(object.getHeader());
- // }
- super.add(object);
+ protected boolean isHeader(EventListItem item) {
+ if(item instanceof RecordingListItem == false){
+ return item.isHeader();
+ }
+
+ if(((RecordingListItem)item).isFolder() ){
+ return false;
+ }
+
+ return item.isHeader();
}
+
@Override
public int getItemViewType(int position) {
@@ -89,7 +94,7 @@ class RecordingAdapter extends BaseEventAdapter<EventListItem> {
holder = (EventListItemFolderHolder) convertView.getTag();
}
- holder.folder.setText(item.folder);
+ holder.folder.setText(Utils.highlight(item.folder, highlight));
holder.count.setText(String.valueOf(item.count));
return convertView;
}
@@ -98,4 +103,13 @@ class RecordingAdapter extends BaseEventAdapter<EventListItem> {
public RecordingListItem getItem(int position) {
return (RecordingListItem) super.getItem(position);
}
+//
+// protected void addSuper(RecordingListItem item) {
+// super.addSuper(item);
+// }
+//
+// protected void clearSuper() {
+// super.clear();
+// }
+
} \ No newline at end of file