diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-03 17:37:21 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-07 09:18:18 +0200 |
commit | 3f82a2e72f53d76dcb6a4c44da9dd65fd3d4b931 (patch) | |
tree | 5b47797642efd4a30c0b77a91c6093dc076ebb51 /android/experimental | |
parent | ec864627585f7ea383252c50d726754fb51dd56f (diff) |
android: remove dead GSoC-2012-eclipse-workspace
Change-Id: I62e551b99904036e8c0e67f0684dc16e5ade2b90
Diffstat (limited to 'android/experimental')
60 files changed, 0 insertions, 2134 deletions
diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/.classpath b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/.classpath deleted file mode 100644 index a4763d1eeced..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/.classpath +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="src" path="gen"/> - <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> - <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> - <classpathentry kind="output" path="bin/classes"/> -</classpath> diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/.project b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/.project deleted file mode 100644 index f3a4c444a738..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>LibreOfficeUI</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.android.ide.eclipse.adt.ApkBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>com.android.ide.eclipse.adt.AndroidNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/.settings/org.eclipse.jdt.core.prefs b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 416f4fb69607..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/AndroidManifest.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/AndroidManifest.xml deleted file mode 100644 index fa1724ac7481..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="org.libreoffice.ui" - android:versionCode="1" - android:versionName="1.0" > - - <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="11"/> - <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> - - <application - android:icon="@drawable/lo_icon" - android:label="@string/app_name" android:theme="@android:style/Theme.Holo.Light"> - <activity - android:name=".LibreOfficeUIActivity" - android:label="@string/app_name" > - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - <activity android:theme="@android:style/Theme.Holo.Light" android:name="WriterViewerActivity"> - <intent-filter android:label="writer_viewer"></intent-filter> - </activity> - <activity android:name="PreferenceEditor"></activity> - </application> - -</manifest>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/proguard.cfg b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/proguard.cfg deleted file mode 100644 index b1cdf17b5bb4..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/proguard.cfg +++ /dev/null @@ -1,40 +0,0 @@ --optimizationpasses 5 --dontusemixedcaseclassnames --dontskipnonpubliclibraryclasses --dontpreverify --verbose --optimizations !code/simplification/arithmetic,!field/*,!class/merging/* - --keep public class * extends android.app.Activity --keep public class * extends android.app.Application --keep public class * extends android.app.Service --keep public class * extends android.content.BroadcastReceiver --keep public class * extends android.content.ContentProvider --keep public class * extends android.app.backup.BackupAgentHelper --keep public class * extends android.preference.Preference --keep public class com.android.vending.licensing.ILicensingService - --keepclasseswithmembernames class * { - native <methods>; -} - --keepclasseswithmembers class * { - public <init>(android.content.Context, android.util.AttributeSet); -} - --keepclasseswithmembers class * { - public <init>(android.content.Context, android.util.AttributeSet, int); -} - --keepclassmembers class * extends android.app.Activity { - public void *(android.view.View); -} - --keepclassmembers enum * { - public static **[] values(); - public static ** valueOf(java.lang.String); -} - --keep class * implements android.os.Parcelable { - public static final android.os.Parcelable$Creator *; -} diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/project.properties b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/project.properties deleted file mode 100644 index d79abae19a25..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/project.properties +++ /dev/null @@ -1,11 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "ant.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-11 diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/action_search.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/action_search.png Binary files differdeleted file mode 100644 index e6b70451863a..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/action_search.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/base.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/base.png Binary files differdeleted file mode 100644 index 729dbcd82ebf..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/base.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/calc.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/calc.png Binary files differdeleted file mode 100644 index a3f5fd4d80c0..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/calc.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/draw.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/draw.png Binary files differdeleted file mode 100644 index b3ee11426a04..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/draw.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/dummy_page.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/dummy_page.png Binary files differdeleted file mode 100644 index c58d276e7085..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/dummy_page.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/folder.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/folder.png Binary files differdeleted file mode 100644 index 9c9b42c83956..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/folder.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/ic_launcher.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/ic_launcher.png Binary files differdeleted file mode 100644 index 8074c4c571b8..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/ic_launcher.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/impress.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/impress.png Binary files differdeleted file mode 100644 index 5909f05bf089..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/impress.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_sort_by_size.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_sort_by_size.png Binary files differdeleted file mode 100644 index 3b34aaf8ab57..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_sort_by_size.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_grid.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_grid.png Binary files differdeleted file mode 100644 index ae138edbf006..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_grid.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_list.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_list.png Binary files differdeleted file mode 100644 index c5f6c97b2687..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/light_view_as_list.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/lo_icon.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/lo_icon.png Binary files differdeleted file mode 100644 index 2ef86417e69e..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/lo_icon.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/main.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/main.png Binary files differdeleted file mode 100644 index 7e8e2a05e2da..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/main.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/math.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/math.png Binary files differdeleted file mode 100644 index 50b8dc863bff..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/math.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/startcenter.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/startcenter.png Binary files differdeleted file mode 100644 index 7e8e2a05e2da..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/startcenter.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/writer.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/writer.png Binary files differdeleted file mode 100644 index 2f4abcb280cd..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-hdpi/writer.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-ldpi/dummy_page.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-ldpi/dummy_page.png Binary files differdeleted file mode 100644 index c58d276e7085..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-ldpi/dummy_page.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-ldpi/ic_launcher.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-ldpi/ic_launcher.png Binary files differdeleted file mode 100644 index 1095584ec21f..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-ldpi/ic_launcher.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-ldpi/lo_icon.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-ldpi/lo_icon.png Binary files differdeleted file mode 100644 index 95b3113b6f95..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-ldpi/lo_icon.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-mdpi/ic_launcher.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-mdpi/ic_launcher.png Binary files differdeleted file mode 100644 index a07c69fa5a0f..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-mdpi/ic_launcher.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-mdpi/lo_icon.png b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-mdpi/lo_icon.png Binary files differdeleted file mode 100644 index 4f3f89beadc2..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/drawable-mdpi/lo_icon.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml deleted file mode 100644 index ce42e577fa95..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_explorer_grid_item.xml +++ /dev/null @@ -1,29 +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/grid_item_image" - android:layout_width="50dp" - android:layout_height="75dp" - android:paddingTop="15dp" - android:paddingBottom="10dp" - android:layout_gravity="center" > - </ImageView> - - <TextView - android:id="@+id/grid_item_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@+id/label" - android:paddingLeft="10dp" - android:paddingRight="10dp" - android:layout_gravity="center" - android:textSize="15dp" - android:textStyle="bold" - android:maxLines="2"> - </TextView> - -</LinearLayout>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_grid.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_grid.xml deleted file mode 100644 index 1e241c00a13a..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_grid.xml +++ /dev/null @@ -1,20 +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" > - - <GridView - android:id="@+id/file_explorer_grid_view" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:columnWidth="120dp" - android:numColumns="auto_fit" - android:verticalSpacing="10dp" - android:horizontalSpacing="10dp" - android:stretchMode="columnWidth" - android:gravity="center"> - </GridView> - - -</LinearLayout>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list.xml deleted file mode 100644 index 6ef02555a8a3..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list.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:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" > - - <ListView - android:id="@+id/file_explorer_list_view" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - ></ListView> - -</LinearLayout>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml deleted file mode 100644 index 0bff445659a0..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/file_list_item.xml +++ /dev/null @@ -1,41 +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="48dp" - android:orientation="horizontal" > - <ImageView - android:id="@+id/file_list_item_icon" - android:layout_height="match_parent" - android:layout_width="32dp" - android:layout_margin="8dp" - android:layout_gravity="center"/> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="48dp" - android:orientation="horizontal"> - <TextView - android:id="@+id/file_list_item_name" - android:layout_height="48dp" - android:layout_width="0dp" - android:textSize="15dp" - android:textStyle="bold" - android:layout_weight="2" - android:gravity="center"/> - <TextView - android:id="@+id/file_list_item_size" - android:layout_height="48dp" - android:layout_width="0dp" - android:textSize="15dp" - android:textStyle="bold" - android:layout_weight="1" - android:gravity="center"/> - <TextView - android:id="@+id/file_list_item_date" - android:layout_height="48dp" - android:layout_width="0dp" - android:textSize="15dp" - android:textStyle="bold" - android:layout_weight="2" - android:gravity="center"/> - </LinearLayout> -</LinearLayout>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/main.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/main.xml deleted file mode 100644 index 6b97fe101177..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/layout/main.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="#aaa" - android:orientation="vertical" - > - - <org.libreoffice.ui.PageView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - /> - - -</LinearLayout>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/menu/view_menu.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/menu/view_menu.xml deleted file mode 100644 index 87270d3a5985..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/menu/view_menu.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<menu xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:id="@+id/menu_search" - android:icon="@drawable/action_search" - android:showAsAction="always" /> - <item android:id="@+id/menu_view_toggle" - android:title="@string/grid_view"/> - <item android:id="@+id/menu_sort_size" - android:title="@string/menu_sort_size" - android:onClick="sortFiles"/> - <item android:id="@+id/menu_sort_az" - android:title="@string/menu_sort_az" - android:onClick="sortFiles"/> - <item android:id="@+id/menu_sort_modified" - android:title="@string/menu_sort_modified" - android:onClick="sortFiles"/> - <item android:id="@+id/menu_preferences" - android:title="@string/menu_preferences" - android:onClick="editPreferences"/> -</menu>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/arrays.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/arrays.xml deleted file mode 100644 index 67a157d201bf..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/arrays.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <integer-array name="FilterTypeValues"> - <item >-1</item> - <item >0</item> - <item >1</item> - <item >2</item> - </integer-array> - <string-array name="FilterTypeStringValues"> - <item >-1</item> - <item >0</item> - <item >1</item> - <item >2</item> - </string-array> - <string-array name="SortModeStringValues"> - <item >0</item> - <item >1</item> - <item >2</item> - <item >3</item> - <item >4</item> - <item >5</item> - </string-array> - <!-- View Mode names,values --> - <string-array name="ViewModeNames"> - <item >Grid</item> - <item >List</item> - </string-array> - <string-array name="ViewModeStringValues"> - <item >0</item> - <item >1</item> - </string-array> - - <!-- Preference Name Arrays --> - <string-array name="file_view_modes"> - <item >EVERYTHING</item> - <item >DOCUMENTS</item> - <item >SPREADSHEETS</item> - <item >PRESENTATIONS</item> - </string-array> - <string-array name="FilterTypeNames"> - <item >Everything</item> - <item >Documents</item> - <item >Spreadsheets</item> - <item >Presentations</item> - </string-array> - <string-array name="SortModeNames"> - <item >A-Z</item> - <item >Z-A</item> - <item >Oldest First</item> - <item >Newest First</item> - <item >Largest First</item> - <item >Smallest First</item> - </string-array> - - -</resources>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml deleted file mode 100644 index 8951dd495b8a..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/values/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <string name="app_name">LibreOfficeUI</string> - <string name="menu_search">Search</string> - <string name="list_view">List</string> - <string name="grid_view">Grid</string> - <string name="menu_sort_size">Sort By Size</string> - <string name="menu_sort_az">Sort A-Z</string> - <string name="menu_sort_modified">Sort by Date</string> - <string name="menu_preferences">Preferences</string> - <!-- Pref keys as resources ; Not currently used --> - <string name="EXPLORER_VIEW_TYPE_KEY">EXPLORER_VIEW_TYPE</string> - <string name="CURRENT_DIRECTORY_KEY">CURRENT_DIRECTORY</string> - - -</resources>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/xml/libreoffice_preferences.xml b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/xml/libreoffice_preferences.xml deleted file mode 100644 index d19d9e65298c..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/res/xml/libreoffice_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" > - <ListPreference - android:title="Default File Filter" - android:summary="Set which files to show by default" - android:entries="@array/FilterTypeNames" - android:entryValues="@array/FilterTypeStringValues" - android:key="FILTER_MODE"/> - <ListPreference - android:summary="Select how to order files; A-Z, by size, etc." - android:key="SORT_MODE" - android:title="File Order" android:entries="@array/SortModeNames" android:entryValues="@array/SortModeStringValues"/> - <ListPreference - android:entries="@array/ViewModeNames" - android:entryValues="@array/ViewModeStringValues" - android:title="Default File Explorer View" - android:key="EXPLORER_VIEW_TYPE" - android:summary="View files as a grid or in a list. #not functional, yet."/> - - -</PreferenceScreen>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java deleted file mode 100644 index 2e21dbe5da61..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/FileUtilities.java +++ /dev/null @@ -1,159 +0,0 @@ -package org.libreoffice.ui; - -import java.io.File; -import java.io.FileFilter; -import java.io.FilenameFilter; -import java.util.Arrays; -import java.util.Comparator; - -public class FileUtilities { - - static final int ALL = -1; - static final int DOC = 0; - static final int CALC = 1; - static final int IMPRESS = 2; - - static final int SORT_AZ = 0; - static final int SORT_ZA = 1; - /** Oldest Files First*/ - static final int SORT_OLDEST = 2; - /** Newest Files First*/ - static final int SORT_NEWEST = 3; - /** Largest Files First */ - static final int SORT_LARGEST = 4; - /** Smallest Files First */ - static final int SORT_SMALLEST = 5; - - private static String[] fileExtensions = {".odt",".ods",".odp"}; - - static boolean isDoc(String filename){ - if( filename.endsWith( fileExtensions[ DOC ] ) ){ - return true; - } - return false; - } - - static boolean isCalc(String filename){ - if( filename.endsWith( fileExtensions[ CALC ] ) ){ - return true; - } - return false; - } - - static boolean isImpress(String filename){ - if( filename.endsWith( fileExtensions[ IMPRESS ] ) ){ - return true; - } - return false; - } - - static FileFilter getFileFilter(int mode ){ - if( mode != ALL){ - final String ext = fileExtensions[ mode ]; - return new FileFilter() { - - public boolean accept(File pathname) { - if( pathname.getName().endsWith( ext ) ){ - return true; - } - if( pathname.isDirectory() ){ - return true; - } - return false; - } - }; - }else{//return all - return new FileFilter() { - - public boolean accept(File pathname) { - // TODO Auto-generated method stub - return true; - } - }; - } - } - - static FilenameFilter getFilenameFilter(int mode){ - if( mode != ALL){ - final String ext = fileExtensions[ mode ]; - return new FilenameFilter() { - - public boolean accept(File dir, String filename) { - if( filename.endsWith( ext ) ){ - return true; - } - if( new File( dir , filename ).isDirectory() ){ - return true; - } - return false; - } - }; - }else{ - return new FilenameFilter() { - - public boolean accept(File dir, String filename) { - return true; - } - }; - } - } - - static void sortFiles(File[] files , int sortMode){ - //Should really change all this to a switch statement... - if( sortMode == SORT_AZ ){ - Arrays.sort( files , new Comparator<File>() { - - public int compare(File lhs, File rhs) { - return lhs.getName().compareTo( rhs.getName() ); - } - }); - return; - } - if( sortMode == SORT_ZA ){ - Arrays.sort( files , new Comparator<File>() { - - public int compare(File lhs, File rhs) { - return rhs.getName().compareTo( lhs.getName() ); - } - }); - return; - } - if( sortMode == SORT_OLDEST ){ - Arrays.sort( files , new Comparator<File>() { - - public int compare(File lhs, File rhs) { - return Long.valueOf( lhs.lastModified() ).compareTo( rhs.lastModified() ); - } - }); - return; - } - if( sortMode == SORT_NEWEST ){ - Arrays.sort( files , new Comparator<File>() { - - public int compare(File lhs, File rhs) { - return Long.valueOf( rhs.lastModified() ).compareTo( lhs.lastModified() ); - } - }); - return; - } - if( sortMode == SORT_LARGEST ){ - Arrays.sort( files , new Comparator<File>() { - - public int compare(File lhs, File rhs) { - return Long.valueOf( rhs.length() ).compareTo( lhs.length() ); - } - }); - return; - } - if( sortMode == SORT_SMALLEST ){ - Arrays.sort( files , new Comparator<File>() { - - public int compare(File lhs, File rhs) { - return Long.valueOf( lhs.length() ).compareTo( rhs.length() ); - } - }); - return; - } - return; - } -} diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/GridItemAdapter.java b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/GridItemAdapter.java deleted file mode 100644 index 9585705d5e06..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/GridItemAdapter.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.libreoffice.ui; - -import java.io.File; - -import android.content.Context; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.BaseAdapter; -import android.widget.ImageView; -import android.widget.TextView; - -public class GridItemAdapter extends BaseAdapter{ - Context mContext; - File[] filePaths; - File currentDirectory; - String tag = "GridItemAdapter"; - - public GridItemAdapter(Context mContext, File[] filePaths) { - this.mContext = mContext; - this.filePaths = filePaths; - for(File fn : filePaths){ - Log.d(tag, fn.getName()); - } - } - - public GridItemAdapter(Context mContext, File currentDirectory) { - this.mContext = mContext; - this.currentDirectory = currentDirectory; - filePaths = currentDirectory.listFiles(); - } - - public GridItemAdapter(Context mContext, File currentDirectory, File[] filteredFiles) { - this.mContext = mContext; - this.currentDirectory = currentDirectory; - filePaths = filteredFiles; - } - - public int getCount() { - return filePaths.length; - } - - public Object getItem(int position) { - return null;//filePaths[ position ]; - } - - public long getItemId(int arg0) { - // TODO Auto-generated method stub - return 0; - } - - public View getView(int position, View convertView, ViewGroup parent) { - LayoutInflater inflater = (LayoutInflater) mContext.getSystemService( - Context.LAYOUT_INFLATER_SERVICE); - - View gridView; - - if (convertView == null) { - - - - } else { - gridView = (View) convertView; - } - gridView = new View(mContext); - - // get layout from mobile.xml - gridView = inflater.inflate(R.layout.file_explorer_grid_item, null); - - // set value into textview - TextView textView = (TextView) gridView - .findViewById(R.id.grid_item_label); - textView.setText(filePaths[position].getName()); - // set image based on selected text - ImageView imageView = (ImageView) gridView - .findViewById(R.id.grid_item_image); - if( filePaths[position].getName().endsWith(".odt") ){ - imageView.setImageResource(R.drawable.writer); - } - if( filePaths[position].getName().endsWith(".ods") ){ - imageView.setImageResource(R.drawable.calc); - } - if( filePaths[position].getName().endsWith(".odp") ){ - imageView.setImageResource(R.drawable.impress); - } - if( filePaths[position].isDirectory() ){//Is a folder - //Eventually have thumbnails of each sub file on a black circle - //For now just a folder icon - imageView.setImageResource(R.drawable.folder); - } - return gridView; - } - -} diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java deleted file mode 100644 index d1e46a9b543d..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/LibreOfficeUIActivity.java +++ /dev/null @@ -1,548 +0,0 @@ -package org.libreoffice.ui; - -import java.io.File; -import java.io.FileFilter; -import java.io.FilenameFilter; -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.prefs.Preferences; - -import android.app.ActionBar; -import android.app.ActionBar.OnNavigationListener; -import android.app.Activity; -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; -import android.database.DataSetObserver; -import android.os.Bundle; -import android.os.Environment; -import android.preference.PreferenceManager; -import android.util.Log; -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.view.View.OnClickListener; -import android.widget.AdapterView; -import android.widget.AdapterView.OnItemClickListener; -import android.widget.ArrayAdapter; -import android.widget.GridView; -import android.widget.ImageView; -import android.widget.ListAdapter; -import android.widget.ListView; -import android.widget.SpinnerAdapter; -import android.widget.TextView; - -public class LibreOfficeUIActivity extends Activity implements OnNavigationListener { - private String tag = "file_manager"; - private SharedPreferences prefs; - private File homeDirectory; - private File currentDirectory; - private int filterMode = FileUtilities.ALL; - private int viewMode; - private int sortMode; - - FileFilter fileFilter; - FilenameFilter filenameFilter; - private String[] fileNames; - private File[] filePaths; - - - private static final String CURRENT_DIRECTORY_KEY = "CURRENT_DIRECTORY"; - private static final String FILTER_MODE_KEY = "FILTER_MODE"; - public static final String EXPLORER_VIEW_TYPE_KEY = "EXPLORER_VIEW_TYPE"; - public static final String EXPLORER_PREFS_KEY = "EXPLORER_PREFS"; - public static final String SORT_MODE_KEY = "SORT_MODE"; - - public static final int GRID_VIEW = 0; - public static final int LIST_VIEW = 1; - - GridView gv; - ListView lv; - - @Override - public void onCreate(Bundle savedInstanceState) { - - super.onCreate(savedInstanceState); - Log.d(tag, "onCreate"); - //Set the "home" - top level - directory. - homeDirectory = new File(Environment.getExternalStorageDirectory(),"LibreOffice"); - homeDirectory.mkdirs(); - currentDirectory = homeDirectory; - //Load default settings - - - } - - public void createUI(){ - ActionBar actionBar = getActionBar(); - actionBar.setDisplayShowTitleEnabled(false);//This should show current directory if anything - actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); - SpinnerAdapter mSpinnerAdapter = ArrayAdapter.createFromResource(this, R.array.file_view_modes, - android.R.layout.simple_spinner_dropdown_item); - actionBar.setListNavigationCallbacks(mSpinnerAdapter, this); - if( !currentDirectory.equals( homeDirectory )){ - actionBar.setDisplayHomeAsUpEnabled(true); - } - - if( viewMode == GRID_VIEW){ - // code to make a grid view - setContentView(R.layout.file_grid); - gv = (GridView)findViewById(R.id.file_explorer_grid_view); - fileNames = currentDirectory.list( FileUtilities.getFilenameFilter( filterMode ) ); - filePaths = currentDirectory.listFiles( FileUtilities.getFileFilter( filterMode ) ); - gv.setOnItemClickListener(new OnItemClickListener() { - public void onItemClick(AdapterView<?> parent, View view, - int position, long id) { - File file = filePaths[position]; - if(!file.isDirectory()){ - open(fileNames[position]); - }else{ - file = new File( currentDirectory, file.getName() ); - openDirectory( file ); - } - - } - }); - gv.setAdapter( new GridItemAdapter(getApplicationContext(), currentDirectory, filePaths ) ); - actionBar.setSelectedNavigationItem( filterMode + 1 );//This triggers the listener which modifies the view. - }else{ - setContentView(R.layout.file_list); - lv = (ListView)findViewById( R.id.file_explorer_list_view); - lv.setClickable(true); - fileNames = currentDirectory.list( FileUtilities.getFilenameFilter( filterMode ) ); - filePaths = currentDirectory.listFiles( FileUtilities.getFileFilter( filterMode ) ); - /*lv.setOnItemClickListener(new OnItemClickListener() { - public void onItemClick(AdapterView<?> parent, View view, - int position, long id) { - Log.d(tag, "click!"); - File file = filePaths[position]; - if(!file.isDirectory()){ - open(fileNames[position]); - }else{ - file = new File( currentDirectory, file.getName() ); - openDirectory( file ); - } - } - });*/ - lv.setAdapter( new ListItemAdapter(getApplicationContext(), filePaths) ); - actionBar.setSelectedNavigationItem( filterMode + 1 ); - } - - } - - public void openDirectory(File dir ){ - currentDirectory = dir; - if( !currentDirectory.equals( homeDirectory )){ - ActionBar actionBar = getActionBar(); - actionBar.setDisplayHomeAsUpEnabled(true); - }else{ - ActionBar actionBar = getActionBar(); - actionBar.setDisplayHomeAsUpEnabled( false ); - } - filePaths = currentDirectory.listFiles( FileUtilities.getFileFilter( filterMode ) ); - fileNames = new String[ filePaths.length ]; - FileUtilities.sortFiles( filePaths, sortMode ); - for( int i = 0; i < fileNames.length; i++){ - fileNames[ i ] = filePaths[ i ].getName(); - } - if( viewMode == GRID_VIEW){ - gv.setAdapter( new GridItemAdapter(getApplicationContext(), currentDirectory, filePaths ) ); - }else{ - lv.setAdapter( new ListItemAdapter(getApplicationContext(), filePaths) ); - } - } - - public void open(String file){ - Intent i = new Intent( this , WriterViewerActivity.class ); - i.putExtra( CURRENT_DIRECTORY_KEY , currentDirectory.getAbsolutePath() ); - i.putExtra( FILTER_MODE_KEY , filterMode ); - i.putExtra( EXPLORER_VIEW_TYPE_KEY , viewMode ); - startActivity( i ); - } - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - MenuInflater inflater = getMenuInflater(); - inflater.inflate(R.menu.view_menu, menu); - - MenuItem item = (MenuItem)menu.findItem(R.id.menu_view_toggle); - if( viewMode == GRID_VIEW){ - item.setTitle(R.string.list_view); - item.setIcon( R.drawable.light_view_as_list ); - }else{ - item.setTitle(R.string.grid_view); - item.setIcon( R.drawable.light_view_as_grid ); - } - return true; - } - - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: - if( !currentDirectory.equals( homeDirectory ) ){ - openDirectory( currentDirectory.getParentFile() ); - } - break; - case R.id.menu_view_toggle: - if( viewMode == GRID_VIEW){ - viewMode = LIST_VIEW; - item.setTitle(R.string.grid_view);//Button points to next view. - item.setIcon( R.drawable.light_view_as_grid ); - - }else{ - viewMode = GRID_VIEW; - item.setTitle(R.string.list_view);//Button points to next view. - item.setIcon( R.drawable.light_view_as_list ); - } - createUI(); - break; - default: - return super.onOptionsItemSelected(item); - } - return true; - } - - public void createDummyFileSystem(){ - boolean mExternalStorageAvailable = false; - boolean mExternalStorageWriteable = false; - String state = Environment.getExternalStorageState(); - - if (Environment.MEDIA_MOUNTED.equals(state)) { - mExternalStorageAvailable = mExternalStorageWriteable = true; - } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { - mExternalStorageAvailable = true; - mExternalStorageWriteable = false; - } else { - mExternalStorageAvailable = mExternalStorageWriteable = false; - } - if( mExternalStorageAvailable && mExternalStorageWriteable ){//can also check if its writeable - Log.d(tag, Boolean.toString( currentDirectory.mkdir() ) ); - try { - File[] removeList = currentDirectory.listFiles(); - for(File item : removeList){ - if(item.isDirectory()) - continue;//Log.d(tag, item.getPath()); - item.delete(); - } - new File( currentDirectory , "d0.odp" ).createNewFile(); - new File( currentDirectory , "d1.odt" ).createNewFile(); - new File( currentDirectory , "d2.odt" ).createNewFile(); - new File( currentDirectory , "d3.odp" ).createNewFile(); - new File( currentDirectory , "d4.ods" ).createNewFile(); - new File( currentDirectory , "d5.odt" ).createNewFile(); - new File( currentDirectory , "d6.odp" ).createNewFile(); - new File( currentDirectory , "d7.odt" ).createNewFile(); - new File( currentDirectory , "d8.odt" ).createNewFile(); - new File( currentDirectory , "d9.odp" ).createNewFile(); - new File( currentDirectory , "d10.odp" ).createNewFile(); - new File( currentDirectory , "d11.odt" ).createNewFile(); - new File( currentDirectory , "d12.odt" ).createNewFile(); - new File( currentDirectory , "d13.odp" ).createNewFile(); - new File( currentDirectory , "d14.ods" ).createNewFile(); - new File( currentDirectory , "d15.odt" ).createNewFile(); - File templatesDirectory = new File( currentDirectory , "Templates" ); - templatesDirectory.mkdir(); - new File( templatesDirectory , "template1.odt" ).createNewFile(); - new File( templatesDirectory , "template2.odt" ).createNewFile(); - new File( templatesDirectory , "template3.ods" ).createNewFile(); - new File( templatesDirectory , "template4.odp" ).createNewFile(); - File regularDirectory = new File( currentDirectory , "Folder" ); - regularDirectory.mkdir(); - new File( regularDirectory , "yetAnotherDoc.odt" ).createNewFile(); - new File( regularDirectory , "some really long file name.ods" ).createNewFile(); - File anotherRegularDirectory = new File( regularDirectory , "AnotherFolder" ); - anotherRegularDirectory.mkdir(); - new File( anotherRegularDirectory , "yetAnotherDoc2.odt" ).createNewFile(); - //Should put a folder in at some stage. - - } catch (IOException e) { - Log.d(tag, "file io failure"); - e.printStackTrace(); - } - //Log.d(tag, fileStore.toString()); - } - else{ - Log.d(tag, "No External Storage"); - } - } - - @SuppressWarnings("unused")//see android:onClick properties in view_menu.xml - public void sortFiles(MenuItem item){ - switch ( item.getItemId() ) { - case R.id.menu_sort_az: - if( sortMode == FileUtilities.SORT_AZ ){ - sortMode = FileUtilities.SORT_ZA; - }else{ - sortMode = FileUtilities.SORT_AZ; - } - break; - case R.id.menu_sort_modified: - if( sortMode == FileUtilities.SORT_NEWEST ){ - sortMode = FileUtilities.SORT_OLDEST; - }else{ - sortMode = FileUtilities.SORT_NEWEST; - } - break; - case R.id.menu_sort_size: - if( sortMode == FileUtilities.SORT_LARGEST ){ - sortMode = FileUtilities.SORT_SMALLEST; - }else{ - sortMode = FileUtilities.SORT_LARGEST; - } - break; - default: - break; - } - this.onResume(); - return; - } - - public void readPreferences(){ - prefs = getSharedPreferences(EXPLORER_PREFS_KEY, MODE_PRIVATE); - viewMode = prefs.getInt( EXPLORER_VIEW_TYPE_KEY, GRID_VIEW); - sortMode = prefs.getInt( SORT_MODE_KEY, FileUtilities.SORT_AZ ); - SharedPreferences defaultPrefs = PreferenceManager.getDefaultSharedPreferences( getBaseContext() ); - filterMode = Integer.valueOf( defaultPrefs.getString( FILTER_MODE_KEY , "-1") ); - sortMode = Integer.valueOf( defaultPrefs.getString( SORT_MODE_KEY , "-1") ); - } - - public void editPreferences(MenuItem item){ - startActivity( new Intent( this , PreferenceEditor.class) ); - } - - @Override - protected void onSaveInstanceState(Bundle outState) { - // TODO Auto-generated method stub - super.onSaveInstanceState(outState); - outState.putString( CURRENT_DIRECTORY_KEY , currentDirectory.getAbsolutePath() ); - outState.putInt( FILTER_MODE_KEY , filterMode ); - outState.putInt( EXPLORER_VIEW_TYPE_KEY , viewMode ); - - Log.d(tag, currentDirectory.toString() + Integer.toString(filterMode ) + Integer.toString(viewMode) ); - //prefs.edit().putInt(EXPLORER_VIEW_TYPE, viewType).commit(); - Log.d(tag, "savedInstanceSate"); - } - - @Override - protected void onRestoreInstanceState(Bundle savedInstanceState) { - // TODO Auto-generated method stub - super.onRestoreInstanceState(savedInstanceState); - if( savedInstanceState.isEmpty() ){ - return; - } - currentDirectory = new File( savedInstanceState.getString( CURRENT_DIRECTORY_KEY ) ); - filterMode = savedInstanceState.getInt( FILTER_MODE_KEY , FileUtilities.ALL ) ; - viewMode = savedInstanceState.getInt( EXPLORER_VIEW_TYPE_KEY , GRID_VIEW ); - //openDirectory( currentDirectory ); - Log.d(tag, "onRestoreInstanceState"); - Log.d(tag, currentDirectory.toString() + Integer.toString(filterMode ) + Integer.toString(viewMode) ); - } - - @Override - protected void onPause() { - //prefs.edit().putInt(EXPLORER_VIEW_TYPE, viewType).commit(); - super.onPause(); - Log.d(tag, "onPause"); - } - - @Override - protected void onResume() { - // TODO Auto-generated method stub - super.onResume(); - Log.d(tag, "onResume"); - readPreferences();// intent values take precedence over prefs? - Intent i = this.getIntent(); - if( i.hasExtra( CURRENT_DIRECTORY_KEY ) ){ - currentDirectory = new File( i.getStringExtra( CURRENT_DIRECTORY_KEY ) ); - Log.d(tag, CURRENT_DIRECTORY_KEY); - } - if( i.hasExtra( FILTER_MODE_KEY ) ){ - filterMode = i.getIntExtra( FILTER_MODE_KEY, FileUtilities.ALL); - Log.d(tag, FILTER_MODE_KEY); - } - if( i.hasExtra( EXPLORER_VIEW_TYPE_KEY ) ){ - viewMode = i.getIntExtra( EXPLORER_VIEW_TYPE_KEY, GRID_VIEW); - Log.d(tag, EXPLORER_VIEW_TYPE_KEY); - } - createUI(); - openDirectory( currentDirectory ); - } - - @Override - protected void onStart() { - // TODO Auto-generated method stub - super.onStart(); - Log.d(tag, "onStart"); - } - - @Override - protected void onStop() { - // TODO Auto-generated method stub - super.onStop(); - Log.d(tag, "onStop"); - } - - @Override - protected void onDestroy() { - // TODO Auto-generated method stub - super.onDestroy(); - - Log.d(tag, "onDestroy"); - } - - public boolean onNavigationItemSelected(int itemPosition, long itemId) { - filterMode = itemPosition -1; //bit of a hack, I know. -1 is ALL 0 Docs etc - openDirectory( currentDirectory );// Uses filter mode - return true; - } - -class ListItemAdapter implements ListAdapter{ - private Context mContext; - private File[] filePaths; - private final long KB = 1024; - private final long MB = 1048576; - - public ListItemAdapter(Context mContext, File[] filePaths) { - this.mContext = mContext; - this.filePaths = filePaths; - } - - public int getCount() { - // TODO Auto-generated method stub - return filePaths.length; - } - - public Object getItem(int arg0) { - // TODO Auto-generated method stub - return null; - } - - public long getItemId(int arg0) { - // TODO Auto-generated method stub - return 0; - } - - public int getItemViewType(int arg0) { - // TODO Auto-generated method stub - return 0; - } - - public View getView(int position, View convertView, ViewGroup parent) { - LayoutInflater inflater = (LayoutInflater) mContext.getSystemService( - Context.LAYOUT_INFLATER_SERVICE); - - View listItem; - - if (convertView == null) { - listItem = new View(mContext); - listItem = inflater.inflate(R.layout.file_list_item, null); - } else { - listItem = (View) convertView; - } - final int pos = position; - listItem.setClickable(true); - listItem.setOnClickListener(new OnClickListener() { - - public void onClick(View v) { - Log.d("LIST", "click!"); - if(filePaths[ pos ].isDirectory() ){ - openDirectory( filePaths[ pos ] ); - }else{ - open( filePaths[ pos ].getName() ); - } - } - }); - - - - // set value into textview - TextView filename = (TextView) listItem.findViewById(R.id.file_list_item_name); - filename.setText( filePaths[ position ].getName() ); - //filename.setClickable(true); - - TextView fileSize = (TextView) listItem.findViewById(R.id.file_list_item_size); - //TODO Give size in KB , MB as appropriate. - String size = "0B"; - long length = filePaths[ position ].length(); - if( length < KB ){ - size = Long.toString( length ) + "B"; - } - if( length >= KB && length < MB){ - size = Long.toString( length/KB ) + "KB"; - } - if( length >= MB){ - size = Long.toString( length/MB ) + "MB"; - } - fileSize.setText( size ); - //fileSize.setClickable(true); - - TextView fileDate = (TextView) listItem.findViewById(R.id.file_list_item_date); - SimpleDateFormat df = new SimpleDateFormat("dd MMM yyyy hh:ss"); - Date date = new Date( filePaths[ position ].lastModified() ); - //TODO format date - fileDate.setText( df.format( date ) ); - - // set image based on selected text - ImageView imageView = (ImageView) listItem.findViewById(R.id.file_list_item_icon); - if( filePaths[position].getName().endsWith(".odt") ){ - imageView.setImageResource(R.drawable.writer); - } - if( filePaths[position].getName().endsWith(".ods") ){ - imageView.setImageResource(R.drawable.calc); - } - if( filePaths[position].getName().endsWith(".odp") ){ - imageView.setImageResource(R.drawable.impress); - } - if( filePaths[position].isDirectory() ){ - //Eventually have thumbnails of each sub file on a black circle - //For now just a folder icon - imageView.setImageResource(R.drawable.folder); - } - //imageView.setClickable(true); - return listItem; - } - - public int getViewTypeCount() { - // TODO Auto-generated method stub - return 1; - } - - public boolean hasStableIds() { - // TODO Auto-generated method stub - return false; - } - - public boolean isEmpty() { - // TODO Auto-generated method stub - return false; - } - - public void registerDataSetObserver(DataSetObserver arg0) { - // TODO Auto-generated method stub - - } - - public void unregisterDataSetObserver(DataSetObserver arg0) { - // TODO Auto-generated method stub - - } - - public boolean areAllItemsEnabled() { - // TODO Auto-generated method stub - return false; - } - - public boolean isEnabled(int position) { - // TODO Auto-generated method stub - return false; - } - - } - -} - - diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/ListItemAdapter.java b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/ListItemAdapter.java deleted file mode 100644 index 1e66e3a0501c..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/ListItemAdapter.java +++ /dev/null @@ -1,159 +0,0 @@ -package org.libreoffice.ui; - -import java.io.File; -import java.text.SimpleDateFormat; -import java.util.Date; - -import android.content.Context; -import android.database.DataSetObserver; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.view.View.OnClickListener; -import android.widget.ImageView; -import android.widget.ListAdapter; -import android.widget.TextView; - -/*Currently this is class is not used but instead is implemented as an inner class in LibreOfficeUI. - * This is because I can't get the onItemClickListener to fire on the listview so I need to set an - * onClick listener in the adapter. ( I've tried turning off the focusability etc of the listitem - * contents but no dice...) */ -public class ListItemAdapter implements ListAdapter{ - private Context mContext; - private File[] filePaths; - private final long KB = 1024; - private final long MB = 1048576; - - public ListItemAdapter(Context mContext, File[] filePaths) { - this.mContext = mContext; - this.filePaths = filePaths; - } - - public int getCount() { - // TODO Auto-generated method stub - return filePaths.length; - } - - public Object getItem(int arg0) { - // TODO Auto-generated method stub - return null; - } - - public long getItemId(int arg0) { - // TODO Auto-generated method stub - return 0; - } - - public int getItemViewType(int arg0) { - // TODO Auto-generated method stub - return 0; - } - - public View getView(int position, View convertView, ViewGroup parent) { - LayoutInflater inflater = (LayoutInflater) mContext.getSystemService( - Context.LAYOUT_INFLATER_SERVICE); - - View listItem; - - if (convertView == null) { - listItem = new View(mContext); - listItem = inflater.inflate(R.layout.file_list_item, null); - } else { - listItem = (View) convertView; - } - - listItem.setClickable(true); - listItem.setOnClickListener(new OnClickListener() { - - public void onClick(View v) { - Log.d("LIST", "click!"); - } - }); - - - - // set value into textview - TextView filename = (TextView) listItem.findViewById(R.id.file_list_item_name); - filename.setText( filePaths[ position ].getName() ); - //filename.setClickable(true); - - TextView fileSize = (TextView) listItem.findViewById(R.id.file_list_item_size); - //TODO Give size in KB , MB as appropriate. - String size = "0B"; - long length = filePaths[ position ].length(); - if( length < KB ){ - size = Long.toString( length ) + "B"; - } - if( length >= KB && length < MB){ - size = Long.toString( length/KB ) + "KB"; - } - if( length >= MB){ - size = Long.toString( length/MB ) + "MB"; - } - fileSize.setText( size ); - //fileSize.setClickable(true); - - TextView fileDate = (TextView) listItem.findViewById(R.id.file_list_item_date); - SimpleDateFormat df = new SimpleDateFormat("dd MMM yyyy hh:ss"); - Date date = new Date( filePaths[ position ].lastModified() ); - //TODO format date - fileDate.setText( df.format( date ) ); - - // set image based on selected text - ImageView imageView = (ImageView) listItem.findViewById(R.id.file_list_item_icon); - if( filePaths[position].getName().endsWith(".odt") ){ - imageView.setImageResource(R.drawable.writer); - } - if( filePaths[position].getName().endsWith(".ods") ){ - imageView.setImageResource(R.drawable.calc); - } - if( filePaths[position].getName().endsWith(".odp") ){ - imageView.setImageResource(R.drawable.impress); - } - if( filePaths[position].isDirectory() ){ - //Eventually have thumbnails of each sub file on a black circle - //For now just a folder icon - imageView.setImageResource(R.drawable.folder); - } - //imageView.setClickable(true); - return listItem; - } - - public int getViewTypeCount() { - // TODO Auto-generated method stub - return 1; - } - - public boolean hasStableIds() { - // TODO Auto-generated method stub - return false; - } - - public boolean isEmpty() { - // TODO Auto-generated method stub - return false; - } - - public void registerDataSetObserver(DataSetObserver arg0) { - // TODO Auto-generated method stub - - } - - public void unregisterDataSetObserver(DataSetObserver arg0) { - // TODO Auto-generated method stub - - } - - public boolean areAllItemsEnabled() { - // TODO Auto-generated method stub - return false; - } - - public boolean isEnabled(int position) { - // TODO Auto-generated method stub - return false; - } - -} - diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/PageView.java b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/PageView.java deleted file mode 100644 index 5edb6ea20926..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/PageView.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.libreoffice.ui; - -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.graphics.Rect; -import android.util.AttributeSet; -import android.util.Log; -import android.view.View; - -public class PageView extends View{ - private Bitmap bmp; - private Paint mPaintBlack; - private String tag = "PageView"; - - public PageView(Context context ) { - super(context); - bmp = BitmapFactory.decodeResource(getResources(), R.drawable.dummy_page); - intialise(); - } - public PageView(Context context, AttributeSet attrs) { - super(context, attrs); - bmp = BitmapFactory.decodeResource(getResources(), R.drawable.dummy_page); - Log.d( tag , bmp.toString()); - intialise(); - } - public PageView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - bmp = BitmapFactory.decodeResource(getResources(), R.drawable.dummy_page);//load a "page" - intialise(); - } - - private void intialise(){ - mPaintBlack = new Paint(); - mPaintBlack.setARGB(255, 0, 0, 0); - Log.d(tag, " Doing some set-up"); - } - - public void setBitmap(Bitmap bmp){ - this.bmp = bmp; - } - - @Override - protected void onDraw(Canvas canvas) { - super.onDraw(canvas); - Log.d(tag, "Draw"); - Log.d(tag, Integer.toString(bmp.getHeight())); - if( bmp != null ){ - int horizontalMargin = (int) (canvas.getWidth()*0.1); - //int verticalMargin = (int) (canvas.getHeight()*0.1); - int verticalMargin = horizontalMargin; - canvas.drawBitmap(bmp, new Rect(0, 0, bmp.getWidth(), bmp.getHeight()), - new Rect(horizontalMargin,verticalMargin,canvas.getWidth()-horizontalMargin, - canvas.getHeight()-verticalMargin), - mPaintBlack);// - } - if( bmp == null) - canvas.drawText("Bmp is null!", 100, 100, new Paint()); - } - -} diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/PreferenceEditor.java b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/PreferenceEditor.java deleted file mode 100644 index dec509de1167..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/PreferenceEditor.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.libreoffice.ui; - -import android.content.SharedPreferences; -import android.os.Bundle; -import android.preference.Preference; -import android.preference.Preference.OnPreferenceClickListener; -import android.preference.PreferenceActivity; - -public class PreferenceEditor extends PreferenceActivity { - public final static String FilterTypePrefKey = "FilterTypePreference"; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - addPreferencesFromResource( R.xml.libreoffice_preferences ); - //mPrefs = getSharedPreferences( LibreOfficeUIActivity.EXPLORER_PREFS_KEY , MODE_PRIVATE ); - } -} diff --git a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/WriterViewerActivity.java b/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/WriterViewerActivity.java deleted file mode 100644 index fe2f1135b3a0..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/LibreOfficeUI/src/org/libreoffice/ui/WriterViewerActivity.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.libreoffice.ui; - -import android.app.ActionBar; -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.view.MenuItem; - -public class WriterViewerActivity extends Activity{ - private Bundle extras; - - @Override - protected void onCreate(Bundle savedInstanceState) { - // TODO Auto-generated method stub - super.onCreate(savedInstanceState); - extras = getIntent().getExtras(); - setContentView(R.layout.main); - ActionBar actionBar = getActionBar(); - actionBar.setDisplayHomeAsUpEnabled(true); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: - // app icon in action bar clicked; go home - Intent intent = new Intent(this, LibreOfficeUIActivity.class); - intent.putExtras( extras ); - //intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); - startActivity(intent); - return true; - default: - return super.onOptionsItemSelected(item); - } - } - -} diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/.classpath b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/.classpath deleted file mode 100644 index a4763d1eeced..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/.classpath +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="src" path="gen"/> - <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> - <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> - <classpathentry kind="output" path="bin/classes"/> -</classpath> diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/.project b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/.project deleted file mode 100644 index 59b93ac3f38c..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>TextturePage</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.android.ide.eclipse.adt.ApkBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>com.android.ide.eclipse.adt.AndroidNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/AndroidManifest.xml b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/AndroidManifest.xml deleted file mode 100644 index a9e146032f01..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/AndroidManifest.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="libreoffice.android.ui" - android:versionCode="1" - android:versionName="1.0" > - - <uses-sdk android:minSdkVersion="11" /> - - <application - android:icon="@drawable/ic_launcher" - android:label="@string/app_name" > - <activity - android:name=".TextturePageActivity" - android:label="@string/app_name" > - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - </application> - -</manifest>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/proguard-project.txt b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/proguard-project.txt deleted file mode 100644 index f2fe1559a217..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/project.properties b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/project.properties deleted file mode 100644 index 4d07452b5f04..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-11 diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/dummy_page.png b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/dummy_page.png Binary files differdeleted file mode 100644 index c58d276e7085..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/dummy_page.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/ic_launcher.png b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/ic_launcher.png Binary files differdeleted file mode 100644 index 96a442e5b8e9..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/ic_launcher.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/jay.png b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/jay.png Binary files differdeleted file mode 100644 index 03a72c16aab7..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/jay.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/ph_800_1280_dddddd.png b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/ph_800_1280_dddddd.png Binary files differdeleted file mode 100644 index a7c632a84db1..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-hdpi/ph_800_1280_dddddd.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-ldpi/ic_launcher.png b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-ldpi/ic_launcher.png Binary files differdeleted file mode 100644 index 99238729d875..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-ldpi/ic_launcher.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-mdpi/ic_launcher.png b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-mdpi/ic_launcher.png Binary files differdeleted file mode 100644 index 359047dfa4ed..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-mdpi/ic_launcher.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-xhdpi/ic_launcher.png b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-xhdpi/ic_launcher.png Binary files differdeleted file mode 100644 index 71c6d760f051..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/drawable-xhdpi/ic_launcher.png +++ /dev/null diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/layout/main.xml b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/layout/main.xml deleted file mode 100644 index bc12cd82317f..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/layout/main.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" > - - <TextView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="@string/hello" /> - -</LinearLayout>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/values/strings.xml b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/values/strings.xml deleted file mode 100644 index afe8c5c24c7a..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/res/values/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - - <string name="hello">Hello World, TextturePageActivity!</string> - <string name="app_name">TextturePage</string> - -</resources>
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/src/libreoffice/android/ui/Mesh.java b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/src/libreoffice/android/ui/Mesh.java deleted file mode 100644 index d747e2ebf138..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/src/libreoffice/android/ui/Mesh.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * Copyright 2010 Per-Erik Bergman (per-erik.bergman@jayway.com) - * - * 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. - */ - -package libreoffice.android.ui; - -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import java.nio.ShortBuffer; - -import javax.microedition.khronos.opengles.GL10; - -import android.graphics.Bitmap; -import android.opengl.GLUtils; -import android.util.Log; - -/** - * Mesh is a base class for 3D objects making it easier to create and maintain - * new primitives. - */ -public class Mesh { - // Our vertex buffer. - private FloatBuffer mVerticesBuffer = null; - - // Our index buffer. - private ShortBuffer mIndicesBuffer = null; - - // Our UV texture buffer. - private FloatBuffer mTextureBuffer; // New variable. - - // Our texture id. - private int mTextureId = -1; // New variable. - - // The bitmap we want to load as a texture. - private Bitmap mBitmap; // New variable. - - // Indicates if we need to load the texture. - private boolean mShouldLoadTexture = false; // New variable. - - // The number of indices. - private int mNumOfIndices = -1; - - // Flat Color - private final float[] mRGBA = new float[] { 1.0f, 1.0f, 1.0f, 1.0f }; - - // Smooth Colors - private FloatBuffer mColorBuffer = null; - - // Translate params. - public float x = 0; - - public float y = 0; - - public float z = -2; - - // Rotate params. - public float rx = 0; - - public float ry = 0; - - public float rz = 0; - - /** - * Render the mesh. - * - * @param gl - * the OpenGL context to render to. - */ - public void draw(GL10 gl) { - // Counter-clockwise winding. - gl.glFrontFace(GL10.GL_CCW); - // Enable face culling. - gl.glEnable(GL10.GL_CULL_FACE); - // What faces to remove with the face culling. - gl.glCullFace(GL10.GL_BACK); - // Enabled the vertices buffer for writing and to be used during - // rendering. - gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); - // Specifies the location and data format of an array of vertex - // coordinates to use when rendering. - gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVerticesBuffer); - // Set flat color - gl.glColor4f(mRGBA[0], mRGBA[1], mRGBA[2], mRGBA[3]); - // Smooth color - if (mColorBuffer != null) { - // Enable the color array buffer to be used during rendering. - gl.glEnableClientState(GL10.GL_COLOR_ARRAY); - gl.glColorPointer(4, GL10.GL_FLOAT, 0, mColorBuffer); - } - - // New part... - if (mShouldLoadTexture) { - loadGLTexture(gl); - mShouldLoadTexture = false; - } - if (mTextureId != -1 && mTextureBuffer != null) { - gl.glEnable(GL10.GL_TEXTURE_2D); - // Enable the texture state - gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); - - // Point to our buffers - gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, mTextureBuffer); - gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureId); - } - // ... end new part. - - gl.glTranslatef(x, y, z); - gl.glRotatef(rx, 1, 0, 0); - gl.glRotatef(ry, 0, 1, 0); - gl.glRotatef(rz, 0, 0, 1); - - // Point out the where the color buffer is. - gl.glDrawElements(GL10.GL_TRIANGLES, mNumOfIndices, - GL10.GL_UNSIGNED_SHORT, mIndicesBuffer); - // Disable the vertices buffer. - gl.glDisableClientState(GL10.GL_VERTEX_ARRAY); - - // New part... - if (mTextureId != -1 && mTextureBuffer != null) { - gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY); - } - // ... end new part. - - // Disable face culling. - gl.glDisable(GL10.GL_CULL_FACE); - } - - /** - * Set the vertices. - * - * @param vertices - */ - protected void setVertices(float[] vertices) { - // a float is 4 bytes, therefore we multiply the number if - // vertices with 4. - ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4); - vbb.order(ByteOrder.nativeOrder()); - mVerticesBuffer = vbb.asFloatBuffer(); - mVerticesBuffer.put(vertices); - mVerticesBuffer.position(0); - } - - /** - * Set the indices. - * - * @param indices - */ - protected void setIndices(short[] indices) { - // short is 2 bytes, therefore we multiply the number if - // vertices with 2. - ByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2); - ibb.order(ByteOrder.nativeOrder()); - mIndicesBuffer = ibb.asShortBuffer(); - mIndicesBuffer.put(indices); - mIndicesBuffer.position(0); - mNumOfIndices = indices.length; - } - - /** - * Set the texture coordinates. - * - * @param textureCoords - */ - protected void setTextureCoordinates(float[] textureCoords) { // New - // function. - // float is 4 bytes, therefore we multiply the number if - // vertices with 4. - ByteBuffer byteBuf = ByteBuffer - .allocateDirect(textureCoords.length * 4); - byteBuf.order(ByteOrder.nativeOrder()); - mTextureBuffer = byteBuf.asFloatBuffer(); - mTextureBuffer.put(textureCoords); - mTextureBuffer.position(0); - } - - /** - * Set one flat color on the mesh. - * - * @param red - * @param green - * @param blue - * @param alpha - */ - protected void setColor(float red, float green, float blue, float alpha) { - mRGBA[0] = red; - mRGBA[1] = green; - mRGBA[2] = blue; - mRGBA[3] = alpha; - } - - /** - * Set the colors - * - * @param colors - */ - protected void setColors(float[] colors) { - // float has 4 bytes. - ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length * 4); - cbb.order(ByteOrder.nativeOrder()); - mColorBuffer = cbb.asFloatBuffer(); - mColorBuffer.put(colors); - mColorBuffer.position(0); - } - - /** - * Set the bitmap to load into a texture. - * - * @param bitmap - */ - public void loadBitmap(Bitmap bitmap) { // New function. - this.mBitmap = bitmap; - mShouldLoadTexture = true; - } - - /** - * Loads the texture. - * - * @param gl - */ - private void loadGLTexture(GL10 gl) { // New function - // Generate one texture pointer... - int[] textures = new int[1]; - gl.glGenTextures(1, textures, 0); - mTextureId = textures[0]; - - // ...and bind it to our array - gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureId); - - // Create Nearest Filtered Texture - gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, - GL10.GL_LINEAR); - gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, - GL10.GL_LINEAR); - - // Different possible texture parameters, e.g. GL10.GL_CLAMP_TO_EDGE - gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, - GL10.GL_CLAMP_TO_EDGE); - gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, - GL10.GL_REPEAT); - - // Use the Android GLUtils to specify a two-dimensional texture image - // from our bitmap - GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, mBitmap, 0); - Log.d("gl-load-texture", Integer.toString(mTextureId) ); - } -} diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/src/libreoffice/android/ui/Page.java b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/src/libreoffice/android/ui/Page.java deleted file mode 100644 index 2f98d5b3d556..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/src/libreoffice/android/ui/Page.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright 2010 Per-Erik Bergman (per-erik.bergman@jayway.com) - * - * 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. - */ - -package libreoffice.android.ui; - -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import java.nio.ShortBuffer; - -import javax.microedition.khronos.opengles.GL10; - -import android.graphics.Bitmap; -import android.opengl.GLUtils; -import android.util.Log; - - -public class Page extends Mesh { - /** - * Create a plane with a default with and height of 1 unit. - */ - public Page() { - this(1, 1); - } - - /** - * Create a plane. - * - * @param width - * the width of the plane. - * @param height - * the height of the plane. - */ - public Page(float width, float height) { - // Mapping coordinates for the vertices - float textureCoordinates[] = { - 0.0f, 1.0f, // - 1.0f, 1.0f, // - 0.0f, 0.0f, // - 1.0f, 0.0f, // - }; - - short[] indices = new short[] { 0, 1, 2, 1, 3, 2 }; - - float[] vertices = new float[] { -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f, - -0.5f, 0.5f, 0.0f, 0.5f, 0.5f, 0.0f }; - - setIndices(indices); - setVertices(vertices); - setTextureCoordinates(textureCoordinates); - } - - public void zoomBy(float z){ - this.z += z; - if ( this.z > mMaxZoom) - this.z = mMaxZoom; - return; - } - - public void translateBy(float x, float y){ - this.x += x; - this.y += y; - if( Math.abs( this.x ) > 0.5f ) - this.x -= x; - if( Math.abs( this.y ) > 0.5f ) - this.y -= y; - return; - } - - float mMaxZoom = -0.1f; //positive z values are not visible - - - - - - -}
\ No newline at end of file diff --git a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/src/libreoffice/android/ui/TextturePageActivity.java b/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/src/libreoffice/android/ui/TextturePageActivity.java deleted file mode 100644 index eb90d47c44d3..000000000000 --- a/android/experimental/GSoC-2012-eclipse-workspace/TextturePage/src/libreoffice/android/ui/TextturePageActivity.java +++ /dev/null @@ -1,227 +0,0 @@ -package libreoffice.android.ui; - -import javax.microedition.khronos.egl.EGLConfig; -import javax.microedition.khronos.opengles.GL10; -import android.opengl.GLES20; - -import android.app.Activity; -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.opengl.GLSurfaceView; -import android.opengl.GLU; -import android.os.Bundle; -import android.util.Log; -import android.view.GestureDetector; -import android.view.MotionEvent; - -public class TextturePageActivity extends Activity { - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - Page page = new Page(1, 1); - PageView view = new PageView(this,page); - BitmapFactory.Options options = new BitmapFactory.Options(); - options.inScaled = false; - page.loadBitmap(BitmapFactory.decodeResource(getResources(), - R.drawable.ph_800_1280_dddddd,options) ); - view.setRenderer(new PageRenderer(page)); - view.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); - setContentView(view); - } -} - -class PageView extends GLSurfaceView { - Page mPage; - float zCumulative = 0;//can use this to limit zoom etc. - - - float dragX = -1.0f; - float dragY = -1.0f; - - float ptr0x = 0; - float ptr0y = 0; - float ptr1x = 0; - float ptr1y = 0; - - //The smaller this is the more sensitive the surface is to pinching - float zoomThreshold = 0.025f; - //The amout to zoom per event. - //Could calculate this dynamically but it seems smoother this way. - float zoomIncrement = 0.025f; - float dragIncrement = 0.01f; - - public PageView(Context context, Page mPage) { - super(context); - this.mPage = mPage; - } - - @Override - public boolean onTouchEvent(MotionEvent ev) { - Log.d("onTouch", "********"); - String str = new String(); - - Log.d(" Screen -> Object ","" ); - Log.d("ptr count", Integer.toString( ev.getPointerCount() )); - Log.d("action", Integer.toString( ev.getAction() ) ); - Log.d("action-masked", Integer.toString( ev.getActionMasked() ) ); - - int action = ev.getActionMasked(); - int numDigits = ev.getPointerCount(); - float z = 0; - - - if( action == ev.ACTION_MOVE && numDigits == 2){ - MotionEvent.PointerCoords ptr0Curr = new MotionEvent.PointerCoords(); - MotionEvent.PointerCoords ptr1Curr = new MotionEvent.PointerCoords(); - ev.getPointerCoords(0, ptr0Curr); - ev.getPointerCoords(1, ptr1Curr); - float currentDistance = (ptr1Curr.x - ptr0Curr.x)*(ptr1Curr.x - ptr0Curr.x) + - (ptr1Curr.y - ptr0Curr.y)*(ptr1Curr.y - ptr0Curr.y); - float prevDistance = ( ptr1x - ptr0x )*( ptr1x - ptr0x ) + - ( ptr1y - ptr0y)*( ptr1y - ptr0y ); - Log.d("distance", " Curr = " + Float.toString(currentDistance) + - " Prev = " + Float.toString(prevDistance) ); - if(currentDistance >= (1+zoomThreshold)*prevDistance){//zoom in - z = zoomIncrement; - zCumulative += z; - } - if(currentDistance <= (1-zoomThreshold)*prevDistance){//zoom in - z = -zoomIncrement; - zCumulative -= z; - } - - mPage.zoomBy( z ); - this.requestRender(); - - ptr0x = ptr0Curr.x; - ptr0y = ptr0Curr.y; - ptr1x = ptr1Curr.x; - ptr1y = ptr1Curr.y; - } - - if(action == ev.ACTION_POINTER_UP && numDigits == 1){ - // End two finger gesture - //end zoom - } - - if(action == ev.ACTION_UP ){ - // gesture finished - //reset state variables - float zCumulative = 0; - float ptr0x = 0; - float ptr0y = 0; - float ptr1x = 0; - float ptr1y = 0; - } - - if( action == ev.ACTION_DOWN && numDigits == 1){ - //one finger pressed - dragX = ev.getX(); - dragY = ev.getY(); - } - - if( action == ev.ACTION_MOVE && numDigits == 1){ - //get normal vector in direction of motion - //multiply by increment scalar - //translate by x , y - float currX = ev.getX(); - float currY = ev.getY(); - - if( dragX == -1.0f || dragY == -1.0f ){//a bit dodgey - dragX = currX; - dragY = currY; - }else{ - Log.d("drag", Float.toString( dragX ) + " " + Float.toString( dragY ) ); - Log.d("drag-diff", Float.toString( currX - dragX ) + " " + Float.toString( currY - dragY ) ); - - float mag = ( currX - dragX )*( currX - dragX ) + - ( currY - dragY )*( currY - dragY ); - float xComp = ( currX - dragX )/mag; - float yComp = -( currY - dragY )/mag; - - mPage.translateBy( 0.025f*xComp , 0.025f*yComp ); - this.requestRender(); - - dragX = currX; - dragY = currY; - } - - } - return true; - } - - //public float[] getObjectCoordinates -} - -class PageRenderer implements GLSurfaceView.Renderer { - private Page mPage; - - public PageRenderer(Page page) { - // Initialize our square. - mPage = page; - } - /* - * (non-Javadoc) - * - * @see - * android.opengl.GLSurfaceView.Renderer#onSurfaceCreated(javax.microedition - * .khronos.opengles.GL10, javax.microedition.khronos.egl.EGLConfig) - */ - public void onSurfaceCreated(GL10 gl, EGLConfig config) { - // Set the background color to black ( rgba ). - gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); - // Enable Smooth Shading, default not really needed. - gl.glShadeModel(GL10.GL_SMOOTH); - // Depth buffer setup. - gl.glClearDepthf(1.0f); - // Enables depth testing. - gl.glEnable(GL10.GL_DEPTH_TEST); - // The type of depth testing to do. - gl.glDepthFunc(GL10.GL_LEQUAL); - // Really nice perspective calculations. - gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); - } - - /* - * (non-Javadoc) - * - * @see - * android.opengl.GLSurfaceView.Renderer#onDrawFrame(javax.microedition. - * khronos.opengles.GL10) - */ - public void onDrawFrame(GL10 gl) { - // Clears the screen and depth buffer. - gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); - // Replace the current matrix with the identity matrix - gl.glLoadIdentity(); - // Translates 4 units into the screen. - //gl.glTranslatef(0, 0, -2); - // Draw our square. - mPage.draw(gl); - } - - /* - * (non-Javadoc) - * - * @see - * android.opengl.GLSurfaceView.Renderer#onSurfaceChanged(javax.microedition - * .khronos.opengles.GL10, int, int) - */ - public void onSurfaceChanged(GL10 gl, int width, int height) { - // Sets the current view port to the new size. - gl.glViewport(0, 0, width, height); - // Select the projection matrix - gl.glMatrixMode(GL10.GL_PROJECTION);//TODO Should really use ModelView... - // Reset the projection matrix - gl.glLoadIdentity(); - // Calculate the aspect ratio of the window - GLU.gluPerspective(gl, 45.0f, (float) width / (float) height, 0.1f, - 100.0f); - // Select the modelview matrix - gl.glMatrixMode(GL10.GL_MODELVIEW); - // Reset the modelview matrix - gl.glLoadIdentity(); - } - }
\ No newline at end of file |