summaryrefslogtreecommitdiff
path: root/vdrmanager
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2014-12-29 21:05:59 +0100
committerlado <herrlado@gmail.com>2014-12-29 21:05:59 +0100
commit6dcead1f7ad58be52e4c155942b651ad6f2c4e70 (patch)
treeea820e9a02acd153c33a235b3e136b03f2619ea3 /vdrmanager
parent4119f8234452ad9fa01cd4950b31a3408e5b30c0 (diff)
downloadvdr-manager-6dcead1f7ad58be52e4c155942b651ad6f2c4e70.tar.gz
vdr-manager-6dcead1f7ad58be52e4c155942b651ad6f2c4e70.tar.bz2
smarttvweb and compat lib. removed actionbar sherloch
Diffstat (limited to 'vdrmanager')
-rw-r--r--vdrmanager/AndroidManifest.xml9
-rw-r--r--vdrmanager/libs/android-support-v4.jarbin0 -> 987314 bytes
-rw-r--r--vdrmanager/project.properties4
-rw-r--r--vdrmanager/release/vdrmanager-12-beta-21.apkbin0 -> 1603320 bytes
-rw-r--r--vdrmanager/release/vdrmanager-12-beta-7.apkbin0 -> 1302988 bytes
-rw-r--r--vdrmanager/release/vdrmanager-12-beta-9.apkbin0 -> 1399667 bytes
-rw-r--r--vdrmanager/release/vdrmanager-12.10.apkbin0 -> 1400104 bytes
-rw-r--r--vdrmanager/release/vdrmanager-12.11.apkbin0 -> 1399891 bytes
-rw-r--r--vdrmanager/release/vdrmanager-12.12.apkbin0 -> 1600355 bytes
-rw-r--r--vdrmanager/release/vdrmanager-12.9.apkbin0 -> 1399664 bytes
-rwxr-xr-xvdrmanager/res/drawable-hdpi/action_search.pngbin0 -> 1764 bytes
-rw-r--r--vdrmanager/res/drawable-hdpi/drawer_shadow.9.pngbin0 -> 171 bytes
-rw-r--r--vdrmanager/res/drawable-hdpi/ic_drawer.pngbin0 -> 2842 bytes
-rwxr-xr-xvdrmanager/res/drawable-mdpi/action_search.pngbin0 -> 1394 bytes
-rw-r--r--vdrmanager/res/drawable-mdpi/drawer_shadow.9.pngbin0 -> 158 bytes
-rw-r--r--vdrmanager/res/drawable-mdpi/ic_drawer.pngbin0 -> 2837 bytes
-rwxr-xr-xvdrmanager/res/drawable-xhdpi/action_search.pngbin0 -> 2127 bytes
-rw-r--r--vdrmanager/res/drawable-xhdpi/drawer_shadow.9.pngbin0 -> 182 bytes
-rw-r--r--vdrmanager/res/drawable-xhdpi/ic_drawer.pngbin0 -> 1056 bytes
-rw-r--r--vdrmanager/res/layout/channel_list.xml140
-rw-r--r--vdrmanager/res/layout/channel_list_fragment.xml70
-rw-r--r--vdrmanager/res/layout/drawer_list_item.xml27
-rw-r--r--vdrmanager/res/layout/event_epg_list.xml175
-rw-r--r--vdrmanager/res/layout/left_drawer.xml19
-rw-r--r--vdrmanager/res/layout/recording_list.xml11
-rw-r--r--vdrmanager/res/layout/search_epg_list.xml10
-rw-r--r--vdrmanager/res/layout/time_epg_list.xml171
-rw-r--r--vdrmanager/res/layout/timer_list.xml96
-rw-r--r--vdrmanager/res/menu/channellist.xml6
-rw-r--r--vdrmanager/res/menu/epg_details.xml9
-rw-r--r--vdrmanager/res/menu/epg_event_list_menu.xml4
-rw-r--r--vdrmanager/res/menu/epg_list_menu.xml4
-rw-r--r--vdrmanager/res/menu/epg_search_menu.xml4
-rw-r--r--vdrmanager/res/menu/main_menu.xml10
-rw-r--r--vdrmanager/res/menu/recording_list_item_menu.xml21
-rw-r--r--vdrmanager/res/menu/refresh_filter_menu.xml6
-rw-r--r--vdrmanager/res/menu/refresh_menu.xml4
-rw-r--r--vdrmanager/res/menu/vdrlist.xml4
-rw-r--r--vdrmanager/res/values-de/strings.xml3
-rw-r--r--vdrmanager/res/values-it/strings.xml2
-rw-r--r--vdrmanager/res/values-uk/strings.xml2
-rw-r--r--vdrmanager/res/values-v14/abs__themes.xml7
-rw-r--r--vdrmanager/res/values/arrays.xml8
-rw-r--r--vdrmanager/res/values/strings.xml241
-rw-r--r--vdrmanager/res/values/styles.xml2
-rw-r--r--vdrmanager/res/xml/vdr_prefs.xml17
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java16
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Vdr.java29
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/db/DBAccess.java19
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java269
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java30
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java35
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListFragment.java8
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java16
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgSearchListActivity.java37
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java37
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/ICSBaseActivity.java22
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java33
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/TimeEpgListActivity.java756
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java34
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java40
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrManagerActivity.java27
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrPreferencesActivity.java79
63 files changed, 1532 insertions, 1041 deletions
diff --git a/vdrmanager/AndroidManifest.xml b/vdrmanager/AndroidManifest.xml
index 656e210..436e842 100644
--- a/vdrmanager/AndroidManifest.xml
+++ b/vdrmanager/AndroidManifest.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.bjusystems.vdrmanager"
- android:versionCode="12110"
- android:versionName="12.11" >
+ android:versionCode="12210"
+ android:versionName="12.21" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@@ -12,11 +12,10 @@
<uses-sdk
android:minSdkVersion="8"
- android:targetSdkVersion="19" />
+ android:targetSdkVersion="21" />
<application
-
- android:theme="@style/Theme.Sherlock"
+ android:theme="@style/AppTheme"
android:name=".app.VdrManagerApp"
android:hardwareAccelerated="true"
android:icon="@drawable/app_logo"
diff --git a/vdrmanager/libs/android-support-v4.jar b/vdrmanager/libs/android-support-v4.jar
new file mode 100644
index 0000000..ac4181f
--- /dev/null
+++ b/vdrmanager/libs/android-support-v4.jar
Binary files differ
diff --git a/vdrmanager/project.properties b/vdrmanager/project.properties
index c91098a..46f7358 100644
--- a/vdrmanager/project.properties
+++ b/vdrmanager/project.properties
@@ -8,5 +8,5 @@
# project structure.
# Project target.
-target=android-19
-android.library.reference.1=../../ActionBarSherlock.git/actionbarsherlock
+target=Google Inc.:Google APIs:21
+android.library.reference.1=../../../../../../opt/android-sdk-update-manager/extras/android/support/v7/appcompat
diff --git a/vdrmanager/release/vdrmanager-12-beta-21.apk b/vdrmanager/release/vdrmanager-12-beta-21.apk
new file mode 100644
index 0000000..c828f90
--- /dev/null
+++ b/vdrmanager/release/vdrmanager-12-beta-21.apk
Binary files differ
diff --git a/vdrmanager/release/vdrmanager-12-beta-7.apk b/vdrmanager/release/vdrmanager-12-beta-7.apk
new file mode 100644
index 0000000..273ccc7
--- /dev/null
+++ b/vdrmanager/release/vdrmanager-12-beta-7.apk
Binary files differ
diff --git a/vdrmanager/release/vdrmanager-12-beta-9.apk b/vdrmanager/release/vdrmanager-12-beta-9.apk
new file mode 100644
index 0000000..08c425a
--- /dev/null
+++ b/vdrmanager/release/vdrmanager-12-beta-9.apk
Binary files differ
diff --git a/vdrmanager/release/vdrmanager-12.10.apk b/vdrmanager/release/vdrmanager-12.10.apk
new file mode 100644
index 0000000..ae67a34
--- /dev/null
+++ b/vdrmanager/release/vdrmanager-12.10.apk
Binary files differ
diff --git a/vdrmanager/release/vdrmanager-12.11.apk b/vdrmanager/release/vdrmanager-12.11.apk
new file mode 100644
index 0000000..f94a46a
--- /dev/null
+++ b/vdrmanager/release/vdrmanager-12.11.apk
Binary files differ
diff --git a/vdrmanager/release/vdrmanager-12.12.apk b/vdrmanager/release/vdrmanager-12.12.apk
new file mode 100644
index 0000000..4a854c5
--- /dev/null
+++ b/vdrmanager/release/vdrmanager-12.12.apk
Binary files differ
diff --git a/vdrmanager/release/vdrmanager-12.9.apk b/vdrmanager/release/vdrmanager-12.9.apk
new file mode 100644
index 0000000..92d1921
--- /dev/null
+++ b/vdrmanager/release/vdrmanager-12.9.apk
Binary files differ
diff --git a/vdrmanager/res/drawable-hdpi/action_search.png b/vdrmanager/res/drawable-hdpi/action_search.png
new file mode 100755
index 0000000..f12e005
--- /dev/null
+++ b/vdrmanager/res/drawable-hdpi/action_search.png
Binary files differ
diff --git a/vdrmanager/res/drawable-hdpi/drawer_shadow.9.png b/vdrmanager/res/drawable-hdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..224cc4f
--- /dev/null
+++ b/vdrmanager/res/drawable-hdpi/drawer_shadow.9.png
Binary files differ
diff --git a/vdrmanager/res/drawable-hdpi/ic_drawer.png b/vdrmanager/res/drawable-hdpi/ic_drawer.png
new file mode 100644
index 0000000..ff7b1de
--- /dev/null
+++ b/vdrmanager/res/drawable-hdpi/ic_drawer.png
Binary files differ
diff --git a/vdrmanager/res/drawable-mdpi/action_search.png b/vdrmanager/res/drawable-mdpi/action_search.png
new file mode 100755
index 0000000..587d9e0
--- /dev/null
+++ b/vdrmanager/res/drawable-mdpi/action_search.png
Binary files differ
diff --git a/vdrmanager/res/drawable-mdpi/drawer_shadow.9.png b/vdrmanager/res/drawable-mdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..3797f99
--- /dev/null
+++ b/vdrmanager/res/drawable-mdpi/drawer_shadow.9.png
Binary files differ
diff --git a/vdrmanager/res/drawable-mdpi/ic_drawer.png b/vdrmanager/res/drawable-mdpi/ic_drawer.png
new file mode 100644
index 0000000..fb681ba
--- /dev/null
+++ b/vdrmanager/res/drawable-mdpi/ic_drawer.png
Binary files differ
diff --git a/vdrmanager/res/drawable-xhdpi/action_search.png b/vdrmanager/res/drawable-xhdpi/action_search.png
new file mode 100755
index 0000000..3549f84
--- /dev/null
+++ b/vdrmanager/res/drawable-xhdpi/action_search.png
Binary files differ
diff --git a/vdrmanager/res/drawable-xhdpi/drawer_shadow.9.png b/vdrmanager/res/drawable-xhdpi/drawer_shadow.9.png
new file mode 100644
index 0000000..fa3d853
--- /dev/null
+++ b/vdrmanager/res/drawable-xhdpi/drawer_shadow.9.png
Binary files differ
diff --git a/vdrmanager/res/drawable-xhdpi/ic_drawer.png b/vdrmanager/res/drawable-xhdpi/ic_drawer.png
new file mode 100644
index 0000000..b9bc3d7
--- /dev/null
+++ b/vdrmanager/res/drawable-xhdpi/ic_drawer.png
Binary files differ
diff --git a/vdrmanager/res/layout/channel_list.xml b/vdrmanager/res/layout/channel_list.xml
index 3ff4c1e..df2d984 100644
--- a/vdrmanager/res/layout/channel_list.xml
+++ b/vdrmanager/res/layout/channel_list.xml
@@ -1,70 +1,102 @@
-<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/flipper"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
-
- <LinearLayout
- android:id="@+id/main_content"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
+<!--
+ Copyright 2013 The Android Open Source Project
- <EditText
- android:id="@+id/search_box"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:hint="@string/type_to_filter"
- android:inputType="text"
- android:maxLines="1"
- android:visibility="gone" />
-
- <ExpandableListView
- android:id="@+id/channel_list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_alignParentTop="true"
- android:layout_alignWithParentIfMissing="true"
- android:layout_centerHorizontal="true"
- android:cacheColorHint="?android:attr/colorBackground" />
-
- <TextView
- android:id="@android:id/empty"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Empty set" />
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/no_connection_layout"
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+
+<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
+<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/drawer_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <!--
+ As the main content view, the view below consumes the entire
+ space available using match_parent in both dimensions.
+ -->
+
+ <ViewFlipper
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/flipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
+ android:id="@+id/main_content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:gravity="center"
- android:orientation="horizontal" >
+ android:orientation="vertical" >
- <TextView
- android:layout_width="wrap_content"
+ <EditText
+ android:id="@+id/search_box"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="@string/no_connection"
- android:textSize="18dip" />
+ android:hint="@string/type_to_filter"
+ android:inputType="text"
+ android:maxLines="1"
+ android:visibility="gone" />
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/sad" />
+ <ExpandableListView
+ android:id="@+id/channel_list"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_alignParentTop="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_centerHorizontal="true"
+ android:cacheColorHint="?android:attr/colorBackground" />
- <Button
- android:id="@+id/retry_button"
+ <TextView
+ android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/no_connection_retry"
- android:textSize="18dip" />
+ android:text="Empty set" />
</LinearLayout>
- </LinearLayout>
-</ViewFlipper> \ No newline at end of file
+ <LinearLayout
+ android:id="@+id/no_connection_layout"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:gravity="center"
+ android:orientation="horizontal" >
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection"
+ android:textSize="18dip" />
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/sad" />
+
+ <Button
+ android:id="@+id/retry_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection_retry"
+ android:textSize="18dip" />
+ </LinearLayout>
+ </LinearLayout>
+ </ViewFlipper>
+
+ <include layout="@layout/left_drawer" />
+
+</android.support.v4.widget.DrawerLayout> \ No newline at end of file
diff --git a/vdrmanager/res/layout/channel_list_fragment.xml b/vdrmanager/res/layout/channel_list_fragment.xml
new file mode 100644
index 0000000..becf269
--- /dev/null
+++ b/vdrmanager/res/layout/channel_list_fragment.xml
@@ -0,0 +1,70 @@
+<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/flipper"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:id="@+id/main_content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <EditText
+ android:id="@+id/search_box"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/type_to_filter"
+ android:inputType="text"
+ android:maxLines="1"
+ android:visibility="gone" />
+
+ <ExpandableListView
+ android:id="@+id/channel_list"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_alignParentTop="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_centerHorizontal="true"
+ android:cacheColorHint="?android:attr/colorBackground" />
+
+ <TextView
+ android:id="@android:id/empty"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Empty set" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/no_connection_layout"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:gravity="center"
+ android:orientation="horizontal" >
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection"
+ android:textSize="18dip" />
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/sad" />
+
+ <Button
+ android:id="@+id/retry_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection_retry"
+ android:textSize="18dip" />
+ </LinearLayout>
+ </LinearLayout>
+
+</ViewFlipper>
diff --git a/vdrmanager/res/layout/drawer_list_item.xml b/vdrmanager/res/layout/drawer_list_item.xml
new file mode 100644
index 0000000..ab52575
--- /dev/null
+++ b/vdrmanager/res/layout/drawer_list_item.xml
@@ -0,0 +1,27 @@
+<!--
+ Copyright 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/text1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceListItemSmall"
+ android:gravity="center_vertical"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:textColor="#fff"
+ android:background="?android:attr/activatedBackgroundIndicator"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"/> \ No newline at end of file
diff --git a/vdrmanager/res/layout/event_epg_list.xml b/vdrmanager/res/layout/event_epg_list.xml
index 6c26b4a..2e835d4 100644
--- a/vdrmanager/res/layout/event_epg_list.xml
+++ b/vdrmanager/res/layout/event_epg_list.xml
@@ -1,107 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
-<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/flipper"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
+<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
+<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/drawer_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
- <RelativeLayout
+ <ViewFlipper
+ android:id="@+id/flipper"
android:layout_width="fill_parent"
- android:layout_height="wrap_content" >
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
- <LinearLayout
- android:id="@+id/whatson_time"
+ <RelativeLayout
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:orientation="horizontal" >
+ android:layout_height="wrap_content" >
- <Spinner
- android:id="@+id/epg_list_channel_spinner"
+ <LinearLayout
+ android:id="@+id/whatson_time"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="3dip"
- android:layout_weight="1"
- android:prompt="@string/epg_list_channel_spinner" />
-
- <ImageView
- android:id="@+id/switch_epg_view"
- style="?android:attr/buttonStyleSmall"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_centerHorizontal="true"
- android:layout_gravity="center_horizontal"
- android:background="@android:drawable/list_selector_background"
- android:clickable="true"
- android:src="@drawable/ic_menu_revert" />
- </LinearLayout>
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ android:orientation="horizontal" >
- <ListView
- android:id="@+id/whatson_list"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_above="@+id/channel_info"
- android:layout_alignWithParentIfMissing="true"
- android:layout_below="@+id/whatson_time"
- android:layout_centerHorizontal="true"
- android:cacheColorHint="?android:attr/colorBackground" />
+ <Spinner
+ android:id="@+id/epg_list_channel_spinner"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="3dip"
+ android:layout_weight="1"
+ android:prompt="@string/epg_list_channel_spinner" />
- <LinearLayout
- android:id="@+id/channel_info"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:background="@drawable/back"
- android:orientation="horizontal"
- android:layout_marginTop="4dp"
- android:padding="2dp" >
-
- <ImageView
- android:id="@+id/audio_image"
- android:layout_width="wrap_content"
+ <ImageView
+ android:id="@+id/switch_epg_view"
+ style="?android:attr/buttonStyleSmall"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_centerHorizontal="true"
+ android:layout_gravity="center_horizontal"
+ android:background="@android:drawable/list_selector_background"
+ android:clickable="true"
+ android:src="@drawable/ic_menu_revert" />
+ </LinearLayout>
+
+ <ListView
+ android:id="@+id/whatson_list"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:src="@drawable/ic_volume_small" />
+ android:layout_above="@+id/channel_info"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_below="@+id/whatson_time"
+ android:layout_centerHorizontal="true"
+ android:cacheColorHint="?android:attr/colorBackground" />
- <TextView
- android:id="@+id/channel_audio"
+ <LinearLayout
+ android:id="@+id/channel_info"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="5dp"
- android:text="" />
- </LinearLayout>
- </RelativeLayout>
+ android:layout_alignParentBottom="true"
+ android:layout_marginTop="4dp"
+ android:background="@drawable/back"
+ android:orientation="horizontal"
+ android:padding="2dp" >
- <LinearLayout
- android:id="@+id/no_connection_layout"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
+ <ImageView
+ android:id="@+id/audio_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_volume_small" />
+
+ <TextView
+ android:id="@+id/channel_audio"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="5dp"
+ android:text="" />
+ </LinearLayout>
+ </RelativeLayout>
<LinearLayout
+ android:id="@+id/no_connection_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:gravity="center"
- android:orientation="horizontal" >
+ android:orientation="vertical" >
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/no_connection"
- android:textSize="18dip" />
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:gravity="center"
+ android:orientation="horizontal" >
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/sad" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection"
+ android:textSize="18dip" />
- <Button
- android:id="@+id/retry_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/no_connection_retry"
- android:textSize="18dip" />
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/sad" />
+
+ <Button
+ android:id="@+id/retry_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection_retry"
+ android:textSize="18dip" />
+ </LinearLayout>
</LinearLayout>
- </LinearLayout>
+ </ViewFlipper>
+
+ <include layout="@layout/left_drawer" />
-</ViewFlipper> \ No newline at end of file
+</android.support.v4.widget.DrawerLayout> \ No newline at end of file
diff --git a/vdrmanager/res/layout/left_drawer.xml b/vdrmanager/res/layout/left_drawer.xml
new file mode 100644
index 0000000..ad8379a
--- /dev/null
+++ b/vdrmanager/res/layout/left_drawer.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ android:layout_gravity="start" tells DrawerLayout to treat
+ this as a sliding drawer on the left side for left-to-right
+ languages and on the right side for right-to-left languages.
+ The drawer is given a fixed width in dp and extends the full height of
+ the container. A solid background is used for contrast
+ with the content view.
+-->
+<ListView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/left_drawer"
+ android:layout_width="240dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="start"
+ android:background="#111"
+ android:choiceMode="singleChoice"
+ android:divider="@android:color/transparent"
+ android:dividerHeight="0dp" />
diff --git a/vdrmanager/res/layout/recording_list.xml b/vdrmanager/res/layout/recording_list.xml
index 3ad9103..dd4b100 100644
--- a/vdrmanager/res/layout/recording_list.xml
+++ b/vdrmanager/res/layout/recording_list.xml
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
+<android.support.v4.widget.DrawerLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/drawer_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flipper"
android:layout_width="fill_parent"
@@ -99,4 +104,8 @@
android:textSize="18sp" />
</LinearLayout>
-</ViewFlipper> \ No newline at end of file
+</ViewFlipper>
+
+<include layout="@layout/left_drawer" />
+
+</android.support.v4.widget.DrawerLayout> \ No newline at end of file
diff --git a/vdrmanager/res/layout/search_epg_list.xml b/vdrmanager/res/layout/search_epg_list.xml
index eef7503..d5cc5af 100644
--- a/vdrmanager/res/layout/search_epg_list.xml
+++ b/vdrmanager/res/layout/search_epg_list.xml
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
+<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/drawer_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
@@ -38,6 +41,7 @@
</LinearLayout>
</LinearLayout>
-
-
</LinearLayout>
+
+<include layout="@layout/left_drawer"/>
+</android.support.v4.widget.DrawerLayout>
diff --git a/vdrmanager/res/layout/time_epg_list.xml b/vdrmanager/res/layout/time_epg_list.xml
index 3274adb..f42ab32 100644
--- a/vdrmanager/res/layout/time_epg_list.xml
+++ b/vdrmanager/res/layout/time_epg_list.xml
@@ -1,106 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
-<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/flipper"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
+<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
+<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/drawer_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
- <LinearLayout
+ <ViewFlipper
+ android:id="@+id/flipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
- android:id="@+id/whatson_time"
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
- <TextView
- android:id="@+id/epg_list_time_label"
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:id="@+id/whatson_time"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="@string/epg_list_time_label"
- android:visibility="gone" />
+ android:orientation="horizontal" >
- <ImageView
- android:id="@+id/epg_list_times"
- style="?android:attr/buttonStyleSmall"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
+ <TextView
+ android:id="@+id/epg_list_time_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/epg_list_time_label"
+ android:visibility="gone" />
+
+ <ImageView
+ android:id="@+id/epg_list_times"
+ style="?android:attr/buttonStyleSmall"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_centerHorizontal="true"
+ android:layout_gravity="center_horizontal"
+ android:background="@android:drawable/list_selector_background"
+ android:clickable="true"
+ android:src="@drawable/btn_search_times" />
+
+ <Spinner
+ android:id="@+id/epg_list_time_spinner"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="2dip"
+ android:layout_weight="1"
+ android:prompt="@string/epg_list_time_label" />
+
+ <ImageView
+ android:id="@+id/switch_epg_view"
+ style="?android:attr/buttonStyleSmall"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_centerHorizontal="true"
+ android:layout_gravity="center_horizontal"
+ android:background="@android:drawable/list_selector_background"
+ android:clickable="true"
+ android:src="@drawable/ic_menu_revert" />
+ </LinearLayout>
+
+ <ListView
+ android:id="@+id/whatson_list"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_alignParentTop="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_below="@id/epg_list_time_spinner"
android:layout_centerHorizontal="true"
- android:layout_gravity="center_horizontal"
- android:background="@android:drawable/list_selector_background"
- android:clickable="true"
- android:src="@drawable/btn_search_times" />
+ android:cacheColorHint="?android:attr/colorBackground" />
- <Spinner
- android:id="@+id/epg_list_time_spinner"
+ <TextView
+ android:id="@+id/epg_list_search_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginTop="2dip"
- android:prompt="@string/epg_list_time_label" />
-
- <ImageView
- android:id="@+id/switch_epg_view"
- style="?android:attr/buttonStyleSmall"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_centerHorizontal="true"
- android:layout_gravity="center_horizontal"
- android:background="@android:drawable/list_selector_background"
- android:clickable="true"
- android:src="@drawable/ic_menu_revert" />
+ android:text="@string/epg_list_search_label" />
</LinearLayout>
- <ListView
- android:id="@+id/whatson_list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_alignParentTop="true"
- android:layout_alignWithParentIfMissing="true"
- android:layout_below="@id/epg_list_time_spinner"
- android:layout_centerHorizontal="true"
- android:cacheColorHint="?android:attr/colorBackground" />
-
- <TextView
- android:id="@+id/epg_list_search_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/epg_list_search_label" />
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/no_connection_layout"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
-
<LinearLayout
+ android:id="@+id/no_connection_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:gravity="center"
- android:orientation="horizontal" >
+ android:orientation="vertical" >
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/no_connection"
- android:textSize="18dip" />
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:gravity="center"
+ android:orientation="horizontal" >
- <ImageView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/sad" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection"
+ android:textSize="18dip" />
- <Button
- android:id="@+id/retry_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/no_connection_retry"
- android:textSize="18dip" />
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/sad" />
+
+ <Button
+ android:id="@+id/retry_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection_retry"
+ android:textSize="18dip" />
+ </LinearLayout>
</LinearLayout>
- </LinearLayout>
+ </ViewFlipper>
+
+ <include layout="@layout/left_drawer" />
-</ViewFlipper> \ No newline at end of file
+</android.support.v4.widget.DrawerLayout> \ No newline at end of file
diff --git a/vdrmanager/res/layout/timer_list.xml b/vdrmanager/res/layout/timer_list.xml
index ccb4be1..7a3ed02 100644
--- a/vdrmanager/res/layout/timer_list.xml
+++ b/vdrmanager/res/layout/timer_list.xml
@@ -1,34 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
-<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/flipper"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
- <LinearLayout android:layout_height="fill_parent"
- android:layout_width="fill_parent" android:id="@+id/main_content">
- <ListView
- android:id="@+id/timer_list" android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_alignWithParentIfMissing="true"
- android:layout_alignParentTop="true" android:layout_centerHorizontal="true"
- android:cacheColorHint="?android:attr/colorBackground" />
- </LinearLayout>
-
- <LinearLayout android:orientation="vertical"
- android:id="@+id/no_connection_layout" android:layout_width="fill_parent"
- android:layout_height="fill_parent">
- <LinearLayout android:layout_height="fill_parent"
- android:gravity="center" android:layout_width="fill_parent"
- android:orientation="horizontal">
- <TextView android:text="@string/no_connection"
- android:layout_height="wrap_content" android:layout_width="wrap_content"
- android:textSize="18dip" />
- <ImageView android:src="@drawable/sad"
- android:layout_height="wrap_content" android:layout_width="wrap_content" />
- <Button android:text="@string/no_connection_retry"
- android:textSize="18dip" android:layout_height="wrap_content"
- android:layout_width="wrap_content" android:id="@+id/retry_button" />
-
- </LinearLayout>
- </LinearLayout>
-</ViewFlipper> \ No newline at end of file
+<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
+<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/drawer_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <ViewFlipper
+ android:id="@+id/flipper"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:id="@+id/main_content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" >
+
+ <ListView
+ android:id="@+id/timer_list"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_alignParentTop="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_centerHorizontal="true"
+ android:cacheColorHint="?android:attr/colorBackground" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/no_connection_layout"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:gravity="center"
+ android:orientation="horizontal" >
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection"
+ android:textSize="18dip" />
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/sad" />
+
+ <Button
+ android:id="@+id/retry_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_connection_retry"
+ android:textSize="18dip" />
+ </LinearLayout>
+ </LinearLayout>
+ </ViewFlipper>
+
+ <include layout="@layout/left_drawer" />
+
+</android.support.v4.widget.DrawerLayout> \ No newline at end of file
diff --git a/vdrmanager/res/menu/channellist.xml b/vdrmanager/res/menu/channellist.xml
index 29cf2d8..4f2695a 100644
--- a/vdrmanager/res/menu/channellist.xml
+++ b/vdrmanager/res/menu/channellist.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:v7="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/channels_recent_channels" android:alphabeticShortcut="r"
android:icon="@drawable/ic_menu_recent_history"
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:title="@string/recent_channels"/>
<item
android:id="@+id/channels_groupby" android:alphabeticShortcut="g"
android:icon="@android:drawable/ic_menu_sort_alphabetically"
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:title="@string/menu_groupby"/>
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/epg_details.xml b/vdrmanager/res/menu/epg_details.xml
index 4353b0b..6ce238a 100644
--- a/vdrmanager/res/menu/epg_details.xml
+++ b/vdrmanager/res/menu/epg_details.xml
@@ -1,25 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:v7="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/epg_details_menu_search_repeat"
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:icon="@drawable/ic_menu_view"
android:title="@string/search_reapt"/>
<item
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:id="@+id/epg_details_menu_share"
android:icon="@android:drawable/ic_menu_share"
android:title="@string/share"/>
<item
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:id="@+id/epg_details_menu_add_to_cal"
android:icon="@android:drawable/ic_menu_month"
android:title="@string/addtocal"/>
<item
+ v7:showAsAction="ifRoom"
android:id="@+id/epg_details_menu_switch"
android:icon="@drawable/ic_menu_goto"
android:title="@string/switch_to_channel"/>
diff --git a/vdrmanager/res/menu/epg_event_list_menu.xml b/vdrmanager/res/menu/epg_event_list_menu.xml
index c0615e9..4796a13 100644
--- a/vdrmanager/res/menu/epg_event_list_menu.xml
+++ b/vdrmanager/res/menu/epg_event_list_menu.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:v7="http://schemas.android.com/apk/res-auto" >
<!--
<item
@@ -16,8 +16,8 @@
<!-- -->
<item
+ v7:showAsAction="ifRoom"
android:id="@+id/epg_list_stream"
android:icon="@drawable/ic_menu_play_clip"
- android:showAsAction="ifRoom"
android:title="@string/livetv"/>
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/epg_list_menu.xml b/vdrmanager/res/menu/epg_list_menu.xml
index ebbefa9..2e1b029 100644
--- a/vdrmanager/res/menu/epg_list_menu.xml
+++ b/vdrmanager/res/menu/epg_list_menu.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:v7="http://schemas.android.com/apk/res-auto" >
<!--
<item
@@ -18,7 +18,7 @@
<item
android:id="@+id/epg_list_sort_menu"
android:icon="@android:drawable/ic_menu_sort_alphabetically"
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:title="@string/sort"/>
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/epg_search_menu.xml b/vdrmanager/res/menu/epg_search_menu.xml
index e4bf9d0..22a69ee 100644
--- a/vdrmanager/res/menu/epg_search_menu.xml
+++ b/vdrmanager/res/menu/epg_search_menu.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
+<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:v7="http://schemas.android.com/apk/res-auto" >
<!-- -->
<item
android:id="@+id/epg_search"
android:icon="@android:drawable/ic_menu_search"
android:alphabeticShortcut="s"
- android:showAsAction="always"
+ v7:showAsAction="always"
android:title="@string/action_menu_search"/>
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/main_menu.xml b/vdrmanager/res/menu/main_menu.xml
index 5e452cb..f08a1fd 100644
--- a/vdrmanager/res/menu/main_menu.xml
+++ b/vdrmanager/res/menu/main_menu.xml
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:v7="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/main_menu_goto"
android:icon="@drawable/ic_menu_goto"
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:title="@string/main_menu_goto"/>
<item
android:id="@+id/menu_search"
- android:actionViewClass="com.actionbarsherlock.widget.SearchView"
+ v7:actionViewClass="android.support.v7.widget.SearchView"
android:icon="@android:drawable/ic_menu_search"
- android:showAsAction="always"
+ v7:showAsAction="always"
android:title="@string/search"/>
<item
android:id="@+id/main_menu_preferences"
android:icon="@android:drawable/ic_menu_preferences"
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:title="@string/main_menu_preferences"/>
<item
android:id="@+id/main_menu_clear_search"
diff --git a/vdrmanager/res/menu/recording_list_item_menu.xml b/vdrmanager/res/menu/recording_list_item_menu.xml
index b375ba0..1da52d5 100644
--- a/vdrmanager/res/menu/recording_list_item_menu.xml
+++ b/vdrmanager/res/menu/recording_list_item_menu.xml
@@ -1,8 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item
+ android:id="@+id/recording_item_menu_delete"
+ android:title="@string/recording_item_menu_delete"/>
+ <item
+ android:id="@+id/recording_item_menu_stream"
+ android:title="@string/recording_item_menu_stream"/>
+ <item
+ android:id="@+id/epg_item_menu_live_tv"
+ android:title="@string/livetv"
+ android:visible="false"/>
+ <item
+ android:id="@+id/epg_item_menu_switchto"
+ android:title="@string/switch_to_channel"
+ android:visible="true"/>
- <item android:id="@+id/recording_item_menu_delete" android:title="@string/recording_item_menu_delete"/>
- <item android:id="@+id/recording_item_menu_stream" android:title="@string/recording_item_menu_stream"/>
- <item android:id="@+id/epg_item_menu_live_tv" android:title="@string/livetv" android:visible="false" />
- <item android:id="@+id/epg_item_menu_switchto" android:title="@string/switch_to_channel" android:visible="true" />
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/refresh_filter_menu.xml b/vdrmanager/res/menu/refresh_filter_menu.xml
index a8065b5..0046707 100644
--- a/vdrmanager/res/menu/refresh_filter_menu.xml
+++ b/vdrmanager/res/menu/refresh_filter_menu.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:v7="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/list_refresh"
android:alphabeticShortcut="r"
android:icon="@drawable/ic_menu_refresh"
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:title="@string/refresh"/>
<item
android:id="@+id/list_filter"
android:alphabeticShortcut="f"
android:icon="@drawable/ic_menu_filter"
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:title="@string/filter"/>
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/refresh_menu.xml b/vdrmanager/res/menu/refresh_menu.xml
index 1d8dcad..79626b9 100644
--- a/vdrmanager/res/menu/refresh_menu.xml
+++ b/vdrmanager/res/menu/refresh_menu.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:v7="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/list_refresh"
android:alphabeticShortcut="r"
- android:showAsAction="ifRoom"
+ v7:showAsAction="ifRoom"
android:icon="@drawable/ic_menu_refresh"
android:title="@string/refresh"/>
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/vdrlist.xml b/vdrmanager/res/menu/vdrlist.xml
index 70d670d..f156173 100644
--- a/vdrmanager/res/menu/vdrlist.xml
+++ b/vdrmanager/res/menu/vdrlist.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:v7="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/main_menu_vdrlist_add"
android:icon="@android:drawable/ic_menu_add"
- android:showAsAction="always"
+ v7:showAsAction="always"
android:title="@string/new_vdr"/>
<item
android:id="@+id/main_menu_vdrlist_restore"
diff --git a/vdrmanager/res/values-de/strings.xml b/vdrmanager/res/values-de/strings.xml
index e39997e..bdb1994 100644
--- a/vdrmanager/res/values-de/strings.xml
+++ b/vdrmanager/res/values-de/strings.xml
@@ -305,8 +305,9 @@ herrlado&lt;herrlado@gmail.com&gt;</string>
<item>EXTERN (veraltet)</item>
</string-array>
<string-array name="recstream_entries">
- <item>VDR Live plugin</item>
+ <item>VDR live plugin</item>
<item>VDR streamdev plugin</item>
+ <item>VDR smattvweb plugin</item>
</string-array>
<string-array name="recent_channels_order_entries">
<item>Am meisten genutzt</item>
diff --git a/vdrmanager/res/values-it/strings.xml b/vdrmanager/res/values-it/strings.xml
index 5f5425f..74a4573 100644
--- a/vdrmanager/res/values-it/strings.xml
+++ b/vdrmanager/res/values-it/strings.xml
@@ -267,6 +267,8 @@
</string-array>
<string-array name="recstream_entries">
<item>Plugin VDR Live</item>
+ <item>Plugin VDR Streamdev</item>
+ <item>Plugin VDR Smattvweb</item>
</string-array>
diff --git a/vdrmanager/res/values-uk/strings.xml b/vdrmanager/res/values-uk/strings.xml
index b32c461..37725ca 100644
--- a/vdrmanager/res/values-uk/strings.xml
+++ b/vdrmanager/res/values-uk/strings.xml
@@ -262,6 +262,8 @@ herrlado&lt;herrlado@gmail.com&gt;
</string-array>
<string-array name="recstream_entries">
<item>Додаток VDR live</item>
+ <item>Додаток VDR streamdev</item>
+ <item>Додаток VDR smattvweb</item>
</string-array>
<!-- EPG Content -->
diff --git a/vdrmanager/res/values-v14/abs__themes.xml b/vdrmanager/res/values-v14/abs__themes.xml
deleted file mode 100644
index a22caa7..0000000
--- a/vdrmanager/res/values-v14/abs__themes.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-<style name="Sherlock.__Theme" parent="android:Theme.Holo">
- <item name="textColorPrimary">@color/abs__primary_text_holo_light</item>
- <item name="textColorPrimaryInverse">@color/abs__primary_text_holo_dark</item>
-</style>
-</resources> \ No newline at end of file
diff --git a/vdrmanager/res/values/arrays.xml b/vdrmanager/res/values/arrays.xml
index 6fb2fea..4f68ddd 100644
--- a/vdrmanager/res/values/arrays.xml
+++ b/vdrmanager/res/values/arrays.xml
@@ -32,13 +32,19 @@
<string-array name="recstream_entry_values">
<item>vdr-live</item>
<item>vdr-streamdev</item>
+ <item>vdr-smarttvweb</item>
</string-array>
<string-array name="recent_channels_order_entry_values">
<item>most</item>
<item>last</item>
</string-array>
-
+ <array name="recstream_smarttvweb_entry_values">
+ <item>progressive</item>
+ <item>has</item>
+ <item>hls</item>
+ </array>
+
diff --git a/vdrmanager/res/values/strings.xml b/vdrmanager/res/values/strings.xml
index 3666e98..03880f3 100644
--- a/vdrmanager/res/values/strings.xml
+++ b/vdrmanager/res/values/strings.xml
@@ -96,7 +96,7 @@
<string name="new_timer">New timer</string>
<string name="vdr_error_text">The communication with VDR has caused an error: %1$s</string>
<string name="livetv">Live TV</string>
- <string name="settings_livetv_summary">Needs streamdev-server on VDR and an external
+ <string name="settings_livetv_summary">Needs streamdev-server on VDR and an external
player such as VPlayer</string>
<string name="settings_livetv_streamformat">Streamformat</string>
<string name="settings_livetv_port">Streaming Port</string>
@@ -110,7 +110,6 @@
<item>PS</item>
</string-array>
-
<string name="key_remux_enable">remux_enable</string>
<string name="key_remux_command">remux_command</string>
<string name="key_remux_parameter">remux_parameter</string>
@@ -264,8 +263,17 @@
<string name="recstream_enable_summary">Enable Streaming of recordings</string>
<string-array name="recstream_entries">
- <item>VDR live plugin</item>
- <item>VDR streamdev plugin</item>
+ <item>live plugin</item>
+ <item>streamdev plugin</item>
+ <item>smarttvweb plugin</item>
+ </string-array>
+
+
+
+ <string-array name="recstream_smarttvweb_entries">
+ <item>Progressive</item>
+ <item>MPEG-DASH</item>
+ <item>Apple HLS</item>
</string-array>
<string name="recstream_method_title">Streaming method</string>
@@ -355,8 +363,7 @@
<item>Time</item>
<item>Alphabet</item>
</string-array>
-
- <string-array name="epg_sort_by_time_alpha_channel">
+ <string-array name="epg_sort_by_time_alpha_channel">
<item>Time</item>
<item>Alphabet</item>
<item>Channel</item>
@@ -388,133 +395,129 @@
</string-array>
<string name="filter">Filter</string>
-
<string name="audio_tracks_template">Audio Tracks: %1$s</string>
<string name="audio_track_dolby">D</string>
-
<string name="vdr_timezone_summary">The time zone used on the server. It is important if you travel and modify timers from another time zone.</string>
<string name="vdr_timezone_title">Select server time zone</string>
<string name="zone_list_menu_sort_alphabetically">Sort alphabetically</string>
<string name="zone_list_menu_sort_by_timezone">Sort by time zone</string>
<string name="probing">Probing %1$s …</string>
- <string name="no_results">No results…</string>
- <string name="recording_started">Recording started</string>
- <string name="set_time">Set time</string>
- <!-- … -->
+ <string name="no_results">No results…</string>
+ <string name="recording_started">Recording started</string>
+ <string name="set_time">Set time</string>
+ <!-- … -->
- <!--
- SSL related messages
- -->
+<!-- SSL related messages -->
- <string name="certificate_problem_message_title">Certificate warning</string>
-<string name="certificate_problem_message_text">
-The server certificate was not accepted:\n\n
+ <string name="certificate_problem_message_title">Certificate warning</string>
+ <string name="certificate_problem_message_text">The server certificate was not accepted:\n\n
Hostname:\n
%1$s\n
Valid from:\n
%2$s\n
Valid until:\n
%3$s\n\n
-What do you want to do?
- </string>
- <string name="certificate_accept_once">Accept once</string>
- <string name="certificate_accepted_forever">Accept forever</string>
- <string name="certificate_not_accepted">Abort</string>
-
-<!-- EPG Content -->
-<string name="Content$Movie__Drama">Movie/Drama</string>
-<string name="Content$Detective__Thriller">Detective/Thriller</string>
-<string name="Content$Adventure__Western__War">Adventure/Western/War</string>
-<string name="Content$Science_Fiction__Fantasy__Horror">Science Fiction/Fantasy/Horror</string>
-<string name="Content$Comedy">Comedy</string>
-<string name="Content$Soap__Melodrama__Folkloric">Soap/Melodrama/Folkloric</string>
-<string name="Content$Romance">Romance</string>
-<string name="Content$Serious__Classical__Religious__Historical_Movie__Drama">Serious/Classical/Religious/Historical Movie/Drama</string>
-<string name="Content$Adult_Movie__Drama">Adult Movie/Drama</string>
-<string name="Content$News__Current_Affairs">News/Current Affairs</string>
-<string name="Content$News__Weather_Report">News/Weather Report</string>
-<string name="Content$News_Magazine">News Magazine</string>
-<string name="Content$Documentary">Documentary</string>
-<string name="Content$Discussion__Inverview__Debate">Discussion/Inverview/Debate</string>
-<string name="Content$Show__Game_Show">Show/Game Show</string>
-<string name="Content$Game_Show__Quiz__Contest">Game Show/Quiz/Contest</string>
-<string name="Content$Variety_Show">Variety Show</string>
-<string name="Content$Talk_Show">Talk Show</string>
-<string name="Content$Sports">Sports</string>
-<string name="Content$Special_Event">Special Event</string>
-<string name="Content$Sport_Magazine">Sport Magazine</string>
-<string name="Content$Football__Soccer">Football/Soccer</string>
-<string name="Content$Tennis__Squash">Tennis/Squash</string>
-<string name="Content$Team_Sports">Team Sports</string>
-<string name="Content$Athletics">Athletics</string>
-<string name="Content$Motor_Sport">Motor Sport</string>
-<string name="Content$Water_Sport">Water Sport</string>
-<string name="Content$Winter_Sports">Winter Sports</string>
-<string name="Content$Equestrian">Equestrian</string>
-<string name="Content$Martial_Sports">Martial Sports</string>
-<string name="Content$Childrens__Youth_Programme">Children\'s/Youth Programme</string>
-<string name="Content$Preschool_Childrens_Programme">Pre-school Children\'s Programme</string>
-<string name="Content$Entertainment_Programme_for_6_to_14">Entertainment Programme for 6 to 14</string>
-<string name="Content$Entertainment_Programme_for_10_to_16">Entertainment Programme for 10 to 16</string>
-<string name="Content$Informational__Educational__School_Programme">Informational/Educational/School Programme</string>
-<string name="Content$Cartoons__Puppets">Cartoons/Puppets</string>
-<string name="Content$Music__Ballet__Dance">Music/Ballet/Dance</string>
-<string name="Content$Rock__Pop">Rock/Pop</string>
-<string name="Content$Serious__Classical_Music">Serious/Classical Music</string>
-<string name="Content$Folk__Tradional_Music">Folk/Tradional Music</string>
-<string name="Content$Jazz">Jazz</string>
-<string name="Content$Musical__Opera">Musical/Opera</string>
-<string name="Content$Ballet">Ballet</string>
-<string name="Content$Arts__Culture">Arts/Culture</string>
-<string name="Content$Performing_Arts">Performing Arts</string>
-<string name="Content$Fine_Arts">Fine Arts</string>
-<string name="Content$Religion">Religion</string>
-<string name="Content$Popular_Culture__Traditional_Arts">Popular Culture/Traditional Arts</string>
-<string name="Content$Literature">Literature</string>
-<string name="Content$Film__Cinema">Film/Cinema</string>
-<string name="Content$Experimental_Film__Video">Experimental Film/Video</string>
-<string name="Content$Broadcasting__Press">Broadcasting/Press</string>
-<string name="Content$New_Media">New Media</string>
-<string name="Content$Arts__Culture_Magazine">Arts/Culture Magazine</string>
-<string name="Content$Fashion">Fashion</string>
-<string name="Content$Social__Political__Economics">Social/Political/Economics</string>
-<string name="Content$Magazine__Report__Documentary">Magazine/Report/Documentary</string>
-<string name="Content$Economics__Social_Advisory">Economics/Social Advisory</string>
-<string name="Content$Remarkable_People">Remarkable People</string>
-<string name="Content$Education__Science__Factual">Education/Science/Factual</string>
-<string name="Content$Nature__Animals__Environment">Nature/Animals/Environment</string>
-<string name="Content$Technology__Natural_Sciences">Technology/Natural Sciences</string>
-<string name="Content$Medicine__Physiology__Psychology">Medicine/Physiology/Psychology</string>
-<string name="Content$Foreign_Countries__Expeditions">Foreign Countries/Expeditions</string>
-<string name="Content$Social__Spiritual_Sciences">Social/Spiritual Sciences</string>
-<string name="Content$Further_Education">Further Education</string>
-<string name="Content$Languages">Languages</string>
-<string name="Content$Leisure__Hobbies">Leisure/Hobbies</string>
-<string name="Content$Tourism__Travel">Tourism/Travel</string>
-<string name="Content$Handicraft">Handicraft</string>
-<string name="Content$Motoring">Motoring</string>
-<string name="Content$Fitness_and_Health">Fitness &amp; Health</string>
-<string name="Content$Cooking">Cooking</string>
-<string name="Content$Advertisement__Shopping">Advertisement/Shopping</string>
-<string name="Content$Gardening">Gardening</string>
-<string name="Content$Original_Language">Original Language</string>
-<string name="Content$Black_and_White">Black &amp; White</string>
-<string name="Content$Unpublished">Unpublished</string>
-<string name="Content$Live_Broadcast">Live Broadcas</string>
-<string name="Content$Unknown"></string>
-<!-- EPG Content END -->
-<string name="type_to_filter">type to filter</string>
-
-<string name="drive_info">Free %1$s GB of %2$s GB (%3$s%%)</string>
-<string name="drive_img">Drive</string>
-<string name="sad_img">Sad</string>
-<string name="search">Search</string>
-
-<string name="clear_term_after_search_title">Clear Term after Search</string>
-<string name="clear_term_after_search_summary_off">Search term remains after peforming search</string>
-<string name="clear_term_after_search_summary_on">Term gets cleared after performing search</string>
-
-
-
+What do you want to do?</string>
+ <string name="certificate_accept_once">Accept once</string>
+ <string name="certificate_accepted_forever">Accept forever</string>
+ <string name="certificate_not_accepted">Abort</string>
+
+ <!-- EPG Content -->
+ <string name="Content$Movie__Drama">Movie/Drama</string>
+ <string name="Content$Detective__Thriller">Detective/Thriller</string>
+ <string name="Content$Adventure__Western__War">Adventure/Western/War</string>
+ <string name="Content$Science_Fiction__Fantasy__Horror">Science Fiction/Fantasy/Horror</string>
+ <string name="Content$Comedy">Comedy</string>
+ <string name="Content$Soap__Melodrama__Folkloric">Soap/Melodrama/Folkloric</string>
+ <string name="Content$Romance">Romance</string>
+ <string name="Content$Serious__Classical__Religious__Historical_Movie__Drama">Serious/Classical/Religious/Historical Movie/Drama</string>
+ <string name="Content$Adult_Movie__Drama">Adult Movie/Drama</string>
+ <string name="Content$News__Current_Affairs">News/Current Affairs</string>
+ <string name="Content$News__Weather_Report">News/Weather Report</string>
+ <string name="Content$News_Magazine">News Magazine</string>
+ <string name="Content$Documentary">Documentary</string>
+ <string name="Content$Discussion__Inverview__Debate">Discussion/Inverview/Debate</string>
+ <string name="Content$Show__Game_Show">Show/Game Show</string>
+ <string name="Content$Game_Show__Quiz__Contest">Game Show/Quiz/Contest</string>
+ <string name="Content$Variety_Show">Variety Show</string>
+ <string name="Content$Talk_Show">Talk Show</string>
+ <string name="Content$Sports">Sports</string>
+ <string name="Content$Special_Event">Special Event</string>
+ <string name="Content$Sport_Magazine">Sport Magazine</string>
+ <string name="Content$Football__Soccer">Football/Soccer</string>
+ <string name="Content$Tennis__Squash">Tennis/Squash</string>
+ <string name="Content$Team_Sports">Team Sports</string>
+ <string name="Content$Athletics">Athletics</string>
+ <string name="Content$Motor_Sport">Motor Sport</string>
+ <string name="Content$Water_Sport">Water Sport</string>
+ <string name="Content$Winter_Sports">Winter Sports</string>
+ <string name="Content$Equestrian">Equestrian</string>
+ <string name="Content$Martial_Sports">Martial Sports</string>
+ <string name="Content$Childrens__Youth_Programme">Children\'s/Youth Programme</string>
+ <string name="Content$Preschool_Childrens_Programme">Pre-school Children\'s Programme</string>
+ <string name="Content$Entertainment_Programme_for_6_to_14">Entertainment Programme for 6 to 14</string>
+ <string name="Content$Entertainment_Programme_for_10_to_16">Entertainment Programme for 10 to 16</string>
+ <string name="Content$Informational__Educational__School_Programme">Informational/Educational/School Programme</string>
+ <string name="Content$Cartoons__Puppets">Cartoons/Puppets</string>
+ <string name="Content$Music__Ballet__Dance">Music/Ballet/Dance</string>
+ <string name="Content$Rock__Pop">Rock/Pop</string>
+ <string name="Content$Serious__Classical_Music">Serious/Classical Music</string>
+ <string name="Content$Folk__Tradional_Music">Folk/Tradional Music</string>
+ <string name="Content$Jazz">Jazz</string>
+ <string name="Content$Musical__Opera">Musical/Opera</string>
+ <string name="Content$Ballet">Ballet</string>
+ <string name="Content$Arts__Culture">Arts/Culture</string>
+ <string name="Content$Performing_Arts">Performing Arts</string>
+ <string name="Content$Fine_Arts">Fine Arts</string>
+ <string name="Content$Religion">Religion</string>
+ <string name="Content$Popular_Culture__Traditional_Arts">Popular Culture/Traditional Arts</string>
+ <string name="Content$Literature">Literature</string>
+ <string name="Content$Film__Cinema">Film/Cinema</string>
+ <string name="Content$Experimental_Film__Video">Experimental Film/Video</string>
+ <string name="Content$Broadcasting__Press">Broadcasting/Press</string>
+ <string name="Content$New_Media">New Media</string>
+ <string name="Content$Arts__Culture_Magazine">Arts/Culture Magazine</string>
+ <string name="Content$Fashion">Fashion</string>
+ <string name="Content$Social__Political__Economics">Social/Political/Economics</string>
+ <string name="Content$Magazine__Report__Documentary">Magazine/Report/Documentary</string>
+ <string name="Content$Economics__Social_Advisory">Economics/Social Advisory</string>
+ <string name="Content$Remarkable_People">Remarkable People</string>
+ <string name="Content$Education__Science__Factual">Education/Science/Factual</string>
+ <string name="Content$Nature__Animals__Environment">Nature/Animals/Environment</string>
+ <string name="Content$Technology__Natural_Sciences">Technology/Natural Sciences</string>
+ <string name="Content$Medicine__Physiology__Psychology">Medicine/Physiology/Psychology</string>
+ <string name="Content$Foreign_Countries__Expeditions">Foreign Countries/Expeditions</string>
+ <string name="Content$Social__Spiritual_Sciences">Social/Spiritual Sciences</string>
+ <string name="Content$Further_Education">Further Education</string>
+ <string name="Content$Languages">Languages</string>
+ <string name="Content$Leisure__Hobbies">Leisure/Hobbies</string>
+ <string name="Content$Tourism__Travel">Tourism/Travel</string>
+ <string name="Content$Handicraft">Handicraft</string>
+ <string name="Content$Motoring">Motoring</string>
+ <string name="Content$Fitness_and_Health">Fitness &amp; Health</string>
+ <string name="Content$Cooking">Cooking</string>
+ <string name="Content$Advertisement__Shopping">Advertisement/Shopping</string>
+ <string name="Content$Gardening">Gardening</string>
+ <string name="Content$Original_Language">Original Language</string>
+ <string name="Content$Black_and_White">Black &amp; White</string>
+ <string name="Content$Unpublished">Unpublished</string>
+ <string name="Content$Live_Broadcast">Live Broadcas</string>
+ <string name="Content$Unknown"></string>
+ <!-- EPG Content END -->
+ <string name="type_to_filter">type to filter</string>
+ <string name="drive_info">Free %1$s GB of %2$s GB (%3$s%%)</string>
+ <string name="drive_img">Drive</string>
+ <string name="sad_img">Sad</string>
+ <string name="search">Search</string>
+ <string name="clear_term_after_search_title">Clear Term after Search</string>
+ <string name="clear_term_after_search_summary_off">Search term remains after peforming search</string>
+ <string name="clear_term_after_search_summary_on">Term gets cleared after performing search</string>
+ <string name="drawer_open">Open navigation drawer</string>
+ <string name="drawer_close">Close navigation drawer</string>
+ <string name="action_websearch">Web search</string>
+ <string name="settings_smarttvweb_port_summary">VDR smarttvweb plugin has default port 8000</string>
+ <string name="settings_smarttvweb_port">Smarttvweb port</string>
+ <string name="recstream_smarttvweb_method_title">Smarttvweb Stream Type</string>
+ <string name="recstream_smarttvweb_method_summary">Supported methods: \'Progressive\', \'MPEG-DASH \/ OIPF HAS\', \'Apple HLS\'</string>
</resources> \ No newline at end of file
diff --git a/vdrmanager/res/values/styles.xml b/vdrmanager/res/values/styles.xml
index 70ece1a..4139961 100644
--- a/vdrmanager/res/values/styles.xml
+++ b/vdrmanager/res/values/styles.xml
@@ -77,5 +77,7 @@
<item name="android:layout_marginBottom">1dp</item>
<item name="android:background">@drawable/line_gradient</item>
</style>
+
+ <style name="AppTheme" parent="@style/Theme.AppCompat"/>
</resources> \ No newline at end of file
diff --git a/vdrmanager/res/xml/vdr_prefs.xml b/vdrmanager/res/xml/vdr_prefs.xml
index 4cbd861..1135eab 100644
--- a/vdrmanager/res/xml/vdr_prefs.xml
+++ b/vdrmanager/res/xml/vdr_prefs.xml
@@ -176,6 +176,23 @@
android:key="key_live_port"
android:summary="@string/settings_live_port_summary"
android:title="@string/settings_live_port" />
+
+
+ <ListPreference
+ android:dependency="key_rec_stream_enable"
+ android:entries="@array/recstream_smarttvweb_entries"
+ android:entryValues="@array/recstream_smarttvweb_entry_values"
+ android:key="key_smarttvweb_recstream_method"
+ android:summary="@string/recstream_smarttvweb_method_summary"
+ android:title="@string/recstream_smarttvweb_method_title" />
+
+ <EditTextPreference
+ android:defaultValue="8000"
+ android:dependency="key_rec_stream_enable"
+ android:inputType="number"
+ android:key="key_smarttvweb_port"
+ android:summary="@string/settings_smarttvweb_port_summary"
+ android:title="@string/settings_smarttvweb_port" />
</PreferenceCategory>
<PreferenceScreen android:title="Advanced" >
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
index 7a63af5..d4cb2d9 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
@@ -47,7 +47,6 @@ public class Preferences {
}
-
public static boolean get(Context context, String key, boolean defValue) {
final SharedPreferences sharedPrefs = getSharedPreferences(context);
return sharedPrefs.getBoolean(key, defValue);
@@ -101,7 +100,7 @@ public class Preferences {
private boolean showTmdbButton = false;
private int maxRecentChannels = 10;
-
+
private boolean clearTermAfterSearch = false;
public int getMaxRecentChannels() {
@@ -391,6 +390,14 @@ public class Preferences {
return getCurrentVdr().getStreamFormat();
}
+ public int getSmarttvewebPort() {
+ return getCurrentVdr().getSmarttvwebPort();
+ }
+
+ public String getSmarttvewebType() {
+ return getCurrentVdr().getSmarttvwebType();
+ }
+
/**
* Sets the time values for the epg search
*
@@ -520,8 +527,9 @@ public class Preferences {
prefs.maxRecentChannels = getInt(context,
R.string.gui_max_recent_channels_key, 10);
-
- prefs.clearTermAfterSearch = getBoolean(context, R.string.clear_term_after_search_key, false);
+
+ prefs.clearTermAfterSearch = getBoolean(context,
+ R.string.clear_term_after_search_key, false);
thePrefs = prefs;
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Vdr.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Vdr.java
index f61bc26..74ed48f 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Vdr.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Vdr.java
@@ -180,6 +180,12 @@ public class Vdr {
@DatabaseField
private String recStreamMethod = "vdr-live";
+
+ @DatabaseField(columnName="smarttvwebPort")
+ private int smarttvwebPort = 8000;
+
+ @DatabaseField(columnName="smarttvwebType")
+ private String smarttvwebType="ts";
@DatabaseField
private boolean enableRecStreaming = false;
@@ -584,6 +590,10 @@ public class Vdr {
map.put("key_live_port", livePort);
map.put("key_recstream_method", recStreamMethod);
map.put("key_timezone", serverTimeZone);
+
+
+ map.put("key_smarttvweb_port", smarttvwebPort);
+ map.put("key_smarttvweb_recstream_method", smarttvwebType);
return map;
}
@@ -672,6 +682,25 @@ public class Vdr {
livePort = getInteger(map, "key_live_port", 8008);
recStreamMethod = get(map, "key_recstream_method", "vdr-live");
serverTimeZone = get(map, "key_timezone", TimeZone.getDefault().getID());
+
+ smarttvwebPort= getInteger(map, "key_smarttvweb_port", 8000);
+ smarttvwebType= get(map, "key_smarttvweb_recstream_method", "progressive");
+ }
+
+ public int getSmarttvwebPort() {
+ return smarttvwebPort;
+ }
+
+ public void setSmarttvwebPort(int smarttvwebPort) {
+ this.smarttvwebPort = smarttvwebPort;
+ }
+
+ public String getSmarttvwebType() {
+ return smarttvwebType;
+ }
+
+ public void setSmarttvwebType(String smarttvwebType) {
+ this.smarttvwebType = smarttvwebType;
}
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/db/DBAccess.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/db/DBAccess.java
index f9ae121..75bd892 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/db/DBAccess.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/db/DBAccess.java
@@ -32,7 +32,7 @@ public class DBAccess extends OrmLiteSqliteOpenHelper {
// any time you make changes to your database objects, you may have to
// increase the database version
// Version 3 since 0.6
- private static final int DATABASE_VERSION = 3;
+ private static final int DATABASE_VERSION = 4;
private RuntimeExceptionDao<Vdr, Integer> vdrDAO = null;
@@ -91,6 +91,23 @@ public class DBAccess extends OrmLiteSqliteOpenHelper {
"UPDATE `vdr` set stz = ?", tz);
}
+ if(oldVersion < 4){
+ getVdrDAO()
+ .executeRaw(
+ "ALTER TABLE `vdr` ADD COLUMN smarttvwebType varchar;");
+ getVdrDAO()
+ .executeRaw(
+ "ALTER TABLE `vdr` ADD COLUMN smarttvwebPort int;");
+
+ getVdrDAO()
+ .executeRaw(
+ "UPDATE `vdr` set smarttvwebPort = ?", "8000");
+ getVdrDAO()
+ .executeRaw(
+ "UPDATE `vdr` set smarttvwebType = ?", "progressive");
+
+
+ }
} catch (SQLException e) {
Log.e(DBAccess.class.getName(), "Can't drop databases", e);
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java
index cb2672f..b2ba4d8 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java
@@ -7,15 +7,21 @@ import android.app.ProgressDialog;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
+import android.support.v4.app.ActionBarDrawerToggle;
+import android.support.v4.view.GravityCompat;
+import android.support.v4.view.MenuCompat;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v7.app.ActionBarActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
+import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.ViewFlipper;
-
-import com.actionbarsherlock.app.ActionBar.OnNavigationListener;
-
import de.bjusystems.vdrmanager.R;
import de.bjusystems.vdrmanager.app.VdrManagerApp;
import de.bjusystems.vdrmanager.data.Channel;
@@ -29,7 +35,7 @@ import de.bjusystems.vdrmanager.utils.svdrp.SvdrpFinishedListener;
import de.bjusystems.vdrmanager.utils.svdrp.SvdrpListener;
public abstract class BaseActivity<Result, T extends ListView> extends
- ICSBaseActivity implements OnClickListener, SvdrpListener,
+ ActionBarActivity implements OnClickListener, SvdrpListener,
SvdrpExceptionListener, SvdrpFinishedListener<Result> {
public static final String TAG = BaseActivity.class.getName();
@@ -48,6 +54,12 @@ public abstract class BaseActivity<Result, T extends ListView> extends
// protected SvdrpProgressDialog progress;
+ private CharSequence mDrawerTitle;
+ private DrawerLayout mDrawerLayout;
+ private ListView mDrawerList;
+ private ActionBarDrawerToggle mDrawerToggle;
+ private String[] mTitles;
+
abstract protected String getWindowTitle();
abstract protected int getMainLayout();
@@ -58,6 +70,18 @@ public abstract class BaseActivity<Result, T extends ListView> extends
abstract protected boolean displayingResults();
+ /**
+ * When using the ActionBarDrawerToggle, you must call it during
+ * onPostCreate() and onConfigurationChanged()...
+ */
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ super.onPostCreate(savedInstanceState);
+ // Sync the toggle state after onRestoreInstanceState has occurred.
+ mDrawerToggle.syncState();
+ }
+
protected boolean isForceRefresh() {
if (forceRefresh == false) {
return false;
@@ -81,10 +105,15 @@ public abstract class BaseActivity<Result, T extends ListView> extends
}
}
+ protected CertificateProblemDialog getCertificateProblemDialog() {
+ return new CertificateProblemDialog(this);
+ }
+
@Override
public void onConfigurationChanged(final Configuration newConfig) {
Preferences.setLocale(this);
super.onConfigurationChanged(newConfig);
+ mDrawerToggle.onConfigurationChanged(newConfig);
}
@Override
@@ -143,60 +172,60 @@ public abstract class BaseActivity<Result, T extends ListView> extends
return;
}
- getSupportActionBar().setDisplayShowTitleEnabled(false);
-
- getSupportActionBar().setNavigationMode(
- getSupportActionBar().NAVIGATION_MODE_LIST);
-
- final ArrayAdapter<CharSequence> mSpinnerAdapter = ArrayAdapter
- .createFromResource(this, R.array.navigation_array,
- android.R.layout.simple_spinner_dropdown_item);
-
- getSupportActionBar().setListNavigationCallbacks(mSpinnerAdapter,
- new OnNavigationListener() {
-
- private boolean firstHit = true;
-
- @Override
- public boolean onNavigationItemSelected(
- final int itemPosition, final long itemId) {
-
- if (firstHit == true) {
- firstHit = false;
- return false;
- }
- switch (itemPosition) {
-
- case LIST_NAVIGATION_CHANNELS: {
- startActivity(ChannelListActivity.class);
- return true;
- }
- case LIST_NAVIGATION_EPG_BY_TIME: {
- startActivity(TimeEpgListActivity.class);
- return true;
- }
-
- case LIST_NAVIGATION_EPG_BY_CHANNEL: {
- startActivity(EventEpgListActivity.class);
- return true;
- }
-
- case LIST_NAVIGATION_RECORDINGS: {
- startActivity(RecordingListActivity.class);
- return true;
- }
-
- case LIST_NAVIGATION_TIMERS: {
- startActivity(TimerListActivity.class);
- return true;
- }
-
- }
- return false;
- }
- });
- getSupportActionBar().setSelectedNavigationItem(
- getListNavigationIndex());
+ // getSupportActionBar().setDisplayShowTitleEnabled(false);
+ //
+ // getSupportActionBar().setNavigationMode(
+ // getSupportActionBar().NAVIGATION_MODE_LIST);
+ //
+ // final ArrayAdapter<CharSequence> mSpinnerAdapter = ArrayAdapter
+ // .createFromResource(this, R.array.navigation_array,
+ // android.R.layout.simple_spinner_dropdown_item);
+ //
+ // getSupportActionBar().setListNavigationCallbacks(mSpinnerAdapter,
+ // new OnNavigationListener() {
+ //
+ // private boolean firstHit = true;
+ //
+ // @Override
+ // public boolean onNavigationItemSelected(
+ // final int itemPosition, final long itemId) {
+ //
+ // if (firstHit == true) {
+ // firstHit = false;
+ // return false;
+ // }
+ // switch (itemPosition) {
+ //
+ // case LIST_NAVIGATION_CHANNELS: {
+ // startActivity(ChannelListActivity.class);
+ // return true;
+ // }
+ // case LIST_NAVIGATION_EPG_BY_TIME: {
+ // startActivity(TimeEpgListActivity.class);
+ // return true;
+ // }
+ //
+ // case LIST_NAVIGATION_EPG_BY_CHANNEL: {
+ // startActivity(EventEpgListActivity.class);
+ // return true;
+ // }
+ //
+ // case LIST_NAVIGATION_RECORDINGS: {
+ // startActivity(RecordingListActivity.class);
+ // return true;
+ // }
+ //
+ // case LIST_NAVIGATION_TIMERS: {
+ // startActivity(TimerListActivity.class);
+ // return true;
+ // }
+ //
+ // }
+ // return false;
+ // }
+ // });
+ // getSupportActionBar().setSelectedNavigationItem(
+ // getListNavigationIndex());
}
@@ -204,6 +233,7 @@ public abstract class BaseActivity<Result, T extends ListView> extends
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Preferences.setLocale(this);
+ setContentView(getMainLayout());
progress = new ProgressDialog(this);
progress.setCancelable(false);
progress.setCanceledOnTouchOutside(false);
@@ -218,6 +248,8 @@ public abstract class BaseActivity<Result, T extends ListView> extends
initListNavigation();
+ initLeftDrawer(savedInstanceState);
+
// new OnNavigationListener() {
// @Override
// public boolean onNavigationItemSelected(int itemPosition, long
@@ -239,6 +271,105 @@ public abstract class BaseActivity<Result, T extends ListView> extends
}
+ protected void initLeftDrawer(final Bundle savedInstanceState) {
+
+ mDrawerTitle = getTitle();
+
+ mTitles = getResources().getStringArray(R.array.navigation_array);
+
+ mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
+ mDrawerList = (ListView) findViewById(R.id.left_drawer);
+
+ // set a custom shadow that overlays the main content when the drawer
+ // opens
+ mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow,
+ GravityCompat.START);
+ // set up the drawer's list view with items and click listener
+ mDrawerList.setAdapter(new ArrayAdapter<String>(this,
+ R.layout.drawer_list_item, mTitles));
+ mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
+
+ // enable ActionBar app icon to behave as action to toggle nav drawer
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+
+ // ActionBarDrawerToggle ties together the the proper interactions
+ // between the sliding drawer and the action bar app icon
+ mDrawerToggle = new ActionBarDrawerToggle(this, /* host Activity */
+ mDrawerLayout, /* DrawerLayout object */
+ R.drawable.ic_drawer, /* nav drawer image to replace 'Up' caret */
+ R.string.drawer_open, /* "open drawer" description for accessibility */
+ R.string.drawer_close /* "close drawer" description for accessibility */
+ ) {
+ public void onDrawerClosed(View view) {
+ // getSupportActionBar().setTitle(mTitle);
+ //invalidateOptionsMenu(); // creates call to
+ // onPrepareOptionsMenu()
+ }
+
+ public void onDrawerOpened(View drawerView) {
+ // getSupportActionBar().setTitle(mDrawerTitle);
+ //invalidateOptionsMenu(); // creates call to
+ // onPrepareOptionsMenu()
+ }
+ };
+ mDrawerLayout.setDrawerListener(mDrawerToggle);
+
+// if (savedInstanceState == null) {
+// selectItem(0);
+// }
+
+ }
+
+ /* The click listner for ListView in the navigation drawer */
+ private class DrawerItemClickListener implements
+ ListView.OnItemClickListener {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view, int position,
+ long id) {
+ selectItem(position);
+ }
+ }
+
+ private void selectItem(int position) {
+
+ // update selected item and title, then close the drawer
+ mDrawerList.setItemChecked(position, true);
+ // setTitle(mPlanetTitles[position]);
+
+ switch (position) {
+
+ case LIST_NAVIGATION_CHANNELS: {
+ startActivity(ChannelListActivity.class);
+ break;
+ }
+ case LIST_NAVIGATION_EPG_BY_TIME: {
+ startActivity(TimeEpgListActivity.class);
+ break;
+ }
+
+ case LIST_NAVIGATION_EPG_BY_CHANNEL: {
+ startActivity(EventEpgListActivity.class);
+ break;
+ }
+
+ case LIST_NAVIGATION_RECORDINGS: {
+ startActivity(RecordingListActivity.class);
+ break;
+ }
+
+ case LIST_NAVIGATION_TIMERS: {
+ startActivity(TimerListActivity.class);
+ break;
+ }
+ }
+
+ mDrawerLayout.closeDrawer(mDrawerList);
+ }
+
+ protected void initActionBar() {
+ getSupportActionBar().setHomeButtonEnabled(true);
+ }
+
public void startActivity(final Class<?> clazz) {
final Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setClass(this, clazz);
@@ -251,15 +382,14 @@ public abstract class BaseActivity<Result, T extends ListView> extends
}
@Override
- public boolean onCreateOptionsMenu(
- final com.actionbarsherlock.view.Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
// MenuItem item;
// item = menu.add(MENU_GROUP_REFRESH, MENU_REFRESH, 0,
// R.string.refresh);
// item.setIcon(R.drawable.ic_menu_refresh);
// item.setAlphabeticShortcut('r');
- final com.actionbarsherlock.view.MenuInflater inf = getSupportMenuInflater();
+ final MenuInflater inf = getMenuInflater();
inf.inflate(getBaseMenu(), menu);
// SearchView searchView = (SearchView)
@@ -276,8 +406,12 @@ public abstract class BaseActivity<Result, T extends ListView> extends
// abstract protected SvdrpClient<Result> getClient();
@Override
- public boolean onOptionsItemSelected(
- final com.actionbarsherlock.view.MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
+
+ if (mDrawerToggle != null && mDrawerToggle.onOptionsItemSelected(item)) {
+ return true;
+ }
+
switch (item.getItemId()) {
case R.id.list_refresh:
backupViewSelection();
@@ -508,13 +642,4 @@ public abstract class BaseActivity<Result, T extends ListView> extends
}
}
- /**
- * Creates a dialog for showing certificate problems
- *
- * @return dialog
- */
- @Override
- protected CertificateProblemDialog getCertificateProblemDialog() {
- return new CertificateProblemDialog(this);
- }
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
index 3557630..f1779d8 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
@@ -1,5 +1,6 @@
package de.bjusystems.vdrmanager.gui;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
@@ -13,6 +14,8 @@ import android.os.Bundle;
import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
+import android.view.Menu;
+import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
@@ -22,6 +25,7 @@ import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import de.bjusystems.vdrmanager.R;
import de.bjusystems.vdrmanager.app.Intents;
+import de.bjusystems.vdrmanager.app.VdrManagerApp;
import de.bjusystems.vdrmanager.data.Channel;
import de.bjusystems.vdrmanager.data.Event;
import de.bjusystems.vdrmanager.data.EventListItem;
@@ -82,7 +86,6 @@ public abstract class BaseEventListActivity<T extends Event> extends
sortBy = Preferences.get(this, getViewID() + "_" + P.EPG_LAST_SORT,
MENU_GROUP_DEFAULT);
// Attach view
- setContentView(getMainLayout());
setTitle(getWindowTitle());
initFlipper();
detector = new SimpleGestureFilter(this, this);
@@ -113,9 +116,9 @@ public abstract class BaseEventListActivity<T extends Event> extends
*/
@Override
public boolean onCreateOptionsMenu(
- final com.actionbarsherlock.view.Menu menu) {
+ final Menu menu) {
super.onCreateOptionsMenu(menu);
- final com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
+ final MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.epg_list_menu, menu);
return true;
}
@@ -125,7 +128,24 @@ public abstract class BaseEventListActivity<T extends Event> extends
*
* @param event
*/
- protected int prepareDetailsViewData(final EventListItem event, int pos) {
+ protected int prepareDetailsViewData(final EventListItem item, int pos) {
+ final VdrManagerApp app = (VdrManagerApp) getApplication();
+ // remember event for details view and timer things
+ app.setCurrentEvent(item.getEvent());
+ ArrayList<Event> current = new ArrayList<Event>();
+ for (int i = 0; i < adapter.getCount(); ++i) {
+ EventListItem item2 = adapter.getItem(i);
+ if(item2.isHeader()){
+ continue;
+ }
+ current.add(item2.getEvent());
+ }
+ app.setCurrentEpgList(current);
+ for (int i = 0; i < pos; ++i) {
+ if (current.get(i) == item.getEvent()) {
+ return i;
+ }
+ }
return 0;
}
@@ -189,7 +209,7 @@ public abstract class BaseEventListActivity<T extends Event> extends
* .view.MenuItem)
*/
public boolean onOptionsItemSelected(
- final com.actionbarsherlock.view.MenuItem item) {
+ final MenuItem item) {
switch (item.getItemId()) {
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java
index 91741d2..0b51f5e 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java
@@ -11,21 +11,28 @@ import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
+import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
+import android.support.v4.app.ActionBarDrawerToggle;
+import android.support.v4.view.GravityCompat;
+import android.support.v4.widget.DrawerLayout;
import android.text.TextUtils;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
+import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
+import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
import android.widget.ExpandableListView.OnChildClickListener;
import android.widget.ExpandableListView.OnGroupClickListener;
+import android.widget.ListView;
import android.widget.TextView;
import de.bjusystems.vdrmanager.R;
import de.bjusystems.vdrmanager.data.Channel;
@@ -76,12 +83,14 @@ public class ChannelListActivity extends
super.onResume();
}
+
+
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Attach view
- setContentView(getMainLayout());
+
setTitle(getWindowTitle());
initFlipper();
@@ -98,11 +107,14 @@ public class ChannelListActivity extends
listView.setAdapter(adapter);
// register context menu
registerForContextMenu(listView);
+
+
+
startChannelQuery();
}
- //
+
@Override
protected void onPause() {
@@ -247,10 +259,10 @@ public class ChannelListActivity extends
public int compare(Channel lhs, Channel rhs) {
String lhsn = lhs.getName();
String rhsn = rhs.getName();
- if(lhsn == null){
+ if (lhsn == null) {
return 1;
}
- if(rhsn == null){
+ if (rhsn == null) {
return -1;
}
return lhsn.compareToIgnoreCase(rhsn);
@@ -265,17 +277,11 @@ public class ChannelListActivity extends
adapter.notifyDataSetChanged();
}
- public boolean onPrepareOptionsMenu(
- final com.actionbarsherlock.view.Menu menu) {
- return super.onPrepareOptionsMenu(menu);
- }
-
@Override
- public final boolean onCreateOptionsMenu(
- final com.actionbarsherlock.view.Menu menu) {
+ public final boolean onCreateOptionsMenu(final Menu menu) {
super.onCreateOptionsMenu(menu);
- final com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
+ MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.channellist, menu);
return true;
@@ -288,9 +294,8 @@ public class ChannelListActivity extends
AlertDialog groupByDialog = null;
@Override
- public boolean onOptionsItemSelected(
- final com.actionbarsherlock.view.MenuItem item) {
-
+ public boolean onOptionsItemSelected(final MenuItem item) {
+
switch (item.getItemId()) {
case R.id.channels_groupby:
// case MENU_PROVIDER:
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListFragment.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListFragment.java
new file mode 100644
index 0000000..0ce4cc2
--- /dev/null
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListFragment.java
@@ -0,0 +1,8 @@
+package de.bjusystems.vdrmanager.gui;
+
+import android.support.v4.app.Fragment;
+
+public class ChannelListFragment extends Fragment {
+
+
+}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
index 33af528..c1daefa 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
@@ -15,7 +15,11 @@ import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
+import android.support.v7.app.ActionBarActivity;
import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
@@ -50,7 +54,7 @@ import de.bjusystems.vdrmanager.utils.svdrp.SvdrpEvent;
*
* @author bju
*/
-public class EpgDetailsActivity extends ICSBaseActivity implements
+public class EpgDetailsActivity extends ActionBarActivity implements
OnClickListener, OnPageChangeListener {
public static final String TAG = "EpgDetailsActivity";
@@ -133,7 +137,7 @@ public class EpgDetailsActivity extends ICSBaseActivity implements
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
+ getSupportActionBar().setHomeButtonEnabled(true);
// requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
Intent i = getIntent();
@@ -141,7 +145,7 @@ public class EpgDetailsActivity extends ICSBaseActivity implements
highlight = i.getStringExtra(Intents.HIGHLIGHT);
final int preselect = i.getIntExtra(Intents.CURRENT_EPG, 0);
- initActionBar();
+
// requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
// getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
@@ -648,10 +652,10 @@ public class EpgDetailsActivity extends ICSBaseActivity implements
@Override
public final boolean onCreateOptionsMenu(
- com.actionbarsherlock.view.Menu menu) {
+ Menu menu) {
super.onCreateOptionsMenu(menu);
- final com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
+ final MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.epg_details, menu);
// mShareActionProvider = (ShareActionProvider)
@@ -667,7 +671,7 @@ public class EpgDetailsActivity extends ICSBaseActivity implements
@Override
public boolean onOptionsItemSelected(
- com.actionbarsherlock.view.MenuItem item) {
+ MenuItem item) {
Event cEvent = epgs.get(pager.getCurrentItem());
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgSearchListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgSearchListActivity.java
index 1662903..0c08670 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgSearchListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgSearchListActivity.java
@@ -10,12 +10,12 @@ import android.content.Intent;
import android.os.Bundle;
import android.provider.SearchRecentSuggestions;
import android.text.TextUtils;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
-
-import com.actionbarsherlock.view.MenuItem;
-
import de.bjusystems.vdrmanager.R;
import de.bjusystems.vdrmanager.app.VdrManagerApp;
import de.bjusystems.vdrmanager.data.Epg;
@@ -205,19 +205,19 @@ public class EpgSearchListActivity extends BaseTimerEditActivity<Epg> implements
return adapter.getCount() > 0;
}
- @Override
- protected int prepareDetailsViewData(final EventListItem item, int position) {
- final VdrManagerApp app = (VdrManagerApp) getApplication();
- app.setCurrentEvent(item.getEvent());
- app.setCurrentEpgList(CACHE);
- for(int i = 0; i < position; ++i){
- if(CACHE.get(i) == item.getEvent()){
- return i;
- }
- }
-
- return 0;
- }
+// @Override
+// protected int prepareDetailsViewData(final EventListItem item, int position) {
+// final VdrManagerApp app = (VdrManagerApp) getApplication();
+// app.setCurrentEvent(item.getEvent());
+// app.setCurrentEpgList(CACHE);
+// for (int i = 0; i < position; ++i) {
+// if (CACHE.get(i) == item.getEvent()) {
+// return i;
+// }
+// }
+//
+// return 0;
+// }
@Override
protected int getMainLayout() {
@@ -235,15 +235,14 @@ public class EpgSearchListActivity extends BaseTimerEditActivity<Epg> implements
}
@Override
- public boolean onCreateOptionsMenu(
- final com.actionbarsherlock.view.Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
// MenuItem item;
// item = menu.add(MENU_GROUP_NEW_TIMER, MENU_NEW_TIMER, 0,
// R.string.new_timer);
// item.setIcon(android.R.drawable.ic_menu_add);;
// /item.setAlphabeticShortcut('r');
- final com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
+ MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.epg_search_menu, menu);
return super.onCreateOptionsMenu(menu);
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java
index c9281ae..3e73729 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EventEpgListActivity.java
@@ -8,6 +8,9 @@ import java.util.List;
import android.content.Intent;
import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
@@ -17,10 +20,6 @@ import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
-
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuItem;
-
import de.bjusystems.vdrmanager.R;
import de.bjusystems.vdrmanager.app.VdrManagerApp;
import de.bjusystems.vdrmanager.data.Channel;
@@ -394,20 +393,20 @@ public class EventEpgListActivity extends BaseTimerEditActivity<Epg> implements
}
- @Override
- protected int prepareDetailsViewData(final EventListItem item, int position) {
- final VdrManagerApp app = (VdrManagerApp) getApplication();
- app.setCurrentEvent(item.getEvent());
- ArrayList<Epg> cache = getCache();
- app.setCurrentEpgList(cache);
- for (int i = 0; i < position; ++i) {
- if (cache.get(i) == item.getEvent()) {
- return i;
- }
- }
-
- return 0;
- }
+// @Override
+// protected int prepareDetailsViewData(final EventListItem item, int position) {
+// final VdrManagerApp app = (VdrManagerApp) getApplication();
+// app.setCurrentEvent(item.getEvent());
+// ArrayList<Epg> cache = getCache();
+// app.setCurrentEpgList(cache);
+// for (int i = 0; i < position; ++i) {
+// if (cache.get(i) == item.getEvent()) {
+// return i;
+// }
+// }
+//
+// return 0;
+// }
@Override
protected int getMainLayout() {
@@ -473,7 +472,7 @@ public class EventEpgListActivity extends BaseTimerEditActivity<Epg> implements
@Override
public boolean onCreateOptionsMenu(final Menu menu) {
super.onCreateOptionsMenu(menu);
- final com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
+ final MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.epg_event_list_menu, menu);
return true;
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ICSBaseActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ICSBaseActivity.java
deleted file mode 100644
index b34219f..0000000
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ICSBaseActivity.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package de.bjusystems.vdrmanager.gui;
-
-import com.actionbarsherlock.app.SherlockActivity;
-
-public abstract class ICSBaseActivity extends SherlockActivity {
-
- public void initActionBar() {
- // int api = Build.VERSION.SDK_INT;
- // if (api < 14) {
- // return;
- //}
- final com.actionbarsherlock.app.ActionBar actionBar = getSupportActionBar();
- if(actionBar == null){
- return;
- }
- actionBar.setHomeButtonEnabled(true);
- }
-
- protected CertificateProblemDialog getCertificateProblemDialog() {
- return new CertificateProblemDialog(this);
- }
-}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java
index a03b09c..50f0971 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/RecordingListActivity.java
@@ -11,6 +11,7 @@ import android.os.Bundle;
import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
+import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
@@ -193,8 +194,8 @@ public class RecordingListActivity extends BaseEventListActivity<Recording>
*/
@Override
public boolean onCreateOptionsMenu(
- final com.actionbarsherlock.view.Menu menu) {
- final com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
+ final Menu menu) {
+ final MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.recording_list_menu, menu);
return super.onCreateOptionsMenu(menu);
}
@@ -204,20 +205,20 @@ public class RecordingListActivity extends BaseEventListActivity<Recording>
super.onPause();
}
- @Override
- protected int prepareDetailsViewData(final EventListItem event, int position) {
- getApp().setCurrentEvent(event.getEvent());
- List<Recording> cachEget = CACHEget(currentFolder);
- getApp().setCurrentEpgList(cachEget);
-
- for(int i = 0; i < position; ++i){
- if(cachEget.get(i) == event.getEvent()){
- return i;
- }
- }
-
- return 0;
- }
+// @Override
+// protected int prepareDetailsViewData(final EventListItem event, int position) {
+// getApp().setCurrentEvent(event.getEvent());
+// List<Recording> cachEget = CACHEget(currentFolder);
+// getApp().setCurrentEpgList(cachEget);
+//
+// for(int i = 0; i < position; ++i){
+// if(cachEget.get(i) == event.getEvent()){
+// return i;
+// }
+// }
+//
+// return 0;
+// }
@Override
public void onCreateContextMenu(final ContextMenu menu, final View v,
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimeEpgListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimeEpgListActivity.java
index 7d5b89d..c9c6a57 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimeEpgListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimeEpgListActivity.java
@@ -39,386 +39,390 @@ import de.bjusystems.vdrmanager.utils.svdrp.SvdrpClient;
* @author bju
*/
public class TimeEpgListActivity extends BaseTimerEditActivity<Epg> implements
-OnItemClickListener, OnItemSelectedListener, OnTimeSetListener {
+ OnItemClickListener, OnItemSelectedListener, OnTimeSetListener {
- protected Spinner timeSpinner;
-
- protected View switcher;
+ protected Spinner timeSpinner;
- protected View clock;
-
- ArrayAdapter<EpgSearchTimeValue> timeSpinnerAdapter;
-
- protected static Date nextForceCache = null;
-
- private static String cachedTime = null;
-
- int selectedIndex = 0;
-
- protected static ArrayList<Epg> CACHE = new ArrayList<Epg>();
-
- @Override
- public int getProgressTextId() {
- return R.string.progress_whatson_loading;
- }
-
- @Override
- protected void onCreate(final Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // create adapter for time spinner
- timeSpinnerAdapter = new ArrayAdapter<EpgSearchTimeValue>(this,
- android.R.layout.simple_spinner_item);
- timeSpinnerAdapter
- .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- timeSpinner = (Spinner) findViewById(R.id.epg_list_time_spinner);
- timeSpinner.setAdapter(timeSpinnerAdapter);
-
- switcher = findViewById(R.id.switch_epg_view);
- switcher.setOnClickListener(this);
-
- clock = findViewById(R.id.epg_list_times);
- clock.setOnClickListener(this);
-
- // update gui
- adapter = new TimeEventAdapter(this);
- // searchLabel.setVisibility(View.GONE);
- timeSpinner.setOnItemSelectedListener(this);
-
- fillTimeSpinnerValues();
-
- // Create adapter for EPG list
- listView = (ListView) findViewById(R.id.whatson_list);
- listView.setFastScrollEnabled(true);
- listView.setTextFilterEnabled(true);
-
- listView.setAdapter(adapter);
- registerForContextMenu(listView);
-
- // register EPG item click
- listView.setOnItemClickListener(this);
-
- }
-
- private void fillTimeSpinnerValues() {
- final EpgSearchTimeValues values = new EpgSearchTimeValues(this);
- timeSpinnerAdapter.clear();
- for (final EpgSearchTimeValue value : values.getValues()) {
- timeSpinnerAdapter.add(value);
- }
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- }
-
- @Override
- protected void onPause() {
- super.onPause();
-
- }
-
- @Override
- public void onClick(final View view) {
- if (view == switcher) {
- final Intent intent = new Intent();
- intent.setClass(this, EventEpgListActivity.class);
- intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
- | Intent.FLAG_ACTIVITY_SINGLE_TOP);
- startActivity(intent);
- finish();
- } else if (view == clock) {
- final Intent intent = new Intent();
- intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
- | Intent.FLAG_ACTIVITY_SINGLE_TOP);
- intent.setClass(this, EpgSearchTimesListActivity.class);
- startActivity(intent);
- } else {
- super.onClick(view);
- }
- }
-
- @Override
- public void onTimeSet(final TimePicker view, final int hourOfDay,
- final int minute) {
- final String tm = String.format("%02d:%02d", hourOfDay, minute);
-
- // timeSpinnerAdapter.add(time);
- final EpgSearchTimeValues values = new EpgSearchTimeValues(this);
- final List<EpgSearchTimeValue> vs = values.getValues();
- final EpgSearchTimeValue time = new EpgSearchTimeValue(3, tm);
- vs.add(vs.size() - 1, time);
- timeSpinnerAdapter.clear();
- int select = -1;
- int counter = 0;
- for (final EpgSearchTimeValue value : vs) {
- timeSpinnerAdapter.add(value);
- if (select == -1 && value.getText().equals(tm)) {
- select = counter;
- }
- counter++;
- }
- timeSpinner.setSelection(select);
- setTitle(resolveWindowTitle());
- // update search
- startEpgQuery(time.getValue(), false);
- }
-
- private String resolveWindowTitle() {
- if (timeSpinner == null) {
- return getString(R.string.epg_by_time);
- }
- final EpgSearchTimeValue v = (EpgSearchTimeValue) timeSpinner
- .getSelectedItem();
- if (v == null) {
- return getString(R.string.epg_by_time);
- }
- return getString(R.string.epg_by_time_args, v.getText());
- }
-
- @Override
- public void onItemSelected(final AdapterView<?> parent, final View view,
- final int position, final long id) {
-
- // get spinner value
- final EpgSearchTimeValue selection = (EpgSearchTimeValue) timeSpinner
- .getSelectedItem();
-
- if (selection.getValue().equals("adhoc")) {
- final Calendar cal = Calendar.getInstance(TimeZone.getDefault());
- // show time selection
- final TimePickerDialog dialog = new TimePickerDialog(this, this,
- cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE),
- Preferences.get().isUse24hFormat());
- // dialog.setOnDismissListener(new OnDismissListener() {
-
- // @Override
- // public void onDismiss(DialogInterface dialog) {
-
-
- // }
- //});
-
- dialog.show();
- } else {
- // update search
- setTitle(getString(R.string.epg_by_time_args, selection.getText()));
- startEpgQuery(selection.getValue(), false);
- }
- }
-
- @Override
- public void onNothingSelected(final AdapterView<?> arg0) {
- // startTimeEpgQuery(((EpgTimeSpinnerValue)timeSpinner.getAdapter().getItem(0)).getValue());
- }
-
- @Override
- public void clearCache() {
- super.clearCache();
- cachedTime = null;
- }
-
- private boolean useCache(final String time) {
-
- if (cachedTime == null) {
- return false;
- }
-
- if (cachedTime.equals(time) == false) {
- return false;
- }
-
- if (nextForceCache == null) {
- return false;
- }
- final Date now = new Date();
- if (nextForceCache.before(now)) {
- return false;
- }
- return true;
- }
-
- private void startEpgQuery(final String time, final boolean force) {
-
- if (useCache(time) && !force) {
- fillAdapter();
- return;
- }
-
- if (checkInternetConnection() == false) {
- return;
- }
-
- final EpgClient epgClient = new EpgClient(time, getCertificateProblemDialog());
-
- // remove old listeners
- // epgClient.clearSvdrpListener();
-
- // create background task
- final SvdrpAsyncTask<Epg, SvdrpClient<Epg>> task = new SvdrpAsyncTask<Epg, SvdrpClient<Epg>>(
- epgClient);
-
- // create progress
- addListener(task);
-
- // start task
- task.run();
- }
-
- @Override
- protected synchronized void fillAdapter() {
-
- adapter.clear();
-
- if (CACHE.isEmpty()) {
- return;
- }
-
- sort();
- listView.setFastScrollEnabled(false);
- adapter.add(new EventListItem(
- new DateFormatter(CACHE.get(0).getStart()).getDailyHeader()));
-
- for (final Event e : CACHE) {
- adapter.add(new EventListItem(e));
- }
- adapter.notifyDataSetChanged();
- listView.setFastScrollEnabled(true);
- }
-
- void sort() {
- if (sortBy == BaseEventListActivity.MENU_GROUP_ALPHABET) {
- Collections.sort(CACHE, new TitleComparator());
- } else if (sortBy == BaseEventListActivity.MENU_GROUP_DEFAULT) {
- Collections.sort(CACHE, new ChannelComparator());
- }
- }
-
- @Override
- protected int getAvailableSortByEntries() {
- return R.array.epg_sort_by_channels_alpha;
- }
-
- @Override
- protected String getViewID() {
- return TimeEpgListActivity.class.getSimpleName();
- }
-
- @Override
- protected boolean finishedSuccessImpl(final List<Epg> results) {
- clearCache();
-
- if (results.isEmpty()) {
- return false;
- }
-
- // get spinner value
- final EpgSearchTimeValue selection = (EpgSearchTimeValue) timeSpinner
- .getSelectedItem();
- nextForceCache = FUTURE;
- cachedTime = selection.getValue();
- final Date now = new Date();
-
- // adapter.add(new EventListItem(new DateFormatter(results.get(0)
- // .getStart()).getDailyHeader()));
-
- for (final Epg e : results) {
- CACHE.add(e);
- if (e.getStop().before(nextForceCache) && e.getStop().after(now)) {
- nextForceCache = e.getStop();
- }
- }
- fillAdapter();
- pushResultCountToTitle();
- listView.setSelectionAfterHeaderView();
- return results.isEmpty() == false;
-
- }
-
- @Override
- protected int prepareDetailsViewData(final EventListItem item, int position) {
- final VdrManagerApp app = (VdrManagerApp) getApplication();
- // remember event for details view and timer things
- app.setCurrentEvent(item.getEvent());
- app.setCurrentEpgList(CACHE);
- for(int i = 0; i < position; ++i){
- if(CACHE.get(i) == item.getEvent()){
- return i;
+ protected View switcher;
+
+ protected View clock;
+
+ ArrayAdapter<EpgSearchTimeValue> timeSpinnerAdapter;
+
+ protected static Date nextForceCache = null;
+
+ private static String cachedTime = null;
+
+ int selectedIndex = 0;
+
+ protected static ArrayList<Epg> CACHE = new ArrayList<Epg>();
+
+ @Override
+ public int getProgressTextId() {
+ return R.string.progress_whatson_loading;
+ }
+
+ @Override
+ protected void onCreate(final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // create adapter for time spinner
+ timeSpinnerAdapter = new ArrayAdapter<EpgSearchTimeValue>(this,
+ android.R.layout.simple_spinner_item);
+ timeSpinnerAdapter
+ .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+ timeSpinner = (Spinner) findViewById(R.id.epg_list_time_spinner);
+ timeSpinner.setAdapter(timeSpinnerAdapter);
+
+ switcher = findViewById(R.id.switch_epg_view);
+ switcher.setOnClickListener(this);
+
+ clock = findViewById(R.id.epg_list_times);
+ clock.setOnClickListener(this);
+
+ // update gui
+ adapter = new TimeEventAdapter(this);
+ // searchLabel.setVisibility(View.GONE);
+ timeSpinner.setOnItemSelectedListener(this);
+
+ fillTimeSpinnerValues();
+
+ // Create adapter for EPG list
+ listView = (ListView) findViewById(R.id.whatson_list);
+ listView.setFastScrollEnabled(true);
+ listView.setTextFilterEnabled(true);
+
+ listView.setAdapter(adapter);
+ registerForContextMenu(listView);
+
+ // register EPG item click
+ listView.setOnItemClickListener(this);
+
+ }
+
+ private void fillTimeSpinnerValues() {
+ final EpgSearchTimeValues values = new EpgSearchTimeValues(this);
+ timeSpinnerAdapter.clear();
+ for (final EpgSearchTimeValue value : values.getValues()) {
+ timeSpinnerAdapter.add(value);
+ }
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+
+ }
+
+ @Override
+ public void onClick(final View view) {
+ if (view == switcher) {
+ final Intent intent = new Intent();
+ intent.setClass(this, EventEpgListActivity.class);
+ intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
+ | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+ startActivity(intent);
+ finish();
+ } else if (view == clock) {
+ final Intent intent = new Intent();
+ intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
+ | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+ intent.setClass(this, EpgSearchTimesListActivity.class);
+ startActivity(intent);
+ } else {
+ super.onClick(view);
+ }
+ }
+
+ @Override
+ public void onTimeSet(final TimePicker view, final int hourOfDay,
+ final int minute) {
+ final String tm = String.format("%02d:%02d", hourOfDay, minute);
+
+ // timeSpinnerAdapter.add(time);
+ final EpgSearchTimeValues values = new EpgSearchTimeValues(this);
+ final List<EpgSearchTimeValue> vs = values.getValues();
+ final EpgSearchTimeValue time = new EpgSearchTimeValue(3, tm);
+ vs.add(vs.size() - 1, time);
+ timeSpinnerAdapter.clear();
+ int select = -1;
+ int counter = 0;
+ for (final EpgSearchTimeValue value : vs) {
+ timeSpinnerAdapter.add(value);
+ if (select == -1 && value.getText().equals(tm)) {
+ select = counter;
+ }
+ counter++;
+ }
+ timeSpinner.setSelection(select);
+ setTitle(resolveWindowTitle());
+ // update search
+ startEpgQuery(time.getValue(), false);
+ }
+
+ private String resolveWindowTitle() {
+ if (timeSpinner == null) {
+ return getString(R.string.epg_by_time);
+ }
+ final EpgSearchTimeValue v = (EpgSearchTimeValue) timeSpinner
+ .getSelectedItem();
+ if (v == null) {
+ return getString(R.string.epg_by_time);
+ }
+ return getString(R.string.epg_by_time_args, v.getText());
+ }
+
+ @Override
+ public void onItemSelected(final AdapterView<?> parent, final View view,
+ final int position, final long id) {
+
+ // get spinner value
+ final EpgSearchTimeValue selection = (EpgSearchTimeValue) timeSpinner
+ .getSelectedItem();
+
+ if (selection.getValue().equals("adhoc")) {
+ final Calendar cal = Calendar.getInstance(TimeZone.getDefault());
+ // show time selection
+ final TimePickerDialog dialog = new TimePickerDialog(this, this,
+ cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE),
+ Preferences.get().isUse24hFormat());
+ // dialog.setOnDismissListener(new OnDismissListener() {
+
+ // @Override
+ // public void onDismiss(DialogInterface dialog) {
+
+ // }
+ // });
+
+ dialog.show();
+ } else {
+ // update search
+ setTitle(getString(R.string.epg_by_time_args, selection.getText()));
+ startEpgQuery(selection.getValue(), false);
+ }
+ }
+
+ @Override
+ public void onNothingSelected(final AdapterView<?> arg0) {
+ // startTimeEpgQuery(((EpgTimeSpinnerValue)timeSpinner.getAdapter().getItem(0)).getValue());
+ }
+
+ @Override
+ public void clearCache() {
+ super.clearCache();
+ cachedTime = null;
+ }
+
+ private boolean useCache(final String time) {
+
+ if (cachedTime == null) {
+ return false;
+ }
+
+ if (cachedTime.equals(time) == false) {
+ return false;
+ }
+
+ if (nextForceCache == null) {
+ return false;
+ }
+ final Date now = new Date();
+ if (nextForceCache.before(now)) {
+ return false;
+ }
+ return true;
+ }
+
+ private void startEpgQuery(final String time, final boolean force) {
+
+ if (useCache(time) && !force) {
+ fillAdapter();
+ return;
+ }
+
+ if (checkInternetConnection() == false) {
+ return;
}
+
+ final EpgClient epgClient = new EpgClient(time,
+ getCertificateProblemDialog());
+
+ // remove old listeners
+ // epgClient.clearSvdrpListener();
+
+ // create background task
+ final SvdrpAsyncTask<Epg, SvdrpClient<Epg>> task = new SvdrpAsyncTask<Epg, SvdrpClient<Epg>>(
+ epgClient);
+
+ // create progress
+ addListener(task);
+
+ // start task
+ task.run();
}
- return 0;
- }
-
- @Override
- protected int getMainLayout() {
- return R.layout.time_epg_list;
- }
-
- @Override
- protected void refresh() {
- // get spi
- final EpgSearchTimeValue selection = (EpgSearchTimeValue) timeSpinner
- .getSelectedItem();
- // update search
- startEpgQuery(selection.getValue(), true);
- }
-
- @Override
- protected void retry() {
- refresh();
- }
-
- @Override
- protected String getWindowTitle() {
- return resolveWindowTitle();
- }
-
- private void nextEvent() {
- final int pos = timeSpinner.getSelectedItemPosition();
- if (pos + 1 >= timeSpinnerAdapter.getCount()) {
- say(R.string.navigae_at_the_end);
- return;
- }
- timeSpinner.setSelection(pos + 1, true);
- }
-
- private void prevEvent() {
- final int pos = timeSpinner.getSelectedItemPosition();
- if (pos <= 0) {
- say(R.string.navigae_at_the_start);
- return;
- }
- timeSpinner.setSelection(pos - 1, true);
- }
-
- @Override
- public void onSwipe(final int direction) {
- switch (direction) {
- case SimpleGestureFilter.SWIPE_RIGHT:
- prevEvent();
- break;
- case SimpleGestureFilter.SWIPE_LEFT:
- nextEvent();
- break;
- }
- }
-
- @Override
- protected int getListNavigationIndex() {
- return LIST_NAVIGATION_EPG_BY_TIME;
- }
-
- @Override
- protected List<Epg> getCACHE() {
- return CACHE;
- }
-
- @Override
- protected void timerModified(final Timer timer) {
- clearCache();
- super.timerModified(timer);
- }
+ @Override
+ protected synchronized void fillAdapter() {
+
+ adapter.clear();
+
+ if (CACHE.isEmpty()) {
+ return;
+ }
+
+ sort();
+ listView.setFastScrollEnabled(false);
+ adapter.add(new EventListItem(
+ new DateFormatter(CACHE.get(0).getStart()).getDailyHeader()));
+
+ for (final Event e : CACHE) {
+ adapter.add(new EventListItem(e));
+ }
+ adapter.notifyDataSetChanged();
+ listView.setFastScrollEnabled(true);
+ }
+
+ void sort() {
+ if (sortBy == BaseEventListActivity.MENU_GROUP_ALPHABET) {
+ Collections.sort(CACHE, new TitleComparator());
+ } else if (sortBy == BaseEventListActivity.MENU_GROUP_DEFAULT) {
+ Collections.sort(CACHE, new ChannelComparator());
+ }
+ }
+
+ @Override
+ protected int getAvailableSortByEntries() {
+ return R.array.epg_sort_by_channels_alpha;
+ }
+
+ @Override
+ protected String getViewID() {
+ return TimeEpgListActivity.class.getSimpleName();
+ }
+
+ @Override
+ protected boolean finishedSuccessImpl(final List<Epg> results) {
+ clearCache();
+
+ if (results.isEmpty()) {
+ return false;
+ }
+
+ // get spinner value
+ final EpgSearchTimeValue selection = (EpgSearchTimeValue) timeSpinner
+ .getSelectedItem();
+ nextForceCache = FUTURE;
+ cachedTime = selection.getValue();
+ final Date now = new Date();
+
+ // adapter.add(new EventListItem(new DateFormatter(results.get(0)
+ // .getStart()).getDailyHeader()));
+
+ for (final Epg e : results) {
+ CACHE.add(e);
+ if (e.getStop().before(nextForceCache) && e.getStop().after(now)) {
+ nextForceCache = e.getStop();
+ }
+ }
+ fillAdapter();
+ pushResultCountToTitle();
+ listView.setSelectionAfterHeaderView();
+ return results.isEmpty() == false;
+
+ }
+
+// @Override
+// protected int prepareDetailsViewData(final EventListItem item, int position) {
+// final VdrManagerApp app = (VdrManagerApp) getApplication();
+// // remember event for details view and timer things
+// app.setCurrentEvent(item.getEvent());
+// ArrayList<EventListItem> current = new ArrayList<EventListItem>();
+// for (int i = 0; i < adapter.getCount(); ++i) {
+// current.add(adapter.getItem(i));
+// }
+// app.setCurrentEpgList(current);
+// for (int i = 0; i < position; ++i) {
+// if (current.get(i) == item.getEvent()) {
+// return i;
+// }
+// }
+//
+// return 0;
+// }
+
+ @Override
+ protected int getMainLayout() {
+ return R.layout.time_epg_list;
+ }
+
+ @Override
+ protected void refresh() {
+ // get spi
+ final EpgSearchTimeValue selection = (EpgSearchTimeValue) timeSpinner
+ .getSelectedItem();
+ // update search
+ startEpgQuery(selection.getValue(), true);
+ }
+
+ @Override
+ protected void retry() {
+ refresh();
+ }
+
+ @Override
+ protected String getWindowTitle() {
+ return resolveWindowTitle();
+ }
+
+ private void nextEvent() {
+ final int pos = timeSpinner.getSelectedItemPosition();
+ if (pos + 1 >= timeSpinnerAdapter.getCount()) {
+ say(R.string.navigae_at_the_end);
+ return;
+ }
+ timeSpinner.setSelection(pos + 1, true);
+ }
+
+ private void prevEvent() {
+ final int pos = timeSpinner.getSelectedItemPosition();
+ if (pos <= 0) {
+ say(R.string.navigae_at_the_start);
+ return;
+ }
+ timeSpinner.setSelection(pos - 1, true);
+ }
+
+ @Override
+ public void onSwipe(final int direction) {
+ switch (direction) {
+ case SimpleGestureFilter.SWIPE_RIGHT:
+ prevEvent();
+ break;
+ case SimpleGestureFilter.SWIPE_LEFT:
+ nextEvent();
+ break;
+ }
+ }
+
+ @Override
+ protected int getListNavigationIndex() {
+ return LIST_NAVIGATION_EPG_BY_TIME;
+ }
+
+ @Override
+ protected List<Epg> getCACHE() {
+ return CACHE;
+ }
+
+ @Override
+ protected void timerModified(final Timer timer) {
+ clearCache();
+ super.timerModified(timer);
+ }
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java
index 57882ad..ae07e1c 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java
@@ -7,6 +7,8 @@ import java.util.Comparator;
import java.util.List;
import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuInflater;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import de.bjusystems.vdrmanager.R;
@@ -112,20 +114,20 @@ OnItemClickListener {
* de.bjusystems.vdrmanager.gui.BaseEventListActivity#prepareTimer(de.bjusystems
* .vdrmanager.data.EventListItem)
*/
- @Override
- protected int prepareDetailsViewData(final EventListItem item, int position) {
- final VdrManagerApp app = (VdrManagerApp) getApplication();
- // remember event for details view and timer things
- app.setCurrentEvent(item.getEvent());
- app.setCurrentEpgList(CACHE);
- for(int i = 0; i < position; ++i){
- if(CACHE.get(i) == item.getEvent()){
- return i;
- }
- }
-
- return 0;
- }
+// @Override
+// protected int prepareDetailsViewData(final EventListItem item, int position) {
+// final VdrManagerApp app = (VdrManagerApp) getApplication();
+// // remember event for details view and timer things
+// app.setCurrentEvent(item.getEvent());
+// app.setCurrentEpgList(CACHE);
+// for(int i = 0; i < position; ++i){
+// if(CACHE.get(i) == item.getEvent()){
+// return i;
+// }
+// }
+//
+// return 0;
+// }
protected Comparator<Timer> getTimeComparator(final boolean reverse) {
return new Comparator<Timer>() {
@@ -264,14 +266,14 @@ OnItemClickListener {
return R.array.epg_sort_by_time_alpha;
}
- public boolean onCreateOptionsMenu(final com.actionbarsherlock.view.Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
// MenuItem item;
// item = menu.add(MENU_GROUP_NEW_TIMER, MENU_NEW_TIMER, 0,
// R.string.new_timer);
// item.setIcon(android.R.drawable.ic_menu_add);;
// /item.setAlphabeticShortcut('r');
- final com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
+ final MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.timer_list_menu, menu);
return super.onCreateOptionsMenu(menu);
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
index 8d2fca8..a414725 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
@@ -362,6 +362,23 @@ public class Utils {
.append(Integer.valueOf(Preferences.get().getStreamPort()))
//
.append("/").append(rec.getDevInode());
+ } else if (StringUtils.equals(m, "vdr-smarttvweb")) {
+
+ String type = Preferences.get().getSmarttvewebType();
+
+ url.append("http://")
+ .append(Preferences.get().getSvdrpHost())
+ //
+ .append(":")
+ .append(Integer.valueOf(Preferences.get()
+ .getSmarttvewebPort()))
+ //
+ .append(Utils.encodeUrlPath(rec.getFileName()));
+ if (StringUtils.equals(type, "has") == true) {
+ url.append("/manifest-seg.mpd");
+ } else if (StringUtils.equals(type, "hls")) {
+ url.append("/manifest-seg.m3u8");
+ }
}
return url.toString();
}
@@ -420,6 +437,9 @@ public class Utils {
t.setGravity(Gravity.CENTER, 0, 0);
t.show();
}
+ public static String encodeUrlPath(String path){
+ return path.replaceAll("%", "%25");
+ }
public static void say(final Context ctx, final int msg) {
final Toast t = Toast.makeText(ctx, msg, Toast.LENGTH_SHORT);
@@ -447,16 +467,16 @@ public class Utils {
public static int getTimerStateDrawable(final TimerMatch match,
final int full, final int begin, final int end, final int conflict) {
- switch (match) {
- case Begin:
- return begin;
- case End:
- return end;
- case Conflict:
- return conflict;
- default:
- return full;
- }
+ switch (match) {
+ case Begin:
+ return begin;
+ case End:
+ return end;
+ case Conflict:
+ return conflict;
+ default:
+ return full;
+ }
}
public static String formatAudio(final Context context,
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrManagerActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrManagerActivity.java
index 8a7330e..37eb6b2 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrManagerActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrManagerActivity.java
@@ -9,14 +9,18 @@ import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.SearchRecentSuggestions;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v7.app.ActionBarActivity;
+import android.support.v7.widget.SearchView;
+import android.support.v7.widget.SearchView.OnQueryTextListener;
import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Toast;
-import com.actionbarsherlock.app.SherlockActivity;
-import com.actionbarsherlock.widget.SearchView;
-import com.actionbarsherlock.widget.SearchView.OnQueryTextListener;
import com.j256.ormlite.android.AndroidDatabaseResults;
import de.bjusystems.vdrmanager.R;
@@ -28,14 +32,14 @@ import de.bjusystems.vdrmanager.data.db.DBAccess;
import de.bjusystems.vdrmanager.data.db.EPGSearchSuggestionsProvider;
import de.bjusystems.vdrmanager.utils.wakeup.AsyncWakeupTask;
-public class VdrManagerActivity extends SherlockActivity implements
+public class VdrManagerActivity extends ActionBarActivity implements
OnClickListener, OnQueryTextListener {
public static final String TAG = "VdrManagerActivity";
public static final String VDR_PORTAL = "http://www.vdr-portal.de";
- private com.actionbarsherlock.widget.SearchView search;
+ private SearchView search;
private View actionMenuWakup;
@@ -48,7 +52,7 @@ public class VdrManagerActivity extends SherlockActivity implements
// if(Preferences.get().getCurrentVdr() == null){
// finish();
// return;
- // }
+ // } android.support.v7.appcompat.R
if (Preferences.initVDR(this) == false) {
final Intent intent = new Intent();
@@ -86,13 +90,12 @@ public class VdrManagerActivity extends SherlockActivity implements
// createButtons();
}
- public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {
- com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
+ public boolean onCreateOptionsMenu(Menu menu) {
+ MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_menu, menu);
// search = new SearchView(getSupportActionBar().getThemedContext());
-
- search = (SearchView) menu.findItem(R.id.menu_search).getActionView();
+ search = (SearchView) MenuItemCompat.getActionView( menu.findItem(R.id.menu_search));
// search = (SearchView)
// .getActionView();
@@ -103,7 +106,7 @@ public class VdrManagerActivity extends SherlockActivity implements
search.setSearchableInfo(searchManager
.getSearchableInfo(getComponentName()));
- // search.setOnQueryTextListener(this);
+ //search.setOnQueryTextListener(this);
return true;
}
@@ -122,7 +125,7 @@ public class VdrManagerActivity extends SherlockActivity implements
@Override
public boolean onOptionsItemSelected(
- final com.actionbarsherlock.view.MenuItem item) {
+ final MenuItem item) {
switch (item.getItemId()) {
case R.id.main_menu_preferences: {
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrPreferencesActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrPreferencesActivity.java
index 1bf81b8..0d01737 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrPreferencesActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrPreferencesActivity.java
@@ -68,7 +68,6 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
super.updateSummary(ep);
}
-
private boolean isNew = false;
private boolean hasChanged = false;
@@ -137,16 +136,15 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
return null;
}
-// private String getIp() throws Exception {
-// final Preferences prefs = Preferences.get();
-// String host = prefs.getSvdrpHost();
-// return InetAddress.getByName(host).getHostAddress();
-// }
+ // private String getIp() throws Exception {
+ // final Preferences prefs = Preferences.get();
+ // String host = prefs.getSvdrpHost();
+ // return InetAddress.getByName(host).getHostAddress();
+ // }
private void ping(String ip, int port) throws Exception {
Socket socket = new Socket();
- socket.connect(new InetSocketAddress(ip, port),
- 5 * 1000);
+ socket.connect(new InetSocketAddress(ip, port), 5 * 1000);
socket.setSoTimeout(5 * 1000);
}
@@ -171,9 +169,15 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
// PreferenceCategory cat = (PreferenceCategory)
// findPreference("key_streaming_category");
// cat.removePreference(p);
- }
-
+ }
+
+ if (recstream.equals("vdr-smarttvweb") == false) {
+ Preference p = findPreference("key_smarttvweb_port");
+ p.setEnabled(false);
+ p = findPreference("key_smarttvweb_recstream_method");
+ p.setEnabled(false);
+ }
// create background task
@@ -181,7 +185,7 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
final FetchEditTextPreference macedit = (FetchEditTextPreference) findPreference(getString(R.string.wakeup_wol_mac_key));
String mac = vdr.getMac();
- if(mac == null){
+ if (mac == null) {
mac = "";
}
macedit.setText(mac);
@@ -221,7 +225,8 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
@Override
protected Void doInBackground(Void... params) {
try {
- String ip = InetAddress.getByName(host).getHostAddress();
+ String ip = InetAddress.getByName(host)
+ .getHostAddress();
ping(ip, vdr.getPort());
mac = getMacFromArpCache(ip);
} catch (Exception ex) {
@@ -260,24 +265,26 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
return;
}
- if(ips.isEmpty()){
- Utils.say(VdrPreferencesActivity.this, R.string.no_results);
+ if (ips.isEmpty()) {
+ Utils.say(VdrPreferencesActivity.this,
+ R.string.no_results);
return;
}
if (ips.size() == 1) {
ipEdit.setEditText(ips.get(0).toString());
} else {
- new AlertDialog.Builder(VdrPreferencesActivity.this).setItems(
- ips.toArray(new CharSequence[] {}),
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(
- DialogInterface dialog,
- int which) {
- String ip = ips.get(which);
- ipEdit.setEditText(ip);
- }
- }).show();
+ new AlertDialog.Builder(VdrPreferencesActivity.this)
+ .setItems(
+ ips.toArray(new CharSequence[] {}),
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(
+ DialogInterface dialog,
+ int which) {
+ String ip = ips.get(which);
+ ipEdit.setEditText(ip);
+ }
+ }).show();
}
}
@@ -329,6 +336,7 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
"vdr-live");
Preference pk = findPreference("key_live_port");
if (recstream.equals("vdr-live") == false) {
+
pk.setEnabled(false);
// PreferenceCategory cat = (PreferenceCategory)
// findPreference("key_streaming_category");
@@ -337,6 +345,20 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
pk.setEnabled(true);
}
+ if (recstream.equals("vdr-smarttvweb") == false) {
+ p = findPreference("key_smarttvweb_port");
+ p.setEnabled(false);
+ p = findPreference("key_smarttvweb_recstream_method");
+ p.setEnabled(false);
+
+ } else {
+ p = findPreference("key_smarttvweb_port");
+ p.setEnabled(true);
+ p = findPreference("key_smarttvweb_recstream_method");
+ p.setEnabled(true);
+
+ }
+
// if(pk)
// cat.addPreference(pk);
// } else {
@@ -440,8 +462,8 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
finish();
return;
}
- if(isNew == true && hasChanged == false) {
- //if (pref.commits < 2) {// user has not changed anything
+ if (isNew == true && hasChanged == false) {
+ // if (pref.commits < 2) {// user has not changed anything
DBAccess.get(this).getVdrDAO().delete(pref.getVdr());
finish();
return;
@@ -467,7 +489,8 @@ public class VdrPreferencesActivity extends BasePreferencesActivity implements
return;
}
- //never mind, onResume also registers this, but the listenres are held in a map (as key) so that no double occurance
+ // never mind, onResume also registers this, but the listenres are held
+ // in a map (as key) so that no double occurance
pref.registerOnSharedPreferenceChangeListener(this);
if (requestCode == REQUEST_CODE_PICK_A_TIME_ZONE) {