summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vdrmanager/res/layout/mac_fetch_preference.xml23
-rw-r--r--vdrmanager/res/menu-v11/channellist.xml16
-rw-r--r--vdrmanager/res/menu-v11/epg_details.xml20
-rw-r--r--vdrmanager/res/menu-v11/epg_list_item_menu.xml30
-rw-r--r--vdrmanager/res/menu-v11/epg_list_menu.xml27
-rw-r--r--vdrmanager/res/menu-v11/epg_search_time_item_menu.xml8
-rw-r--r--vdrmanager/res/menu-v11/recording_list_menu.xml21
-rw-r--r--vdrmanager/res/menu-v11/refresh_menu.xml11
-rw-r--r--vdrmanager/res/menu-v11/timer_list_menu.xml21
-rw-r--r--vdrmanager/res/menu/channellist.xml2
-rw-r--r--vdrmanager/res/menu/epg_details.xml12
-rw-r--r--vdrmanager/res/menu/epg_list_item_menu.xml32
-rw-r--r--vdrmanager/res/menu/epg_list_menu.xml14
-rw-r--r--vdrmanager/res/menu/recording_list_menu.xml1
-rw-r--r--vdrmanager/res/menu/refresh_menu.xml1
-rw-r--r--vdrmanager/res/menu/timer_list_menu.xml9
-rw-r--r--vdrmanager/res/values/arrays.xml11
-rw-r--r--vdrmanager/res/values/strings.xml6
-rw-r--r--vdrmanager/res/xml/vdr_prefs.xml4
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/MacFetchEditTextPreference.java94
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java6
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java17
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java8
23 files changed, 206 insertions, 188 deletions
diff --git a/vdrmanager/res/layout/mac_fetch_preference.xml b/vdrmanager/res/layout/mac_fetch_preference.xml
new file mode 100644
index 0000000..d276625
--- /dev/null
+++ b/vdrmanager/res/layout/mac_fetch_preference.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal"
+ android:padding="5dip">
+
+ <EditText
+ android:id="@+id/edit"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:singleLine="true" />
+
+ <ImageButton
+ android:src="@drawable/ic_menu_refresh"
+ android:id="@+id/button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:minWidth="64dip"
+ android:minHeight="48dip"/>
+
+</LinearLayout> \ No newline at end of file
diff --git a/vdrmanager/res/menu-v11/channellist.xml b/vdrmanager/res/menu-v11/channellist.xml
deleted file mode 100644
index 2ca3884..0000000
--- a/vdrmanager/res/menu-v11/channellist.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item
- android:id="@+id/channels_recent_channels" android:alphabeticShortcut="r"
- android:icon="@drawable/ic_menu_recent_history"
- android: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"
- android:title="@string/menu_groupby"/>
-
-</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu-v11/epg_details.xml b/vdrmanager/res/menu-v11/epg_details.xml
deleted file mode 100644
index 4458f09..0000000
--- a/vdrmanager/res/menu-v11/epg_details.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item
- android:id="@+id/epg_details_menu_search_repeat"
- android:showAsAction="ifRoom"
- android:icon="@drawable/ic_menu_view"
- android:title="@string/search_reapt"/>
-
- <item
- android:showAsAction="ifRoom|withText"
- android:id="@+id/epg_details_menu_share"
- android:icon="@android:drawable/ic_menu_share"
- android:title="@string/share"/>
-
- <item
- android:id="@+id/epg_details_menu_switch"
- android:icon="@drawable/ic_menu_goto"
- android:title="@string/switch_to_channel"/>
-</menu>
diff --git a/vdrmanager/res/menu-v11/epg_list_item_menu.xml b/vdrmanager/res/menu-v11/epg_list_item_menu.xml
deleted file mode 100644
index 93ccb68..0000000
--- a/vdrmanager/res/menu-v11/epg_list_item_menu.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item
- android:id="@+id/epg_item_menu_timer_toggle"
- android:title="@string/epg_item_menu_timer_enable"
- android:visible="false"/>
-
- <item
- android:id="@+id/epg_item_menu_timer_add"
- android:title="@string/epg_item_menu_timer_add"/>
-
- <item
- android:id="@+id/epg_item_menu_timer_delete"
- android:title="@string/epg_item_menu_timer_delete"
- android:visible="false"/>
-
- <item
- android:id="@+id/epg_item_menu_timer_modify"
- android:title="@string/epg_item_menu_timer_modify"
- android:visible="false"/>
-
- <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-v11/epg_list_menu.xml b/vdrmanager/res/menu-v11/epg_list_menu.xml
deleted file mode 100644
index ea31378..0000000
--- a/vdrmanager/res/menu-v11/epg_list_menu.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-<!--
- <item
- android:id="@+id/epg_menu_search"
- android:icon="@android:drawable/ic_menu_search"
- android:title="@string/epg_menu_search"/>
--->
-<!--
- <item
- android:id="@+id/epg_menu_times"
- android:icon="@android:drawable/ic_menu_search"
- android:title="@string/epg_menu_times"/>
- -->
- <item
- android:id="@+id/epg_list_menu_channels"
- android:icon="@drawable/ic_menu_moreoverflow"
- android:showAsAction="ifRoom"
- android:title="@string/action_menu_channels"/>
-
- <item
- android:showAsAction="ifRoom"
- android:id="@+id/epg_list_sort_menu"
- android:icon="@android:drawable/ic_menu_sort_alphabetically"
- android:title="@string/sort"/>
-
-</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu-v11/epg_search_time_item_menu.xml b/vdrmanager/res/menu-v11/epg_search_time_item_menu.xml
deleted file mode 100644
index a54abf0..0000000
--- a/vdrmanager/res/menu-v11/epg_search_time_item_menu.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item
- android:id="@+id/epg_search_time_delete"
- android:title="@string/common_delete"/>
-
-</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu-v11/recording_list_menu.xml b/vdrmanager/res/menu-v11/recording_list_menu.xml
deleted file mode 100644
index 2edc02b..0000000
--- a/vdrmanager/res/menu-v11/recording_list_menu.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-<!--
- <item
- android:id="@+id/epg_menu_search"
- android:icon="@android:drawable/ic_menu_search"
- android:title="@string/epg_menu_search"/>
--->
-<!--
- <item
- android:id="@+id/epg_menu_times"
- android:icon="@android:drawable/ic_menu_search"
- android:title="@string/epg_menu_times"/>
- -->
-
- <item
- android:id="@+id/menu_groupby" android:alphabeticShortcut="g"
- android:icon="@android:drawable/ic_menu_sort_alphabetically"
- android:showAsAction="ifRoom"
- android:title="@string/menu_groupby"/>
-</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu-v11/refresh_menu.xml b/vdrmanager/res/menu-v11/refresh_menu.xml
deleted file mode 100644
index 9c31b62..0000000
--- a/vdrmanager/res/menu-v11/refresh_menu.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item
- android:id="@+id/list_refresh"
- android:alphabeticShortcut="r"
- android:icon="@drawable/ic_menu_refresh"
- android:showAsAction="ifRoom"
- android:title="@string/refresh"/>
-
-</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu-v11/timer_list_menu.xml b/vdrmanager/res/menu-v11/timer_list_menu.xml
deleted file mode 100644
index fa00a26..0000000
--- a/vdrmanager/res/menu-v11/timer_list_menu.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-<!--
- <item
- android:id="@+id/epg_menu_search"
- android:icon="@android:drawable/ic_menu_search"
- android:title="@string/epg_menu_search"/>
--->
-<!-- -->
- <item
- android:id="@+id/timer_menu_add"
- android:icon="@android:drawable/ic_menu_add"
- android:alphabeticShortcut="a"
- android:title="@string/epg_item_menu_timer_add"/>
-
- <item
- android:id="@+id/epg_list_menu_channels"
- android:icon="@drawable/ic_menu_moreoverflow"
- android:showAsAction="ifRoom"
- android:title="@string/action_menu_channels"/>
-</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/channellist.xml b/vdrmanager/res/menu/channellist.xml
index c62dd18..2ca3884 100644
--- a/vdrmanager/res/menu/channellist.xml
+++ b/vdrmanager/res/menu/channellist.xml
@@ -4,11 +4,13 @@
<item
android:id="@+id/channels_recent_channels" android:alphabeticShortcut="r"
android:icon="@drawable/ic_menu_recent_history"
+ android: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"
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 df19218..4353b0b 100644
--- a/vdrmanager/res/menu/epg_details.xml
+++ b/vdrmanager/res/menu/epg_details.xml
@@ -3,18 +3,24 @@
<item
android:id="@+id/epg_details_menu_search_repeat"
+ android:showAsAction="ifRoom"
android:icon="@drawable/ic_menu_view"
android:title="@string/search_reapt"/>
<item
+ android:showAsAction="ifRoom"
android:id="@+id/epg_details_menu_share"
android:icon="@android:drawable/ic_menu_share"
android:title="@string/share"/>
-
-
+
+ <item
+ android:showAsAction="ifRoom"
+ android:id="@+id/epg_details_menu_add_to_cal"
+ android:icon="@android:drawable/ic_menu_month"
+ android:title="@string/addtocal"/>
+
<item
android:id="@+id/epg_details_menu_switch"
android:icon="@drawable/ic_menu_goto"
android:title="@string/switch_to_channel"/>
-
</menu>
diff --git a/vdrmanager/res/menu/epg_list_item_menu.xml b/vdrmanager/res/menu/epg_list_item_menu.xml
index cc6ed44..7bda366 100644
--- a/vdrmanager/res/menu/epg_list_item_menu.xml
+++ b/vdrmanager/res/menu/epg_list_item_menu.xml
@@ -1,11 +1,29 @@
<?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/epg_item_menu_timer_toggle" android:title="@string/epg_item_menu_timer_enable" android:visible="false"/>
- <item android:id="@+id/epg_item_menu_timer_add" android:title="@string/epg_item_menu_timer_add" />
- <item android:id="@+id/epg_item_menu_timer_delete" android:title="@string/epg_item_menu_timer_delete" android:visible="false"/>
- <item android:id="@+id/epg_item_menu_timer_modify" android:title="@string/epg_item_menu_timer_modify" android:visible="false" />
- <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/epg_item_menu_timer_toggle"
+ android:title="@string/epg_item_menu_timer_enable"
+ android:visible="false"/>
+
+ <item
+ android:id="@+id/epg_item_menu_timer_add"
+ android:title="@string/epg_item_menu_timer_add"/>
+
+ <item
+ android:id="@+id/epg_item_menu_timer_delete"
+ android:title="@string/epg_item_menu_timer_delete"
+ android:visible="false"/>
+ <item
+ android:id="@+id/epg_item_menu_timer_modify"
+ android:title="@string/epg_item_menu_timer_modify"
+ android:visible="false"/>
+
+ <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/epg_list_menu.xml b/vdrmanager/res/menu/epg_list_menu.xml
index 2335101..ea31378 100644
--- a/vdrmanager/res/menu/epg_list_menu.xml
+++ b/vdrmanager/res/menu/epg_list_menu.xml
@@ -6,16 +6,22 @@
android:icon="@android:drawable/ic_menu_search"
android:title="@string/epg_menu_search"/>
-->
-<!-- -->
+<!--
<item
+ android:id="@+id/epg_menu_times"
+ android:icon="@android:drawable/ic_menu_search"
+ android:title="@string/epg_menu_times"/>
+ -->
+ <item
android:id="@+id/epg_list_menu_channels"
- android:icon="@android:drawable/ic_menu_agenda"
+ android:icon="@drawable/ic_menu_moreoverflow"
+ android:showAsAction="ifRoom"
android:title="@string/action_menu_channels"/>
-
+
<item
+ android:showAsAction="ifRoom"
android:id="@+id/epg_list_sort_menu"
android:icon="@android:drawable/ic_menu_sort_alphabetically"
android:title="@string/sort"/>
-
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/recording_list_menu.xml b/vdrmanager/res/menu/recording_list_menu.xml
index 8b3e72d..2edc02b 100644
--- a/vdrmanager/res/menu/recording_list_menu.xml
+++ b/vdrmanager/res/menu/recording_list_menu.xml
@@ -16,5 +16,6 @@
<item
android:id="@+id/menu_groupby" android:alphabeticShortcut="g"
android:icon="@android:drawable/ic_menu_sort_alphabetically"
+ android:showAsAction="ifRoom"
android:title="@string/menu_groupby"/>
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/refresh_menu.xml b/vdrmanager/res/menu/refresh_menu.xml
index 8bfe27d..9c31b62 100644
--- a/vdrmanager/res/menu/refresh_menu.xml
+++ b/vdrmanager/res/menu/refresh_menu.xml
@@ -5,6 +5,7 @@
android:id="@+id/list_refresh"
android:alphabeticShortcut="r"
android:icon="@drawable/ic_menu_refresh"
+ android:showAsAction="ifRoom"
android:title="@string/refresh"/>
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/menu/timer_list_menu.xml b/vdrmanager/res/menu/timer_list_menu.xml
index 93509ec..fa00a26 100644
--- a/vdrmanager/res/menu/timer_list_menu.xml
+++ b/vdrmanager/res/menu/timer_list_menu.xml
@@ -6,15 +6,16 @@
android:icon="@android:drawable/ic_menu_search"
android:title="@string/epg_menu_search"/>
-->
-<!-- -->
+<!-- -->
<item
android:id="@+id/timer_menu_add"
android:icon="@android:drawable/ic_menu_add"
android:alphabeticShortcut="a"
android:title="@string/epg_item_menu_timer_add"/>
- <item
+
+ <item
android:id="@+id/epg_list_menu_channels"
- android:icon="@android:drawable/ic_menu_agenda"
+ android:icon="@drawable/ic_menu_moreoverflow"
+ android:showAsAction="ifRoom"
android:title="@string/action_menu_channels"/>
-
</menu> \ No newline at end of file
diff --git a/vdrmanager/res/values/arrays.xml b/vdrmanager/res/values/arrays.xml
index 73baaf7..33e08ac 100644
--- a/vdrmanager/res/values/arrays.xml
+++ b/vdrmanager/res/values/arrays.xml
@@ -11,12 +11,12 @@
<item>it</item>
<item>uk</item>
</string-array>
-
+
<string-array name="remux_entry_values">
<item>EXT</item>
<item>EXTERN</item>
</string-array>
-
+
<string-array name="imdb_urls_velues">
<item>akas.imdb.com</item>
<item>imdb.com</item>
@@ -27,11 +27,12 @@
<item>imdb.it</item>
<item>imdb.pt</item>
</string-array>
-
-
+
+
<string-array name="recstream_entry_values">
<item>vdr-live</item>
+ <item>vdr-streamdev</item>
</string-array>
-
+
</resources> \ No newline at end of file
diff --git a/vdrmanager/res/values/strings.xml b/vdrmanager/res/values/strings.xml
index 5796515..9812c55 100644
--- a/vdrmanager/res/values/strings.xml
+++ b/vdrmanager/res/values/strings.xml
@@ -32,6 +32,7 @@
<string name="refresh">Refresh</string>
<string name="done">Done</string>
<string name="share">Share</string>
+ <string name="addtocal">Add to calendar</string>
<string name="search_reapt">Reruns</string>
<string name="share_chooser">Share EPG Entry</string>
<string name="about_text">
@@ -274,10 +275,11 @@
<string-array name="recstream_entries">
<item>VDR live plugin</item>
+ <item>VDR streamdev plugin</item>
</string-array>
<string name="recstream_method_title">Streaming method</string>
- <string name="recstream_method_summary">Currently Streaming over VDR live plugin is supported</string>
+ <string name="recstream_method_summary">Currently Streaming over VDR live and or streamdev plugin is supported</string>
<string name="settings_live_port">VDR live plugin port</string>
<string name="settings_live_port_summary">VDR live plugin has default port 8008.</string>
@@ -347,4 +349,6 @@
<string name="sortby_alphabet">Alphabet</string>
<string name="sortby_channellist">Chanellist</string>
<string name="main_menu_clear_search">Clear Search History</string>
+ <string name="vdr_host_not_defined">VDR host not defined</string>
+ <string name="processing">Processing…</string>
</resources> \ No newline at end of file
diff --git a/vdrmanager/res/xml/vdr_prefs.xml b/vdrmanager/res/xml/vdr_prefs.xml
index c83f014..20d9823 100644
--- a/vdrmanager/res/xml/vdr_prefs.xml
+++ b/vdrmanager/res/xml/vdr_prefs.xml
@@ -68,7 +68,7 @@
android:key="@string/wakeup_password_key" android:password="true"
android:summary="@string/wakeup_password_summary" android:title="@string/wakeup_password_title" />
- <EditTextPreference android:dependency="@string/wakeup_enabled_key"
+ <de.bjusystems.vdrmanager.data.MacFetchEditTextPreference android:dependency="@string/wakeup_enabled_key"
android:key="@string/wakeup_wol_mac_key" android:summary="@string/wakeup_wol_mac_summary"
android:title="@string/wakeup_wol_mac_title" />
@@ -129,7 +129,7 @@
android:summary="@string/remux_parameter_summary" android:title="@string/remux_parameter_title" />
</PreferenceCategory>
- <PreferenceCategory android:title="@string/recstream">
+ <PreferenceCategory android:title="@string/recstream" android:key="key_streaming_category">
<CheckBoxPreference android:key="key_rec_stream_enable"
android:defaultValue="false" android:summary="@string/recstream_enable_summary"
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/MacFetchEditTextPreference.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/MacFetchEditTextPreference.java
new file mode 100644
index 0000000..3b5ab4f
--- /dev/null
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/MacFetchEditTextPreference.java
@@ -0,0 +1,94 @@
+package de.bjusystems.vdrmanager.data;
+
+import android.content.Context;
+import android.content.DialogInterface;
+import android.preference.DialogPreference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.ImageButton;
+import de.bjusystems.vdrmanager.R;
+import de.bjusystems.vdrmanager.data.VdrSharedPreferences.Editor;
+
+public class MacFetchEditTextPreference extends DialogPreference {
+
+ private EditText mEditText;
+
+ private String initialValue;
+
+ public String getInitialValue() {
+ return initialValue;
+ }
+
+ public void setInitialValue(String initialValue) {
+ this.initialValue = initialValue;
+ }
+
+ public EditText getmEditText() {
+ return mEditText;
+ }
+
+ public void setEditText(String text) {
+ this.mEditText.setText(text);
+ }
+
+ private ImageButton mButton;
+
+ private String mText;
+ //private CharSequence mCompoundButtonText;
+ private View.OnClickListener mCompoundButtonCallback;
+
+ public MacFetchEditTextPreference(Context context, AttributeSet attrs,
+ int defStyle) {
+ super(context, attrs, defStyle);
+ setDialogLayoutResource(R.layout.mac_fetch_preference);
+ }
+
+ public MacFetchEditTextPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ setDialogLayoutResource(R.layout.mac_fetch_preference);
+ }
+
+ @Override
+ protected View onCreateDialogView() {
+ View root = super.onCreateDialogView();
+ mEditText = (EditText) root.findViewById(R.id.edit);
+ mButton = (ImageButton) root.findViewById(R.id.button);
+ return root;
+ }
+
+ public void setText(String text) {
+ mText = text;
+ }
+
+ public String getText() {
+ return mText;
+ }
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ switch (which) {
+ case DialogInterface.BUTTON_POSITIVE: // User clicked OK!
+ mText = mEditText.getText().toString();
+ callChangeListener(mText);
+ Editor editor = (Editor) getEditor();
+ editor.putString(getKey(), mText);
+ editor.commit();
+ break;
+ }
+ super.onClick(dialog, which);
+ }
+
+ @Override
+ protected void onBindDialogView(View view) {
+ mEditText.setText(mText);
+ //mButton.setText(mCompoundButtonText);
+
+ // Set a callback to our button.
+ mButton.setOnClickListener(mCompoundButtonCallback);
+ }
+
+ public void setCompoundButtonListener(View.OnClickListener callback) {
+ mCompoundButtonCallback = callback;
+ }
+} \ No newline at end of file
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java
index c117623..b40a544 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/TimerListActivity.java
@@ -198,7 +198,7 @@ public class TimerListActivity extends BaseTimerEditActivity<Timer> implements
* de.bjusystems.vdrmanager.gui.BaseActivity#onOptionsItemSelected(android
* .view.MenuItem)
*/
- public boolean onOptionsItemSelected(final MenuItem item) {
+ public boolean onOptionsItemSelected(final com.actionbarsherlock.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.timer_menu_add:
@@ -220,14 +220,14 @@ public class TimerListActivity extends BaseTimerEditActivity<Timer> implements
return super.onOptionsItemSelected(item);
}
- public boolean onCreateOptionsMenu(final Menu menu) {
+ public boolean onCreateOptionsMenu(final com.actionbarsherlock.view.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 MenuInflater inflater = getMenuInflater();
+ final com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater();
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 1014b80..842de8a 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
@@ -249,6 +249,9 @@ public class Utils {
return minuts;
}
+
+
+
public static void shareEvent(Activity activity, Event event) {
final Intent share = new Intent(android.content.Intent.ACTION_SEND);
share.setType("text/plain");
@@ -272,6 +275,18 @@ public class Utils {
activity.getString(R.string.share_chooser)));
}
+
+ public static void addCalendarEvent(Activity activity, Event event){
+ Intent intent = new Intent(Intent.ACTION_EDIT);
+ intent.setType("vnd.android.cursor.item/event");
+ intent.putExtra("title", event.getTitle());
+ intent.putExtra("description", event.getShortText());
+ intent.putExtra("beginTime", event.getStart().getTime());
+ intent.putExtra("endTime", event.getStop().getTime());
+ activity.startActivity(intent);
+ }
+
+
public static String mapSpecialChars(String src) {
if (src == null) {
return "";
@@ -372,7 +387,7 @@ public class Utils {
/**
* Formats the date and time based on user's phone date/time preferences.
- *
+ *
* @param context
* the context
* @param time
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java
index 87c9439..85dbe8f 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java
@@ -110,7 +110,7 @@ public class VdrListActivity extends ListActivity
}
Vdr vdr = getItem(position);
- String name = vdr.getName();
+ String name = (vdr.getName() != null ? vdr.getName() : "");
String host = vdr.getHost();
holder.text2.setText(host);
@@ -164,7 +164,7 @@ public class VdrListActivity extends ListActivity
/*
* (non-Javadoc)
- *
+ *
* @see
* android.widget.AdapterView.OnItemClickListener#onItemClick(android.widget
* .AdapterView, android.view.View, int, long)
@@ -176,7 +176,7 @@ public class VdrListActivity extends ListActivity
/**
* Start {@link VdrPreferencesActivity} to create or edit a vdr
- *
+ *
* @param id
* may be null. Then a new vdr is created
*/
@@ -188,7 +188,7 @@ public class VdrListActivity extends ListActivity
/*
* (non-Javadoc)
- *
+ *
* @see android.app.Activity#onActivityResult(int, int,
* android.content.Intent)
*/