summaryrefslogtreecommitdiff
path: root/vdrmanager
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager')
-rw-r--r--vdrmanager/res/layout/recording_list.xml3
-rw-r--r--vdrmanager/res/values/styles.xml10
-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
6 files changed, 48 insertions, 11 deletions
diff --git a/vdrmanager/res/layout/recording_list.xml b/vdrmanager/res/layout/recording_list.xml
index c7e81b4..d4bd820 100644
--- a/vdrmanager/res/layout/recording_list.xml
+++ b/vdrmanager/res/layout/recording_list.xml
@@ -11,7 +11,7 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal"
- android:padding="2dp" android:paddingLeft="5dp" android:paddingRight="5dp" >
+ android:paddingTop="2dp" android:paddingBottom="2dp" android:paddingLeft="5dp" android:paddingRight="5dp" >
<TextView
android:id="@+id/folder_info"
android:layout_width="wrap_content"
@@ -23,6 +23,7 @@
android:layout_height="wrap_content"
/>
</LinearLayout>
+
<ListView
android:id="@+id/recording_list" android:layout_width="fill_parent"
android:layout_height="fill_parent"
diff --git a/vdrmanager/res/values/styles.xml b/vdrmanager/res/values/styles.xml
index 4c463ba..70ece1a 100644
--- a/vdrmanager/res/values/styles.xml
+++ b/vdrmanager/res/values/styles.xml
@@ -67,5 +67,15 @@
<item name="android:layout_marginBottom">10dp</item>
<item name="android:background">@drawable/line_gradient</item>
</style>
+
+ <style name="Line2">
+ <item name="android:layout_width">fill_parent</item>
+ <item name="android:layout_height">1px</item>
+ <item name="android:layout_marginLeft">10dp</item>
+ <item name="android:layout_marginRight">10dp</item>
+ <item name="android:layout_marginTop">1dp</item>
+ <item name="android:layout_marginBottom">1dp</item>
+ <item name="android:background">@drawable/line_gradient</item>
+ </style>
</resources> \ No newline at end of file
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