summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorArtur Dryomov <artur.dryomov@gmail.com>2013-07-17 03:10:27 +0300
committerMichael Meeks <michael.meeks@suse.com>2013-07-25 18:01:57 +0100
commitcc20292c4d1074a02c740c8411d94cd97c9e2bb6 (patch)
tree6e7a8ffff9eedc7b07b478a9d84144b3ceca4651 /android
parentf39f3ccd590c76d80ff9e02e5cb26fd5119d3de5 (diff)
Remove legacy and unused code.
Change-Id: I9c126628cd8e73c162e561d23bd884c1af26404a
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/AndroidManifest.xml35
-rw-r--r--android/sdremote/res/drawable-hdpi/handle_default.9.pngbin282 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-hdpi/handle_light.9.pngbin203 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-land-hdpi/handle_default.9.pngbin263 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-land-hdpi/handle_light.9.pngbin201 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-land-ldpi/handle_default.9.pngbin263 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-land-ldpi/handle_light.9.pngbin201 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-land-mdpi/handle_default.9.pngbin263 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-land-mdpi/handle_light.9.pngbin201 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-ldpi/handle_default.9.pngbin282 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-ldpi/handle_light.9.pngbin222 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-mdpi/handle_default.9.pngbin282 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-mdpi/handle_light.9.pngbin222 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-mdpi/handle_vertical_default.9.pngbin263 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-mdpi/handle_vertical_light.9.pngbin202 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-xhdpi/handle_default.9.pngbin282 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-xhdpi/handle_light.9.pngbin222 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-xhdpi/handle_vertical_default.9.pngbin263 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable-xhdpi/handle_vertical_light.9.pngbin202 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/actionbar_icon_overflow.pngbin167 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/actionbar_icon_thumbs.pngbin175 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/actionbar_none.pngbin106 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/actionbar_pressed.pngbin115 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/actionbar_selected.pngbin115 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/actionbar_thumbs.xml9
-rw-r--r--android/sdremote/res/drawable/actionbar_toggle.xml8
-rw-r--r--android/sdremote/res/drawable/clockbar_clock.xml11
-rw-r--r--android/sdremote/res/drawable/clockbar_countdown.xml11
-rw-r--r--android/sdremote/res/drawable/clockbar_icon_clock.pngbin1051 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/clockbar_icon_countdown.pngbin794 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/clockbar_icon_stopwatch.pngbin1008 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/clockbar_stopwatch.xml11
-rw-r--r--android/sdremote/res/drawable/empty.pngbin107 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/handle.xml9
-rw-r--r--android/sdremote/res/drawable/icon_options.pngbin454 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/image_loading.pngbin287 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/libreoffice_logo.9.pngbin5960 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/rectangle_black.xml11
-rw-r--r--android/sdremote/res/drawable/testimage.pngbin9075 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/up_indicator_white.pngbin244 -> 0 bytes
-rw-r--r--android/sdremote/res/drawable/warning_exclamation.pngbin3333 -> 0 bytes
-rw-r--r--android/sdremote/res/layout-land/fragment_blankscreen.xml55
-rw-r--r--android/sdremote/res/layout-land/fragment_presentation.xml59
-rw-r--r--android/sdremote/res/layout/activity_pairing.xml43
-rw-r--r--android/sdremote/res/layout/activity_presentation.xml14
-rw-r--r--android/sdremote/res/layout/activity_reconnect.xml56
-rw-r--r--android/sdremote/res/layout/activity_selector.xml72
-rw-r--r--android/sdremote/res/layout/activity_selector_sublayout_server.xml21
-rw-r--r--android/sdremote/res/layout/activity_startpresentation.xml22
-rw-r--r--android/sdremote/res/layout/dialog_about.xml83
-rw-r--r--android/sdremote/res/layout/dialog_addserver.xml56
-rw-r--r--android/sdremote/res/layout/fragment_blankscreen.xml45
-rw-r--r--android/sdremote/res/layout/fragment_presentation.xml48
-rw-r--r--android/sdremote/res/layout/fragment_thumbnail.xml14
-rw-r--r--android/sdremote/res/layout/main.xml13
-rw-r--r--android/sdremote/res/layout/presentation_actionbar.xml25
-rw-r--r--android/sdremote/res/layout/presentation_clockbar.xml101
-rw-r--r--android/sdremote/res/layout/slide_thumbnail.xml22
-rw-r--r--android/sdremote/res/layout/testlayout.xml40
-rw-r--r--android/sdremote/res/menu/actionbar_presentation.xml21
-rw-r--r--android/sdremote/res/menu/actionbar_selector.xml18
-rw-r--r--android/sdremote/res/menu/selector_activity.xml6
-rw-r--r--android/sdremote/res/menu/selector_contextmenu.xml4
-rw-r--r--android/sdremote/res/values/attrs.xml10
-rw-r--r--android/sdremote/res/values/colors.xml11
-rw-r--r--android/sdremote/res/values/strings.xml62
-rw-r--r--android/sdremote/res/values/themes.xml8
-rw-r--r--android/sdremote/res/xml/preferences.xml21
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/AboutDialogBuilder.java61
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/ActivityChangeBroadcastProcessor.java64
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java88
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/Globals.java17
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/PairingActivity.java116
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java559
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java311
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java412
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java39
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/StartPresentationActivity.java117
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java229
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/ReconnectionActivity.java108
-rw-r--r--android/sdremote/src/pl/polidea/coverflow/AbstractCoverFlowImageAdapter.java120
-rw-r--r--android/sdremote/src/pl/polidea/coverflow/CoverFlow.java387
-rw-r--r--android/sdremote/src/pl/polidea/coverflow/ReflectingImageAdapter.java145
-rw-r--r--android/sdremote/src/pl/polidea/coverflow/ResourceImageAdapter.java109
84 files changed, 1 insertions, 3936 deletions
diff --git a/android/sdremote/AndroidManifest.xml b/android/sdremote/AndroidManifest.xml
index c2f9ed4aec1e..4a6a1d1e0034 100644
--- a/android/sdremote/AndroidManifest.xml
+++ b/android/sdremote/AndroidManifest.xml
@@ -48,45 +48,12 @@
</activity>
<activity
- android:name=".SelectorActivity"
- android:label="@string/selector_choose_a_computer"
- android:uiOptions="splitActionBarWhenNarrow">
- </activity>
-
- <activity
- android:name=".PairingActivity"
- android:noHistory="true">
- </activity>
-
- <activity
- android:name=".StartPresentationActivity"
- android:label="@string/startpresentation_title">
- </activity>
-
- <activity
- android:name=".PresentationActivity"
- android:label="@string/title_activity_presentation">
- </activity>
-
- <activity
- android:name=".SettingsActivity"
- android:icon="@drawable/icon_options"
- android:label="@string/options">
- </activity>
-
- <activity
- android:name=".communication.ReconnectionActivity"
- android:label="@string/reconnect">
- </activity>
-
- <activity
android:name=".LicensesActivity"
android:label="@string/title_licenses">
</activity>
<service
- android:name=".communication.CommunicationService"
- android:label="@string/startpresentation_title">
+ android:name=".communication.CommunicationService">
</service>
</application>
diff --git a/android/sdremote/res/drawable-hdpi/handle_default.9.png b/android/sdremote/res/drawable-hdpi/handle_default.9.png
deleted file mode 100644
index d978f956854e..000000000000
--- a/android/sdremote/res/drawable-hdpi/handle_default.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-hdpi/handle_light.9.png b/android/sdremote/res/drawable-hdpi/handle_light.9.png
deleted file mode 100644
index 7d1b1c968bb9..000000000000
--- a/android/sdremote/res/drawable-hdpi/handle_light.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-land-hdpi/handle_default.9.png b/android/sdremote/res/drawable-land-hdpi/handle_default.9.png
deleted file mode 100644
index 830493c1f90c..000000000000
--- a/android/sdremote/res/drawable-land-hdpi/handle_default.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-land-hdpi/handle_light.9.png b/android/sdremote/res/drawable-land-hdpi/handle_light.9.png
deleted file mode 100644
index 1db41c1256fa..000000000000
--- a/android/sdremote/res/drawable-land-hdpi/handle_light.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-land-ldpi/handle_default.9.png b/android/sdremote/res/drawable-land-ldpi/handle_default.9.png
deleted file mode 100644
index 830493c1f90c..000000000000
--- a/android/sdremote/res/drawable-land-ldpi/handle_default.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-land-ldpi/handle_light.9.png b/android/sdremote/res/drawable-land-ldpi/handle_light.9.png
deleted file mode 100644
index 1db41c1256fa..000000000000
--- a/android/sdremote/res/drawable-land-ldpi/handle_light.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-land-mdpi/handle_default.9.png b/android/sdremote/res/drawable-land-mdpi/handle_default.9.png
deleted file mode 100644
index 830493c1f90c..000000000000
--- a/android/sdremote/res/drawable-land-mdpi/handle_default.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-land-mdpi/handle_light.9.png b/android/sdremote/res/drawable-land-mdpi/handle_light.9.png
deleted file mode 100644
index 1db41c1256fa..000000000000
--- a/android/sdremote/res/drawable-land-mdpi/handle_light.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-ldpi/handle_default.9.png b/android/sdremote/res/drawable-ldpi/handle_default.9.png
deleted file mode 100644
index d978f956854e..000000000000
--- a/android/sdremote/res/drawable-ldpi/handle_default.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-ldpi/handle_light.9.png b/android/sdremote/res/drawable-ldpi/handle_light.9.png
deleted file mode 100644
index b0d7bef534d6..000000000000
--- a/android/sdremote/res/drawable-ldpi/handle_light.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-mdpi/handle_default.9.png b/android/sdremote/res/drawable-mdpi/handle_default.9.png
deleted file mode 100644
index d978f956854e..000000000000
--- a/android/sdremote/res/drawable-mdpi/handle_default.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-mdpi/handle_light.9.png b/android/sdremote/res/drawable-mdpi/handle_light.9.png
deleted file mode 100644
index b0d7bef534d6..000000000000
--- a/android/sdremote/res/drawable-mdpi/handle_light.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-mdpi/handle_vertical_default.9.png b/android/sdremote/res/drawable-mdpi/handle_vertical_default.9.png
deleted file mode 100644
index 830493c1f90c..000000000000
--- a/android/sdremote/res/drawable-mdpi/handle_vertical_default.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-mdpi/handle_vertical_light.9.png b/android/sdremote/res/drawable-mdpi/handle_vertical_light.9.png
deleted file mode 100644
index 8246c398347b..000000000000
--- a/android/sdremote/res/drawable-mdpi/handle_vertical_light.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-xhdpi/handle_default.9.png b/android/sdremote/res/drawable-xhdpi/handle_default.9.png
deleted file mode 100644
index d978f956854e..000000000000
--- a/android/sdremote/res/drawable-xhdpi/handle_default.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-xhdpi/handle_light.9.png b/android/sdremote/res/drawable-xhdpi/handle_light.9.png
deleted file mode 100644
index b0d7bef534d6..000000000000
--- a/android/sdremote/res/drawable-xhdpi/handle_light.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-xhdpi/handle_vertical_default.9.png b/android/sdremote/res/drawable-xhdpi/handle_vertical_default.9.png
deleted file mode 100644
index 830493c1f90c..000000000000
--- a/android/sdremote/res/drawable-xhdpi/handle_vertical_default.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable-xhdpi/handle_vertical_light.9.png b/android/sdremote/res/drawable-xhdpi/handle_vertical_light.9.png
deleted file mode 100644
index 8246c398347b..000000000000
--- a/android/sdremote/res/drawable-xhdpi/handle_vertical_light.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/actionbar_icon_overflow.png b/android/sdremote/res/drawable/actionbar_icon_overflow.png
deleted file mode 100644
index 5265c45101b2..000000000000
--- a/android/sdremote/res/drawable/actionbar_icon_overflow.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/actionbar_icon_thumbs.png b/android/sdremote/res/drawable/actionbar_icon_thumbs.png
deleted file mode 100644
index ae10accd7ef6..000000000000
--- a/android/sdremote/res/drawable/actionbar_icon_thumbs.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/actionbar_none.png b/android/sdremote/res/drawable/actionbar_none.png
deleted file mode 100644
index d7895e55dab2..000000000000
--- a/android/sdremote/res/drawable/actionbar_none.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/actionbar_pressed.png b/android/sdremote/res/drawable/actionbar_pressed.png
deleted file mode 100644
index 812c92b467fd..000000000000
--- a/android/sdremote/res/drawable/actionbar_pressed.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/actionbar_selected.png b/android/sdremote/res/drawable/actionbar_selected.png
deleted file mode 100644
index 9c471a306075..000000000000
--- a/android/sdremote/res/drawable/actionbar_selected.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/actionbar_thumbs.xml b/android/sdremote/res/drawable/actionbar_thumbs.xml
deleted file mode 100644
index 2d03853fed76..000000000000
--- a/android/sdremote/res/drawable/actionbar_thumbs.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item android:drawable="@drawable/actionbar_toggle"/>
- <item><bitmap
- android:src="@drawable/actionbar_icon_thumbs"
- android:gravity="center" /></item>
-
-</layer-list> \ No newline at end of file
diff --git a/android/sdremote/res/drawable/actionbar_toggle.xml b/android/sdremote/res/drawable/actionbar_toggle.xml
deleted file mode 100644
index 3f53266b1ef6..000000000000
--- a/android/sdremote/res/drawable/actionbar_toggle.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:drawable="@drawable/actionbar_selected" android:state_checked="true" />
- <item android:drawable="@drawable/actionbar_pressed" android:state_pressed="true"/>
- <item android:drawable="@drawable/actionbar_none"/>
-
-</selector> \ No newline at end of file
diff --git a/android/sdremote/res/drawable/clockbar_clock.xml b/android/sdremote/res/drawable/clockbar_clock.xml
deleted file mode 100644
index 14ceb47c07df..000000000000
--- a/android/sdremote/res/drawable/clockbar_clock.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item android:drawable="@drawable/actionbar_toggle"/>
- <item>
- <bitmap
- android:gravity="center"
- android:src="@drawable/clockbar_icon_clock" />
- </item>
-
-</layer-list> \ No newline at end of file
diff --git a/android/sdremote/res/drawable/clockbar_countdown.xml b/android/sdremote/res/drawable/clockbar_countdown.xml
deleted file mode 100644
index 129d9aa4f492..000000000000
--- a/android/sdremote/res/drawable/clockbar_countdown.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item android:drawable="@drawable/actionbar_toggle"/>
- <item>
- <bitmap
- android:gravity="center"
- android:src="@drawable/clockbar_icon_countdown" />
- </item>
-
-</layer-list> \ No newline at end of file
diff --git a/android/sdremote/res/drawable/clockbar_icon_clock.png b/android/sdremote/res/drawable/clockbar_icon_clock.png
deleted file mode 100644
index 792af07edf9b..000000000000
--- a/android/sdremote/res/drawable/clockbar_icon_clock.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/clockbar_icon_countdown.png b/android/sdremote/res/drawable/clockbar_icon_countdown.png
deleted file mode 100644
index 19af04134595..000000000000
--- a/android/sdremote/res/drawable/clockbar_icon_countdown.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/clockbar_icon_stopwatch.png b/android/sdremote/res/drawable/clockbar_icon_stopwatch.png
deleted file mode 100644
index ac0414231cbc..000000000000
--- a/android/sdremote/res/drawable/clockbar_icon_stopwatch.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/clockbar_stopwatch.xml b/android/sdremote/res/drawable/clockbar_stopwatch.xml
deleted file mode 100644
index bfdab6cd89d2..000000000000
--- a/android/sdremote/res/drawable/clockbar_stopwatch.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item android:drawable="@drawable/actionbar_toggle"/>
- <item>
- <bitmap
- android:gravity="center"
- android:src="@drawable/clockbar_icon_stopwatch" />
- </item>
-
-</layer-list> \ No newline at end of file
diff --git a/android/sdremote/res/drawable/empty.png b/android/sdremote/res/drawable/empty.png
deleted file mode 100644
index 8705a3df4191..000000000000
--- a/android/sdremote/res/drawable/empty.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/handle.xml b/android/sdremote/res/drawable/handle.xml
deleted file mode 100644
index 9fda3d89bbad..000000000000
--- a/android/sdremote/res/drawable/handle.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:drawable="@drawable/handle_light" android:state_activated="true"/>
- <item android:drawable="@drawable/handle_light" android:state_pressed="true"/>
- <item android:drawable="@drawable/handle_light" android:state_focused="true"/>
- <item android:drawable="@drawable/handle_default"/>
-
-</selector> \ No newline at end of file
diff --git a/android/sdremote/res/drawable/icon_options.png b/android/sdremote/res/drawable/icon_options.png
deleted file mode 100644
index ab79d1307c48..000000000000
--- a/android/sdremote/res/drawable/icon_options.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/image_loading.png b/android/sdremote/res/drawable/image_loading.png
deleted file mode 100644
index 24e8ebdf12b2..000000000000
--- a/android/sdremote/res/drawable/image_loading.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/libreoffice_logo.9.png b/android/sdremote/res/drawable/libreoffice_logo.9.png
deleted file mode 100644
index 11bb5f274d96..000000000000
--- a/android/sdremote/res/drawable/libreoffice_logo.9.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/rectangle_black.xml b/android/sdremote/res/drawable/rectangle_black.xml
deleted file mode 100644
index f854e6000481..000000000000
--- a/android/sdremote/res/drawable/rectangle_black.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle" >
-
- <size
- android:height="240dip"
- android:width="320dip" />
-
- <solid android:color="@color/black" />
-
-</shape> \ No newline at end of file
diff --git a/android/sdremote/res/drawable/testimage.png b/android/sdremote/res/drawable/testimage.png
deleted file mode 100644
index 4529586c5901..000000000000
--- a/android/sdremote/res/drawable/testimage.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/up_indicator_white.png b/android/sdremote/res/drawable/up_indicator_white.png
deleted file mode 100644
index 9a72a2363648..000000000000
--- a/android/sdremote/res/drawable/up_indicator_white.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/drawable/warning_exclamation.png b/android/sdremote/res/drawable/warning_exclamation.png
deleted file mode 100644
index 76b2f2d46e27..000000000000
--- a/android/sdremote/res/drawable/warning_exclamation.png
+++ /dev/null
Binary files differ
diff --git a/android/sdremote/res/layout-land/fragment_blankscreen.xml b/android/sdremote/res/layout-land/fragment_blankscreen.xml
deleted file mode 100644
index 3117d307b289..000000000000
--- a/android/sdremote/res/layout-land/fragment_blankscreen.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center_vertical"
- android:layout_margin="10dip"
- android:gravity="center_horizontal"
- android:orientation="vertical" >
-
- <ImageView
- android:id="@+id/blankscreen_blankimage"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:scaleType="fitXY"
- android:src="@drawable/rectangle_black" />
-
- <ImageView
- android:id="@+id/blankscreen_divider"
- android:layout_width="1dip"
- android:layout_height="fill_parent"
- android:layout_centerHorizontal="true"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="5dip"
- android:layout_toRightOf="@+id/blankscreen_blankimage"
- android:src="@color/medium_grey" />
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_gravity="center_vertical"
- android:layout_toRightOf="@id/blankscreen_divider"
- android:gravity="center"
- android:orientation="vertical" >
-
- <ImageView
- android:id="@+id/blankscreen_slidepreview"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="5dip"
- android:adjustViewBounds="true"
- android:scaleType="centerInside"
- android:src="@drawable/rectangle_black" />
-
- <TextView
- android:id="@+id/blankscreen_return"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="5dip"
- android:gravity="center"
- android:text="@string/blankscreen_return" />
- </LinearLayout>
-
-</RelativeLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout-land/fragment_presentation.xml b/android/sdremote/res/layout-land/fragment_presentation.xml
deleted file mode 100644
index 7ac884bc5ae1..000000000000
--- a/android/sdremote/res/layout-land/fragment_presentation.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/presentation_layout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal" >
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:orientation="vertical" >
-
- <pl.polidea.coverflow.CoverFlow
- xmlns:coverflow="http://schemas.android.com/apk/res/org.libreoffice.impressremote"
- android:id="@+id/presentation_coverflow"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_margin="5dp"
- android:layout_marginLeft="15dp"
- coverflow:imageHeight="200dip"
- coverflow:imageWidth="240dip"
- coverflow:withReflection="false" />
-
- <TextView
- android:id="@+id/presentation_slidenumber"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|center_vertical"
- android:text="" />
- </LinearLayout>
-
- <ImageView
- android:id="@+id/presentation_handle"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginLeft="6dp"
- android:layout_marginRight="6dp"
- android:contentDescription="@string/presentation_ui_resizehandle"
- android:paddingBottom="5dp"
- android:paddingLeft="5dp"
- android:paddingRight="10dp"
- android:paddingTop="5dp"
- android:scaleType="fitXY"
- android:src="@drawable/handle" />
-
- <ScrollView
- android:id="@+id/presentation_scrollview"
- android:layout_width="wrap_content"
- android:layout_height="match_parent" >
-
- <WebView
- android:id="@+id/presentation_notes"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
- </ScrollView>
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/activity_pairing.xml b/android/sdremote/res/layout/activity_pairing.xml
deleted file mode 100644
index d2f06bdb40c8..000000000000
--- a/android/sdremote/res/layout/activity_pairing.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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="vertical" >
-
- <TextView
- android:id="@+id/pairing_instruction1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:gravity="center"
- android:text="@string/pairing_instructions_1" />
-
- <TextView
- android:id="@+id/pairing_instruction2_deviceName"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:gravity="center"
- android:text="@string/pairing_instructions_2_deviceName" />
-
- <TextView
- android:id="@+id/pairing_instruction3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:text="@string/pairing_instructions_3" />
-
- <TextView
- android:id="@+id/pairing_pin"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:text=""
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="75dip" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/activity_presentation.xml b/android/sdremote/res/layout/activity_presentation.xml
deleted file mode 100644
index 1dbf5a604bf5..000000000000
--- a/android/sdremote/res/layout/activity_presentation.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/framelayout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:keepScreenOn = "true">
-
- <view
- android:id="@+id/presentation_interceptor"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- class="org.libreoffice.impressremote.PresentationActivity$InterceptorLayout" />
-
-</FrameLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/activity_reconnect.xml b/android/sdremote/res/layout/activity_reconnect.xml
deleted file mode 100644
index 0d2f8bb75de4..000000000000
--- a/android/sdremote/res/layout/activity_reconnect.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_centerVertical="true"
- android:orientation="vertical" >
-
- <ImageView
- android:id="@+id/imageView1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:src="@drawable/warning_exclamation"
- android:layout_marginBottom="50dp" />
-
- <TextView
- android:id="@+id/textView1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:gravity="center_horizontal"
- android:text="@string/reconnect_description1"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <TextView
- android:id="@+id/textView2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:gravity="center_horizontal"
- android:text="@string/reconnect_description2"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <TextView
- android:id="@+id/countDownTV"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:gravity="center_horizontal"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- </LinearLayout>
-
-</RelativeLayout>
diff --git a/android/sdremote/res/layout/activity_selector.xml b/android/sdremote/res/layout/activity_selector.xml
deleted file mode 100644
index 2c16abe80fed..000000000000
--- a/android/sdremote/res/layout/activity_selector.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="10dip" >
-
- <TextView
- android:id="@+id/selector_label_none"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/selector_noservers"
- android:textAppearance="?android:attr/textAppearanceLarge" />
-
- <LinearLayout
- android:id="@+id/selector_container_bluetooth"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/selector_label_bluetooth"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/bluetooth"
- android:textAppearance="?android:attr/textAppearanceLarge" />
-
- <ImageView
- android:id="@+id/selector_divider1"
- android:layout_width="fill_parent"
- android:layout_height="2dip"
- android:src="@color/medium_grey" />
-
- <LinearLayout
- android:id="@+id/selector_list_bluetooth"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" />
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/selector_container_network"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/selector_label_network"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/wifi"
- android:textAppearance="?android:attr/textAppearanceLarge" />
-
- <ImageView
- android:id="@+id/selector_divider1"
- android:layout_width="fill_parent"
- android:layout_height="2dip"
- android:src="@color/medium_grey" />
-
- <LinearLayout
- android:id="@+id/selector_list_network"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" />
- </LinearLayout>
- </LinearLayout>
-
-</ScrollView> \ No newline at end of file
diff --git a/android/sdremote/res/layout/activity_selector_sublayout_server.xml b/android/sdremote/res/layout/activity_selector_sublayout_server.xml
deleted file mode 100644
index 58a037423d84..000000000000
--- a/android/sdremote/res/layout/activity_selector_sublayout_server.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?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="wrap_content"
- android:orientation="vertical" android:clickable="true" >
-
- <ImageView
- android:id="@+id/sub_divider"
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:src="@color/medium_grey" />
-
- <TextView
- android:id="@+id/selector_sub_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="10dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- />
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/activity_startpresentation.xml b/android/sdremote/res/layout/activity_startpresentation.xml
deleted file mode 100644
index 25bf55ab86d0..000000000000
--- a/android/sdremote/res/layout/activity_startpresentation.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?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="vertical" >
-
- <TextView
- android:id="@+id/startpresentation_instruction"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="5dip"
- android:text="@string/startpresentation_instruction" />
-
- <Button
- android:id="@+id/startpresentation_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="@string/startpresentation_button" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/dialog_about.xml b/android/sdremote/res/layout/dialog_about.xml
deleted file mode 100644
index 74f4474b6ca6..000000000000
--- a/android/sdremote/res/layout/dialog_about.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/about_root"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <ImageView
- android:id="@+id/imageView1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:scaleType="fitXY"
- android:src="@drawable/libreoffice_logo" />
-
- <ScrollView
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/about_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:gravity="center_horizontal"
- android:text="@string/application_name"
- android:textAppearance="?android:attr/textAppearanceLarge" />
-
- <TextView
- android:id="@+id/about_version"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:gravity="center_horizontal"
- android:text="@string/about_versionstring" />
-
- <TextView
- android:id="@+id/about_copyright"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:gravity="center_horizontal"
- android:text="@string/about_copyright" />
-
- <TextView
- android:id="@+id/about_link"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:autoLink="web"
- android:linksClickable="true"
- android:text="www.libreoffice.org"
- tools:ignore="HardcodedText" />
-
- <TextView
- android:id="@+id/about_licence"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:gravity="center_horizontal"
- android:text="@string/about_licence" />
-
- <TextView
- android:id="@+id/about_libraries"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_margin="10dip"
- android:text="@string/about_libraries" />
- </LinearLayout>
- </ScrollView>
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/dialog_addserver.xml b/android/sdremote/res/layout/dialog_addserver.xml
deleted file mode 100644
index 475aabd6d7a1..000000000000
--- a/android/sdremote/res/layout/dialog_addserver.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/addserver_root"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:padding="12dp"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/wifiAlertMsg"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="5dp"
- android:text="@string/wifiAlertMsg"
- android:textStyle="italic"
- android:typeface="serif" />
-
- <TextView
- android:id="@+id/addserver_namelabel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/addserver_entername" />
-
- <EditText
- android:id="@+id/addserver_nameentry"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:inputType="textCapWords" >
-
- <requestFocus />
- </EditText>
-
- <TextView
- android:id="@+id/addserver_addressabel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/addserver_enteraddress" />
-
- <EditText
- android:id="@+id/addserver_addressentry"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:inputType="textUri" >
-
- </EditText>
-
- <CheckBox
- android:id="@+id/addserver_remember"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:checked="true"
- android:text="@string/addserver_remember" />
-
-</LinearLayout>
diff --git a/android/sdremote/res/layout/fragment_blankscreen.xml b/android/sdremote/res/layout/fragment_blankscreen.xml
deleted file mode 100644
index 87ecf0347ec8..000000000000
--- a/android/sdremote/res/layout/fragment_blankscreen.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="10dip"
- android:gravity="center_vertical"
- android:orientation="vertical" >
-
- <ImageView
- android:id="@+id/blankscreen_blankimage"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:scaleType="fitXY"
- android:src="@drawable/rectangle_black" />
-
- <ImageView
- android:id="@+id/blankscreen_divider"
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:layout_below="@+id/blankscreen_blankimage"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="10dip"
- android:src="@color/medium_grey" />
-
- <ImageView
- android:id="@+id/blankscreen_slidepreview"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_below="@id/blankscreen_divider"
- android:layout_toLeftOf="@+id/blankscreen_return"
- android:src="@drawable/rectangle_black" />
-
- <TextView
- android:id="@+id/blankscreen_return"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentRight="true"
- android:gravity="center"
- android:layout_below="@id/blankscreen_divider"
- android:text="@string/blankscreen_return"
- android:layout_margin="5dip" />
-
-</RelativeLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/fragment_presentation.xml b/android/sdremote/res/layout/fragment_presentation.xml
deleted file mode 100644
index 03c4ee76746c..000000000000
--- a/android/sdremote/res/layout/fragment_presentation.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/presentation_layout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <pl.polidea.coverflow.CoverFlow
- xmlns:coverflow="http://schemas.android.com/apk/res/org.libreoffice.impressremote"
- android:id="@+id/presentation_coverflow"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dip"
- coverflow:imageHeight="150dip"
- coverflow:imageWidth="180dip"
- coverflow:withReflection="false" />
-
- <TextView
- android:id="@+id/presentation_slidenumber"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="" />
-
- <ImageView
- android:id="@+id/presentation_handle"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="6dp"
- android:layout_marginRight="6dp"
- android:contentDescription="@string/presentation_ui_resizehandle"
- android:paddingBottom="5dp"
- android:paddingTop="5dp"
- android:scaleType="fitXY"
- android:src="@drawable/handle" />
-
- <ScrollView
- android:id="@+id/presentation_scrollview"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
-
- <WebView
- android:id="@+id/presentation_notes"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
- </ScrollView>
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/fragment_thumbnail.xml b/android/sdremote/res/layout/fragment_thumbnail.xml
deleted file mode 100644
index ecd8855c9fe7..000000000000
--- a/android/sdremote/res/layout/fragment_thumbnail.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<GridView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/thumbnail_grid"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:columnWidth="90dp"
- android:gravity="center"
- android:horizontalSpacing="10dp"
- android:numColumns="auto_fit"
- android:paddingTop="10dp"
- android:stretchMode="columnWidth"
- android:verticalSpacing="10dp" >
-
-</GridView> \ No newline at end of file
diff --git a/android/sdremote/res/layout/main.xml b/android/sdremote/res/layout/main.xml
deleted file mode 100644
index b100941e7796..000000000000
--- a/android/sdremote/res/layout/main.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
-<TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Hello World, Launcher"
- />
-</LinearLayout>
-
diff --git a/android/sdremote/res/layout/presentation_actionbar.xml b/android/sdremote/res/layout/presentation_actionbar.xml
deleted file mode 100644
index 1fd3bae96fe2..000000000000
--- a/android/sdremote/res/layout/presentation_actionbar.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?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" >
-
- <ToggleButton
- android:id="@+id/actionbar_thumbnailtoggle"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="@drawable/actionbar_thumbs"
- android:textOff=""
- android:textOn="" />
-
- <ToggleButton
- android:id="@+id/actionbar_time"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:background="@drawable/actionbar_toggle"
- android:gravity="center"
- android:textColor="#FFFFFF"
- android:textSize="22dp" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/presentation_clockbar.xml b/android/sdremote/res/layout/presentation_clockbar.xml
deleted file mode 100644
index 98b913ccc5f6..000000000000
--- a/android/sdremote/res/layout/presentation_clockbar.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/clockbars_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <LinearLayout
- android:id="@+id/clockbar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="#EE313131"
- android:orientation="horizontal" >
-
- <ToggleButton
- android:id="@+id/clockbar_toggle_clockmode"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/clockbar_clock"
- android:textOff=""
- android:textOn="" />
-
- <ToggleButton
- android:id="@+id/clockbar_toggle_stopwatchmode"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/clockbar_stopwatch"
- android:textOff=""
- android:textOn="" />
-
- <ToggleButton
- android:id="@+id/clockbar_toggle_countdownmode"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/clockbar_countdown"
- android:textOff=""
- android:textOn="" />
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/clockbar_stopwatchbar"
- android:layout_width="match_parent"
- android:layout_height="48dp"
- android:background="#DD4D4D4D"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/clockbar_stopwatch_run"
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="#00000000"
- android:text="@string/clock_timer_start"
- android:textColor="#FFFFFF" />
-
- <Button
- android:id="@+id/clockbar_stopwatch_reset"
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="#00000000"
- android:text="@string/clock_timer_reset"
- android:textColor="#FFFFFF" />
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/clockbar_countdownbar"
- android:layout_width="match_parent"
- android:layout_height="48dp"
- android:background="#DD4D4D4D"
- android:orientation="horizontal" >
-
- <AutoCompleteTextView android:id="@+id/countdown_time"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:completionThreshold="1" />
-
- <Button
- android:id="@+id/clockbar_countdown_reset"
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="#00000000"
- android:text="@string/clock_timer_reset"
- android:textColor="#FFFFFF" />
-
- <Button
- android:id="@+id/clockbar_countdown_button"
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="#00000000"
- android:text="@string/clock_timer_start"
- android:textColor="#FFFFFF" />
- </LinearLayout>
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/slide_thumbnail.xml b/android/sdremote/res/layout/slide_thumbnail.xml
deleted file mode 100644
index d3834c7e343b..000000000000
--- a/android/sdremote/res/layout/slide_thumbnail.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?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="vertical" >
-
- <ImageView
- android:id="@+id/sub_thumbnail"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:src="@drawable/ic_launcher"
- android:adjustViewBounds="true"/>
-
- <TextView
- android:id="@+id/sub_number"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="0" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/layout/testlayout.xml b/android/sdremote/res/layout/testlayout.xml
deleted file mode 100644
index 4f0b0657a815..000000000000
--- a/android/sdremote/res/layout/testlayout.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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="vertical" >
-
- <TextView
- android:id="@+id/label_curSlide"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="Slide: XXX" />
-
- <Button
- android:id="@+id/button_next"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="Next" />
-
- <Button
- android:id="@+id/button_previous"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="Previous" />
-
- <Button
- android:id="@+id/button_thumbnail"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="Thumbnail View" />
-
- <ImageView
- android:id="@+id/image_preview"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/android/sdremote/res/menu/actionbar_presentation.xml b/android/sdremote/res/menu/actionbar_presentation.xml
deleted file mode 100644
index 59fe6fc5a34c..000000000000
--- a/android/sdremote/res/menu/actionbar_presentation.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/actionbar_presentation_submenu"
- android:showAsAction="always"
- android:icon="@drawable/actionbar_icon_overflow">
- <menu>
- <item
- android:id="@+id/actionbar_presentation_submenu_blank"
- android:title="@string/presentation_blank_screen"/>
- <item
- android:id="@+id/actionbar_presentation_submenu_options"
- android:title="@string/options"/>
- <item
- android:id="@+id/actionbar_presentation_submenu_about"
- android:title="@string/about"/>
- </menu>
- </item>
-
-</menu> \ No newline at end of file
diff --git a/android/sdremote/res/menu/actionbar_selector.xml b/android/sdremote/res/menu/actionbar_selector.xml
deleted file mode 100644
index f70139e0e39a..000000000000
--- a/android/sdremote/res/menu/actionbar_selector.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item
- android:id="@+id/actionbar_presentation_submenu"
- android:showAsAction="always"
- android:icon="@drawable/actionbar_icon_overflow">
- <menu>
- <item
- android:id="@+id/actionbar_presentation_submenu_options"
- android:title="@string/options"/>
- <item
- android:id="@+id/actionbar_presentation_submenu_about"
- android:title="@string/about"/>
- </menu>
- </item>
-
-</menu>
diff --git a/android/sdremote/res/menu/selector_activity.xml b/android/sdremote/res/menu/selector_activity.xml
deleted file mode 100644
index dab6e207b678..000000000000
--- a/android/sdremote/res/menu/selector_activity.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item android:id="@+id/menu_selector_addServer" android:title="@string/addserver" android:showAsAction="always"></item>
-
-
-</menu> \ No newline at end of file
diff --git a/android/sdremote/res/menu/selector_contextmenu.xml b/android/sdremote/res/menu/selector_contextmenu.xml
deleted file mode 100644
index d3c99a15592c..000000000000
--- a/android/sdremote/res/menu/selector_contextmenu.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item android:id="@+id/selector_context_delete" android:title="@string/selector_delete"></item>
-</menu> \ No newline at end of file
diff --git a/android/sdremote/res/values/attrs.xml b/android/sdremote/res/values/attrs.xml
deleted file mode 100644
index 43de3bc8e95f..000000000000
--- a/android/sdremote/res/values/attrs.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <declare-styleable name="CoverFlow">
- <attr name="imageWidth" format="dimension" />
- <attr name="imageHeight" format="dimension" />
- <attr name="withReflection" format="boolean" />
- <attr name="reflectionGap" format="dimension" />
- <attr name="imageReflectionRatio" format="float" />
- </declare-styleable>
-</resources> \ No newline at end of file
diff --git a/android/sdremote/res/values/colors.xml b/android/sdremote/res/values/colors.xml
index fbc2e441327f..ed05f91ee040 100644
--- a/android/sdremote/res/values/colors.xml
+++ b/android/sdremote/res/values/colors.xml
@@ -8,15 +8,4 @@
<color name="stroke_grid_slide">#65000000</color>
<color name="stroke_pager_slide">#35000000</color>
- <color name="orange">#EE4400</color>
- <color name="grey">#303030</color>
- <color name="white">#FFFFFF</color>
- <color name="black">#000000</color>
- <color name="light_grey">#E8E9E8</color>
- <color name="medium_grey">#C1C2C1</color>
- <color name="text_grey">#5E5F5F</color>
-
- <color name="thumbnail_border">#B4B4B4</color>
- <color name="thumbnail_border_selected">#EE4400</color>
-
</resources> \ No newline at end of file
diff --git a/android/sdremote/res/values/strings.xml b/android/sdremote/res/values/strings.xml
index 42209c123ae8..38252bb9a05c 100644
--- a/android/sdremote/res/values/strings.xml
+++ b/android/sdremote/res/values/strings.xml
@@ -1,68 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="menu_settings">Settings</string>
- <string name="title_activity_presentation">PresentationActivity</string>
- <string name="presentation_ui_resizehandle">Handle to resize view.</string>
- <string name="presentation_blank_screen">Blank Screen</string>
- <string name="options">Options</string>
- <string name="reconnect">Reconnect...</string>
- <string name="actionbar_timeformat">h:mmaa</string>
- <string name="actionbar_timerformat">mm:ss</string>
- <string name="clock_timer_start">Start</string>
- <string name="clock_timer_pause">Pause</string>
- <string name="clock_timer_restart">Restart</string>
- <string name="clock_timer_reset">Reset</string>
- <string name="clock_timer_resume">Resume</string>
- <string name="options_autodecline">Decline Calls</string>
- <string name="help">Help</string>
- <string name="ConnectionFailedHelp">#1 Verify Impress is running \n#2 For Bluetooth user, enable \"Preferences\"-\"LibreOffice Impress\"-\"General\"-\"Enable remote control\"\n#3 For WiFi user, tick \"Preferences\"-\"LibreOffice\"-\"Advanced\"-\"Enable Experimental Features\" \n </string>
- <string name="options_description">Automatically decline all incoming calls.</string>
- <string name="options_volumeswitching">Volume Switching</string>
- <string name="options_volumeswitching_descripton">Change slides using volume buttons</string>
- <string name="options_enablewifi">Enable wireless</string>
- <string name="options_enablewifi_descripton">Try to connect to the computer over wireless</string>
- <string name="options_switchcomputer">Switch computer</string>
- <string name="blankscreen_return">Return to Slide</string>
- <string name="bluetooth">Bluetooth</string>
- <string name="wifi">Wi-Fi</string>
- <string name="selector_noservers">Searching for computers…</string>
- <string name="selector_delete">Remove computer</string>
- <string name="selector_choose_a_computer">Choose a Computer</string>
- <string name="selector_dialog_connecting">Attempting to connect to {0}…</string>
- <string name="selector_dialog_connectionfailed">Impress Remote could not connect to {0}.</string>
- <string name="selector_dialog_connectionfailed_ok">OK</string>
- <string name="pairing_instructions_1">In Impress, click on the "Slideshow" menu and select "Impress Remote".</string>
- <string name="pairing_instructions_2_deviceName">Choose "{0}" as your device.</string>
- <string name="pairing_instructions_3">Then input this PIN:</string>
- <string name="startpresentation_instruction">No presentation is currently running.</string>
- <string name="startpresentation_button">Start Presentation</string>
- <string name="startpresentation_title">Start Presentation</string>
- <string name="about">About</string>
- <string name="about_close">Close</string>
- <string name="about_versionstring">Version: {0} (Build ID: {1})</string>
- <string name="about_copyright">Copyright © 2012 LibreOffice Contributors and/or their affiliates.</string>
- <string name="about_licence">This app is released under the Mozilla Public License, v. 2.0.</string>
- <string name="about_libraries">This app uses android-coverflow\n\tCopyright © 2011, Polidea\n\tNew BSD License.\n\nThis app uses ActionBarSherlock:\n\tCopyright 2012 Jake Wharton\n\tLicensed under the Apache License, Version 2.0 (the "License")</string>
- <string name="addserver">Add Wi-Fi Computer Manually</string>
- <string name="addserver_entername">Computer name:</string>
- <string name="addserver_enteraddress">Computer IP address or hostname:</string>
- <string name="addserver_remember">Remember this computer next time</string>
- <string name="addserver_add">Add</string>
- <string name="addserver_cancel">Cancel</string>
- <string name="reconnect_description1">Your connection has been dropped.</string>
- <string name="reconnect_description2">Please try to reconnect</string>
- <string name="wifiAlertMsg">This is still an experimental feature. You need to \"enable experimental features\" in \"Preferences\"-\"LibreOffice\"-\"Advanced\" on your computer. \nThe use over Bluetooth is recommended.</string>
- <string-array name="countdown_values">
- <item >5:00</item>
- <item >10:00</item>
- <item >15:00</item>
- <item >20:00</item>
- <item >30:00</item>
- <item >45:00</item>
- </string-array>
- <string name="wrong_time_format">You have entered wrong time format</string>
-
<string name="application_name">Impress Remote</string>
<string name="title_computers">Computers</string>
diff --git a/android/sdremote/res/values/themes.xml b/android/sdremote/res/values/themes.xml
index 21f5be187576..a7e9ad597717 100644
--- a/android/sdremote/res/values/themes.xml
+++ b/android/sdremote/res/values/themes.xml
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <integer name="thumbnail_border_width">3</integer>
-
<style name="Theme.ImpressRemote" parent="Theme.Sherlock.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/Theme.ImpressRemote.ActionBar</item>
<item name="actionBarStyle">@style/Theme.ImpressRemote.ActionBar</item>
@@ -47,10 +45,4 @@
<item name="displayOptions">showCustom</item>
</style>
- <style name="Theme.ImpressRemote.ActionBarWidget" parent="android:style/Widget.Holo.Light">
- <item name="android:background">@color/orange</item>
- <item name="android:textColor">@color/white</item>
- <item name="android:textSize">22dp</item>
- </style>
-
</resources> \ No newline at end of file
diff --git a/android/sdremote/res/xml/preferences.xml b/android/sdremote/res/xml/preferences.xml
deleted file mode 100644
index 292c851ab878..000000000000
--- a/android/sdremote/res/xml/preferences.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <!-- <SwitchPreference android:defaultValue="false" android:title="@string/options_autodecline" android:key="option_autodecline"/> -->
- <CheckBoxPreference
- android:defaultValue="true"
- android:key="option_volumeswitching"
- android:summary="@string/options_volumeswitching_descripton"
- android:title="@string/options_volumeswitching" />
-
- <CheckBoxPreference
- android:defaultValue="false"
- android:key="option_enablewifi"
- android:summary="@string/options_enablewifi_descripton"
- android:title="@string/options_enablewifi" />
-
- <Preference
- android:key="option_switchcomputer"
- android:title="@string/options_switchcomputer" />
-
-</PreferenceScreen> \ No newline at end of file
diff --git a/android/sdremote/src/org/libreoffice/impressremote/AboutDialogBuilder.java b/android/sdremote/src/org/libreoffice/impressremote/AboutDialogBuilder.java
deleted file mode 100644
index 3fdc5a8e9202..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/AboutDialogBuilder.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import java.text.MessageFormat;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.TextView;
-
-public class AboutDialogBuilder extends AlertDialog.Builder {
-
- private TextView mVersionLabel;
-
- public AboutDialogBuilder(Context aContext) {
- super(aContext);
-
- LayoutInflater aInflater = (LayoutInflater) aContext
- .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- View aLayout = aInflater.inflate(R.layout.dialog_about, null);
-
- setView(aLayout);
-
- // setTitle(R.string.about);
- setPositiveButton(
- aContext.getResources().getString(R.string.about_close),
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- dialog.dismiss();
- }
- });
-
- mVersionLabel = (TextView) aLayout.findViewById(R.id.about_version);
-
- try {
- PackageInfo aInfo = aContext.getPackageManager().getPackageInfo(
- aContext.getPackageName(), 0);
- String aVersionString = MessageFormat.format(
- aContext.getResources().getString(
- R.string.about_versionstring),
- aInfo.versionName, aInfo.versionCode);
- mVersionLabel.setText(aVersionString);
- } catch (NameNotFoundException e) {
- // Cannot logically happen
- }
-
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/ActivityChangeBroadcastProcessor.java b/android/sdremote/src/org/libreoffice/impressremote/ActivityChangeBroadcastProcessor.java
deleted file mode 100644
index 0855423f92a3..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/ActivityChangeBroadcastProcessor.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-
-/**
- * This class is used to centralise the processing of Broadcasts concerning
- * presentation/connection status changes which result in a change of activity.
- *
- * I.e. this will switch to the correct activity and correctly set up the
- * activity backstack when switching activity.
- *
- * To use create this on activity startup, and pass messages from your
- * BroadcastReceiver's onReceive.
- *
- */
-public class ActivityChangeBroadcastProcessor {
-
- private Activity mActivity;
-
- public ActivityChangeBroadcastProcessor(Activity aActivity) {
- mActivity = aActivity;
- }
-
- public void addToFilter(IntentFilter aFilter) {
- aFilter.addAction(Intents.Actions.SLIDE_SHOW_STOPPED);
- aFilter.addAction(Intents.Actions.SLIDE_SHOW_RUNNING);
- aFilter.addAction(Intents.Actions.PAIRING_VALIDATION);
- }
-
- public void onReceive(Context aContext, Intent aIntent) {
- if (aIntent.getAction().equals(
- Intents.Actions.SLIDE_SHOW_STOPPED)) {
- Intent nIntent = new Intent(mActivity,
- StartPresentationActivity.class);
- nIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
- mActivity.startActivity(nIntent);
- } else if (aIntent
- .getAction()
- .equals(Intents.Actions.SLIDE_SHOW_RUNNING)) {
- Intent nIntent = new Intent(mActivity, PresentationActivity.class);
- nIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
- mActivity.startActivity(nIntent);
- } else if (aIntent.getAction().equals(
- Intents.Actions.PAIRING_VALIDATION)) {
- Intent nIntent = new Intent(mActivity, PairingActivity.class);
- nIntent.putExtras(aIntent.getExtras()); // Pass on pin and other info.
- mActivity.startActivity(nIntent);
- }
- }
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java b/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java
deleted file mode 100644
index f39a10a70c80..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/BlankScreenFragment.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import org.libreoffice.impressremote.communication.CommunicationService;
-
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.RectF;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-
-import com.actionbarsherlock.app.SherlockFragment;
-
-public class BlankScreenFragment extends SherlockFragment {
-
- CommunicationService mCommunicationService;
-
- public BlankScreenFragment(CommunicationService aCommunicationService) {
- mCommunicationService = aCommunicationService;
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
-
- View v = inflater.inflate(R.layout.fragment_blankscreen, container,
- false);
-
- Bitmap aBitmap = mCommunicationService.getSlideShow().getSlidePreview(
- mCommunicationService.getSlideShow().getCurrentSlideIndex());
-
- // Process the image
- final int borderWidth = 8;
-
- Paint p = new Paint(Paint.ANTI_ALIAS_FLAG);
- p.setShadowLayer(borderWidth, 0, 0, Color.BLACK);
-
- RectF aRect = new RectF(borderWidth, borderWidth, borderWidth
- + aBitmap.getWidth(), borderWidth + aBitmap.getHeight());
- Bitmap aOut = Bitmap.createBitmap(aBitmap.getWidth() + 2 * borderWidth,
- aBitmap.getHeight() + 2 * borderWidth,
- aBitmap.getConfig());
- Canvas canvas = new Canvas(aOut);
- canvas.drawColor(Color.TRANSPARENT);
- canvas.drawRect(aRect, p);
- canvas.drawBitmap(aBitmap, null, aRect, null);
-
- ImageView aImage = (ImageView) v
- .findViewById(R.id.blankscreen_slidepreview);
- aImage.setImageBitmap(aOut);
-
- OnClickListener aListener = new OnClickListener() {
-
- @Override
- public void onClick(View v) {
- getFragmentManager().popBackStackImmediate();
- }
-
- };
-
- v.findViewById(R.id.blankscreen_slidepreview).setOnClickListener(
- aListener);
- v.findViewById(R.id.blankscreen_return).setOnClickListener(aListener);
- mCommunicationService.getTransmitter().setUpBlankScreen();
- return v;
- }
-
- @Override
- public void onDestroyView() {
- super.onDestroyView();
- mCommunicationService.getTransmitter().resumePresentation();
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/Globals.java b/android/sdremote/src/org/libreoffice/impressremote/Globals.java
deleted file mode 100644
index a767bb13c290..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/Globals.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-public class Globals {
-
- public static final String TAG = "sdremote";
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/PairingActivity.java b/android/sdremote/src/org/libreoffice/impressremote/PairingActivity.java
deleted file mode 100644
index 4e921833864b..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/PairingActivity.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import java.text.MessageFormat;
-
-import org.libreoffice.impressremote.communication.CommunicationService;
-import org.libreoffice.impressremote.communication.CommunicationService.State;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.support.v4.content.LocalBroadcastManager;
-import android.widget.TextView;
-
-import com.actionbarsherlock.app.SherlockActivity;
-import com.actionbarsherlock.view.MenuItem;
-
-public class PairingActivity extends SherlockActivity {
- private ActivityChangeBroadcastProcessor mBroadcastProcessor;
- private CommunicationService mCommunicationService;
-
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setContentView(R.layout.activity_pairing);
- bindService(new Intent(this, CommunicationService.class), mConnection,
- Context.BIND_IMPORTANT);
-
- IntentFilter aFilter = new IntentFilter();
-
- mBroadcastProcessor = new ActivityChangeBroadcastProcessor(this);
- mBroadcastProcessor.addToFilter(aFilter);
-
- LocalBroadcastManager.getInstance(this).registerReceiver(mListener,
- aFilter);
-
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
-
- String aPin = getIntent().getStringExtra("PIN");
- String aServerName = Build.MODEL;
-
- ((TextView) findViewById(R.id.pairing_pin)).setText(aPin);
- ((TextView) findViewById(R.id.pairing_instruction2_deviceName))
- .setText(MessageFormat
- .format(getResources()
- .getString(R.string.pairing_instructions_2_deviceName),
- aServerName));
-
- getSupportActionBar().setTitle(aServerName);
- }
-
- @Override
- public void onPause(){
- super.onPause();
- unbindService(mConnection);
- }
-
- @Override
- public void onBackPressed() {
- Intent aIntent = new Intent(this, SelectorActivity.class);
- aIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(aIntent);
- }
-
-
- private BroadcastReceiver mListener = new BroadcastReceiver() {
-
- @Override
- public void onReceive(Context aContext, Intent aIntent) {
- mBroadcastProcessor.onReceive(aContext, aIntent);
- }
- };
-
- private ServiceConnection mConnection = new ServiceConnection() {
-
- @Override
- public void onServiceConnected(ComponentName aClassName,
- IBinder aService) {
- mCommunicationService = ((CommunicationService.CBinder) aService)
- .getService();
-
- }
-
- @Override
- public void onServiceDisconnected(ComponentName aClassName) {
- mCommunicationService = null;
- }
- };
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
-
- switch (item.getItemId()) {
- case android.R.id.home:
- onBackPressed();
- return true;
- }
- return super.onOptionsItemSelected(item);
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
deleted file mode 100644
index ccbbfc6aaf02..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.TimeZone;
-
-import org.libreoffice.impressremote.communication.CommunicationService;
-import org.libreoffice.impressremote.communication.Timer;
-
-import android.app.AlertDialog;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.IBinder;
-import android.preference.PreferenceManager;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v4.content.LocalBroadcastManager;
-import android.text.format.DateFormat;
-import android.util.AttributeSet;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.ArrayAdapter;
-import android.widget.AutoCompleteTextView;
-import android.widget.Button;
-import android.widget.FrameLayout;
-import android.widget.Toast;
-import android.widget.ToggleButton;
-
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
-
-public class PresentationActivity extends SherlockFragmentActivity {
- private CommunicationService mCommunicationService;
- private FrameLayout mOuterLayout;
- private ThumbnailFragment mThumbnailFragment;
- private PresentationFragment mPresentationFragment;
- private static ActionBarManager mActionBarManager;
- private ActivityChangeBroadcastProcessor mBroadcastProcessor;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // bind preference defaults
- PreferenceManager.setDefaultValues(this, R.xml.preferences,
- false /* retain user settings */);
-
- mBroadcastProcessor = new ActivityChangeBroadcastProcessor(this);
-
- bindService(new Intent(this, CommunicationService.class), mConnection,
- Context.BIND_IMPORTANT);
-
- IntentFilter aFilter = new IntentFilter();
- mBroadcastProcessor = new ActivityChangeBroadcastProcessor(this);
- mBroadcastProcessor.addToFilter(aFilter);
- LocalBroadcastManager.getInstance(this).registerReceiver(mListener,
- aFilter);
-
- //((FrameLayout) findViewById(R.id.framelayout)).addView(mLayout);
- setContentView(R.layout.activity_presentation);
-
- mPresentationFragment = new PresentationFragment();
-
- FragmentManager fragmentManager = getSupportFragmentManager();
-
- FragmentTransaction fragmentTransaction = fragmentManager
- .beginTransaction();
- fragmentTransaction.replace(R.id.presentation_interceptor,
- mPresentationFragment, "fragment_presentation");
- fragmentTransaction.commit();
- mOuterLayout = (FrameLayout) findViewById(R.id.framelayout);
- }
-
- @Override
- public void onBackPressed() {
- if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
- super.onBackPressed();
- return;
- }
- Intent aIntent = new Intent(this, SelectorActivity.class);
- aIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(aIntent);
- if ( mCommunicationService != null )
- mCommunicationService.disconnect();
- }
-
- @Override
- protected void onDestroy() {
- mActionBarManager.stop();
- unbindService(mConnection);
- super.onDestroy();
- }
-
- @Override
- public boolean dispatchKeyEvent(KeyEvent event) {
- SharedPreferences aPref = PreferenceManager
- .getDefaultSharedPreferences(this);
- boolean aVolumeSwitching = aPref.getBoolean("option_volumeswitching",
- false);
- boolean aRelevantFragmentVisible = ((mPresentationFragment != null) && mPresentationFragment
- .isVisible())
- || ((mThumbnailFragment != null) && mThumbnailFragment
- .isVisible());
- if (aVolumeSwitching && aRelevantFragmentVisible) {
-
- int action = event.getAction();
- int keyCode = event.getKeyCode();
- switch (keyCode) {
- case KeyEvent.KEYCODE_VOLUME_UP:
- if (action == KeyEvent.ACTION_UP) {
- mCommunicationService.getTransmitter().performNextTransition();
- }
- return true;
- case KeyEvent.KEYCODE_VOLUME_DOWN:
- if (action == KeyEvent.ACTION_DOWN) {
- mCommunicationService.getTransmitter().performPreviousTransition();
- }
- return true;
- }
- }
- return super.dispatchKeyEvent(event);
- }
-
- private ServiceConnection mConnection = new ServiceConnection() {
- @Override
- public void onServiceConnected(ComponentName aClassName,
- IBinder aService) {
- mCommunicationService = ((CommunicationService.CBinder) aService)
- .getService();
-
- if (mThumbnailFragment != null)
- mThumbnailFragment
- .setCommunicationService(mCommunicationService);
-
- }
-
- @Override
- public void onServiceDisconnected(ComponentName aClassName) {
- mCommunicationService = null;
- }
- };
-
- // ---------------------------------------------- ACTION BAR ---------------
-
- @Override
- public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {
- getSupportMenuInflater().inflate(R.menu.actionbar_presentation, menu);
- mActionBarManager = new ActionBarManager();
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(
- com.actionbarsherlock.view.MenuItem item) {
- Intent aIntent;
- switch (item.getItemId()) {
- case R.id.actionbar_presentation_submenu_options:
-
- aIntent = new Intent(this, SettingsActivity.class);
- startActivity(aIntent);
- return true;
- case R.id.actionbar_presentation_submenu_blank:
- boolean aRelevantFragmentVisible = (mPresentationFragment != null && mPresentationFragment
- .isVisible())
- || (mThumbnailFragment != null && mThumbnailFragment
- .isVisible());
- if (aRelevantFragmentVisible) {
-
- BlankScreenFragment aFragment = new BlankScreenFragment(
- mCommunicationService);
-
- FragmentTransaction ft = getSupportFragmentManager()
- .beginTransaction();
- ft.replace(R.id.presentation_interceptor, aFragment);
- ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
- ft.addToBackStack(null);
- ft.commit();
- }
- return true;
- case R.id.actionbar_presentation_submenu_about:
- AboutDialogBuilder aBuilder = new AboutDialogBuilder(this);
- AlertDialog aDialog = aBuilder.create();
- aDialog.show();
- return true;
- default:
- return super.onOptionsItemSelected(item);
- }
- }
-
- private class ActionBarManager implements OnClickListener,
- FragmentManager.OnBackStackChangedListener {
-
- private Handler timerHandler = new Handler();
-
- private ToggleButton mTimeLabel;
- private ToggleButton mThumbnailButton;
-
- // ------- CLOCKBAR
- private View mClockBar;
- private ToggleButton mClockBar_clockButton;
- private ToggleButton mClockBar_stopwatchButton;
- private ToggleButton mClockBar_countdownButton;
-
- // ------- STOPWATCH BAR
- private View mStopwatchBar;
- private Button mStopwatchButtonRun;
- private Button mStopwatchButtonReset;
-
- // ------- COUNTDOWN BAR
- private View mCountdownBar;
- private Button mCountdownButton;
- private Button mCountdownButtonReset;
- private AutoCompleteTextView mCountDownTime;
-
- private SharedPreferences prefs;
- private static final String COUNTDOWN_KEY = "countdownTime";
-
- private String aTimeFormat = getResources().getString(
- R.string.actionbar_timeformat);
- private String aTimerFormat = getResources().getString(
- R.string.actionbar_timerformat);
- /*
- * True if the timer is being used as a timer, false if we are showing a
- * clock.
- */
- private boolean mTimerOn = false;
-
- public void stop() {
- timerHandler.removeCallbacks(timerUpdateRunnable);
- }
-
- public ActionBarManager() {
-
- ActionBar aBar = getSupportActionBar();
- aBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
- aBar.setCustomView(R.layout.presentation_actionbar);
-
- mThumbnailButton = (ToggleButton) aBar.getCustomView()
- .findViewById(R.id.actionbar_thumbnailtoggle);
- mThumbnailButton.setOnClickListener(this);
-
- mTimeLabel = (ToggleButton) aBar.getCustomView().findViewById(
- R.id.actionbar_time);
- mTimeLabel.setOnClickListener(this);
-
- setupClockBar();
-
- getSupportFragmentManager().addOnBackStackChangedListener(this);
-
- timerHandler.removeCallbacks(timerUpdateRunnable);
- timerHandler.postDelayed(timerUpdateRunnable, 50);
-
- }
-
- public void hidePopups() {
- if (mClockBar.getVisibility() == View.VISIBLE) {
- mClockBar.setVisibility(View.INVISIBLE);
- mStopwatchBar.setVisibility(View.INVISIBLE);
- mCountdownBar.setVisibility(View.INVISIBLE);
- mTimeLabel.setChecked(false);
- }
- }
-
- private void setupClockBar() {
- // ClockBar
- LayoutInflater aInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- aInflater.inflate(R.layout.presentation_clockbar, mOuterLayout);
- mClockBar = mOuterLayout.findViewById(R.id.clockbar);
-
- mClockBar_clockButton = (ToggleButton) mClockBar
- .findViewById(R.id.clockbar_toggle_clockmode);
- mClockBar_stopwatchButton = (ToggleButton) mClockBar
- .findViewById(R.id.clockbar_toggle_stopwatchmode);
- mClockBar_countdownButton = (ToggleButton) mClockBar
- .findViewById(R.id.clockbar_toggle_countdownmode);
- mClockBar_clockButton.setOnClickListener(this);
- mClockBar_stopwatchButton.setOnClickListener(this);
- mClockBar_countdownButton.setOnClickListener(this);
-
- // Stopwatch bar
- mStopwatchBar = mOuterLayout
- .findViewById(R.id.clockbar_stopwatchbar);
-
- mStopwatchButtonRun = (Button) mStopwatchBar
- .findViewById(R.id.clockbar_stopwatch_run);
- mStopwatchButtonReset = (Button) mStopwatchBar
- .findViewById(R.id.clockbar_stopwatch_reset);
- mStopwatchButtonRun.setOnClickListener(this);
- mStopwatchButtonReset.setOnClickListener(this);
-
- // Countdown bar
- mCountdownBar = mOuterLayout
- .findViewById(R.id.clockbar_countdownbar);
- mCountdownButton = (Button) mCountdownBar
- .findViewById(R.id.clockbar_countdown_button);
- mCountdownButton.setTag(Boolean.valueOf(false));
- mCountdownButtonReset = (Button) mCountdownBar.findViewById(R.id.clockbar_countdown_reset);
- mCountdownButtonReset.setTag(Boolean.valueOf(false));
-
- prefs = PreferenceManager.getDefaultSharedPreferences(mCountdownBar.getContext());
-
- String[] entries = getResources().getStringArray(R.array.countdown_values);
- String savedTime = prefs.getString(COUNTDOWN_KEY, entries[0]);
- mCountDownTime = (AutoCompleteTextView) mCountdownBar.findViewById(R.id.countdown_time);
- mCountDownTime.setAdapter(new ArrayAdapter<String>(mCountdownBar.getContext(), android.R.layout.simple_dropdown_item_1line, entries));
- mCountDownTime.setText(savedTime);
-
- mCountdownButton.setOnClickListener(this);
- mCountdownButtonReset.setOnClickListener(this);
-
- updateClockBar();
- hidePopups();
-
- }
-
- private void updateClockBar() {
- if (mCommunicationService == null) {
- return;
- }
- mClockBar_clockButton.setChecked(!mTimerOn);
-
- boolean aIsCountdown = mCommunicationService.getSlideShow()
- .getTimer().isCountdown();
- // Stopwatch
- boolean aStopwatchMode = mTimerOn && !aIsCountdown;
- mClockBar_stopwatchButton.setChecked(aStopwatchMode);
- mStopwatchBar.setVisibility(aStopwatchMode ? View.VISIBLE
- : View.GONE);
- mStopwatchBar.bringToFront();
- if (aStopwatchMode) {
- Timer aTimer = mCommunicationService.getSlideShow().getTimer();
- if (aTimer.isRunning()) {
- mStopwatchButtonRun.setText(R.string.clock_timer_pause);
- mStopwatchButtonReset.setText(R.string.clock_timer_restart);
- } else {
- mStopwatchButtonRun.setText(R.string.clock_timer_start);
- mStopwatchButtonReset.setText(R.string.clock_timer_reset);
- }
- }
-
- // Countdown
- boolean aCountdownMode = mTimerOn && aIsCountdown;
- mClockBar_countdownButton.setChecked(mTimerOn && aIsCountdown);
- mCountdownBar.setVisibility(mTimerOn && aIsCountdown ? View.VISIBLE
- : View.GONE);
- mCountdownBar.bringToFront();
- if (aCountdownMode) {
- Timer aTimer = mCommunicationService.getSlideShow().getTimer();
- boolean resetClicked = (Boolean) mCountdownButtonReset.getTag();
- boolean countdownButtonClicked = (Boolean) mCountdownButton.getTag();
- if (aTimer.isRunning() && countdownButtonClicked) {//start or resume clicked
- mCountdownButton.setText(R.string.clock_timer_pause);
- mCountdownButton.setTag(Boolean.valueOf(false));
- }else if(resetClicked){//reset clicked
- mCountdownButton.setText(R.string.clock_timer_start);
- mCountdownButtonReset.setTag(Boolean.valueOf(false));
- } else if(!aTimer.isRunning() && countdownButtonClicked){//pause clicked
- mCountdownButton.setText(R.string.clock_timer_resume);
- mCountdownButton.setTag(Boolean.valueOf(false));
- }else if(!aTimer.isRunning()){
- mCountdownButton.setText(R.string.clock_timer_start);
- }
- }
-
-
- }
-
- private Runnable timerUpdateRunnable = new Runnable() {
-
- @Override
- public void run() {
- CharSequence aTimeString;
- long aTime = System.currentTimeMillis();
- if (mTimerOn && mCommunicationService != null) {
- aTime = mCommunicationService.getSlideShow().getTimer()
- .getTimeMillis();
- aTimeString = DateFormat.format(aTimerFormat, aTime);
- } else {
- aTimeString = DateFormat.format(aTimeFormat, aTime);
- }
- mTimeLabel.setText(aTimeString);
- timerHandler.postDelayed(this, 50);
- }
-
- };
-
- @Override
- public void onClick(View aSource) {
- Timer aTimer = mCommunicationService.getSlideShow().getTimer();
- // --------------------------------- ACTIONBAR BUTTONS -------------
- if (aSource == mThumbnailButton) {
- if (mThumbnailFragment == null) {
- mThumbnailFragment = (ThumbnailFragment) getSupportFragmentManager()
- .findFragmentByTag("ThumbnailFragment");
- if (mThumbnailFragment == null) {
- mThumbnailFragment = new ThumbnailFragment();
- mThumbnailFragment
- .setCommunicationService(mCommunicationService);
- }
- }
- if (!mThumbnailFragment.isVisible()) {
- FragmentTransaction ft = getSupportFragmentManager()
- .beginTransaction();
- ft.replace(R.id.presentation_interceptor,
- mThumbnailFragment, "ThumbnailFragment");
- ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
- ft.addToBackStack(null);
- ft.commit();
- } else {
- getSupportFragmentManager().popBackStack();
- }
- } else if (aSource == mTimeLabel) {
- if (mClockBar.getVisibility() == View.VISIBLE) {
- hidePopups();
- } else {
- mClockBar.setVisibility(View.VISIBLE);
- updateClockBar();
- mClockBar.bringToFront();
- }
- }
- // ------------------------------------ CLOCKBAR BUTTONS -----------
- else if (aSource == mClockBar_clockButton) {
- mTimerOn = false;
- updateClockBar();
- } else if (aSource == mClockBar_stopwatchButton) {
- mTimerOn = true;
- if (aTimer.isCountdown()) { // Changing mode.
- aTimer.reset();
- }
- aTimer.setCountdown(false);
- updateClockBar();
- } else if (aSource == mClockBar_countdownButton) {
- mTimerOn = true;
- if (!aTimer.isCountdown()) { // Changing mode
- aTimer.reset();
- }
- aTimer.setCountdown(true);
- updateClockBar();
- }
- // ------------------------------------- TIMER BUTTONS
- else if (aSource == mStopwatchButtonRun) {
- if (aTimer.isRunning()) {
- aTimer.stop();
- } else {
- aTimer.start();
- }
- updateClockBar();
- } else if (aSource == mStopwatchButtonReset) {
- if (aTimer.isRunning()) {
- aTimer.reset();
- aTimer.start();
- } else {
- aTimer.reset();
- }
- updateClockBar();
- } else if (aSource == mCountdownButton) {
- if (aTimer.isRunning()) {
- aTimer.stop();
- mCountdownButton.setTag(Boolean.valueOf(true));
- updateClockBar();
- } else {
- try {
- String time = mCountDownTime.getText().toString();
- long aTime = this.validateDate(time);
- Editor editor = prefs.edit();
- editor.putString(COUNTDOWN_KEY, time);
- editor.commit();
- aTimer.setCountdownTime(aTime);
- aTimer.start();
- mCountdownButton.setTag(Boolean.valueOf(true));
- updateClockBar();
- } catch (ParseException e) {
- Toast.makeText(mCountDownTime.getContext(), R.string.wrong_time_format, Toast.LENGTH_LONG).show();
- }
- }
- }else if(aSource == mCountdownButtonReset){
- aTimer.reset();
- mCountdownButtonReset.setTag(Boolean.valueOf(true));
- updateClockBar();
- }
-
- }
-
- /*
- *
- * @param timeText
- * @return timeText in millis, or throws ParseException
- * @throws ParseException - if timeText is not valid time
- */
- private long validateDate(String timeText) throws ParseException {
- long aTime = 0;
- try {
- SimpleDateFormat aFormat = new SimpleDateFormat("HH:mm:ss");
- aFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
- aTime = aFormat.parse(timeText).getTime();
- } catch (ParseException e) {
- }
- if (aTime == 0) {
- SimpleDateFormat aFormat = new SimpleDateFormat("mm:ss");
- aFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
- aTime = aFormat.parse(timeText).getTime();
- }
- return aTime;
- }
-
- @Override
- public void onBackStackChanged() {
- if (getSupportFragmentManager().getBackStackEntryCount() == 0) {
- mThumbnailButton.setChecked(false);
- }
- }
- }
-
- /*
- * Intermediate layout that catches all touches, used in order to hide
- * the clock menu as appropriate.
- */
- public static class InterceptorLayout extends FrameLayout {
-
- public InterceptorLayout(Context context, AttributeSet aAttrs) {
- super(context, aAttrs);
- }
-
- @Override
- public boolean onInterceptTouchEvent(MotionEvent aEvent) {
- mActionBarManager.hidePopups();
- return super.onInterceptTouchEvent(aEvent);
- }
- }
-
- private BroadcastReceiver mListener = new BroadcastReceiver() {
-
- @Override
- public void onReceive(Context aContext, Intent aIntent) {
- mBroadcastProcessor.onReceive(aContext, aIntent);
- }
- };
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
deleted file mode 100644
index 9a3abcb52efe..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import org.libreoffice.impressremote.communication.CommunicationService;
-import org.libreoffice.impressremote.communication.SlideShow;
-
-import pl.polidea.coverflow.AbstractCoverFlowImageAdapter;
-import pl.polidea.coverflow.CoverFlow;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
-import android.content.res.Configuration;
-import android.graphics.Bitmap;
-import android.graphics.Color;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.support.v4.content.LocalBroadcastManager;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.View.OnTouchListener;
-import android.view.ViewGroup;
-import android.webkit.WebView;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemSelectedListener;
-import android.widget.ImageView;
-import android.widget.TextView;
-import com.actionbarsherlock.app.SherlockFragment;
-
-public class PresentationFragment extends SherlockFragment {
- private CoverFlow mTopView;
- private ImageView mHandle;
- private View mLayout;
- private WebView mNotes;
- private Context mContext;
- private TextView mNumberText;
-
- private CommunicationService mCommunicationService;
-
- private float mOriginalCoverflowWidth;
- private float mOriginalCoverflowHeight;
-
- private float mNewCoverflowWidth = 0;
- private float mNewCoverflowHeight = 0;
-
- private long lastUpdateTime = 0;
-
- private ServiceConnection mConnection = new ServiceConnection() {
- @Override
- public void onServiceConnected(ComponentName aClassName,
- IBinder aService) {
- mCommunicationService = ((CommunicationService.CBinder) aService)
- .getService();
-
- if (mTopView != null) {
- mTopView.setAdapter(new ThumbnailAdapter(mContext,
- mCommunicationService.getSlideShow()));
- mTopView.setSelection(mCommunicationService.getSlideShow()
- .getCurrentSlideIndex(), true);
- mTopView.setOnItemSelectedListener(new ClickListener());
- }
-
- updateSlideNumberDisplay(mCommunicationService.getSlideShow()
- .getCurrentSlideIndex());
-
- }
-
- @Override
- public void onServiceDisconnected(ComponentName aClassName) {
- mCommunicationService = null;
- }
- };
-
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- setRetainInstance(true);
- getActivity().bindService(
- new Intent(getActivity().getApplicationContext(),
- CommunicationService.class),
- mConnection, Context.BIND_IMPORTANT);
- mContext = getActivity().getApplicationContext();
- // container.removeAllViews();
- View v = inflater.inflate(R.layout.fragment_presentation, container,
- false);
-
- mNotes = (WebView) v.findViewById(R.id.presentation_notes);
-
- String summary = "<html><body>This is just a test<br/><ul><li>And item</li><li>And again</li></ul>More text<br/>Blabla<br/>Blabla<br/>blabla<br/>Blabla</body></html>";
- mNotes.loadDataWithBaseURL(null, summary, "text/html", "UTF-8", null);
- mNotes.setBackgroundColor(Color.TRANSPARENT);
-
- mTopView = (CoverFlow) v.findViewById(R.id.presentation_coverflow);
-
- mLayout = v.findViewById(R.id.presentation_layout);
-
- mNumberText = (TextView) v.findViewById(R.id.presentation_slidenumber);
-
- mHandle = (ImageView) v.findViewById(R.id.presentation_handle);
- mHandle.setOnTouchListener(new SizeListener());
-
- // Save the height/width for future reference
- mOriginalCoverflowHeight = mTopView.getImageHeight();
- mOriginalCoverflowWidth = mTopView.getImageWidth();
-
- if (mNewCoverflowHeight != 0) {
- ThumbnailAdapter aAdapter = (ThumbnailAdapter) mTopView
- .getAdapter();
- if ( aAdapter != null ) {
- aAdapter.setHeight(mNewCoverflowHeight);
- mTopView.setImageHeight(mNewCoverflowHeight);
- aAdapter.setWidth(mNewCoverflowWidth);
- mTopView.setImageWidth(mNewCoverflowWidth);
-
- // We need to update the view now
- aAdapter.notifyDataSetChanged();
- }
- }
-
- IntentFilter aFilter = new IntentFilter(
- Intents.Actions.SLIDE_CHANGED);
- aFilter.addAction(Intents.Actions.SLIDE_NOTES);
- aFilter.addAction(Intents.Actions.SLIDE_PREVIEW);
- LocalBroadcastManager
- .getInstance(getActivity().getApplicationContext())
- .registerReceiver(mListener, aFilter);
-
- return v;
- }
-
- @Override
- public void onDestroyView() {
- getActivity().unbindService(mConnection);
- super.onDestroyView();
- LocalBroadcastManager
- .getInstance(getActivity().getApplicationContext())
- .unregisterReceiver(mListener);
- mTopView = null;
- mContext = null;
- }
-
- private void updateSlideNumberDisplay(int aPosition) {
- // int aSlide = mCommunicationService.getSlideShow().getCurrentSlide();
- mNumberText.setText((aPosition + 1) + "/"
- + mCommunicationService.getSlideShow().getSlidesCount());
- mNotes.loadDataWithBaseURL(null, mCommunicationService.getSlideShow()
- .getSlideNotes(aPosition), "text/html", "UTF-8", null);
- }
-
- // -------------------------------------------------- RESIZING LISTENER ----
- private class SizeListener implements OnTouchListener {
-
- @Override
- public boolean onTouch(View aView, MotionEvent aEvent) {
-
- switch (aEvent.getAction()) {
- case MotionEvent.ACTION_DOWN:
- mHandle.setImageResource(R.drawable.handle_light);
- break;
- case MotionEvent.ACTION_UP:
- mHandle.setImageResource(R.drawable.handle_default);
- break;
- case MotionEvent.ACTION_MOVE:
-
- final int DRAG_MARGIN = 120;
-
- boolean aPortrait = (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT);
-
- int aFlowSize = aPortrait ? mTopView.getHeight() : mTopView
- .getWidth();
- int aViewSize = aPortrait ? mLayout.getHeight() : mLayout
- .getWidth();
-
- // Calculate height change, taking limits into account
- int aDiff = (int) (aPortrait ? aEvent.getY() : aEvent.getX());
- if (aDiff + aFlowSize < DRAG_MARGIN) {
- aDiff = DRAG_MARGIN - aFlowSize;
- } else if ((aFlowSize + aDiff) > (aViewSize - DRAG_MARGIN)) {
- aDiff = (aViewSize - DRAG_MARGIN) - aFlowSize;
- }
-
- // Now deal with the internal height
- AbstractCoverFlowImageAdapter aAdapter = (AbstractCoverFlowImageAdapter) mTopView
- .getAdapter();
-
- double aRatio = mOriginalCoverflowWidth
- / mOriginalCoverflowHeight;
- float aHeightNew;
- float aWidthNew;
- if (aPortrait) {
- aHeightNew = mTopView.getImageHeight() + aDiff;
- aWidthNew = (float) (aRatio * aHeightNew);
- // Too wide -- so scale down
- if (aWidthNew > mLayout.getWidth() - 50) {
- aWidthNew = mLayout.getWidth() - 50;
- aHeightNew = (float) (aWidthNew / aRatio);
- aDiff = (int) (aHeightNew - mTopView.getImageHeight());
- }
- } else {
- aWidthNew = mTopView.getImageWidth() + aDiff;
- aHeightNew = (float) (aWidthNew / aRatio);
- // Too High -- so scale down
- if (aHeightNew > mLayout.getHeight() - 50) {
- aHeightNew = mLayout.getHeight() - 50;
- aWidthNew = (float) (aHeightNew * aRatio);
- aDiff = (int) (aWidthNew - mTopView.getImageWidth());
- }
- }
-
- mNewCoverflowHeight = aHeightNew;
- mNewCoverflowWidth = aWidthNew;
-
- aAdapter.setHeight(aHeightNew);
- mTopView.setImageHeight(aHeightNew);
- aAdapter.setWidth(aWidthNew);
- mTopView.setImageWidth(aWidthNew);
-
- // Force an update of the view
- aAdapter.notifyDataSetChanged();
-
- break;
- }
- return true;
- }
- }
-
- // ----------------------------------------------------- CLICK LISTENER ----
-
- protected class ClickListener implements OnItemSelectedListener {
-
- @Override
- public void onItemSelected(AdapterView<?> arg0, View arg1,
- int aPosition, long arg3) {
- if (mCommunicationService != null)
- mCommunicationService.getTransmitter().setCurrentSlide(
- aPosition);
- lastUpdateTime = System.currentTimeMillis();
- updateSlideNumberDisplay(aPosition);
- }
-
- @Override
- public void onNothingSelected(AdapterView<?> arg0) {
- }
- }
-
- // ---------------------------------------------------- MESSAGE HANDLER ----
- private BroadcastReceiver mListener = new BroadcastReceiver() {
-
- @Override
- public void onReceive(Context aContext, Intent aIntent) {
-
- if (mTopView == null || mTopView.getAdapter() == null)
- return;
- if (aIntent.getAction().equals(
- Intents.Actions.SLIDE_CHANGED)) {
- int aSlide = aIntent.getExtras().getInt("slide_number");
-
- if (aSlide == mTopView.getSelectedItemPosition())
- return;
- if ((System.currentTimeMillis() - lastUpdateTime) < 500) {
- return;
- }
- mTopView.setSelection(aSlide, true);
- } else if (aIntent.getAction().equals(
- Intents.Actions.SLIDE_PREVIEW)) {
- ThumbnailAdapter aThumbAdaptor = (ThumbnailAdapter) mTopView.getAdapter();
- aThumbAdaptor.notifyDataSetChanged();
- } else if (aIntent.getAction().equals(
- Intents.Actions.SLIDE_NOTES)) {
- int aPosition = aIntent.getExtras().getInt("slide_number");
- if ( aPosition == mTopView.getSelectedItemPosition() ) {
- mNotes.loadDataWithBaseURL(null, mCommunicationService.getSlideShow()
- .getSlideNotes(aPosition), "text/html", "UTF-8", null);
- }
- }
-
- }
- };
-
- // ------------------------------------------------- THUMBNAIL ADAPTER ----
- protected class ThumbnailAdapter extends AbstractCoverFlowImageAdapter {
-
- private SlideShow mSlideShow;
-
- public ThumbnailAdapter(Context aContext, SlideShow aSlideShow) {
- mContext = aContext;
- mSlideShow = aSlideShow;
- }
-
- @Override
- public int getCount() {
- return mSlideShow.getSlidesCount();
- }
-
- @Override
- protected Bitmap createBitmap(int position) {
- return mSlideShow.getSlidePreview(position);
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
deleted file mode 100644
index 57e0cb75f7f2..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import java.text.MessageFormat;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map.Entry;
-
-import org.libreoffice.impressremote.communication.CommunicationService;
-import org.libreoffice.impressremote.communication.Server;
-import org.libreoffice.impressremote.communication.Server.Protocol;
-
-import android.app.AlertDialog;
-import android.app.ProgressDialog;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.DialogInterface.OnCancelListener;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.support.v4.content.LocalBroadcastManager;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.CheckBox;
-import android.widget.EditText;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.actionbarsherlock.app.SherlockActivity;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
-
-public class SelectorActivity extends SherlockActivity {
-
- private CommunicationService mCommunicationService;
-
- private View mBluetoothContainer;
- private LinearLayout mBluetoothList;
- private View mNetworkContainer;
- private LinearLayout mNetworkList;
- private TextView mNoServerLabel;
- private ActivityChangeBroadcastProcessor mBroadcastProcessor;
-
- ProgressDialog mProgressDialog = null;
-
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_selector);
-
- if (mCommunicationService != null)
- mCommunicationService.disconnect();
- IntentFilter aFilter = new IntentFilter(
- Intents.Actions.SERVERS_LIST_CHANGED);
- aFilter.addAction(Intents.Actions.CONNECTION_FAILED);
-
- mBroadcastProcessor = new ActivityChangeBroadcastProcessor(this);
- mBroadcastProcessor.addToFilter(aFilter);
-
- LocalBroadcastManager.getInstance(this).registerReceiver(mListener,
- aFilter);
-
- mBluetoothContainer = findViewById(R.id.selector_container_bluetooth);
- mBluetoothList = (LinearLayout) findViewById(R.id.selector_list_bluetooth);
- mNetworkContainer = findViewById(R.id.selector_container_network);
- mNetworkList = (LinearLayout) findViewById(R.id.selector_list_network);
- mNoServerLabel = (TextView) findViewById(R.id.selector_label_none);
-
- refreshLists();
- }
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
- LocalBroadcastManager.getInstance(this).unregisterReceiver(mListener);
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- MenuInflater inflater = getSupportMenuInflater();
- inflater.inflate(R.menu.selector_activity, menu);
- inflater.inflate(R.menu.actionbar_selector, menu);
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.menu_selector_addServer:
-
- AlertDialog.Builder builder;
- AlertDialog alertDialog;
-
- LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
- final View layout = inflater.inflate(R.layout.dialog_addserver,
- null);
-
- builder = new AlertDialog.Builder(this);
- builder.setView(layout);
- builder.setTitle(R.string.addserver);
- builder.setPositiveButton(R.string.addserver_add,
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog,
- int which) {
- EditText aAddressEntry = (EditText) layout
- .findViewById(R.id.addserver_addressentry);
- EditText aNameEntry = (EditText) layout
- .findViewById(R.id.addserver_nameentry);
- CheckBox aRememberServer = (CheckBox) layout
- .findViewById(R.id.addserver_remember);
- mCommunicationService
- .addServer(aAddressEntry
- .getText()
- .toString(),
- aNameEntry.getText()
- .toString(),
- aRememberServer.isChecked());
- refreshLists();
- }
- });
- builder.setNegativeButton(R.string.addserver_cancel, null);
- alertDialog = builder.create();
- alertDialog.show();
-
- return true;
- case R.id.actionbar_presentation_submenu_options:
- Intent aIntent = new Intent(this, SettingsActivity.class);
- startActivity(aIntent);
- return true;
- case R.id.actionbar_presentation_submenu_about:
- AboutDialogBuilder aBuilder = new AboutDialogBuilder(this);
- AlertDialog aDialog = aBuilder.create();
- aDialog.show();
- return true;
- }
- return super.onOptionsItemSelected(item);
- }
-
- @Override
- public void onBackPressed() {
- if (mCommunicationService != null)
- mCommunicationService.stopSearch();
- Intent aIntent = new Intent(this, CommunicationService.class);
- stopService(aIntent);
- super.onBackPressed();
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- mNetworkList.removeAllViews();
- mBluetoothList.removeAllViews();
- mNetworkServers.clear();
- mBluetoothServers.clear();
- doBindService();
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- if (mCommunicationService != null) {
- mCommunicationService.stopSearch();
- }
- doUnbindService();
- if (mProgressDialog != null) {
- mProgressDialog.dismiss();
- }
- }
-
- void doBindService() {
- // This is what creates the first (only?) CommunicationService instance
- // and calls its run() method (in another thread).
- Intent aIntent = new Intent(this, CommunicationService.class);
- startService(aIntent);
- bindService(aIntent, mConnection, Context.BIND_IMPORTANT);
- }
-
- void doUnbindService() {
- unbindService(mConnection);
- mCommunicationService = null;
- }
-
- private ServiceConnection mConnection = new ServiceConnection() {
- @Override
- public void onServiceConnected(ComponentName aClassName,
- IBinder aService) {
- mCommunicationService = ((CommunicationService.CBinder) aService)
- .getService();
- mCommunicationService.startSearch();
- refreshLists();
- }
-
- @Override
- public void onServiceDisconnected(ComponentName aClassName) {
- mCommunicationService = null;
- }
- };
-
- private BroadcastReceiver mListener = new BroadcastReceiver() {
-
- @Override
- public void onReceive(Context aContext, Intent aIntent) {
- if (aIntent.getAction().equals(
- Intents.Actions.SERVERS_LIST_CHANGED)) {
- refreshLists();
- return;
- } else if (aIntent.getAction().equals(
- Intents.Actions.CONNECTION_FAILED)) {
- if (mProgressDialog != null) {
- mProgressDialog.dismiss();
-
- if (mCommunicationService != null) {
- String aFormat = getResources().getString(
- R.string.selector_dialog_connectionfailed);
- String aDialogText = MessageFormat.format(aFormat,
- Build.MODEL);
-
- AlertDialog.Builder builder = new AlertDialog.Builder(
- SelectorActivity.this);
- builder.setMessage(aDialogText)
- .setCancelable(false)
- .setNeutralButton(R.string.help,
- new DialogInterface.OnClickListener() {
- public void onClick(
- DialogInterface dialog,
- int id) {
- dialog.dismiss();
- AlertDialog.Builder builder = new AlertDialog.Builder(
- SelectorActivity.this);
- builder.setMessage(
- R.string.ConnectionFailedHelp)
- .setCancelable(false)
- .setPositiveButton(
- R.string.selector_dialog_connectionfailed_ok,
- new DialogInterface.OnClickListener() {
- public void onClick(
- DialogInterface dialog,
- int id) {
- dialog.dismiss();
- }
- });
- builder.show();
- }
- })
- .setPositiveButton(
- R.string.selector_dialog_connectionfailed_ok,
- new DialogInterface.OnClickListener() {
- public void onClick(
- DialogInterface dialog,
- int id) {
- dialog.dismiss();
- }
- });
- builder.show();
- }
- }
- }
- mBroadcastProcessor.onReceive(aContext, aIntent);
-
- }
- };
-
- private HashMap<Server, View> mBluetoothServers = new HashMap<Server, View>();
- private HashMap<Server, View> mNetworkServers = new HashMap<Server, View>();
-
- private void deleteServer(View aView) {
- Log.i(Globals.TAG, "SelectorActivity.deleteServer(" + aView + ")");
- for (Entry<Server, View> aEntry : mNetworkServers.entrySet()) {
- if (aEntry.getValue() == aView
- .findViewById(R.id.selector_sub_label)
- || aEntry.getValue().findViewById(
- R.id.selector_sub_label) == aView
- .findViewById(R.id.selector_sub_label))
- mCommunicationService.removeServer(aEntry.getKey());
- }
- }
-
- private void refreshLists() {
- if (mCommunicationService != null) {
-
- List<Server> aServers = mCommunicationService.getServers();
-
- Log.i(Globals.TAG, "SelectorActivity.refreshLists: got " + aServers.size() + " servers");
-
- // Simply replace the lists... first clear the old lists,
- // Then add those currently found.
-
- mNetworkServers.clear();
- mBluetoothServers.clear();
- mNetworkList.removeAllViews();
- mBluetoothList.removeAllViews();
-
- for (Server aServer : aServers) {
- boolean aIsBluetooth = (aServer.getProtocol() == Protocol.BLUETOOTH);
- HashMap<Server, View> aMap = aIsBluetooth ? mBluetoothServers
- : mNetworkServers;
- LinearLayout aLayout = aIsBluetooth ? mBluetoothList
- : mNetworkList;
-
- View aView = getLayoutInflater()
- .inflate(R.layout.activity_selector_sublayout_server,
- null);
-
- TextView aText = (TextView) aView
- .findViewById(R.id.selector_sub_label);
- aText.setOnClickListener(mClickListener);
- aText.setText(aServer.getName());
- aLayout.addView(aView);
- aMap.put(aServer, aText);
-
- // registerForContextMenu(aView);
- registerForContextMenu(aText);
- }
- }
-
- // Hide as necessary
- mBluetoothContainer
- .setVisibility((mBluetoothServers.size() != 0) ? View.VISIBLE
- : View.GONE);
- mNetworkContainer
- .setVisibility((mNetworkServers.size() != 0) ? View.VISIBLE
- : View.GONE);
-
- mNoServerLabel.setVisibility(((mBluetoothServers.size() == 0) && (mNetworkServers
- .size() == 0)) ? View.VISIBLE : View.GONE);
- }
-
- private OnClickListener mClickListener = new OnClickListener() {
-
- @Override
- public void onClick(View aView) {
- mCommunicationService.stopSearch();
-
- Server aDesiredServer = null;
-
- if (mBluetoothServers.containsValue(aView)) {
- for (Entry<Server, View> aEntry : mBluetoothServers.entrySet()) {
- if (aEntry.getValue() == aView) {
- aDesiredServer = aEntry.getKey();
- }
- }
- } else if (mNetworkServers.containsValue(aView)) {
- for (Entry<Server, View> aEntry : mNetworkServers.entrySet()) {
- if (aEntry.getValue() == aView) {
- aDesiredServer = aEntry.getKey();
- }
- }
- }
- if (aDesiredServer != null) {
- mCommunicationService.connectTo(aDesiredServer);
- // Connect Service and wait for broadcast
- String aFormat = getResources().getString(
- R.string.selector_dialog_connecting);
- String aDialogText = MessageFormat.format(aFormat,
- aDesiredServer.getName());
-
- mProgressDialog = ProgressDialog.show(SelectorActivity.this,
- "", aDialogText, true);
- mProgressDialog.setCancelable(true);
- mProgressDialog.setOnCancelListener(new OnCancelListener() {
-
- @Override
- public void onCancel(DialogInterface dialog) {
- mCommunicationService.disconnect();
- }
- });
- }
-
- }
- };
-
- View aLastSelected = null;
-
- public void onCreateContextMenu(android.view.ContextMenu menu, View v,
- android.view.ContextMenu.ContextMenuInfo menuInfo) {
- super.onCreateContextMenu(menu, v, menuInfo);
- aLastSelected = v;
- android.view.MenuInflater inflater = getMenuInflater();
- inflater.inflate(R.menu.selector_contextmenu, menu);
-
- }
-
- @Override
- public boolean onContextItemSelected(android.view.MenuItem item) {
- switch (item.getItemId()) {
- case R.id.selector_context_delete:
- deleteServer(aLastSelected);
- refreshLists();
- return true;
- }
- return super.onContextItemSelected(item);
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java b/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java
deleted file mode 100644
index 471e96bedcf6..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/SettingsActivity.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import android.os.Bundle;
-
-import com.actionbarsherlock.app.SherlockPreferenceActivity;
-
-public class SettingsActivity extends SherlockPreferenceActivity {
-
- // We use addPreferencesFromResource as we need sdk-9 compatibility
- // but build with sdk 15
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- addPreferencesFromResource(R.xml.preferences);
- }
-
- @Override
- public boolean onOptionsItemSelected(
- com.actionbarsherlock.view.MenuItem item) {
- switch (item.getItemId()) {
- case android.R.id.home:
- finish();
- return true;
- default:
- return super.onOptionsItemSelected(item);
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/StartPresentationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/StartPresentationActivity.java
deleted file mode 100644
index 5a4af1a07ce2..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/StartPresentationActivity.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import org.libreoffice.impressremote.communication.CommunicationService;
-
-import android.app.AlertDialog;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v4.content.LocalBroadcastManager;
-import android.view.View;
-import android.view.View.OnClickListener;
-
-import com.actionbarsherlock.app.SherlockActivity;
-
-public class StartPresentationActivity extends SherlockActivity {
- private CommunicationService mCommunicationService = null;
- private ActivityChangeBroadcastProcessor mBroadcastProcessor;
-
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setContentView(R.layout.activity_startpresentation);
- bindService(new Intent(this, CommunicationService.class), mConnection,
- Context.BIND_IMPORTANT);
-
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- IntentFilter aFilter = new IntentFilter(
- Intents.Actions.SLIDE_SHOW_STARTED);
-
- mBroadcastProcessor = new ActivityChangeBroadcastProcessor(this);
- mBroadcastProcessor.addToFilter(aFilter);
-
- LocalBroadcastManager.getInstance(this).registerReceiver(mListener,
- aFilter);
-
- findViewById(R.id.startpresentation_button).setOnClickListener(
- mClickListener);
- }
-
- @Override
- public void onBackPressed() {
- Intent aIntent = new Intent(this, SelectorActivity.class);
- aIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(aIntent);
- mCommunicationService.disconnect();
- }
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
- unbindService(mConnection);
- LocalBroadcastManager.getInstance(this).unregisterReceiver(mListener);
- }
-
- private ServiceConnection mConnection = new ServiceConnection() {
- @Override
- public void onServiceConnected(ComponentName aClassName,
- IBinder aService) {
- mCommunicationService = ((CommunicationService.CBinder) aService)
- .getService();
-
- }
-
- @Override
- public void onServiceDisconnected(ComponentName aClassName) {
- mCommunicationService = null;
- }
- };
-
- private OnClickListener mClickListener = new OnClickListener() {
-
- @Override
- public void onClick(View v) {
- if (mCommunicationService != null) {
- mCommunicationService.getTransmitter().startPresentation();
- }
- }
- };
-
- private BroadcastReceiver mListener = new BroadcastReceiver() {
-
- @Override
- public void onReceive(Context aContext, Intent aIntent) {
- mBroadcastProcessor.onReceive(aContext, aIntent);
- }
- };
-
- @Override
- public boolean onOptionsItemSelected(
- com.actionbarsherlock.view.MenuItem item) {
- switch (item.getItemId()) {
- case android.R.id.home:
- onBackPressed();
- return true;
- default:
- return super.onOptionsItemSelected(item);
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java b/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
deleted file mode 100644
index 97948bf778a8..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote;
-
-import org.libreoffice.impressremote.communication.CommunicationService;
-import org.libreoffice.impressremote.communication.SlideShow;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.graphics.Bitmap;
-import android.graphics.Typeface;
-import android.os.Bundle;
-import android.support.v4.content.LocalBroadcastManager;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.BaseAdapter;
-import android.widget.GridView;
-import android.widget.ImageView;
-import android.widget.ImageView.ScaleType;
-import android.widget.TextView;
-
-import com.actionbarsherlock.app.SherlockFragment;
-
-public class ThumbnailFragment extends SherlockFragment {
-
- private CommunicationService mCommunicationService;
-
- private GridView mGrid;
- private ImageView mCurrentImage;
- private TextView mCurrentText;
-
- private SlideShow mSlideShow;
- private Context mContext;
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- // Inflate the layout for this fragment
- // container.removeAllViews();
- setRetainInstance(true);
- View v = inflater
- .inflate(R.layout.fragment_thumbnail, container, false);
-
- mGrid = (GridView) v.findViewById(R.id.thumbnail_grid);
-
- mGrid.setOnItemClickListener(new ClickListener());
- mContext = getActivity().getApplicationContext();
-
- if (mCommunicationService != null && mSlideShow != null) {
- mGrid.setAdapter(new ThumbnailAdapter(mContext, mSlideShow));
- }
-
- IntentFilter aFilter = new IntentFilter(
- Intents.Actions.SLIDE_CHANGED);
- aFilter.addAction(Intents.Actions.SLIDE_PREVIEW);
- LocalBroadcastManager
- .getInstance(getActivity().getApplicationContext())
- .registerReceiver(mListener, aFilter);
-
- return v;
- }
-
- @Override
- public void onDestroyView() {
- super.onDestroyView();
- LocalBroadcastManager
- .getInstance(getActivity().getApplicationContext())
- .unregisterReceiver(mListener);
- mGrid = null;
- mContext = null;
- mCurrentImage = null;
- mCurrentText = null;
- }
-
- private void setSelected(int position) {
- formatUnselected(mCurrentImage, mCurrentText);
-
- if (mGrid == null) {
- return;
- }
-
- View aV = mGrid.getChildAt(position);
- if (aV != null) {
- mCurrentImage = (ImageView) aV.findViewById(R.id.sub_thumbnail);
- mCurrentText = (TextView) aV.findViewById(R.id.sub_number);
-
- formatSelected(mCurrentImage, mCurrentText);
- }
- }
-
- private void formatUnselected(ImageView aImage, TextView aText) {
- if (aImage != null) {
- aImage.setBackgroundColor(getResources().getColor(
- R.color.thumbnail_border));
- }
- if (aText != null) {
- aText.setTypeface(Typeface.create(aText.getTypeface(),
- Typeface.NORMAL));
- }
- }
-
- private void formatSelected(ImageView aImage, TextView aText) {
- if (aImage != null) {
- aImage.setBackgroundColor(getResources().getColor(
- R.color.thumbnail_border_selected));
- }
- if (aText != null) {
- aText.setTypeface(Typeface.create(aText.getTypeface(),
- Typeface.BOLD));
- }
- }
-
- // ----------------------------------------------------- CLICK LISTENER ----
- protected class ClickListener implements AdapterView.OnItemClickListener {
- public void onItemClick(AdapterView<?> parent, View v, int position,
- long id) {
- if (mCommunicationService != null)
- mCommunicationService.getTransmitter().setCurrentSlide(position);
- }
- }
-
- // ---------------------------------------------------- MESSAGE HANDLER ----
-
- public void setCommunicationService(
- CommunicationService aCommunicationService) {
- mCommunicationService = aCommunicationService;
- mSlideShow = mCommunicationService.getSlideShow();
- if (mGrid != null) {
- mGrid.setAdapter(new ThumbnailAdapter(mContext, mSlideShow));
- }
- }
-
- private BroadcastReceiver mListener = new BroadcastReceiver() {
-
- @Override
- public void onReceive(Context aContext, Intent aIntent) {
- if (mGrid == null)
- return;
- if (aIntent.getAction().equals(
- Intents.Actions.SLIDE_CHANGED)) {
- int aSlide = aIntent.getExtras().getInt("slide_number");
- setSelected(aSlide);
- } else if (aIntent.getAction().equals(
- Intents.Actions.SLIDE_PREVIEW)) {
- mGrid.invalidateViews();
- }
-
- }
- };
-
- // ------------------------------------------------- THUMBNAIL ADAPTER ----
- protected class ThumbnailAdapter extends BaseAdapter {
-
- private Context mContext;
-
- private SlideShow mSlideShow;
-
- public ThumbnailAdapter(Context aContext, SlideShow aSlideShow) {
- mContext = aContext;
- mSlideShow = aSlideShow;
- }
-
- @Override
- public int getCount() {
- return mSlideShow.getSlidesCount();
- }
-
- @Override
- public Object getItem(int arg0) {
- return null;
- }
-
- @Override
- public long getItemId(int position) {
- return 0;
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- LayoutInflater aInflater = (LayoutInflater) mContext
- .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- View v = aInflater.inflate(R.layout.slide_thumbnail, null);
-
- ImageView aImage = (ImageView) v.findViewById(R.id.sub_thumbnail);
- TextView aText = (TextView) v.findViewById(R.id.sub_number);
-
- // Do the image & number styling
- int aBorderWidth = getResources().getInteger(
- R.integer.thumbnail_border_width);
- aImage.setPadding(aBorderWidth, aBorderWidth, aBorderWidth,
- aBorderWidth);
-
- if ((mSlideShow != null)
- && (position == mSlideShow.getCurrentSlideIndex())) {
- formatSelected(aImage, aText);
- mCurrentImage = aImage;
- mCurrentText = aText;
- } else {
- formatUnselected(aImage, aText);
- }
-
- Bitmap aBitmap = mSlideShow.getSlidePreview(position);
- // Width
- int aWidth = (mGrid.getWidth()) / 3 - 20;
- aImage.setMaxWidth(aWidth);
- aImage.setScaleType(ScaleType.FIT_CENTER);
-
- if (aBitmap != null) {
- aImage.setImageBitmap(aBitmap);
- }
-
- aText.setText(String.valueOf(position + 1));
-
- return v;
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/ReconnectionActivity.java b/android/sdremote/src/org/libreoffice/impressremote/communication/ReconnectionActivity.java
deleted file mode 100644
index 86227372fc85..000000000000
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/ReconnectionActivity.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-package org.libreoffice.impressremote.communication;
-
-import org.libreoffice.impressremote.ActivityChangeBroadcastProcessor;
-import org.libreoffice.impressremote.R;
-import org.libreoffice.impressremote.SelectorActivity;
-
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.support.v4.content.LocalBroadcastManager;
-
-import com.actionbarsherlock.app.SherlockActivity;
-import com.actionbarsherlock.view.MenuItem;
-
-public class ReconnectionActivity extends SherlockActivity {
-
- private ActivityChangeBroadcastProcessor mBroadcastProcessor;
- private CommunicationService mCommunicationService;
-
- // private TextView mCountDownTextView;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_reconnect);
- // mCountDownTextView = (TextView) findViewById(R.id.countDownTV);
-
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
-
- bindService(new Intent(this, CommunicationService.class), mConnection,
- Context.BIND_IMPORTANT);
-
- final Server desiredServer = getIntent().getParcelableExtra("server");
-
- IntentFilter aFilter = new IntentFilter();
-
- mBroadcastProcessor = new ActivityChangeBroadcastProcessor(this);
- mBroadcastProcessor.addToFilter(aFilter);
-
- LocalBroadcastManager.getInstance(this).registerReceiver(mListener,
- aFilter);
-
- getSupportActionBar().setTitle(desiredServer.getName());
-
- // TODO Connection to desired server
- // Create a countdown clock for 10 seconds, then double the delay
- // with every failure. Until it reaches 1min. Like Gmail retry
-
- }
-
- private BroadcastReceiver mListener = new BroadcastReceiver() {
-
- @Override
- public void onReceive(Context aContext, Intent aIntent) {
- mBroadcastProcessor.onReceive(aContext, aIntent);
- }
- };
-
- private ServiceConnection mConnection = new ServiceConnection() {
-
- @Override
- public void onServiceConnected(ComponentName aClassName,
- IBinder aService) {
- mCommunicationService = ((CommunicationService.CBinder) aService)
- .getService();
-
- }
-
- @Override
- public void onServiceDisconnected(ComponentName aClassName) {
- mCommunicationService = null;
- }
- };
-
- @Override
- public void onBackPressed() {
- Intent aIntent = new Intent(this, SelectorActivity.class);
- aIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(aIntent);
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
-
- switch (item.getItemId()) {
- case android.R.id.home:
- onBackPressed();
- return true;
- }
- return super.onOptionsItemSelected(item);
- }
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/sdremote/src/pl/polidea/coverflow/AbstractCoverFlowImageAdapter.java b/android/sdremote/src/pl/polidea/coverflow/AbstractCoverFlowImageAdapter.java
deleted file mode 100644
index bf6ed09a6f33..000000000000
--- a/android/sdremote/src/pl/polidea/coverflow/AbstractCoverFlowImageAdapter.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2011, Polidea
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the distribution.
- * Neither the name of the Polidea nor the names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package pl.polidea.coverflow;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.ImageView;
-
-/**
- * This class is an adapter that provides base, abstract class for images
- * adapter.
- *
- */
-public abstract class AbstractCoverFlowImageAdapter extends BaseAdapter {
-
- /** The Constant TAG. */
- private static final String TAG = AbstractCoverFlowImageAdapter.class
- .getSimpleName();
-
- /** The width. */
- private float width = 0;
-
- /** The height. */
- private float height = 0;
-
- public AbstractCoverFlowImageAdapter() {
- super();
- }
-
- /**
- * Set width for all pictures.
- *
- * @param width
- * picture height
- */
- public synchronized void setWidth(final float width) {
- this.width = width;
- }
-
- /**
- * Set height for all pictures.
- *
- * @param height
- * picture height
- */
- public synchronized void setHeight(final float height) {
- this.height = height;
- }
-
- @Override
- public final Bitmap getItem(final int position) {
- return createBitmap(position);
- }
-
- /**
- * Creates new bitmap for the position specified.
- *
- * @param position
- * position
- * @return Bitmap created
- */
- protected abstract Bitmap createBitmap(int position);
-
- /*
- * (non-Javadoc)
- *
- * @see android.widget.Adapter#getItemId(int)
- */
- @Override
- public final synchronized long getItemId(final int position) {
- return position;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see android.widget.Adapter#getView(int, android.view.View,
- * android.view.ViewGroup)
- */
- @Override
- public final synchronized ImageView getView(final int position,
- final View convertView, final ViewGroup parent) {
- ImageView imageView;
- if (convertView == null) {
- final Context context = parent.getContext();
- Log.v(TAG, "Creating Image view at position: " + position + ":"
- + this);
- imageView = new ImageView(context);
- imageView.setLayoutParams(new CoverFlow.LayoutParams((int) width,
- (int) height));
- } else {
- Log.v(TAG, "Reusing view at position: " + position + ":" + this);
- imageView = (ImageView) convertView;
- }
- imageView.setImageBitmap(getItem(position));
- return imageView;
- }
-
-}
diff --git a/android/sdremote/src/pl/polidea/coverflow/CoverFlow.java b/android/sdremote/src/pl/polidea/coverflow/CoverFlow.java
deleted file mode 100644
index 1328d45294f2..000000000000
--- a/android/sdremote/src/pl/polidea/coverflow/CoverFlow.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Copyright (C) 2010 Neil Davies
- *
- * 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.
- *
- * This code is base on the Android Gallery widget and was Created
- * by Neil Davies neild001 'at' gmail dot com to be a Coverflow widget
- *
- */
-package pl.polidea.coverflow;
-
-import org.libreoffice.impressremote.R;
-
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.graphics.Camera;
-import android.graphics.Matrix;
-import android.util.AttributeSet;
-import android.view.View;
-import android.view.animation.Transformation;
-import android.widget.Gallery;
-import android.widget.ImageView;
-import android.widget.SpinnerAdapter;
-
-/**
- * Cover Flow implementation.
- *
- */
-public class CoverFlow extends Gallery {
-
- /**
- * Graphics Camera used for transforming the matrix of ImageViews.
- */
- private final Camera mCamera = new Camera();
-
- /**
- * The maximum angle the Child ImageView will be rotated by.
- */
- private int mMaxRotationAngle = 30;
-
- /**
- * The maximum zoom on the centre Child.
- */
- private int mMaxZoom = -100;
-
- /**
- * The Centre of the Coverflow.
- */
- private int mCoveflowCenter;
-
- /** The image height. */
- private float imageHeight;
-
- /** The image width. */
- private float imageWidth;
-
- /** The reflection gap. */
- private float reflectionGap;
-
- /** The with reflection. */
- private boolean withReflection;
-
- /** The image reflection ratio. */
- private float imageReflectionRatio;
-
- /**
- * Gets the image height.
- *
- * @return the image height
- */
- public float getImageHeight() {
- return imageHeight;
- }
-
- /**
- * Sets the image height.
- *
- * @param imageHeight
- * the new image height
- */
- public void setImageHeight(final float imageHeight) {
- this.imageHeight = imageHeight;
- }
-
- /**
- * Gets the image width.
- *
- * @return the image width
- */
- public float getImageWidth() {
- return imageWidth;
- }
-
- /**
- * Sets the image width.
- *
- * @param imageWidth
- * the new image width
- */
- public void setImageWidth(final float imageWidth) {
- this.imageWidth = imageWidth;
- }
-
- /**
- * Gets the reflection gap.
- *
- * @return the reflection gap
- */
- public float getReflectionGap() {
- return reflectionGap;
- }
-
- /**
- * Sets the reflection gap.
- *
- * @param reflectionGap
- * the new reflection gap
- */
- public void setReflectionGap(final float reflectionGap) {
- this.reflectionGap = reflectionGap;
- }
-
- /**
- * Checks if is with reflection.
- *
- * @return true, if is with reflection
- */
- public boolean isWithReflection() {
- return withReflection;
- }
-
- /**
- * Sets the with reflection.
- *
- * @param withReflection
- * the new with reflection
- */
- public void setWithReflection(final boolean withReflection) {
- this.withReflection = withReflection;
- }
-
- /**
- * Sets the image reflection ratio.
- *
- * @param imageReflectionRatio
- * the new image reflection ratio
- */
- public void setImageReflectionRatio(final float imageReflectionRatio) {
- this.imageReflectionRatio = imageReflectionRatio;
- }
-
- /**
- * Gets the image reflection ratio.
- *
- * @return the image reflection ratio
- */
- public float getImageReflectionRatio() {
- return imageReflectionRatio;
- }
-
- public CoverFlow(final Context context) {
- super(context);
- this.setStaticTransformationsEnabled(true);
- }
-
- public CoverFlow(final Context context, final AttributeSet attrs) {
- this(context, attrs, android.R.attr.galleryStyle);
- }
-
- public CoverFlow(final Context context, final AttributeSet attrs,
- final int defStyle) {
- super(context, attrs, defStyle);
- parseAttributes(context, attrs);
- this.setStaticTransformationsEnabled(true);
- }
-
- /**
- * Get the max rotational angle of the image.
- *
- * @return the mMaxRotationAngle
- */
- public int getMaxRotationAngle() {
- return mMaxRotationAngle;
- }
-
- /**
- * Sets the.
- *
- * @param adapter
- * the new adapter
- */
- @Override
- public void setAdapter(final SpinnerAdapter adapter) {
- if (!(adapter instanceof AbstractCoverFlowImageAdapter)) {
- throw new IllegalArgumentException(
- "The adapter should derive from "
- + AbstractCoverFlowImageAdapter.class
- .getName());
- }
- final AbstractCoverFlowImageAdapter coverAdapter = (AbstractCoverFlowImageAdapter) adapter;
- coverAdapter.setWidth(imageWidth);
- coverAdapter.setHeight(imageHeight);
- if (withReflection) {
- final ReflectingImageAdapter reflectAdapter = new ReflectingImageAdapter(
- coverAdapter);
- reflectAdapter.setReflectionGap(reflectionGap);
- reflectAdapter.setWidthRatio(imageReflectionRatio);
- reflectAdapter.setWidth(imageWidth);
- reflectAdapter.setHeight(imageHeight * (1 + imageReflectionRatio));
- super.setAdapter(reflectAdapter);
- } else {
- super.setAdapter(adapter);
- }
- }
-
- /**
- * Set the max rotational angle of each image.
- *
- * @param maxRotationAngle
- * the mMaxRotationAngle to set
- */
- public void setMaxRotationAngle(final int maxRotationAngle) {
- mMaxRotationAngle = maxRotationAngle;
- }
-
- /**
- * Get the Max zoom of the centre image.
- *
- * @return the mMaxZoom
- */
- public int getMaxZoom() {
- return mMaxZoom;
- }
-
- /**
- * Set the max zoom of the centre image.
- *
- * @param maxZoom
- * the mMaxZoom to set
- */
- public void setMaxZoom(final int maxZoom) {
- mMaxZoom = maxZoom;
- }
-
- /**
- * Get the Centre of the Coverflow.
- *
- * @return The centre of this Coverflow.
- */
- private int getCenterOfCoverflow() {
- return (getWidth() - getPaddingLeft() - getPaddingRight()) / 2
- + getPaddingLeft();
- }
-
- /**
- * Get the Centre of the View.
- *
- * @return The centre of the given view.
- */
- private static int getCenterOfView(final View view) {
- return view.getLeft() + view.getWidth() / 2;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see #setStaticTransformationsEnabled(boolean)
- */
- @Override
- protected boolean getChildStaticTransformation(final View child,
- final Transformation t) {
-
- final int childCenter = getCenterOfView(child);
- final int childWidth = child.getWidth();
- int rotationAngle = 0;
-
- t.clear();
- t.setTransformationType(Transformation.TYPE_MATRIX);
-
- if (childCenter == mCoveflowCenter) {
- transformImageBitmap((ImageView) child, t, 0);
- } else {
- rotationAngle = (int) ((float) (mCoveflowCenter - childCenter)
- / childWidth * mMaxRotationAngle);
- if (Math.abs(rotationAngle) > mMaxRotationAngle) {
- rotationAngle = rotationAngle < 0 ? -mMaxRotationAngle
- : mMaxRotationAngle;
- }
- transformImageBitmap((ImageView) child, t, rotationAngle);
- }
-
- return true;
- }
-
- /**
- * This is called during layout when the size of this view has changed. If
- * you were just added to the view hierarchy, you're called with the old
- * values of 0.
- *
- * @param w
- * Current width of this view.
- * @param h
- * Current height of this view.
- * @param oldw
- * Old width of this view.
- * @param oldh
- * Old height of this view.
- */
- @Override
- protected void onSizeChanged(final int w, final int h, final int oldw,
- final int oldh) {
- mCoveflowCenter = getCenterOfCoverflow();
- super.onSizeChanged(w, h, oldw, oldh);
- }
-
- /**
- * Transform the Image Bitmap by the Angle passed.
- *
- * @param imageView
- * ImageView the ImageView whose bitmap we want to rotate
- * @param t
- * transformation
- * @param rotationAngle
- * the Angle by which to rotate the Bitmap
- */
- private void transformImageBitmap(final ImageView child,
- final Transformation t, final int rotationAngle) {
- mCamera.save();
- final Matrix imageMatrix = t.getMatrix();
-
- final int height = child.getLayoutParams().height;
-
- final int width = child.getLayoutParams().width;
- final int rotation = Math.abs(rotationAngle);
-
- mCamera.translate(0.0f, 0.0f, 100.0f);
-
- // As the angle of the view gets less, zoom in
- if (rotation < mMaxRotationAngle) {
- final float zoomAmount = (float) (mMaxZoom + rotation * 1.5);
- mCamera.translate(0.0f, 0.0f, zoomAmount);
- }
-
- mCamera.rotateY(rotationAngle);
- mCamera.getMatrix(imageMatrix);
- imageMatrix.preTranslate(-(width / 2.0f), -(height / 2.0f));
- imageMatrix.postTranslate((width / 2.0f), (height / 2.0f));
- mCamera.restore();
- }
-
- /**
- * Parses the attributes.
- *
- * @param context
- * the context
- * @param attrs
- * the attrs
- */
- private void parseAttributes(final Context context, final AttributeSet attrs) {
- final TypedArray a = context.obtainStyledAttributes(attrs,
- R.styleable.CoverFlow);
- try {
- imageWidth = a.getDimension(R.styleable.CoverFlow_imageWidth, 480);
- imageHeight = a.getDimension(R.styleable.CoverFlow_imageHeight, 320);
- withReflection = a.getBoolean(R.styleable.CoverFlow_withReflection,
- false);
- imageReflectionRatio = a.getFloat(
- R.styleable.CoverFlow_imageReflectionRatio, 0.2f);
- reflectionGap = a.getDimension(R.styleable.CoverFlow_reflectionGap,
- 4);
- setSpacing(-15);
- } finally {
- a.recycle();
- }
- }
-
-}
diff --git a/android/sdremote/src/pl/polidea/coverflow/ReflectingImageAdapter.java b/android/sdremote/src/pl/polidea/coverflow/ReflectingImageAdapter.java
deleted file mode 100644
index 009a69b34ccb..000000000000
--- a/android/sdremote/src/pl/polidea/coverflow/ReflectingImageAdapter.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2011, Polidea
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the distribution.
- * Neither the name of the Polidea nor the names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package pl.polidea.coverflow;
-
-import android.R.color;
-import android.graphics.Bitmap;
-import android.graphics.Bitmap.Config;
-import android.graphics.Canvas;
-import android.graphics.LinearGradient;
-import android.graphics.Matrix;
-import android.graphics.Paint;
-import android.graphics.PorterDuff.Mode;
-import android.graphics.PorterDuffXfermode;
-import android.graphics.Shader.TileMode;
-
-/**
- * This adapter provides reflected images from linked adapter.
- */
-public class ReflectingImageAdapter extends AbstractCoverFlowImageAdapter {
-
- /** The linked adapter. */
- private final AbstractCoverFlowImageAdapter linkedAdapter;
- /**
- * Gap between the image and its reflection.
- */
- private float reflectionGap;
-
- /** The image reflection ratio. */
- private float imageReflectionRatio;
-
- /**
- * Sets the width ratio.
- *
- * @param imageReflectionRatio
- * the new width ratio
- */
- public void setWidthRatio(final float imageReflectionRatio) {
- this.imageReflectionRatio = imageReflectionRatio;
- }
-
- /**
- * Creates reflecting adapter.
- *
- * @param linkedAdapter
- * adapter that provides images to get reflections
- */
- public ReflectingImageAdapter(
- final AbstractCoverFlowImageAdapter linkedAdapter) {
- super();
- this.linkedAdapter = linkedAdapter;
- }
-
- /**
- * Sets the reflection gap.
- *
- * @param reflectionGap
- * the new reflection gap
- */
- public void setReflectionGap(final float reflectionGap) {
- this.reflectionGap = reflectionGap;
- }
-
- /**
- * Gets the reflection gap.
- *
- * @return the reflection gap
- */
- public float getReflectionGap() {
- return reflectionGap;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see pl.polidea.coverflow.AbstractCoverFlowImageAdapter#createBitmap(int)
- */
- @Override
- protected Bitmap createBitmap(final int position) {
- return createReflectedImages(linkedAdapter.getItem(position));
- }
-
- /**
- * Creates the reflected images.
- *
- * @param originalImage
- * the original image
- * @return true, if successful
- */
- public Bitmap createReflectedImages(final Bitmap originalImage) {
- final int width = originalImage.getWidth();
- final int height = originalImage.getHeight();
- final Matrix matrix = new Matrix();
- matrix.preScale(1, -1);
- final Bitmap reflectionImage = Bitmap.createBitmap(originalImage, 0,
- (int) (height * imageReflectionRatio), width,
- (int) (height - height * imageReflectionRatio), matrix,
- false);
- final Bitmap bitmapWithReflection = Bitmap.createBitmap(width,
- (int) (height + height * imageReflectionRatio),
- Config.ARGB_8888);
- final Canvas canvas = new Canvas(bitmapWithReflection);
- canvas.drawBitmap(originalImage, 0, 0, null);
- final Paint deafaultPaint = new Paint();
- deafaultPaint.setColor(color.transparent);
- canvas.drawBitmap(reflectionImage, 0, height + reflectionGap, null);
- final Paint paint = new Paint();
- final LinearGradient shader = new LinearGradient(0,
- originalImage.getHeight(), 0,
- bitmapWithReflection.getHeight() + reflectionGap,
- 0x70ffffff, 0x00ffffff, TileMode.CLAMP);
- paint.setShader(shader);
- paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
- canvas.drawRect(0, height, width, bitmapWithReflection.getHeight()
- + reflectionGap, paint);
- return bitmapWithReflection;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see android.widget.Adapter#getCount()
- */
- @Override
- public int getCount() {
- return linkedAdapter.getCount();
- }
-
-}
diff --git a/android/sdremote/src/pl/polidea/coverflow/ResourceImageAdapter.java b/android/sdremote/src/pl/polidea/coverflow/ResourceImageAdapter.java
deleted file mode 100644
index 494a04d1987c..000000000000
--- a/android/sdremote/src/pl/polidea/coverflow/ResourceImageAdapter.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2011, Polidea
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the distribution.
- * Neither the name of the Polidea nor the names of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package pl.polidea.coverflow;
-
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.drawable.BitmapDrawable;
-import android.util.Log;
-
-/**
- * This class is an adapter that provides images from a fixed set of resource
- * ids. Bitmaps and ImageViews are kept as weak references so that they can be
- * cleared by garbage collection when not needed.
- *
- */
-public class ResourceImageAdapter extends AbstractCoverFlowImageAdapter {
-
- /** The Constant TAG. */
- private static final String TAG = ResourceImageAdapter.class
- .getSimpleName();
-
- /** The Constant DEFAULT_LIST_SIZE. */
- private static final int DEFAULT_LIST_SIZE = 20;
-
- /** The Constant IMAGE_RESOURCE_IDS. */
- private static final List<Integer> IMAGE_RESOURCE_IDS = new ArrayList<Integer>(
- DEFAULT_LIST_SIZE);
-
- /** The Constant DEFAULT_RESOURCE_LIST. */
- private static final int[] DEFAULT_RESOURCE_LIST = {};
- /** The bitmap map. */
- private final Map<Integer, WeakReference<Bitmap>> bitmapMap = new HashMap<Integer, WeakReference<Bitmap>>();
-
- private final Context context;
-
- /**
- * Creates the adapter with default set of resource images.
- *
- * @param context
- * context
- */
- public ResourceImageAdapter(final Context context) {
- super();
- this.context = context;
- setResources(DEFAULT_RESOURCE_LIST);
- }
-
- /**
- * Replaces resources with those specified.
- *
- * @param resourceIds
- * array of ids of resources.
- */
- public final synchronized void setResources(final int[] resourceIds) {
- IMAGE_RESOURCE_IDS.clear();
- for (final int resourceId : resourceIds) {
- IMAGE_RESOURCE_IDS.add(resourceId);
- }
- notifyDataSetChanged();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see android.widget.Adapter#getCount()
- */
- @Override
- public synchronized int getCount() {
- return IMAGE_RESOURCE_IDS.size();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see pl.polidea.coverflow.AbstractCoverFlowImageAdapter#createBitmap(int)
- */
- @Override
- protected Bitmap createBitmap(final int position) {
- Log.v(TAG, "creating item " + position);
- final Bitmap bitmap = ((BitmapDrawable) context.getResources()
- .getDrawable(IMAGE_RESOURCE_IDS.get(position)))
- .getBitmap();
- bitmapMap.put(position, new WeakReference<Bitmap>(bitmap));
- return bitmap;
- }
-} \ No newline at end of file