[Libreoffice-commits] core.git: android/sdremote
Christian Lohmaier
lohmaier+LibreOffice at googlemail.com
Thu Jan 16 07:25:23 PST 2014
android/sdremote/AndroidManifest.xml | 5 +
android/sdremote/Makefile | 23 +++++---
android/sdremote/build.xml | 11 +++-
android/sdremote/project.properties | 4 +
android/sdremote/res/layout/action_bar_computer_creation.xml | 8 +-
android/sdremote/res/menu/menu_action_bar_computer_connection.xml | 5 +
android/sdremote/res/menu/menu_action_bar_computers.xml | 11 ++--
android/sdremote/res/menu/menu_action_bar_slide_show.xml | 15 ++---
android/sdremote/res/values/styles.xml | 4 -
android/sdremote/res/values/themes.xml | 27 ++++------
android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java | 6 +-
android/sdremote/src/org/libreoffice/impressremote/activity/ComputerCreationActivity.java | 6 +-
android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java | 12 ++--
android/sdremote/src/org/libreoffice/impressremote/activity/LicensesActivity.java | 6 +-
android/sdremote/src/org/libreoffice/impressremote/activity/RequirementsActivity.java | 6 +-
android/sdremote/src/org/libreoffice/impressremote/activity/SettingsActivity.java | 12 +---
android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java | 12 ++--
android/sdremote/src/org/libreoffice/impressremote/fragment/ComputerConnectionFragment.java | 12 ++--
android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java | 8 +-
android/sdremote/src/org/libreoffice/impressremote/fragment/EmptySlideFragment.java | 4 -
android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java | 4 -
android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java | 4 -
android/sdremote/src/org/libreoffice/impressremote/fragment/TimerEditingDialog.java | 4 -
android/sdremote/src/org/libreoffice/impressremote/fragment/TimerSettingDialog.java | 4 -
24 files changed, 112 insertions(+), 101 deletions(-)
New commits:
commit 233a15e3aaa1728d6782edb5385ff1061456a700
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date: Fri Dec 13 13:11:58 2013 +0100
move from ActionBarSherlock to corresponding android support lib
UI wise would makes the app compatible with android api level 7,
but other utility functions require higher level (8 for Base64 and 9 for
TimeUnit)
explicitly set the allowBackup flag and raise tested/targeted version to
api level 17
also add tool-annotations to please android-lint
Change-Id: I528e34acdeeecea6d20e8bea21b1d5c203e17c95
diff --git a/android/sdremote/AndroidManifest.xml b/android/sdremote/AndroidManifest.xml
index 80c4ed6..c592b6f 100644
--- a/android/sdremote/AndroidManifest.xml
+++ b/android/sdremote/AndroidManifest.xml
@@ -34,10 +34,11 @@
android:required="false"/>
<uses-sdk
- android:minSdkVersion="10"
- android:targetSdkVersion="14"/>
+ android:minSdkVersion="9"
+ android:targetSdkVersion="17"/>
<application
+ android:allowBackup="true"
android:label="@string/application_name"
android:icon="@drawable/ic_launcher"
android:logo="@drawable/ic_logo"
diff --git a/android/sdremote/Makefile b/android/sdremote/Makefile
index b46df56..84a7b80 100644
--- a/android/sdremote/Makefile
+++ b/android/sdremote/Makefile
@@ -6,22 +6,27 @@
# 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/.
-ifeq ($(BUILDDIR),)
+ifeq ($(WORKDIR),)
include ../../config_host.mk
endif
-all: properties
- mkdir -p ../abs-lib/libs
- cp $(ANDROID_SDK_HOME)/extras/android/support/v4/android-support-v4.jar ../abs-lib/libs
+all: ant.properties
$(ANT) debug
-properties:
- echo sdk.dir=$(ANDROID_SDK_HOME) >local.properties
- echo sdk.dir=$(ANDROID_SDK_HOME) >../abs-lib/local.properties
-
-clean: properties
+clean: ant.properties
$(ANT) -quiet -keep-going clean
+# library references must be relative, let python do the magic.
+ant.properties: $(WORKDIR)/appcompat/build.xml
+ python -c "import os.path; print 'android.library.reference.1='+ os.path.relpath('$(<D)', '$(CURDIR)')" > $@ || rm $@
+
+# sdk-manager installs it without an build.xml, to not mess with files outside of the
+# build-tree, copy to workdir
+$(WORKDIR)/appcompat/build.xml:
+ -rm -r $(WORKDIR)/appcompat
+ cp -a $(ANDROID_SDK_HOME)/extras/android/support/v7/appcompat $(WORKDIR)/appcompat
+ $(ANDROID_SDK_HOME)/tools/android update project -p $(WORKDIR)/appcompat
+
install: all
$(ANDROID_SDK_HOME)/platform-tools/adb install -r ./bin/ImpressRemote-debug.apk
diff --git a/android/sdremote/build.xml b/android/sdremote/build.xml
index b47c397..30dd5ba 100644
--- a/android/sdremote/build.xml
+++ b/android/sdremote/build.xml
@@ -28,6 +28,15 @@
-->
<property file="ant.properties" />
+ <!-- if sdk.dir was not set from one of the property file, then
+ get it from the ANDROID_SDK_HOME env var.
+ This must be done before we load project.properties since
+ the proguard config can use sdk.dir -->
+ <property environment="env" />
+ <condition property="sdk.dir" value="${env.ANDROID_SDK_HOME}">
+ <isset property="env.ANDROID_SDK_HOME" />
+ </condition>
+
<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
@@ -41,7 +50,7 @@
<!-- quick check on sdk.dir -->
<fail
- message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_SDK_HOME environment variable."
unless="sdk.dir"
/>
diff --git a/android/sdremote/project.properties b/android/sdremote/project.properties
index 0a15e2e..ba270da 100644
--- a/android/sdremote/project.properties
+++ b/android/sdremote/project.properties
@@ -12,4 +12,6 @@
# Project target.
target=android-14
-android.library.reference.1=../abs-lib/
+# this will only work if you set sdk.dir to a relative path
+# and when using ant, you also need to create build.xml
+android.library.reference.1=${sdk.dir}/extras/android/support/v7/appcompat
diff --git a/android/sdremote/res/layout/action_bar_computer_creation.xml b/android/sdremote/res/layout/action_bar_computer_creation.xml
index 1a0dcd3..a88089c 100644
--- a/android/sdremote/res/layout/action_bar_computer_creation.xml
+++ b/android/sdremote/res/layout/action_bar_computer_creation.xml
@@ -23,13 +23,13 @@
<FrameLayout
android:id="@+id/button_cancel"
- style="@style/Widget.Sherlock.ActionButton"
+ style="@style/Widget.AppCompat.ActionButton"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent">
<TextView
- style="@style/Widget.Sherlock.ActionBar.TabText"
+ style="@style/Widget.AppCompat.ActionBar.TabText"
android:text="@string/button_cancel"
android:drawableLeft="@drawable/ic_action_cancel"
android:drawablePadding="@dimen/padding_action_bar_button_drawable"
@@ -50,13 +50,13 @@
<FrameLayout
android:id="@+id/button_save"
- style="@style/Widget.Sherlock.ActionButton"
+ style="@style/Widget.AppCompat.ActionButton"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent">
<TextView
- style="@style/Widget.Sherlock.ActionBar.TabText"
+ style="@style/Widget.AppCompat.ActionBar.TabText"
android:text="@string/button_save"
android:drawableLeft="@drawable/ic_action_save"
android:drawablePadding="@dimen/padding_action_bar_button_drawable"
diff --git a/android/sdremote/res/menu/menu_action_bar_computer_connection.xml b/android/sdremote/res/menu/menu_action_bar_computer_connection.xml
index 0fff21e..3eb36f5 100644
--- a/android/sdremote/res/menu/menu_action_bar_computer_connection.xml
+++ b/android/sdremote/res/menu/menu_action_bar_computer_connection.xml
@@ -16,12 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
+<menu xmlns:compat="http://schemas.android.com/apk/res-auto"
+ xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_reconnect"
android:title="@string/menu_reconnect"
android:icon="@drawable/ic_action_reconnect"
- android:showAsAction="always"/>
+ compat:showAsAction="always"/>
</menu>
\ No newline at end of file
diff --git a/android/sdremote/res/menu/menu_action_bar_computers.xml b/android/sdremote/res/menu/menu_action_bar_computers.xml
index 4cd93b3..7cbffc6 100644
--- a/android/sdremote/res/menu/menu_action_bar_computers.xml
+++ b/android/sdremote/res/menu/menu_action_bar_computers.xml
@@ -16,27 +16,28 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
+<menu xmlns:compat="http://schemas.android.com/apk/res-auto"
+ xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_add_computer"
android:title="@string/menu_add_computer"
android:icon="@drawable/ic_action_add_computer"
- android:showAsAction="always"/>
+ compat:showAsAction="always"/>
<item
android:id="@+id/menu_settings"
android:title="@string/menu_settings"
- android:showAsAction="never"/>
+ compat:showAsAction="never"/>
<item
android:id="@+id/menu_requirements"
android:title="@string/menu_requirements"
- android:showAsAction="never"/>
+ compat:showAsAction="never"/>
<item
android:id="@+id/menu_licenses"
android:title="@string/menu_licenses"
- android:showAsAction="never"/>
+ compat:showAsAction="never"/>
</menu>
\ No newline at end of file
diff --git a/android/sdremote/res/menu/menu_action_bar_slide_show.xml b/android/sdremote/res/menu/menu_action_bar_slide_show.xml
index 768442a..5a049fa 100644
--- a/android/sdremote/res/menu/menu_action_bar_slide_show.xml
+++ b/android/sdremote/res/menu/menu_action_bar_slide_show.xml
@@ -16,40 +16,41 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
+<menu xmlns:compat="http://schemas.android.com/apk/res-auto"
+ xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_slides_pager"
android:title="@string/menu_slides_pager"
android:icon="@drawable/ic_action_pager"
- android:showAsAction="always"/>
+ compat:showAsAction="always"/>
<item
android:id="@+id/menu_slides_grid"
android:title="@string/menu_slides_grid"
android:icon="@drawable/ic_action_grid"
- android:showAsAction="always"/>
+ compat:showAsAction="always"/>
<item
android:id="@+id/menu_timer"
android:title="@string/menu_timer"
android:icon="@drawable/ic_action_timer"
- android:showAsAction="ifRoom"/>
+ compat:showAsAction="ifRoom"/>
<item
android:id="@+id/menu_resume_slide_show"
android:title="@string/menu_resume_slide_show"
android:icon="@drawable/ic_action_resume"
- android:showAsAction="always"/>
+ compat:showAsAction="always"/>
<item
android:id="@+id/menu_pause_slide_show"
android:title="@string/menu_pause_slide_show"
- android:showAsAction="never"/>
+ compat:showAsAction="never"/>
<item
android:id="@+id/menu_stop_slide_show"
android:title="@string/menu_stop_slide_show"
- android:showAsAction="never"/>
+ compat:showAsAction="never"/>
</menu>
\ No newline at end of file
diff --git a/android/sdremote/res/values/styles.xml b/android/sdremote/res/values/styles.xml
index dff0505..7046420 100644
--- a/android/sdremote/res/values/styles.xml
+++ b/android/sdremote/res/values/styles.xml
@@ -16,10 +16,10 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-<resources>
+<resources xmlns:tools="http://schemas.android.com/tools">
<style name="SectionHeader">
- <item name="android:textAllCaps">true</item>
+ <item name="android:textAllCaps" tools:targetApi="14">true</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/background_header</item>
<item name="android:drawableBottom">@drawable/underline_header</item>
diff --git a/android/sdremote/res/values/themes.xml b/android/sdremote/res/values/themes.xml
index 9cb6a0f..d2998dd 100644
--- a/android/sdremote/res/values/themes.xml
+++ b/android/sdremote/res/values/themes.xml
@@ -16,49 +16,48 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools">
- <style name="Theme.ImpressRemote" parent="Theme.Sherlock.Light.DarkActionBar.ForceOverflow">
- <item name="android:actionBarStyle">@style/Theme.ImpressRemote.ActionBar</item>
+ <style name="Theme.ImpressRemote" parent="Theme.AppCompat.Light.DarkActionBar">
+ <item name="android:actionBarStyle" tools:targetApi="11">@style/Theme.ImpressRemote.ActionBar</item>
<item name="actionBarStyle">@style/Theme.ImpressRemote.ActionBar</item>
- <item name="android:actionBarTabStyle">@style/Theme.ImpressRemote.ActionBar.Tab</item>
+ <item name="android:actionBarTabStyle" tools:targetApi="11">@style/Theme.ImpressRemote.ActionBar.Tab</item>
<item name="actionBarTabStyle">@style/Theme.ImpressRemote.ActionBar.Tab</item>
</style>
- <style name="Theme.ImpressRemote.ActionBar" parent="Widget.Sherlock.Light.ActionBar.Solid.Inverse">
+ <style name="Theme.ImpressRemote.ActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">@drawable/bg_action_bar</item>
- <item name="background">@drawable/bg_action_bar</item>
- <item name="android:displayOptions">showTitle|showHome|homeAsUp|useLogo</item>
+ <item name="android:displayOptions" tools:targetApi="11">showTitle|showHome|homeAsUp|useLogo</item>
<item name="displayOptions">showTitle|showHome|homeAsUp|useLogo</item>
</style>
- <style name="Theme.ImpressRemote.ActionBar.Tab" parent="Widget.Sherlock.Light.ActionBar.TabView.Inverse">
+ <style name="Theme.ImpressRemote.ActionBar.Tab" parent="Widget.AppCompat.Light.ActionBar.TabView.Inverse">
<item name="android:background">@drawable/bg_action_bar_tab</item>
- <item name="background">@drawable/bg_action_bar_tab</item>
</style>
<style name="Theme.ImpressRemote.Computers" parent="Theme.ImpressRemote">
- <item name="android:actionBarStyle">@style/Theme.ImpressRemote.Computers.ActionBar</item>
+ <item name="android:actionBarStyle" tools:targetApi="11">@style/Theme.ImpressRemote.Computers.ActionBar</item>
<item name="actionBarStyle">@style/Theme.ImpressRemote.Computers.ActionBar</item>
</style>
<style name="Theme.ImpressRemote.Computers.ActionBar" parent="Theme.ImpressRemote.ActionBar">
- <item name="android:navigationMode">tabMode</item>
+ <item name="android:navigationMode" tools:targetApi="11">tabMode</item>
<item name="navigationMode">tabMode</item>
- <item name="android:displayOptions">showHome|useLogo</item>
+ <item name="android:displayOptions" tools:targetApi="11">showHome|useLogo</item>
<item name="displayOptions">showHome|useLogo</item>
</style>
<style name="Theme.ImpressRemote.ComputerCreation" parent="Theme.ImpressRemote">
- <item name="android:actionBarStyle">@style/Theme.ImpressRemote.ComputerCreation.ActionBar</item>
+ <item name="android:actionBarStyle" tools:targetApi="11">@style/Theme.ImpressRemote.ComputerCreation.ActionBar</item>
<item name="actionBarStyle">@style/Theme.ImpressRemote.ComputerCreation.ActionBar</item>
</style>
<style name="Theme.ImpressRemote.ComputerCreation.ActionBar" parent="Theme.ImpressRemote.ActionBar">
- <item name="android:displayOptions">showCustom</item>
+ <item name="android:displayOptions" tools:targetApi="11">showCustom</item>
<item name="displayOptions">showCustom</item>
</style>
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java
index f68c43c..d2f50a4 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java
@@ -10,15 +10,15 @@ package org.libreoffice.impressremote.activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
+import android.support.v7.app.ActionBarActivity;
+import android.view.MenuItem;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
-import com.actionbarsherlock.view.MenuItem;
import org.libreoffice.impressremote.fragment.ComputerConnectionFragment;
import org.libreoffice.impressremote.util.Fragments;
import org.libreoffice.impressremote.util.Intents;
import org.libreoffice.impressremote.communication.Server;
-public class ComputerConnectionActivity extends SherlockFragmentActivity {
+public class ComputerConnectionActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle aSavedInstanceState) {
super.onCreate(aSavedInstanceState);
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerCreationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerCreationActivity.java
index 0ccf0e9..dc4dcf0 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerCreationActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerCreationActivity.java
@@ -12,6 +12,8 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
import android.text.TextUtils;
import android.util.Patterns;
import android.view.KeyEvent;
@@ -22,12 +24,10 @@ import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.TextView;
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
import org.libreoffice.impressremote.util.Intents;
import org.libreoffice.impressremote.R;
-public class ComputerCreationActivity extends SherlockFragmentActivity implements View.OnClickListener, TextView.OnEditorActionListener {
+public class ComputerCreationActivity extends ActionBarActivity implements View.OnClickListener, TextView.OnEditorActionListener {
@Override
protected void onCreate(Bundle aSavedInstanceState) {
super.onCreate(aSavedInstanceState);
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
index 7d1336c..ad7c9db 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
@@ -14,11 +14,11 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.view.Menu;
+import android.view.MenuItem;
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuItem;
import org.libreoffice.impressremote.adapter.ComputersPagerAdapter;
import org.libreoffice.impressremote.fragment.ComputersFragment;
import org.libreoffice.impressremote.util.BluetoothOperator;
@@ -28,7 +28,7 @@ import org.libreoffice.impressremote.R;
import org.libreoffice.impressremote.util.Preferences;
import org.libreoffice.impressremote.util.SavedStates;
-public class ComputersActivity extends SherlockFragmentActivity implements ActionBar.TabListener, ViewPager.OnPageChangeListener {
+public class ComputersActivity extends ActionBarActivity implements ActionBar.TabListener, ViewPager.OnPageChangeListener {
private boolean mBluetoothWasEnabled;
private final static int REQUEST_ENABLE_BT = 1;
@@ -195,7 +195,7 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio
@Override
public boolean onCreateOptionsMenu(Menu aMenu) {
- getSupportMenuInflater().inflate(R.menu.menu_action_bar_computers, aMenu);
+ getMenuInflater().inflate(R.menu.menu_action_bar_computers, aMenu);
return true;
}
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/LicensesActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/LicensesActivity.java
index 0d11c50..84d6981 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/LicensesActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/LicensesActivity.java
@@ -10,13 +10,13 @@ package org.libreoffice.impressremote.activity;
import android.content.ContentResolver;
import android.os.Bundle;
+import android.support.v7.app.ActionBarActivity;
+import android.view.MenuItem;
import android.webkit.WebView;
-import com.actionbarsherlock.app.SherlockActivity;
-import com.actionbarsherlock.view.MenuItem;
import org.libreoffice.impressremote.R;
-public class LicensesActivity extends SherlockActivity {
+public class LicensesActivity extends ActionBarActivity {
private static final String SCHEME = ContentResolver.SCHEME_FILE;
private static final String AUTHORITY = "android_asset";
private static final String PATH = "licenses.html";
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/RequirementsActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/RequirementsActivity.java
index 0429b6e..f098060 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/RequirementsActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/RequirementsActivity.java
@@ -9,12 +9,12 @@
package org.libreoffice.impressremote.activity;
import android.os.Bundle;
+import android.support.v7.app.ActionBarActivity;
+import android.view.MenuItem;
-import com.actionbarsherlock.app.SherlockActivity;
-import com.actionbarsherlock.view.MenuItem;
import org.libreoffice.impressremote.R;
-public class RequirementsActivity extends SherlockActivity {
+public class RequirementsActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle aSavedInstanceState) {
super.onCreate(aSavedInstanceState);
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/SettingsActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/SettingsActivity.java
index 00ae390..762c497 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/SettingsActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/SettingsActivity.java
@@ -9,25 +9,19 @@
package org.libreoffice.impressremote.activity;
import android.os.Bundle;
+import android.preference.PreferenceActivity;
+import android.view.MenuItem;
-import com.actionbarsherlock.app.SherlockPreferenceActivity;
-import com.actionbarsherlock.view.MenuItem;
import org.libreoffice.impressremote.R;
-public class SettingsActivity extends SherlockPreferenceActivity {
+public class SettingsActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle aSavedInstanceState) {
super.onCreate(aSavedInstanceState);
- setUpHomeButton();
setUpPreferences();
}
- private void setUpHomeButton() {
- getSupportActionBar().setHomeButtonEnabled(true);
- }
-
- @SuppressWarnings("deprecation")
private void setUpPreferences() {
// This action is deprecated
// but we still need to target pre-Honeycomb devices.
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
index 4d00217..d7de9a3 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/SlideShowActivity.java
@@ -20,12 +20,12 @@ import android.os.IBinder;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.content.LocalBroadcastManager;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuItem;
import org.libreoffice.impressremote.R;
import org.libreoffice.impressremote.communication.CommunicationService;
import org.libreoffice.impressremote.communication.SlideShow;
@@ -40,7 +40,7 @@ import org.libreoffice.impressremote.util.Intents;
import org.libreoffice.impressremote.util.Preferences;
import org.libreoffice.impressremote.util.SavedStates;
-public class SlideShowActivity extends SherlockFragmentActivity implements ServiceConnection {
+public class SlideShowActivity extends ActionBarActivity implements ServiceConnection {
public static enum Mode {
PAGER, GRID, EMPTY
}
@@ -368,7 +368,7 @@ public class SlideShowActivity extends SherlockFragmentActivity implements Servi
@Override
public boolean onCreateOptionsMenu(Menu aMenu) {
- getSupportMenuInflater().inflate(R.menu.menu_action_bar_slide_show, aMenu);
+ getMenuInflater().inflate(R.menu.menu_action_bar_slide_show, aMenu);
return true;
}
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputerConnectionFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputerConnectionFragment.java
index 72bf755..c2adf4b 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputerConnectionFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputerConnectionFragment.java
@@ -16,17 +16,17 @@ import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
+import android.support.v4.app.Fragment;
import android.support.v4.content.LocalBroadcastManager;
import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.ViewAnimator;
-import com.actionbarsherlock.app.SherlockFragment;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
import org.libreoffice.impressremote.util.Fragments;
import org.libreoffice.impressremote.util.Intents;
import org.libreoffice.impressremote.R;
@@ -34,7 +34,7 @@ import org.libreoffice.impressremote.communication.CommunicationService;
import org.libreoffice.impressremote.communication.Server;
import org.libreoffice.impressremote.util.SavedStates;
-public class ComputerConnectionFragment extends SherlockFragment implements ServiceConnection {
+public class ComputerConnectionFragment extends Fragment implements ServiceConnection {
public static enum Result {
CONNECTED, NOT_CONNECTED
}
@@ -268,7 +268,7 @@ public class ComputerConnectionFragment extends SherlockFragment implements Serv
}
private void refreshActionBarMenu() {
- getSherlockActivity().supportInvalidateOptionsMenu();
+ getActivity().supportInvalidateOptionsMenu();
}
@Override
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java
index 3e5908d..4e013c8 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java
@@ -23,13 +23,13 @@ import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
+import android.support.v4.app.ListFragment;
import android.support.v4.content.LocalBroadcastManager;
-import android.text.Html;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
-import android.text.util.Linkify;
import android.view.ContextMenu;
import android.view.LayoutInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
@@ -39,8 +39,6 @@ import android.widget.ListView;
import android.widget.TextView;
import android.widget.ViewAnimator;
-import com.actionbarsherlock.app.SherlockListFragment;
-import com.actionbarsherlock.view.MenuItem;
import org.libreoffice.impressremote.adapter.ComputersAdapter;
import org.libreoffice.impressremote.util.Fragments;
import org.libreoffice.impressremote.util.Intents;
@@ -49,7 +47,7 @@ import org.libreoffice.impressremote.communication.CommunicationService;
import org.libreoffice.impressremote.communication.Server;
import org.libreoffice.impressremote.util.SavedStates;
-public class ComputersFragment extends SherlockListFragment implements ServiceConnection, Runnable {
+public class ComputersFragment extends ListFragment implements ServiceConnection, Runnable {
private static final int SHOWING_PROGRESS_MESSAGE_DELAY_IN_SECONDS = 3;
public static enum Type {
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/EmptySlideFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/EmptySlideFragment.java
index 014ad7f..51326a0 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/EmptySlideFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/EmptySlideFragment.java
@@ -9,14 +9,14 @@
package org.libreoffice.impressremote.fragment;
import android.os.Bundle;
+import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import com.actionbarsherlock.app.SherlockFragment;
import org.libreoffice.impressremote.R;
-public class EmptySlideFragment extends SherlockFragment {
+public class EmptySlideFragment extends Fragment {
public static EmptySlideFragment newInstance() {
return new EmptySlideFragment();
}
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
index 053648b..5401c28 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesGridFragment.java
@@ -16,6 +16,7 @@ import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
+import android.support.v4.app.Fragment;
import android.support.v4.content.LocalBroadcastManager;
import android.view.LayoutInflater;
import android.view.View;
@@ -23,7 +24,6 @@ import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.GridView;
-import com.actionbarsherlock.app.SherlockFragment;
import org.libreoffice.impressremote.activity.SlideShowActivity;
import org.libreoffice.impressremote.communication.SlideShow;
import org.libreoffice.impressremote.util.Intents;
@@ -31,7 +31,7 @@ import org.libreoffice.impressremote.R;
import org.libreoffice.impressremote.adapter.SlidesGridAdapter;
import org.libreoffice.impressremote.communication.CommunicationService;
-public class SlidesGridFragment extends SherlockFragment implements ServiceConnection, AdapterView.OnItemClickListener {
+public class SlidesGridFragment extends Fragment implements ServiceConnection, AdapterView.OnItemClickListener {
private CommunicationService mCommunicationService;
private BroadcastReceiver mIntentsReceiver;
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
index a51b416..3d13a11 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java
@@ -16,6 +16,7 @@ import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
+import android.support.v4.app.Fragment;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
@@ -27,14 +28,13 @@ import android.view.ViewGroup;
import android.widget.ScrollView;
import android.widget.TextSwitcher;
-import com.actionbarsherlock.app.SherlockFragment;
import org.libreoffice.impressremote.communication.SlideShow;
import org.libreoffice.impressremote.util.Intents;
import org.libreoffice.impressremote.R;
import org.libreoffice.impressremote.adapter.SlidesPagerAdapter;
import org.libreoffice.impressremote.communication.CommunicationService;
-public class SlidesPagerFragment extends SherlockFragment implements ServiceConnection, ViewPager.OnPageChangeListener, View.OnClickListener {
+public class SlidesPagerFragment extends Fragment implements ServiceConnection, ViewPager.OnPageChangeListener, View.OnClickListener {
private CommunicationService mCommunicationService;
private BroadcastReceiver mIntentsReceiver;
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/TimerEditingDialog.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/TimerEditingDialog.java
index 8c4c81e..c77a79c 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/TimerEditingDialog.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/TimerEditingDialog.java
@@ -15,15 +15,15 @@ import android.app.TimePickerDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
import android.support.v4.content.LocalBroadcastManager;
import android.widget.TimePicker;
-import com.actionbarsherlock.app.SherlockDialogFragment;
import org.libreoffice.impressremote.R;
import org.libreoffice.impressremote.util.Fragments;
import org.libreoffice.impressremote.util.Intents;
-public class TimerEditingDialog extends SherlockDialogFragment implements TimePickerDialog.OnTimeSetListener, DialogInterface.OnClickListener {
+public class TimerEditingDialog extends DialogFragment implements TimePickerDialog.OnTimeSetListener, DialogInterface.OnClickListener {
public static final String TAG = "TIMER_EDITING";
private static final boolean IS_24_HOUR_VIEW = true;
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/TimerSettingDialog.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/TimerSettingDialog.java
index 294a370..785a8b3 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/fragment/TimerSettingDialog.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/TimerSettingDialog.java
@@ -15,14 +15,14 @@ import android.app.TimePickerDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
import android.support.v4.content.LocalBroadcastManager;
import android.widget.TimePicker;
-import com.actionbarsherlock.app.SherlockDialogFragment;
import org.libreoffice.impressremote.R;
import org.libreoffice.impressremote.util.Intents;
-public class TimerSettingDialog extends SherlockDialogFragment implements TimePickerDialog.OnTimeSetListener, DialogInterface.OnClickListener {
+public class TimerSettingDialog extends DialogFragment implements TimePickerDialog.OnTimeSetListener, DialogInterface.OnClickListener {
public static final String TAG = "TIMER_SETTING";
private static final int INITIAL_HOUR = 0;
More information about the Libreoffice-commits
mailing list