diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-01-09 13:28:14 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-01-09 17:46:26 +0100 |
commit | 3d6b14ebd824a9397bd2d231dd231fe2eab5c0d7 (patch) | |
tree | 89e9fa3212b90f5c5b7069eb31a8ad93d6c8d469 | |
parent | c405c2fe7a442a720c869befeaafbeffc0aa3ae6 (diff) | |
download | mupdf-3d6b14ebd824a9397bd2d231dd231fe2eab5c0d7.tar.xz |
Remove platform/android/example directory.
The Android example viewer has been moved to its own git repository.
164 files changed, 0 insertions, 13003 deletions
diff --git a/platform/android/example/.gitignore b/platform/android/example/.gitignore deleted file mode 100644 index c474948d..00000000 --- a/platform/android/example/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/* -.DS_Store -/build -/captures -/gradle -/gradlew -/gradlew.bat diff --git a/platform/android/example/Readme.txt b/platform/android/example/Readme.txt deleted file mode 100644 index 7138ddcf..00000000 --- a/platform/android/example/Readme.txt +++ /dev/null @@ -1,21 +0,0 @@ -mupdf/platform/android/example - build instructions - -1. get the code and submodules - -2. make generate - -3. cd mupdf/platform/android/viewer - -3. build: ndk-build - -4. copy the resulting .so file: - - mkdir -p ../example/mupdf/libs/armeabi-v7a - rm -f ../example/mupdf/libs/armeabi-v7a/libmupdf_java32.so - cp ./libs/armeabi-v7a/libmupdf_java.so ../example/mupdf/libs/armeabi-v7a/ - -5. Open the example in Android Studio - -6. build and run - -If you modify C code, do steps 3, 4 and 6 as needed diff --git a/platform/android/example/app/.gitignore b/platform/android/example/app/.gitignore deleted file mode 100644 index 796b96d1..00000000 --- a/platform/android/example/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/platform/android/example/app/build.gradle b/platform/android/example/app/build.gradle deleted file mode 100644 index 3a1b25b3..00000000 --- a/platform/android/example/app/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 23 - buildToolsVersion "23.0.2" - - defaultConfig { - applicationId "com.artifex.mupdf.example" - minSdkVersion 16 - targetSdkVersion 16 - versionCode 1 - versionName "1.0" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.4.0' - compile project(':mupdf') -} diff --git a/platform/android/example/app/proguard-rules.pro b/platform/android/example/app/proguard-rules.pro deleted file mode 100644 index 68e56937..00000000 --- a/platform/android/example/app/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Applications/Android/sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# 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/platform/android/example/app/src/main/AndroidManifest.xml b/platform/android/example/app/src/main/AndroidManifest.xml deleted file mode 100644 index d88f9e01..00000000 --- a/platform/android/example/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.artifex.mupdf.example"> - - <uses-sdk - android:minSdkVersion="16" - android:targetSdkVersion="16" /> - - <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> - <uses-permission android:name="android.permission.INTERNET" /> - - <supports-screens - android:anyDensity="true" - android:largeScreens="true" - android:normalScreens="true" - android:smallScreens="true" /> - - <application - android:allowBackup="true" - android:icon="@mipmap/ic_launcher" - android:label="@string/app_name" - android:theme="@style/AppBaseTheme"> - - <activity android:name=".MainActivity"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - - <activity - android:name=".ChooseDocActivity" - android:configChanges="orientation|keyboardHidden|screenSize" - android:label="@string/app_name" - android:theme="@android:style/Theme.Light"> - <intent-filter> - <action android:name="android.intent.action.VIEW" /> - <category android:name="android.intent.category.DEFAULT" /> - </intent-filter> - </activity> - - <activity android:name=".DocViewActivity" android:configChanges="orientation|screenSize"> - </activity> - </application> - -</manifest> diff --git a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/ChooseDocActivity.java b/platform/android/example/app/src/main/java/com/artifex/mupdf/example/ChooseDocActivity.java deleted file mode 100644 index 4561bc4a..00000000 --- a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/ChooseDocActivity.java +++ /dev/null @@ -1,250 +0,0 @@ -package com.artifex.mupdf.example; - -import android.app.Activity; -import android.app.AlertDialog; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.res.Resources; -import android.net.Uri; -import android.os.Bundle; -import android.os.Environment; -import android.os.FileObserver; -import android.os.Handler; -import android.view.View; -import android.widget.AdapterView; -import android.widget.ListView; - -import java.io.File; -import java.io.FileFilter; -import java.util.Arrays; -import java.util.Comparator; - -public class ChooseDocActivity - extends Activity -{ - private ListView mListView; - private ChooseDocAdapter adapter; - static private File mDirectory; - static private File mStartingDirectory; - private File mParent; - private File[] mDirs; - private File[] mFiles; - private Handler mHandler; - private Runnable mUpdateFiles; - - @Override - protected void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - - setContentView(R.layout.choose_doc); - - mHandler = new Handler(); - - String storageState = Environment.getExternalStorageState(); - if (!Environment.MEDIA_MOUNTED.equals(storageState) && - !Environment.MEDIA_MOUNTED_READ_ONLY.equals(storageState)) - { - showMessage(getResources().getString(R.string.no_media_warning), - getResources().getString(R.string.no_media_hint), - getResources().getString(R.string.dismiss)); - - return; - } - - if (mDirectory == null) - { - mDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); - mStartingDirectory = mDirectory; // remember where we started - } - - // Create the list... - mListView = (ListView) findViewById(R.id.fileListView); - mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() - { - @Override - public void onItemClick(AdapterView<?> parent, View view, int position, long id) - { - onListItemClick(mListView, view, position, id); - } - }); - - // Create a list adapter... - adapter = new ChooseDocAdapter(getLayoutInflater()); - mListView.setAdapter(adapter); - - // ...that is updated dynamically when files are scanned - mUpdateFiles = new Runnable() - { - public void run() - { - Resources res = getResources(); - String appName = res.getString(R.string.app_name); - String version = res.getString(R.string.version); - String title = res.getString(R.string.picker_title_App_Ver_Dir); - setTitle(String.format(title, appName, version, mDirectory)); - - mParent = mDirectory.getParentFile(); - - mDirs = mDirectory.listFiles(new FileFilter() - { - - public boolean accept(File file) - { - return file.isDirectory(); - } - }); - if (mDirs == null) - mDirs = new File[0]; - - mFiles = mDirectory.listFiles(new FileFilter() - { - - public boolean accept(File file) - { - if (file.isDirectory()) - return false; - - String fname = file.getName().toLowerCase(); - - if (fname.endsWith(".pdf")) - return true; - if (fname.endsWith(".xps")) - return true; - if (fname.endsWith(".cbz")) - return true; - if (fname.endsWith(".epub")) - return true; - if (fname.endsWith(".png")) - return true; - if (fname.endsWith(".jpe")) - return true; - if (fname.endsWith(".jpeg")) - return true; - if (fname.endsWith(".jpg")) - return true; - if (fname.endsWith(".jfif")) - return true; - if (fname.endsWith(".jfif-tbnl")) - return true; - if (fname.endsWith(".tif")) - return true; - if (fname.endsWith(".tiff")) - return true; - - return false; - } - }); - if (mFiles == null) - mFiles = new File[0]; - - Arrays.sort(mFiles, new Comparator<File>() - { - public int compare(File arg0, File arg1) - { - return arg0.getName().compareToIgnoreCase(arg1.getName()); - } - }); - - Arrays.sort(mDirs, new Comparator<File>() - { - public int compare(File arg0, File arg1) - { - return arg0.getName().compareToIgnoreCase(arg1.getName()); - } - }); - - adapter.clear(); - - // add a button for going up one level - if (mParent != null) - if (!mDirectory.getAbsolutePath().equals(mStartingDirectory.getAbsolutePath())) - adapter.add(new ChooseDocItem(ChooseDocItem.Type.PARENT, getString(R.string.parent_directory), mParent.getAbsolutePath())); - - for (File f : mDirs) - adapter.add(new ChooseDocItem(ChooseDocItem.Type.DIR, f.getName(), f.getAbsolutePath())); - for (File f : mFiles) - adapter.add(new ChooseDocItem(ChooseDocItem.Type.DOC, f.getName(), f.getAbsolutePath())); - } - }; - - // Start initial file scan... - mHandler.post(mUpdateFiles); - - // ...and observe the directory and scan files upon changes. - FileObserver observer = new FileObserver(mDirectory.getPath(), FileObserver.CREATE | FileObserver.DELETE) - { - public void onEvent(int event, String path) - { - mHandler.post(mUpdateFiles); - } - }; - observer.startWatching(); - } - - private void onListItemClick(ListView l, View v, int position, long id) - { - ChooseDocItem item = (ChooseDocItem) v.getTag(); - File f = new File(item.path); - if (item.type == ChooseDocItem.Type.PARENT || item.type == ChooseDocItem.Type.DIR) - { - mDirectory = f; - mHandler.post(mUpdateFiles); - return; - } - - // start a viewing activity - Uri uri = Uri.parse(f.getAbsolutePath()); - Intent intent; - intent = new Intent(this, DocViewActivity.class); - intent.setAction(Intent.ACTION_VIEW); - intent.setData(uri); - startActivity(intent); - } - - @Override - protected void onPause() - { - super.onPause(); - } - - @Override - protected void onResume() - { - super.onResume(); - - // do another file scan to pick up changes to files since we were away - mHandler.post(mUpdateFiles); - } - - // this hides the activity - @Override - public void onBackPressed() - { - moveTaskToBack(true); - } - - private void showMessage(final String title, final String body, final String okLabel) - { - final Activity activity = this; - runOnUiThread(new Runnable() - { - @Override - public void run() - { - new AlertDialog.Builder(activity) - .setTitle(title) - .setMessage(body) - .setCancelable(false) - .setPositiveButton(okLabel, new DialogInterface.OnClickListener() - { - @Override - public void onClick(DialogInterface dialog, int which) - { - dialog.dismiss(); - } - }).create().show(); - } - }); - } -} diff --git a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/ChooseDocAdapter.java b/platform/android/example/app/src/main/java/com/artifex/mupdf/example/ChooseDocAdapter.java deleted file mode 100644 index 98d6b3ff..00000000 --- a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/ChooseDocAdapter.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.artifex.mupdf.example; - -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.BaseAdapter; -import android.widget.ImageView; -import android.widget.TextView; - -import java.util.LinkedList; - -public class ChooseDocAdapter extends BaseAdapter -{ - private final LinkedList<ChooseDocItem> mItems; - private final LayoutInflater mInflater; - - public ChooseDocAdapter(LayoutInflater inflater) - { - mInflater = inflater; - mItems = new LinkedList<ChooseDocItem>(); - } - - public void clear() - { - mItems.clear(); - } - - public void add(ChooseDocItem item) - { - mItems.add(item); - notifyDataSetChanged(); - } - - public int getCount() - { - return mItems.size(); - } - - public Object getItem(int i) - { - return null; - } - - public long getItemId(int arg0) - { - return 0; - } - - private int iconForType(ChooseDocItem.Type type, String docName) - { - switch (type) - { - case PARENT: - return R.drawable.ic_explorer_up; - - case DIR: - return R.drawable.ic_explorer_fldr; - - case DOC: - return R.drawable.ic_explorer_any; - - default: - return 0; - } - } - - public View getView(int position, View convertView, ViewGroup parent) - { - View v; - if (convertView == null) - { - v = mInflater.inflate(R.layout.picker_entry, null); - } - else - { - v = convertView; - } - ChooseDocItem item = mItems.get(position); - ((TextView) v.findViewById(R.id.name)).setText(item.name); - ((ImageView) v.findViewById(R.id.icon)).setImageResource(iconForType(item.type, item.name)); - - v.setTag(item); - - return v; - } - -} diff --git a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/ChooseDocItem.java b/platform/android/example/app/src/main/java/com/artifex/mupdf/example/ChooseDocItem.java deleted file mode 100644 index df49e5c2..00000000 --- a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/ChooseDocItem.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.artifex.mupdf.example; - -public class ChooseDocItem -{ - public enum Type - { - PARENT, DIR, DOC - } - - final public Type type; - final public String name; - final public String path; - - public ChooseDocItem(Type t, String n, String p) - { - type = t; - name = n; - path = p; - } -} diff --git a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/DocViewActivity.java b/platform/android/example/app/src/main/java/com/artifex/mupdf/example/DocViewActivity.java deleted file mode 100755 index 48d73305..00000000 --- a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/DocViewActivity.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.artifex.mupdf.example; - -import android.app.Activity; -import android.net.Uri; -import android.os.Bundle; - -import com.artifex.mupdf.android.DocActivityView; - -public class DocViewActivity extends Activity -{ - private DocActivityView mDocActivityView; - - @Override - protected void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - - // get the file path - Uri uri = getIntent().getData(); - final String path = Uri.decode(uri.getEncodedPath()); - - // set up UI - setContentView(R.layout.activity_doc_view); - mDocActivityView = (DocActivityView) findViewById(R.id.doc_view); - mDocActivityView.showUI(true); // set to false for no built-in UI - - // set a listener for when it's done - mDocActivityView.setOnDoneListener(new DocActivityView.OnDoneListener() - { - @Override - public void done() - { - finish(); - } - }); - - // Go! - mDocActivityView.start(path); - - } - - @Override - public void finish() - { - // stop the view - mDocActivityView.stop(); - - super.finish(); - } -} diff --git a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/MainActivity.java b/platform/android/example/app/src/main/java/com/artifex/mupdf/example/MainActivity.java deleted file mode 100644 index b7aa39ca..00000000 --- a/platform/android/example/app/src/main/java/com/artifex/mupdf/example/MainActivity.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.artifex.mupdf.example; - -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; - -public class MainActivity extends Activity -{ - @Override - protected void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - - // just show the document chooser activity - Intent intent = new Intent(this, ChooseDocActivity.class); - startActivity(intent); - finish(); - } - -} diff --git a/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_any.png Binary files differdeleted file mode 100755 index 1ec7c5f3..00000000 --- a/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_any.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_fldr.png Binary files differdeleted file mode 100755 index 8156137e..00000000 --- a/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_fldr.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_up.png Binary files differdeleted file mode 100755 index 7adeab26..00000000 --- a/platform/android/example/app/src/main/res/drawable-hdpi/ic_explorer_up.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_any.png Binary files differdeleted file mode 100755 index ee4ed481..00000000 --- a/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_any.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_fldr.png Binary files differdeleted file mode 100755 index 6a1c9862..00000000 --- a/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_fldr.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_up.png Binary files differdeleted file mode 100755 index 48b7ea04..00000000 --- a/platform/android/example/app/src/main/res/drawable-mdpi/ic_explorer_up.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_any.png Binary files differdeleted file mode 100755 index 50e224a4..00000000 --- a/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_any.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_fldr.png Binary files differdeleted file mode 100755 index 0df4d0c4..00000000 --- a/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_fldr.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_up.png Binary files differdeleted file mode 100755 index f089e8d7..00000000 --- a/platform/android/example/app/src/main/res/drawable-xhdpi/ic_explorer_up.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_any.png Binary files differdeleted file mode 100755 index 9aea910c..00000000 --- a/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_any.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_fldr.png Binary files differdeleted file mode 100755 index f0eefc36..00000000 --- a/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_fldr.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_up.png Binary files differdeleted file mode 100755 index af79349e..00000000 --- a/platform/android/example/app/src/main/res/drawable-xxhdpi/ic_explorer_up.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_any.png b/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_any.png Binary files differdeleted file mode 100755 index 6a653115..00000000 --- a/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_any.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_fldr.png b/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_fldr.png Binary files differdeleted file mode 100755 index e06c1b25..00000000 --- a/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_fldr.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_up.png b/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_up.png Binary files differdeleted file mode 100755 index 243c3c65..00000000 --- a/platform/android/example/app/src/main/res/drawable-xxxhdpi/ic_explorer_up.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/layout/activity_doc_view.xml b/platform/android/example/app/src/main/res/layout/activity_doc_view.xml deleted file mode 100755 index 00065cf6..00000000 --- a/platform/android/example/app/src/main/res/layout/activity_doc_view.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"> - - <com.artifex.mupdf.android.DocActivityView - android:id="@+id/doc_view" - android:layout_width="match_parent" - android:layout_height="match_parent"> - </com.artifex.mupdf.android.DocActivityView> - -</LinearLayout> diff --git a/platform/android/example/app/src/main/res/layout/activity_main.xml b/platform/android/example/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 3d1efc88..00000000 --- a/platform/android/example/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent"> -</RelativeLayout> diff --git a/platform/android/example/app/src/main/res/layout/choose_doc.xml b/platform/android/example/app/src/main/res/layout/choose_doc.xml deleted file mode 100644 index bbccc496..00000000 --- a/platform/android/example/app/src/main/res/layout/choose_doc.xml +++ /dev/null @@ -1,30 +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"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_gravity="center_horizontal" - android:id="@+id/device_files_wrapper"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_gravity="center_horizontal" - android:id="@+id/file_list_wrpper"> - - <ListView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:id="@+id/fileListView" - android:layout_gravity="center_horizontal" - android:choiceMode="singleChoice" - android:background="#ffffff"/> - - </LinearLayout> - </LinearLayout> -</LinearLayout> diff --git a/platform/android/example/app/src/main/res/layout/picker_entry.xml b/platform/android/example/app/src/main/res/layout/picker_entry.xml deleted file mode 100644 index 5dead12f..00000000 --- a/platform/android/example/app/src/main/res/layout/picker_entry.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingLeft="4dp" > - - <ImageView - android:id="@+id/icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_alignParentLeft="true" /> - - <TextView - android:id="@+id/name" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_toRightOf="@+id/icon" - android:paddingBottom="4dp" - android:paddingLeft="10dp" - android:paddingRight="4dp" - android:paddingTop="4dp" - android:textAppearance="?android:attr/textAppearanceMedium" /> - -</RelativeLayout> diff --git a/platform/android/example/app/src/main/res/mipmap-hdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differdeleted file mode 100644 index cde69bcc..00000000 --- a/platform/android/example/app/src/main/res/mipmap-hdpi/ic_launcher.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/mipmap-mdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differdeleted file mode 100644 index c133a0cb..00000000 --- a/platform/android/example/app/src/main/res/mipmap-mdpi/ic_launcher.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differdeleted file mode 100644 index bfa42f0e..00000000 --- a/platform/android/example/app/src/main/res/mipmap-xhdpi/ic_launcher.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differdeleted file mode 100644 index 324e72cd..00000000 --- a/platform/android/example/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/platform/android/example/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differdeleted file mode 100644 index aee44e13..00000000 --- a/platform/android/example/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +++ /dev/null diff --git a/platform/android/example/app/src/main/res/values/colors.xml b/platform/android/example/app/src/main/res/values/colors.xml deleted file mode 100644 index 47c6eb22..00000000 --- a/platform/android/example/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <color name="white">#FFFFFFFF</color> -</resources> diff --git a/platform/android/example/app/src/main/res/values/strings.xml b/platform/android/example/app/src/main/res/values/strings.xml deleted file mode 100644 index 3d985824..00000000 --- a/platform/android/example/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ -<resources> - <string name="app_name">MuPDF Example</string> - <string name="ok">OK</string> - <string name="version">1.0</string> - <string name="no_media_warning">Storage media not present</string> - <string name="no_media_hint">Sharing the storage media with a PC can make it inaccessible</string> - <string name="dismiss">Dismiss</string> - <string name="picker_title_App_Ver_Dir">%1$s %2$s: %3$s</string> - <string name="parent_directory">[Up one level]</string> -</resources> diff --git a/platform/android/example/app/src/main/res/values/styles.xml b/platform/android/example/app/src/main/res/values/styles.xml deleted file mode 100644 index 97e54a45..00000000 --- a/platform/android/example/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <!-- Base application theme. --> - <style name="AppBaseTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen"> - </style> -</resources> diff --git a/platform/android/example/build.gradle b/platform/android/example/build.gradle deleted file mode 100644 index a1dae01d..00000000 --- a/platform/android/example/build.gradle +++ /dev/null @@ -1,23 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.2.2' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - jcenter() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/platform/android/example/mupdf/.gitignore b/platform/android/example/mupdf/.gitignore deleted file mode 100644 index 796b96d1..00000000 --- a/platform/android/example/mupdf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/platform/android/example/mupdf/build.gradle b/platform/android/example/mupdf/build.gradle deleted file mode 100644 index 07455d1e..00000000 --- a/platform/android/example/mupdf/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -apply plugin: 'com.android.library' - -android { - compileSdkVersion 23 - buildToolsVersion "23.0.2" - - defaultConfig { - minSdkVersion 16 - targetSdkVersion 16 - versionCode 1 - versionName "1.0" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - - sourceSets { - main { - java { - // we're getting java sources from two places - srcDirs = ["src/main/java", "../../../java/src"] - } - jni.srcDirs = [] // This prevents the auto generation of Android.mk - jniLibs.srcDir 'libs' // where to find the .so file(s) - } - } - -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.4.0' -} diff --git a/platform/android/example/mupdf/proguard-rules.pro b/platform/android/example/mupdf/proguard-rules.pro deleted file mode 100644 index 68e56937..00000000 --- a/platform/android/example/mupdf/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Applications/Android/sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# 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/platform/android/example/mupdf/src/main/AndroidManifest.xml b/platform/android/example/mupdf/src/main/AndroidManifest.xml deleted file mode 100644 index e38f7206..00000000 --- a/platform/android/example/mupdf/src/main/AndroidManifest.xml +++ /dev/null @@ -1,15 +0,0 @@ -<manifest package="com.artifex.mupdf.fitz" xmlns:android="http://schemas.android.com/apk/res/android"> - <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> - <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> - <uses-permission android:name="android.permission.INTERNET" /> - <application android:allowBackup="true" - android:label="@string/app_name" - android:supportsRtl="true" - > - - <activity android:name="com.artifex.mupdf.android.ProofActivity" - android:configChanges="orientation|screenSize"> - </activity> - - </application> -</manifest> diff --git a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/CoatedFOGRA39.icc b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/CoatedFOGRA39.icc Binary files differdeleted file mode 100755 index 61cb86a5..00000000 --- a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/CoatedFOGRA39.icc +++ /dev/null diff --git a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/EuroscaleCoated.icc b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/EuroscaleCoated.icc Binary files differdeleted file mode 100755 index 78e4bb3c..00000000 --- a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/EuroscaleCoated.icc +++ /dev/null diff --git a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/JapanWebCoated.icc b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/JapanWebCoated.icc Binary files differdeleted file mode 100755 index 004b8b9d..00000000 --- a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/JapanWebCoated.icc +++ /dev/null diff --git a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/USWebCoatedSWOP.icc b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/USWebCoatedSWOP.icc Binary files differdeleted file mode 100755 index 078a6443..00000000 --- a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/USWebCoatedSWOP.icc +++ /dev/null diff --git a/platform/android/example/mupdf/src/main/assets/profiles/RGB/AdobeRGB1998.icc b/platform/android/example/mupdf/src/main/assets/profiles/RGB/AdobeRGB1998.icc Binary files differdeleted file mode 100755 index a79f576b..00000000 --- a/platform/android/example/mupdf/src/main/assets/profiles/RGB/AdobeRGB1998.icc +++ /dev/null diff --git a/platform/android/example/mupdf/src/main/assets/profiles/RGB/CIERGB.icc b/platform/android/example/mupdf/src/main/assets/profiles/RGB/CIERGB.icc Binary files differdeleted file mode 100755 index 1d99a710..00000000 --- a/platform/android/example/mupdf/src/main/assets/profiles/RGB/CIERGB.icc +++ /dev/null diff --git a/platform/android/example/mupdf/src/main/assets/profiles/RGB/WideGamutRGB.icc b/platform/android/example/mupdf/src/main/assets/profiles/RGB/WideGamutRGB.icc Binary files differdeleted file mode 100755 index de37f3cd..00000000 --- a/platform/android/example/mupdf/src/main/assets/profiles/RGB/WideGamutRGB.icc +++ /dev/null diff --git a/platform/android/example/mupdf/src/main/assets/profiles/RGB/sRGB Color Space Profile.icm b/platform/android/example/mupdf/src/main/assets/profiles/RGB/sRGB Color Space Profile.icm Binary files differdeleted file mode 100755 index 7f9d18d0..00000000 --- a/platform/android/example/mupdf/src/main/assets/profiles/RGB/sRGB Color Space Profile.icm +++ /dev/null diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ColorDialog.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ColorDialog.java deleted file mode 100644 index 5da38c2e..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ColorDialog.java +++ /dev/null @@ -1,204 +0,0 @@ -package com.artifex.mupdf.android; - - -import android.content.Context; -import android.graphics.Color; -import android.graphics.Point; -import android.util.DisplayMetrics; -import android.view.Gravity; -import android.view.LayoutInflater; -import android.view.MotionEvent; -import android.view.View; -import android.view.ViewGroup; -import android.view.WindowManager; -import android.widget.Button; -import android.widget.LinearLayout; -import android.widget.PopupWindow; -import android.widget.TextView; - -import com.artifex.mupdf.fitz.R; - -public class ColorDialog implements View.OnTouchListener, PopupWindow.OnDismissListener { - - // these are set in the constructor. - private final Context mContext; - private final View mAnchor; - private final ColorChangedListener mListener; - private final int mDialogType; - private boolean mAutoDismiss = false; - - // only one ColorDialog at a time please. - private static ColorDialog singleton = null; - - // a popup window for us. - private PopupWindow popupWindow; - - // two different variants of this dilog - public static final int FG_COLORS = 1; - public static final int BG_COLORS = 2; - - // allowable foreground colors. These come from UE2FileViewerApp - private final String mFgColors[] = {"#000000", "#FFFFFF", "#D8D8D8", "#808080", "#EEECE1", "#1F497D", - "#0070C0", "#C0504D", "#9BBB59", "#8064A2", "#4BACC6", "#F79646", "#FF0000", - "#FFFF00", "#DBE5F1", "#F2DCDB", "#EBF1DD", "#00B050"}; - - // constructor - public ColorDialog(int dialogType, Context context, View anchor, ColorChangedListener listener, boolean autoDismiss) - { - mContext = context; - mAnchor = anchor; - mListener = listener; - mDialogType = dialogType; - mAutoDismiss = autoDismiss; - } - - // whether or not to show the title - private boolean mShowTitle = true; - public void setShowTitle(boolean val) {mShowTitle = val;} - - // time to show the dialog - public void show() - { - // remember us - singleton = this; - - // get the layout - View popupView = LayoutInflater.from(mContext).inflate(R.layout.colors, null); - - // set the title - TextView tv = (TextView)popupView.findViewById(R.id.color_dialog_title); - if (mShowTitle) { - if (mDialogType == BG_COLORS) - tv.setText(mContext.getString(R.string.background)); - else - tv.setText(mContext.getString(R.string.color)); - } - else { - tv.setVisibility(View.GONE); - } - - // choose the list of colors to use - String colors[] = mFgColors; - - // get the three rows of buttons from the layout - LinearLayout rows[] = new LinearLayout[3]; - rows[0] = (LinearLayout)popupView.findViewById(R.id.fontcolors_row1); - rows[1] = (LinearLayout)popupView.findViewById(R.id.fontcolors_row2); - rows[2] = (LinearLayout)popupView.findViewById(R.id.fontcolors_row3); - - // Set up a button for each color. - // Hide buttons for which there are no colors. - int icolor = 0; - int irow; - for (irow=0; irow<rows.length; irow++) { - LinearLayout row = rows[irow]; - int count = row.getChildCount(); - for (int i=0; i<count; i++) { - Button button = (Button)row.getChildAt(i); - if (icolor+1 <= colors.length) { - button.setVisibility(View.VISIBLE); - button.setBackgroundColor(Color.parseColor(colors[icolor])); - button.setTag(colors[icolor]); - button.setOnClickListener(new Button.OnClickListener() { - @Override - public void onClick(View v) - { - mListener.onColorChanged((String)v.getTag()); - if (mAutoDismiss) - dismiss(); - } - }); - } - else { - button.setVisibility(View.GONE); - } - icolor++; - } - } - - // Set up the transaparent button if we're doing background colors. - Button tpb = (Button) popupView.findViewById(R.id.transparent_color_button); - if (mDialogType==ColorDialog.BG_COLORS) { - tpb.setVisibility(View.VISIBLE); - tpb.setOnClickListener(new Button.OnClickListener() { - @Override - public void onClick(View v) - { - mListener.onColorChanged((String)v.getTag()); - } - }); - } - else - tpb.setVisibility(View.GONE); - - // get screen width - WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); - DisplayMetrics metrics = new DisplayMetrics(); - wm.getDefaultDisplay().getMetrics(metrics); - int screenWidth = metrics.widthPixels; - - // put everything in a popup window and show it. - // by default that's the upper right corner, but the dialog is draggable. - popupWindow = new PopupWindow(popupView, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); - popupWindow.setFocusable(true); - popupView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); - popupWindow.showAtLocation(mAnchor, Gravity.TOP|Gravity.LEFT, screenWidth-popupView.getMeasuredWidth()-15, 100); - popupWindow.setClippingEnabled(false); - // this enables dragging - popupView.setOnTouchListener(this); - // this allows us to know when the popup is being dismissed - popupWindow.setOnDismissListener(this); - } - - // internal function to dismiss the popup. - public void dismiss() - { - popupWindow.dismiss(); - singleton = null; - } - - // static function to dismiss the popup. - static public void finish() - { - if (singleton!=null) - singleton.dismiss(); - } - - // this function is called when the user taps outside the popup. - // we make sure to dismiss it properly. - @Override - public void onDismiss() { - dismiss(); - } - - // we're an onTouch listener for the popup window. - // we use that to allow for dragging the popup around. - - private int start[]; - private final Point down = new Point(); - - @Override - public boolean onTouch(View v, MotionEvent event) { - switch (event.getAction()) { - case MotionEvent.ACTION_DOWN: - - start = new int[2]; - popupWindow.getContentView().getLocationOnScreen(start); - down.set((int) event.getRawX(), (int) event.getRawY()); - break; - - case MotionEvent.ACTION_MOVE: - - int dx = down.x - (int)event.getRawX(); - int dy = down.y - (int)event.getRawY(); - popupWindow.update(start[0]-dx, start[1]-dy,-1, -1, true); - break; - } - return true; - } - - public interface ColorChangedListener { - void onColorChanged(String color); - } - -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocActivityView.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocActivityView.java deleted file mode 100644 index 98d9499b..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocActivityView.java +++ /dev/null @@ -1,1022 +0,0 @@ -package com.artifex.mupdf.android; - -import android.app.Activity; -import android.app.Dialog; -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; -import android.graphics.Color; -import android.graphics.PorterDuff; -import android.net.Uri; -import android.util.AttributeSet; -import android.util.Log; -import android.view.KeyEvent; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewTreeObserver; -import android.view.Window; -import android.view.WindowManager; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.InputMethodManager; -import android.widget.ArrayAdapter; -import android.widget.EditText; -import android.widget.FrameLayout; -import android.widget.ImageButton; -import android.widget.LinearLayout; -import android.widget.RelativeLayout; -import android.widget.Spinner; -import android.widget.TabHost; -import android.widget.TextView; -import android.widget.Toast; - -import com.artifex.mupdf.fitz.Document; -import com.artifex.mupdf.fitz.Link; -import com.artifex.mupdf.fitz.Outline; -import com.artifex.mupdf.fitz.PDFDocument; -import com.artifex.mupdf.fitz.PDFObject; -import com.artifex.mupdf.fitz.R; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.UUID; - -public class DocActivityView extends FrameLayout implements TabHost.OnTabChangeListener, View.OnClickListener, DocView.SelectionChangeListener -{ - private DocView mDocView; - private DocReflowView mDocReflowView; - private DocListPagesView mDocPagesView; - - private boolean mShowUI = true; - - // tab tags - private String mTagHidden; - private String mTagFile; - private String mTagAnnotate; - private String mTagPages; - - private ImageButton mReflowButton; - private ImageButton mFirstPageButton; - private ImageButton mLastPageButton; - - private ImageButton mSearchButton; - private EditText mSearchText; - private ImageButton mSearchNextButton; - private ImageButton mSearchPreviousButton; - private ImageButton mBackButton; - - private ImageButton mSaveButton; - private ImageButton mSaveAsButton; - private ImageButton mPrintButton; - private ImageButton mShareButton; - private ImageButton mOpenInButton; - - private ImageButton mToggleAnnotButton; - private ImageButton mHighlightButton; - private ImageButton mDeleteButton; - - private ImageButton mNoteButton; - private ImageButton mDrawButton; - private ImageButton mLineColorButton; - private ImageButton mLineThicknessButton; - - private ImageButton mProofButton; - - private String mEmbeddedProfile = null; - - public DocActivityView(Context context) - { - super(context); - } - - public DocActivityView(Context context, AttributeSet attrs) - { - super(context, attrs); - } - - public DocActivityView(Context context, AttributeSet attrs, int defStyle) - { - super(context, attrs, defStyle); - } - - protected boolean usePagesView() - { - return true; - } - - protected void setupTabs() - { - TabHost tabHost = (TabHost) findViewById(R.id.tabhost); - tabHost.setup(); - - // get the tab tags. - mTagHidden = getResources().getString(R.string.hidden_tab); - mTagFile = getResources().getString(R.string.file_tab); - mTagAnnotate = getResources().getString(R.string.annotate_tab); - mTagPages = getResources().getString(R.string.pages_tab); - - // first tab is and stays hidden. - // when the search tab is selected, we programmatically "select" this hidden tab - // which results in NO tabs appearing selected in this tab host. - setupTab(tabHost, mTagHidden, R.id.hiddenTab, R.layout.tab); - tabHost.getTabWidget().getChildTabViewAt(0).setVisibility(View.GONE); - - // these tabs are shown. - setupTab(tabHost, mTagFile, R.id.fileTab, R.layout.tab_left); - setupTab(tabHost, mTagAnnotate, R.id.annotateTab, R.layout.tab); - setupTab(tabHost, mTagPages, R.id.pagesTab, R.layout.tab_right); - - // start by showing the edit tab - tabHost.setCurrentTabByTag(mTagFile); - - tabHost.setOnTabChangedListener(this); - } - - protected void setupTab(TabHost tabHost, String text, int viewId, int tabId) - { - View tabview = LayoutInflater.from(tabHost.getContext()).inflate(tabId, null); - TextView tv = (TextView) tabview.findViewById(R.id.tabText); - tv.setText(text); - - TabHost.TabSpec tab = tabHost.newTabSpec(text); - tab.setIndicator(tabview); - tab.setContent(viewId); - tabHost.addTab(tab); - } - - @Override - public void onTabChanged(String tabId) - { - // hide the search tab - findViewById(R.id.searchTab).setVisibility(View.GONE); - - // show search is not selected - showSearchSelected(false); - - // show/hide the pages view - handlePagesTab(tabId); - - hideKeyboard(); - } - - private void showSearchSelected(boolean selected) - { - // set the view - mSearchButton.setSelected(selected); - - // colorize - if (selected) - mSearchButton.setColorFilter(0xff000000, PorterDuff.Mode.SRC_IN); - else - mSearchButton.setColorFilter(0xffffffff, PorterDuff.Mode.SRC_IN); - } - - protected void handlePagesTab(String tabId) - { - if (tabId.equals(mTagPages)) - showPages(); - else - { - hideReflow(); - hidePages(); - } - } - - protected void showPages() - { - LinearLayout pages = (LinearLayout) findViewById(R.id.pages_container); - if (null == pages) - return; - - if (pages.getVisibility() == View.VISIBLE) - return; - - pages.setVisibility(View.VISIBLE); - ViewTreeObserver observer = mDocView.getViewTreeObserver(); - observer.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() - { - @Override - public void onGlobalLayout() - { - mDocView.getViewTreeObserver().removeOnGlobalLayoutListener(this); - mDocView.onShowPages(); - } - }); - } - - protected void hidePages() - { - LinearLayout pages = (LinearLayout) findViewById(R.id.pages_container); - if (null == pages) - return; - - if (pages.getVisibility() == View.GONE) - return; - - pages.setVisibility(View.GONE); - ViewTreeObserver observer = mDocView.getViewTreeObserver(); - observer.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() - { - @Override - public void onGlobalLayout() - { - mDocView.getViewTreeObserver().removeOnGlobalLayoutListener(this); - mDocView.onHidePages(); - } - }); - } - - public boolean showKeyboard() - { - // show keyboard - InputMethodManager im = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); - im.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY); - - return true; - } - - public void hideKeyboard() - { - // hide the keyboard - InputMethodManager im = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); - im.hideSoftInputFromWindow(mDocView.getWindowToken(), 0); - } - - private boolean started = false; - public void start(final String path) - { - started = false; - - ((Activity)getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN); - ((Activity)getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); - - // inflate the UI - final LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); - final LinearLayout view = (LinearLayout) inflater.inflate(R.layout.doc_view, null); - - final ViewTreeObserver vto = getViewTreeObserver(); - vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() - { - @Override - public void onGlobalLayout() - { - if (!started) - { - findViewById(R.id.tabhost).setVisibility(mShowUI?View.VISIBLE:View.GONE); - findViewById(R.id.footer).setVisibility(mShowUI?View.VISIBLE:View.GONE); - afterFirstLayoutComplete(path); - - started = true; - } - } - }); - - addView(view); - } - - public void afterFirstLayoutComplete(final String path) - { - // main view - mDocView = (DocView) findViewById(R.id.doc_view_inner); - mDocReflowView = (DocReflowView) findViewById(R.id.doc_reflow_view); - - // page list - if (usePagesView()) - { - mDocPagesView = new DocListPagesView(getContext()); - mDocPagesView.setSelectionListener(new DocListPagesView.SelectionListener() - { - @Override - public void onPageSelected(int pageNumber) - { - goToPage(pageNumber); - } - }); - - LinearLayout layout2 = (LinearLayout) findViewById(R.id.pages_container); - layout2.addView(mDocPagesView); - } - - // tabs - setupTabs(); - - // selection handles - View v = findViewById(R.id.doc_wrapper); - RelativeLayout layout = (RelativeLayout) v; - mDocView.setupHandles(layout); - - // listen for layout changes on the main doc view, and - // copy the "most visible" value to the page list. - ViewTreeObserver observer2 = mDocView.getViewTreeObserver(); - observer2.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() - { - @Override - public void onGlobalLayout() - { - if (usePagesView()) - { - if (mDocView.getVisibility() == View.VISIBLE) - { - int mvp = mDocView.getMostVisiblePage(); - mDocPagesView.setMostVisiblePage(mvp); - } - } - } - }); - - // connect buttons to functions - - mBackButton = (ImageButton)findViewById(R.id.back_button); - mBackButton.setOnClickListener(this); - - mReflowButton = (ImageButton)findViewById(R.id.reflow_button); - mReflowButton.setOnClickListener(this); - - mFirstPageButton = (ImageButton)findViewById(R.id.first_page_button); - mFirstPageButton.setOnClickListener(this); - - mLastPageButton = (ImageButton)findViewById(R.id.last_page_button); - mLastPageButton.setOnClickListener(this); - - mSearchButton = (ImageButton)findViewById(R.id.search_button); - mSearchButton.setOnClickListener(this); - showSearchSelected(false); - mSearchText = (EditText) findViewById(R.id.search_text_input); - mSearchText.setOnClickListener(this); - - mSaveButton = (ImageButton)findViewById(R.id.save_button); - mSaveButton.setOnClickListener(this); - - mSaveAsButton = (ImageButton)findViewById(R.id.save_as_button); - mSaveAsButton.setOnClickListener(this); - - mPrintButton = (ImageButton)findViewById(R.id.print_button); - mPrintButton.setOnClickListener(this); - - mShareButton = (ImageButton)findViewById(R.id.share_button); - mShareButton.setOnClickListener(this); - - mOpenInButton = (ImageButton)findViewById(R.id.open_in_button); - mOpenInButton.setOnClickListener(this); - - mProofButton = (ImageButton)findViewById(R.id.proof_button); - mProofButton.setOnClickListener(this); - - // this listener will - mSearchText.setOnEditorActionListener(new TextView.OnEditorActionListener() - { - @Override - public boolean onEditorAction(TextView v, int actionId, KeyEvent event) - { - if (actionId == EditorInfo.IME_ACTION_NEXT) - { - onSearchNextButton(); - return true; - } - return false; - } - }); - - mSearchNextButton = (ImageButton)findViewById(R.id.search_next_button); - mSearchNextButton.setOnClickListener(this); - - mSearchPreviousButton = (ImageButton)findViewById(R.id.search_previous_button); - mSearchPreviousButton.setOnClickListener(this); - - mToggleAnnotButton = (ImageButton)findViewById(R.id.show_annot_button); - mToggleAnnotButton.setOnClickListener(this); - - mHighlightButton = (ImageButton)findViewById(R.id.highlight_button); - mHighlightButton.setOnClickListener(this); - - mNoteButton = (ImageButton)findViewById(R.id.note_button); - mNoteButton.setOnClickListener(this); - - mDrawButton = (ImageButton)findViewById(R.id.draw_button); - mDrawButton.setOnClickListener(this); - - mLineColorButton = (ImageButton)findViewById(R.id.line_color_button); - mLineColorButton.setOnClickListener(this); - - mLineThicknessButton = (ImageButton)findViewById(R.id.line_thickness_button); - mLineThicknessButton.setOnClickListener(this); - - mDeleteButton = (ImageButton)findViewById(R.id.delete_button); - mDeleteButton.setOnClickListener(this); - - mDoc = new Document(path); - - if (mDoc.needsPassword()) - { - askForPassword(); - } - else - { - afterPassword(); - } - } - - private Document mDoc; - - private void askForPassword() - { - Utilities.passwordDialog((Activity) getContext(), new Utilities.passwordDialogListener() - { - @Override - public void onOK(String password) - { - // yes - boolean ok = mDoc.authenticatePassword(password); - if (ok) - { - afterPassword(); - mDocView.requestLayout(); - } - else - { - askForPassword(); - } - } - - @Override - public void onCancel() - { - mDoc.destroy(); - if (mDoneListener != null) - mDoneListener.done(); - } - }); - } - - private void afterPassword() - { - // start the views - mDocView.start(mDoc); - if (usePagesView()) - { - mDocPagesView.clone(mDocView); - } - - mHighlightButton.setEnabled(false); - mDocView.setSelectionChangeListener(this); - onSelectionChanged(); - } - - public void showUI(boolean show) - { - mShowUI = show; - } - - public void stop() - { - mDocView.finish(); - if (usePagesView()) - { - mDocPagesView.finish(); - } - } - - private void onOutline(final Outline[] outline, int level) - { - if (outline == null) - return; - - for (Outline entry : outline) - { - int numberOfSpaces = (level) * 4; - String spaces = ""; - if (numberOfSpaces > 0) - spaces = String.format("%" + numberOfSpaces + "s", " "); - Log.i("example", String.format("%d %s %s %s", entry.page + 1, spaces, entry.title, entry.uri)); - if (entry.down != null) - { - // branch - onOutline(entry.down, level + 1); - } - } - } - - private void onLinks() - { - int numPages = mDocView.getPageCount(); - for (int pageNum = 0; pageNum < numPages; pageNum++) - { - DocPageView cv = (DocPageView) mDocView.getOrCreateChild(pageNum); - - Link links[] = cv.getPage().getLinks(); - if (links != null) - { - - for (int i = 0; i < links.length; i++) - { - Link link = links[i]; - - Log.i("example", String.format("links for page %d:", pageNum)); - Log.i("example", String.format(" link %d:", i)); - Log.i("example", String.format(" page = %d", link.page)); - Log.i("example", String.format(" uri = %s", link.uri)); - Log.i("example", String.format(" bounds = %f %f %f %f ", - link.bounds.x0, link.bounds.y0, link.bounds.x1, link.bounds.y1)); - } - } - else - { - Log.i("example", String.format("no links for page %d", pageNum)); - } - - } - } - - @Override - public void onClick(View v) - { - if (v == mReflowButton) - onReflowButton(); - - if (v == mFirstPageButton) - onFirstPageButton(); - if (v == mLastPageButton) - onLastPageButton(); - - if (v == mSearchButton) - onShowSearch(); - if (v == mSearchText) - onEditSearchText(); - if (v == mSearchNextButton) - onSearchNextButton(); - if (v == mSearchPreviousButton) - onSearchPreviousButton(); - - if (v == mBackButton) - onBackButton(); - - if (v == mSaveButton) - onSaveButton(); - if (v == mSaveAsButton) - onSaveAsButton(); - if (v == mPrintButton) - onPrintButton(); - if (v == mShareButton) - onShareButton(); - if (v == mOpenInButton) - onOpenInButton(); - - if (v == mToggleAnnotButton) - onToggleAnnotButton(); - if (v == mHighlightButton) - onHighlightButton(); - if (v == mDeleteButton) - onDeleteButton(); - - if (v == mNoteButton) - onNoteButton(); - if (v == mDrawButton) - onDrawButton(); - if (v == mLineColorButton) - onLineColorButton(); - if (v == mLineThicknessButton) - onLineThicknessButton(); - - if (v == mProofButton) - onProof(); - - } - - public void onSearchNextButton() - { - hideKeyboard(); - mDocView.onSearchNext(mSearchText.getText().toString()); - } - - public void onSearchPreviousButton() - { - hideKeyboard(); - mDocView.onSearchPrevious(mSearchText.getText().toString()); - } - - public void onEditSearchText() - { - mSearchText.requestFocus(); - showKeyboard(); - } - - public void onShowSearch() - { - // "deselect" all the visible tabs by selecting the hidden (first) one - TabHost tabHost = (TabHost)findViewById(R.id.tabhost); - tabHost.setCurrentTabByTag("HIDDEN"); - - // show search as selected - showSearchSelected(true); - - // hide all the other tabs - hideAllTabs(); - - // show the search tab - findViewById(R.id.searchTab).setVisibility(View.VISIBLE); - mSearchText.getText().clear(); - } - - protected void hideAllTabs() - { - // hide all the other tabs - findViewById(R.id.fileTab).setVisibility(View.GONE); - findViewById(R.id.annotateTab).setVisibility(View.GONE); - findViewById(R.id.pagesTab).setVisibility(View.GONE); - } - - private void onFirstPageButton() - { - goToPage(0); - } - - private void onLastPageButton() - { - int npages = mDocView.getPageCount(); - goToPage(npages-1); - } - - private void goToPage(int pageNumber) - { - mDocView.scrollToPage(pageNumber); - - if (mDocReflowView.getVisibility() == View.VISIBLE) - { - setReflowText(pageNumber); - mDocPagesView.setMostVisiblePage(pageNumber); - } - } - - private void onReflowButton() - { - if (mDocView.getVisibility() == View.VISIBLE) - { - // set initial text into reflow view - setReflowText(mDocPagesView.getMostVisiblePage()); - - // show reflow - showReflow(); - } - else - { - // hide reflow - hideReflow(); - } - } - - private void showReflow() - { - mDocView.setVisibility(View.GONE); - mDocReflowView.setVisibility(View.VISIBLE); - } - - private void hideReflow() - { - mDocReflowView.setVisibility(View.GONE); - mDocView.setVisibility(View.VISIBLE); - } - - private void setReflowText(int pageNumber) - { - DocPageView dpv = (DocPageView)mDocView.getAdapter().getView(pageNumber, null, null); - byte bytes[] = dpv.getPage().textAsHtml(); - mDocReflowView.setHTML(bytes); - } - - private void onBackButton() - { - if (mDoneListener != null) - mDoneListener.done(); - } - - private void onSaveButton() - { - Toast.makeText(getContext(),"onSaveButton", Toast.LENGTH_SHORT).show(); - } - - private void onSaveAsButton() - { - Toast.makeText(getContext(),"onSaveAsButton", Toast.LENGTH_SHORT).show(); - } - - private void onPrintButton() - { - Toast.makeText(getContext(),"onPrintButton", Toast.LENGTH_SHORT).show(); - } - - private void onShareButton() - { - Toast.makeText(getContext(),"onShareButton", Toast.LENGTH_SHORT).show(); - } - - private void onOpenInButton() - { - Toast.makeText(getContext(),"onOpenInButton", Toast.LENGTH_SHORT).show(); - } - - private void onToggleAnnotButton() - { - mDocView.toggleAnnotations(); - } - - private void onHighlightButton() - { - mDocView.onHighlight(); - } - - private void onNoteButton() - { - mDocView.onNoteMode(); - } - - private void onDrawButton() - { - mDocView.onDrawMode(); - } - - private void onLineColorButton() - { - if (mDocView.getDrawMode() || mDocView.hasInkAnnotationSelected()) - { - ColorDialog dlg = new ColorDialog(ColorDialog.BG_COLORS, - getContext(), mLineColorButton, new ColorDialog.ColorChangedListener() - { - @Override - public void onColorChanged(String color) - { - int icolor = Color.parseColor(color); - mDocView.setInkLineColor(icolor); - mLineColorButton.setColorFilter(icolor, PorterDuff.Mode.SRC_IN); - } - }, true); - dlg.setShowTitle(false); - dlg.show(); - } - } - - private void onLineThicknessButton() - { - if (mDocView.getDrawMode() || mDocView.hasInkAnnotationSelected()) - { - float val = mDocView.getInkLineThickness(); - LineWidthDialog.show(getContext(), mLineThicknessButton, val, - new LineWidthDialog.WidthChangedListener() - { - @Override - public void onWidthChanged(float value) - { - mDocView.setInkLineThickness(value); - } - }); - } - } - - private String getEmbeddedProfileName() - { - PDFObject outputIntents = mDoc.toPDFDocument().getTrailer().get("Root").get("OutputIntents"); - if (outputIntents == null) - return null; - - int length = outputIntents.size(); - int i; - - for (i = 0 ; i < length; i++) { - PDFObject intent = outputIntents.get(i); - - String name = intent.get("S").asName(); - if (!name.equals("GTS_PDFX")) - continue; - - /* We can't use the embedded profile if it's not CMYK based. */ - if (intent.get("DestOutputProfile").get("N").asInteger() != 4) - continue; - - PDFObject id = intent.get("Info"); - if (id.isString()) - return id.asString(); - id = intent.get("OutputConditionIdentifier"); - if (id.isString()) - return id.asString(); - id = intent.get("OutputCondition"); - if (id.isString()) - return id.asString(); - } - return null; - } - - private void onProof() - { - proofSetup(); - if (!proofSupported()) - { - Utilities.showMessage((Activity)getContext(), "gprf not supported", "gprf not supported"); - return; - } - - // show a dialog to collect the resolution and profiles - final Activity activity = (Activity)getContext(); - - final Dialog dialog = new Dialog(activity); - dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); - dialog.setContentView(R.layout.proof_dialog); - - final Spinner sp1 = (Spinner)(dialog.findViewById(R.id.print_profile_spinner)); - final Spinner sp2 = (Spinner)(dialog.findViewById(R.id.display_profile_spinner)); - final Spinner sp3 = (Spinner)(dialog.findViewById(R.id.resolution_spinner)); - - mEmbeddedProfile = getEmbeddedProfileName(); - if (mEmbeddedProfile!=null && !mEmbeddedProfile.isEmpty()) - { - // if the doc has an embedded profile, add it to the beginning of the list of print profiles. - String[] baseList = getResources().getStringArray(R.array.proof_print_profiles); - ArrayList<String> list = new ArrayList<String>(Arrays.asList(baseList)); - list.add(0, "Output Intent: " + mEmbeddedProfile); - ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<String>(activity, android.R.layout.simple_spinner_item, list); - spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); - sp1.setAdapter(spinnerAdapter); - } - - dialog.findViewById(R.id.cancel_button).setOnClickListener(new OnClickListener() - { - @Override - public void onClick(View v) - { - // Cancel - dialog.dismiss(); - - // remember the display profile selected - SharedPreferences sharedPref = activity.getPreferences(Context.MODE_PRIVATE); - SharedPreferences.Editor editor = sharedPref.edit(); - editor.putInt("displayProfileSelected", sp2.getSelectedItemPosition()); - editor.commit(); - } - }); - - dialog.findViewById(R.id.ok_button).setOnClickListener(new OnClickListener() - { - @Override - public void onClick(View v) - { - // OK - dialog.dismiss(); - - // remember the display profile selected - SharedPreferences sharedPref = activity.getPreferences(Context.MODE_PRIVATE); - SharedPreferences.Editor editor = sharedPref.edit(); - editor.putInt("displayProfileSelected", sp2.getSelectedItemPosition()); - editor.commit(); - - doProof(sp1.getSelectedItemPosition(), sp2.getSelectedItemPosition(), sp3.getSelectedItemPosition()); - - } - }); - - // choose the last-selected display profile. - SharedPreferences sharedPref = activity.getPreferences(Context.MODE_PRIVATE); - int selected = sharedPref.getInt("displayProfileSelected", 0); - sp2.setSelection(selected); - - dialog.show(); - } - - private static boolean proofSetupDone = false; - private static boolean proofCodeSupported = false; - private static boolean proofGsLibLoaded = false; - private static void proofSetup() - { - if (proofSetupDone) - return; - - proofCodeSupported = (com.artifex.mupdf.fitz.Context.gprfSupportedNative()==1); - - if (proofCodeSupported) - { - try - { - System.loadLibrary("gs"); - proofGsLibLoaded = true; - } - catch (UnsatisfiedLinkError e) - { - } - } - - proofSetupDone = true; - } - - private static boolean proofSupported() - { - return (proofCodeSupported && proofGsLibLoaded); - } - - private void doProof(int printProfileIndex, int displayProfileIndex, int resolutionIndex) - { - // get the resolution - String[] resolutions = getResources().getStringArray(R.array.proof_resolutions); - String resolutionString = resolutions[resolutionIndex]; - int resolution = Integer.parseInt(resolutionString); - - // get the print profile - String printProfilePath; - String[] printProfiles = getResources().getStringArray(R.array.proof_print_profile_files); - if (mEmbeddedProfile!=null && !mEmbeddedProfile.isEmpty()) - { - if (printProfileIndex==0) - { - printProfilePath = "<EMBEDDED>"; - } - else - { - printProfilePath = extractProfileAsset("profiles/CMYK/" + printProfiles[printProfileIndex-1]); - } - } - else - { - printProfilePath = extractProfileAsset("profiles/CMYK/" + printProfiles[printProfileIndex]); - } - - // get the display profile - String[] displayProfiles = getResources().getStringArray(R.array.proof_display_profile_files); - String displayProfileFile = displayProfiles[displayProfileIndex]; - String displayProfilePath = extractProfileAsset("profiles/RGB/" + displayProfileFile); - - // what page are we doing? - int thePage = mDocView.getMostVisiblePage(); - - String proofFile = mDocView.getDoc().makeProof(mDocView.getDoc().getPath(), printProfilePath, displayProfilePath, resolution); - - Uri uri = Uri.parse("file://" + proofFile); - Intent intent = new Intent(getContext(), ProofActivity.class); - intent.setAction(Intent.ACTION_VIEW); - intent.setData(uri); - // add the current page so it can be found when the activity is running - intent.putExtra("startingPage", thePage); - (getContext()).startActivity(intent); - } - - private String extractProfileAsset(String profile) - { - try - { - InputStream inStream = getContext().getAssets().open(profile); - String tempfile = getContext().getExternalCacheDir() + "/shared/" + profile; - new File(tempfile).mkdirs(); - Utilities.deleteFile(tempfile); - - FileOutputStream outStream = new FileOutputStream(tempfile); - byte[] buffer = new byte[4096]; // To hold file contents - int bytes_read; // How many bytes in buffer - - // Read a chunk of bytes into the buffer, then write them out, - // looping until we reach the end of the file (when read() returns - // -1). Note the combination of assignment and comparison in this - // while loop. This is a common I/O programming idiom. - while ((bytes_read = inStream.read(buffer)) != -1) - // Read until EOF - outStream.write(buffer, 0, bytes_read); // write - - return tempfile; - } - catch (IOException e) - { - e.printStackTrace(); - } - - return ""; - } - - private void onDeleteButton() - { - mDocView.onDelete(); - } - - public void onSelectionChanged() - { - boolean hasSel = mDocView.hasSelection(); - boolean hasInkAnnotSel = mDocView.hasInkAnnotationSelected(); - - mHighlightButton.setEnabled(hasSel); - - boolean noteMode = mDocView.getNoteMode(); - mNoteButton.setSelected(noteMode); - findViewById(R.id.note_holder).setSelected(noteMode); - - boolean drawMode = mDocView.getDrawMode(); - mDrawButton.setSelected(drawMode); - mLineColorButton.setEnabled(drawMode || hasInkAnnotSel); - mLineThicknessButton.setEnabled(drawMode || hasInkAnnotSel); - mDeleteButton.setEnabled(!drawMode && hasInkAnnotSel); - - findViewById(R.id.draw_tools_holder).setSelected(drawMode); - } - - private OnDoneListener mDoneListener = null; - public void setOnDoneListener(OnDoneListener l) {mDoneListener = l;} - public interface OnDoneListener - { - public void done(); - } -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocListPagesView.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocListPagesView.java deleted file mode 100644 index 533633b5..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocListPagesView.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.artifex.mupdf.android; - -import android.content.Context; -import android.graphics.Point; -import android.graphics.Rect; -import android.util.AttributeSet; -import android.view.ScaleGestureDetector; - -public class DocListPagesView extends DocViewBase -{ - private SelectionListener mSelectionListener = null; - - public DocListPagesView(Context context) - { - super(context); - } - - public DocListPagesView(Context context, AttributeSet attrs) - { - super(context, attrs); - } - - public DocListPagesView(Context context, AttributeSet attrs, int defStyle) - { - super(context, attrs, defStyle); - } - - @Override - protected void doSingleTap(float fx, float fy) - { - Point p = eventToScreen(fx, fy); - DocPageView v = findPageViewContainingPoint(p.x, p.y, false); - if (v != null) - { - int pageNumber = v.getPageNumber(); - - if (mSelectionListener != null) - mSelectionListener.onPageSelected(pageNumber); - } - } - - @Override - protected void doDoubleTap(float fx, float fy) - { - } - - @Override - public boolean onScale(ScaleGestureDetector detector) - { - return true; - } - - @Override - protected Point constrainScrollBy(int dx, int dy) - { - // don't scroll sideways - dx = 0; - - Rect viewport = new Rect(); - getGlobalVisibleRect(viewport); - if (mPageCollectionHeight <= viewport.height()) - { - // all the pages are already visible vertically, do nothing - dy = 0; - } - else - { - int sy = getScrollY(); - - // not too far down - if (sy + dy < 0) - dy = -sy; - - // not too far up - if (mPageCollectionHeight < sy + viewport.height() + dy) - dy = 0; - } - - return new Point(dx, dy); - } - - public void setMostVisiblePage(int p) - { - // set one of the pages in the document to be the "most visible". - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - cv.setMostVisible(i == p); - } - } - - public int getMostVisiblePage() - { - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - if (cv.getMostVisible()) - return i; - } - return 0; - } - - @Override - public void onShowPages() - { - } - - @Override - public void onHidePages() - { - } - - public interface SelectionListener - { - void onPageSelected(int pageNumber); - } - - public void setSelectionListener(SelectionListener l) {mSelectionListener=l;} -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocPageView.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocPageView.java deleted file mode 100644 index a726d2a3..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocPageView.java +++ /dev/null @@ -1,1258 +0,0 @@ -package com.artifex.mupdf.android; - -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.Paint; -import android.graphics.Path; -import android.graphics.Point; -import android.graphics.PointF; -import android.graphics.Rect; -import android.graphics.RectF; -import android.os.AsyncTask; -import android.support.v4.content.ContextCompat; -import android.util.Log; -import android.util.TypedValue; -import android.view.KeyEvent.Callback; -import android.view.View; -import android.view.ViewGroup; - -import com.artifex.mupdf.fitz.Annotation; -import com.artifex.mupdf.fitz.Cookie; -import com.artifex.mupdf.fitz.DisplayList; -import com.artifex.mupdf.fitz.DisplayListDevice; -import com.artifex.mupdf.fitz.Document; -import com.artifex.mupdf.fitz.Matrix; -import com.artifex.mupdf.fitz.Page; -import com.artifex.mupdf.fitz.R; -import com.artifex.mupdf.fitz.StructuredText; -import com.artifex.mupdf.fitz.android.AndroidDrawDevice; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.ListIterator; - -public class DocPageView extends View implements Callback -{ - private final Document mDoc; - private int mPageNum = -1; - private Page mPage; - private boolean mFinished = false; - - private float mScale = 1.0f; - private float mZoom = 1.0f; - - // rendering - private Bitmap mRenderBitmap = null; - private final Rect mRenderSrcRect = new Rect(); - private final Rect mRenderDstRect = new Rect(); - private float mRenderScale; - private Rect mPatchRect = new Rect(); - - // drawing - private Bitmap mDrawBitmap = null; - private final Rect mDrawSrcRect = new Rect(); - private final Rect mDrawDstRect = new Rect(); - private float mDrawScale; - private Rect mDisplayRect = new Rect(); - - private final Paint mPainter; - private final Paint mSelectionHighlightPainter; - private final Paint mSearchHighlightPainter; - private final Paint mBlankPainter; - private final Paint mDotPainter; - private final Rect mSrcRect = new Rect(); - private final Rect mDstRect = new Rect(); - - private Rect mHighlightingRect = new Rect(); - - // cached display lists - DisplayList pageContents = null; - DisplayList annotContents = null; - - // current size of this view - private Point mSize; - - private static final boolean DEBUG_PAGE_RENDERING = false; - - private static final float mResolution = 160f; - - public static int bitmapMarginX = 0; - public static int bitmapMarginY = 0; - - // use this to control whether the blue dot is drawn in the upper left corner. - private boolean isMostVisible = false; - - // currently selected TextChars - private ArrayList<StructuredText.TextChar> mSelection = null; - - // current search hilight - private com.artifex.mupdf.fitz.Rect mSearchHighlight = null; - - public DocPageView(Context context, Document theDoc) - { - super(context); - setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); - - mDoc = theDoc; - - mPainter = new Paint(); - - mSelectionHighlightPainter = new Paint(); - mSelectionHighlightPainter.setColor(ContextCompat.getColor(context, R.color.text_highlight_color)); - mSelectionHighlightPainter.setStyle(Paint.Style.FILL); - mSelectionHighlightPainter.setAlpha(getContext().getResources().getInteger(R.integer.text_highlight_alpha)); - - mSearchHighlightPainter = new Paint(); - mSearchHighlightPainter.setStyle(Paint.Style.STROKE); - mSearchHighlightPainter.setColor(ContextCompat.getColor(context, R.color.black)); - - mBlankPainter = new Paint(); - mBlankPainter.setStyle(Paint.Style.FILL); - mBlankPainter.setColor(Color.WHITE); - - mDotPainter = new Paint(); - mDotPainter.setStyle(Paint.Style.FILL); - mDotPainter.setColor(ContextCompat.getColor(context, R.color.blue_dot_color)); - - setFocusable(true); - setFocusableInTouchMode(true); - } - - public void setupPage(final int thePageNum, int w, int h) - { - // if the page number has not yet been set, or has changed, - // make a new page object. - if (thePageNum != mPageNum) - { - // destroy current page and lists - destroyPageAndLists(); - - // switch to the new page - mPageNum = thePageNum; - mPage = mDoc.loadPage(mPageNum); - } - - // calculate zoom that makes page fit - - com.artifex.mupdf.fitz.Rect pageBounds = mPage.getBounds(); - - float pagew = (pageBounds.x1 - pageBounds.x0) * mResolution / 72f; - float pageH = (pageBounds.y1 - pageBounds.y0) * mResolution / 72f; - - mZoom = w / pagew; - mSize = new Point((int) (pagew * mZoom), (int) (pageH * mZoom)); - } - - private void destroyPageAndLists() - { - // de-cache contents and annotations - if (pageContents != null) - { - pageContents.destroy(); - pageContents = null; - } - if (annotContents != null) - { - annotContents.destroy(); - annotContents = null; - } - - // destroy the page before making a new one. - if (mPage != null) - mPage.destroy(); - mPage = null; - } - - public Page getPage() - { - return mPage; - } - - public int getPageNumber() - { - return mPageNum; - } - - public void setNewScale(float scale) - { - mScale = scale; - } - - public int getCalculatedWidth() - { - return (int) (mSize.x * mScale); - } - - public int getCalculatedHeight() - { - return (int) (mSize.y * mScale); - } - - // a test for real visibility - private static final Rect visRect = new Rect(); - - public boolean isReallyVisible() - { - return getLocalVisibleRect(visRect); - } - - // for clipping - private Rect clipRect = new Rect(); - private Path clipPath = new Path(); - - // This function renders colored rectangles and text in place of the page. - // Use it to test layouts. - private void renderNoPage(Bitmap bitmap, final RenderListener listener, Rect localVisRect, Rect globalVisRect) - { - // specify where to draw to and from - mDrawBitmap = bitmap; - mDrawSrcRect.set(globalVisRect); - mDrawDstRect.set(localVisRect); - - // make a rect representing the entire page in screen coordinates - int[] locations = new int[2]; - getLocationOnScreen(locations); - Rect pageRect = new Rect(locations[0], locations[1], locations[0] + getWidth(), locations[1] + getHeight()); - - // draw a yellow page with a red border containing the page number - - Paint p = new Paint(); - Canvas c = new Canvas(bitmap); - p.setColor(Color.RED); - p.setStyle(Paint.Style.FILL); - c.drawRect(pageRect, p); - - Rect smaller = new Rect(pageRect); - int inset = (int) (40 * mScale); - smaller.inset(inset, inset); - p.setColor(Color.YELLOW); - p.setStyle(Paint.Style.FILL); - c.drawRect(smaller, p); - - String s = "" + (mPageNum + 1); - p.setColor(Color.BLACK); - p.setTextSize(200.0f * mScale); - c.drawText(s, pageRect.left + (90 * mScale), pageRect.top + (290 * mScale), p); - - invalidate(); - listener.progress(0); - } - - public void render(Bitmap bitmap, final RenderListener listener, final boolean showAnnotations) - { - if (mFinished) - return; - - // get local visible rect - Rect localVisRect = new Rect(); - if (!getLocalVisibleRect(localVisRect)) - { - listener.progress(0); - return; // not visible - } - - // get global visible rect - Rect globalVisRect = new Rect(); - if (!getGlobalVisibleRect(globalVisRect)) - { - listener.progress(0); - return; // not visible - } - - // do the render. - if (DEBUG_PAGE_RENDERING) - renderNoPage(bitmap, listener, localVisRect, globalVisRect); - else - { - cachePage(); - renderPage(bitmap, listener, localVisRect, globalVisRect, showAnnotations); - } - } - - // This function renders the document's page. - private void renderPage(final Bitmap bitmap, final RenderListener listener, final Rect localVisRect, final Rect globalVisRect, final boolean showAnnotations) - { - // make a rect representing the entire page; this might be outside the bounds of the bitmap - int[] locations = new int[2]; - getLocationOnScreen(locations); - Rect pageRect = new Rect(locations[0], locations[1], locations[0] + getCalculatedWidth(), locations[1] + getCalculatedHeight()); - - // Set rects for rendering and display - mPatchRect.set(globalVisRect); - mDisplayRect.set(localVisRect); - - // enlarge rendering and display rects to account for available margins - int topMargin = Math.min(Math.max(globalVisRect.top - pageRect.top, 0), bitmapMarginY); - int bottomMargin = Math.min(Math.max(pageRect.bottom - globalVisRect.bottom, 0), bitmapMarginY); - int leftMargin = Math.min(Math.max(globalVisRect.left - pageRect.left, 0), bitmapMarginX); - int rightMargin = Math.min(Math.max(pageRect.right - globalVisRect.right, 0), bitmapMarginX); - - mPatchRect.top -= topMargin; - mDisplayRect.top -= topMargin; - mPatchRect.bottom += bottomMargin; - mDisplayRect.bottom += bottomMargin; - - mPatchRect.left -= leftMargin; - mDisplayRect.left -= leftMargin; - mPatchRect.right += rightMargin; - mDisplayRect.right += rightMargin; - - // ... but clip to the bitmap - Rect oldPatch = new Rect(mPatchRect); - mPatchRect.left = Math.max(mPatchRect.left, 0); - mPatchRect.top = Math.max(mPatchRect.top, 0); - mPatchRect.right = Math.min(mPatchRect.right, bitmap.getWidth()); - mPatchRect.bottom = Math.min(mPatchRect.bottom, bitmap.getHeight()); - - mDisplayRect.left += (mPatchRect.left - oldPatch.left); - mDisplayRect.top += (mPatchRect.top - oldPatch.top); - mDisplayRect.right -= (mPatchRect.right - oldPatch.right); - mDisplayRect.bottom -= (mPatchRect.bottom - oldPatch.bottom); - - // set up the page and patch coordinates for the device - int pageX0 = pageRect.left; - int pageY0 = pageRect.top; - int pageX1 = pageRect.right; - int pageY1 = pageRect.bottom; - - int patchX0 = mPatchRect.left; - int patchY0 = mPatchRect.top; - int patchX1 = mPatchRect.right; - int patchY1 = mPatchRect.bottom; - - // set up a matrix for scaling - Matrix ctm = Matrix.Identity(); - ctm.scale((float) getFactor()); - - // remember the final values - mRenderSrcRect.set(mPatchRect); - mRenderDstRect.set(mDisplayRect); - mRenderScale = mScale; - mRenderBitmap = bitmap; - - // Render the page in the background - RenderTaskParams params = new RenderTaskParams(new RenderListener() - { - @Override - public void progress(int error) - { - // specify where to draw to and from - mDrawBitmap = mRenderBitmap; - mDrawSrcRect.set(mRenderSrcRect); - mDrawDstRect.set(mRenderDstRect); - mDrawScale = mRenderScale; - - listener.progress(0); - - } - }, ctm, mRenderBitmap, pageX0, pageY0, pageX1, pageY1, patchX0, patchY0, patchX1, patchY1, showAnnotations); - - new RenderTask().execute(params, null, null); - } - - public void stopRender() - { - // TODO ?? - } - - private void cachePage() - { - Cookie cookie = new Cookie(); - - if (pageContents == null) - { - pageContents = new DisplayList(); - DisplayListDevice dispDev = new DisplayListDevice(pageContents); - try - { - mPage.runPageContents(dispDev, new Matrix(1, 0, 0, 1, 0, 0), cookie); - } - catch (RuntimeException e) - { - pageContents.destroy(); - pageContents = null; - dispDev.destroy(); - throw (e); - } - finally - { - dispDev.destroy(); - } - } - - if (annotContents == null) - { - // run the annotation list - annotContents = new DisplayList(); - DisplayListDevice annotDev = new DisplayListDevice(annotContents); - try - { - Annotation annotations[] = mPage.getAnnotations(); - if (annotations != null) - { - for (Annotation annot : annotations) - { - annot.run(annotDev, new Matrix(1, 0, 0, 1, 0, 0), cookie); - } - } - } - catch (RuntimeException e) - { - annotContents.destroy(); - annotContents = null; - annotDev.destroy(); - throw (e); - } - finally - { - annotDev.destroy(); - } - } - } - - public Point getSelectionStart() - { - if (mSelection == null) - return null; - if (mSelection.size()==0) - return null; - - StructuredText.TextChar tchar = mSelection.get(0); - - return new Point((int)tchar.bbox.x0, (int)tchar.bbox.y0); - } - - public Point getSelectionEnd() - { - if (mSelection == null) - return null; - if (mSelection.size()==0) - return null; - - StructuredText.TextChar tchar = mSelection.get(mSelection.size()-1); - - return new Point((int)tchar.bbox.x1, (int)tchar.bbox.y1); - } - - // Find the collection ot TextChars belonging to lines - // that intersect the rectangle define by two points. - // For the first line, include those to the right of upperLeft.x - // For the last line, include those to the left of lowerLeft.x - // ASSUMPTION: this algorith does not handle right-to-left languages. - - public void setSelection(Point upperLeft, Point lowerLeft) - { - mSelection = new ArrayList<>(); - - // get structured text and the block structure - StructuredText structuredText = getPage().toStructuredText(); - StructuredText.TextBlock textBlocks[] = structuredText.getBlocks(); - - for (StructuredText.TextBlock block : textBlocks) - { - for (StructuredText.TextLine line : block.lines) - { - boolean firstLine = false; - boolean lastLine = false; - boolean middleLine = false; - if (line.bbox.contains(upperLeft.x, upperLeft.y)) - firstLine = true; - if (line.bbox.contains(lowerLeft.x, lowerLeft.y)) - lastLine = true; - if (line.bbox.y0 >= upperLeft.y && line.bbox.y1 <= lowerLeft.y) - middleLine = true; - - for (StructuredText.TextSpan span : line.spans) - { - for (StructuredText.TextChar tchar : span.chars) - { - if (firstLine && lastLine) - { - if (tchar.bbox.x0 >= upperLeft.x && tchar.bbox.x1 <= lowerLeft.x) - mSelection.add(tchar); - } - else if (firstLine) - { - if (tchar.bbox.x0 >= upperLeft.x) - mSelection.add(tchar); - } - else if (lastLine) - { - if (tchar.bbox.x1 <= lowerLeft.x) - mSelection.add(tchar); - } - else if (middleLine) - { - mSelection.add(tchar); - } - } - } - } - } - - invalidate(); - } - - public void setSearchHighlight(com.artifex.mupdf.fitz.Rect r) - { - mSearchHighlight = r; - invalidate(); - } - - public void removeSelection() - { - mSelection = new ArrayList<>(); - invalidate(); - } - - @Override - public void onDraw(Canvas canvas) - { - // clip - canvas.save(); - getLocalVisibleRect(clipRect); - clipPath.reset(); - clipPath.addRect(clipRect.left, clipRect.top, clipRect.right, clipRect.bottom, Path.Direction.CW); - canvas.clipPath(clipPath); - - // always start with a blank white background - canvas.drawRect(clipRect, mBlankPainter); - - if (mFinished) - { - canvas.restore(); - return; - } - - if (mDrawBitmap == null) - { - canvas.restore(); - return; // not yet rendered - } - - // set rectangles for drawing - mSrcRect.set(mDrawSrcRect); - mDstRect.set(mDrawDstRect); - - // if the scale has changed, adjust the destination - if (mDrawScale != mScale) - { - double scale = (((double) mScale) / ((double) mDrawScale)); - mDstRect.left *= scale; - mDstRect.top *= scale; - mDstRect.right *= scale; - mDstRect.bottom *= scale; - } - - // draw - canvas.drawBitmap(mDrawBitmap, mSrcRect, mDstRect, mPainter); - - // highlights - if (mSelection != null && !mSelection.isEmpty()) - { - for (StructuredText.TextChar tchar : mSelection) - { - mHighlightingRect.set((int) tchar.bbox.x0, (int) tchar.bbox.y0, (int) tchar.bbox.x1, (int) tchar.bbox.y1); - pageToView(mHighlightingRect, mHighlightingRect); - canvas.drawRect(mHighlightingRect, mSelectionHighlightPainter); - } - } - - // search highlight. Same as the selection highlight, but with - // a thin black outline. - if (mSearchHighlight != null) - { - mHighlightingRect.set((int) mSearchHighlight.x0, (int) mSearchHighlight.y0, (int) mSearchHighlight.x1, (int) mSearchHighlight.y1); - pageToView(mHighlightingRect, mHighlightingRect); - canvas.drawRect(mHighlightingRect, mSelectionHighlightPainter); - canvas.drawRect(mHighlightingRect, mSearchHighlightPainter); - } - - // draw ink annotations - if (mInkAnnots != null) - { - Iterator<InkAnnotation> it = mInkAnnots.iterator(); - while (it.hasNext()) - { - InkAnnotation annot = it.next(); - annot.draw(canvas); - } - } - - // draw blue dot - if (isMostVisible) - { - canvas.drawCircle(30, 30, 15, mDotPainter); - } - - canvas.restore(); - } - - public Rect selectWord(Point p) - { - // in page units - Point pPage = screenToPage(p.x, p.y); - - // get structured text and the block structure - StructuredText structuredText = getPage().toStructuredText(); - StructuredText.TextBlock textBlocks[] = structuredText.getBlocks(); - - StructuredText.TextBlock block = blockContainingPoint(textBlocks, pPage); - if (block == null) - return null; - - StructuredText.TextLine line = lineContainingPoint(block.lines, pPage); - if (line == null) - return null; - - StructuredText.TextSpan span = spanContainingPoint(line.spans, pPage); - if (span == null) - return null; - - // find the char containing my point - int n = -1; - int i; - for (i = 0; i < span.chars.length; i++) - { - if (span.chars[i].bbox.contains(pPage.x, pPage.y)) - { - n = i; - break; - } - } - // not found - if (n == -1) - return null; - // must be non-blank - if (span.chars[n].isWhitespace()) - return null; - - // look forward for a space, or the end - int nEnd = n; - while (nEnd + 1 < span.chars.length && !span.chars[nEnd + 1].isWhitespace()) - nEnd++; - - // look backward for a space, or the beginning - int nStart = n; - while (nStart - 1 >= 0 && !span.chars[nStart - 1].isWhitespace()) - nStart--; - - mSelection = new ArrayList<>(); - com.artifex.mupdf.fitz.Rect rWord = new com.artifex.mupdf.fitz.Rect(); - for (i = nStart; i <= nEnd; i++) - { - mSelection.add(span.chars[i]); - rWord.union(span.chars[i].bbox); - } - - return new Rect((int) rWord.x0, (int) rWord.y0, (int) rWord.x1, (int) rWord.y1); - } - - private StructuredText.TextBlock blockContainingPoint(StructuredText.TextBlock blocks[], Point p) - { - if (blocks != null) - { - for (StructuredText.TextBlock block : blocks) - { - if (block.bbox.contains(p.x, p.y)) - return block; - } - } - - return null; - } - - private StructuredText.TextLine lineContainingPoint(StructuredText.TextLine lines[], Point p) - { - if (lines != null) - { - for (StructuredText.TextLine line : lines) - { - if (line.bbox.contains(p.x, p.y)) - return line; - } - } - - return null; - } - - private StructuredText.TextSpan spanContainingPoint(StructuredText.TextSpan spans[], Point p) - { - if (spans != null) - { - for (StructuredText.TextSpan span : spans) - { - if (span.bbox.contains(p.x, p.y)) - return span; - } - } - - return null; - } - - private StructuredText.TextChar charContainingPoint(StructuredText.TextChar chars[], Point p) - { - if (chars != null) - { - for (StructuredText.TextChar tchar : chars) - { - if (tchar.bbox.contains(p.x, p.y)) - return tchar; - } - } - - return null; - } - - public Point screenToPage(Point p) - { - return screenToPage(p.x, p.y); - } - - public PointF screenToPage(PointF p) - { - Point pp = screenToPage(new Point((int)p.x, (int)p.y)); - return new PointF(pp.x, pp.y); - } - - private double getFactor() - { - return mZoom * mScale * mResolution / 72f; - } - - private double pageToScreen(double val) - { - double factor = getFactor(); - - return factor * val; - } - - private Point screenToPage(int screenX, int screenY) - { - // convert to view-relative - int viewX = screenX; - int viewY = screenY; - int loc[] = new int[2]; - getLocationOnScreen(loc); - viewX -= loc[0]; - viewY -= loc[1]; - - // convert to page-relative - double factor = getFactor(); - - int pageX = (int) (((double) viewX) / factor); - int pageY = (int) (((double) viewY) / factor); - - return new Point(pageX, pageY); - } - - public Point pageToView(int pageX, int pageY) - { - double factor = getFactor(); - - int viewX = (int) (((double) pageX) * factor); - int viewY = (int) (((double) pageY) * factor); - - return new Point(viewX, viewY); - } - - public void pageToView(Point pageP, Point viewP) - { - double factor = getFactor(); - - int x = (int) (((double) pageP.x) * factor); - int y = (int) (((double) pageP.y) * factor); - - viewP.set(x, y); - } - - public void pageToView(PointF pageP, PointF viewP) - { - double factor = getFactor(); - - float x = (pageP.x * (float)factor); - float y = (pageP.y * (float)factor); - - viewP.set(x, y); - } - - private PointF pageToView(PointF pageP) - { - double factor = getFactor(); - - float x = (pageP.x * (float)factor); - float y = (pageP.y * (float)factor); - - return new PointF(x, y); - } - - public void pageToView(Rect pageR, Rect viewR) - { - double factor = getFactor(); - - int left = (int) (((double) pageR.left) * factor); - int top = (int) (((double) pageR.top) * factor); - int right = (int) (((double) pageR.right) * factor); - int bottom = (int) (((double) pageR.bottom) * factor); - - viewR.set(left, top, right, bottom); - } - - public Point viewToPage(int viewX, int viewY) - { - double factor = getFactor(); - - int pageX = (int) (((double) viewX) / factor); - int pageY = (int) (((double) viewY) / factor); - - return new Point(pageX, pageY); - } - - public void finish() - { - mFinished = true; - - // destroy page and lists - destroyPageAndLists(); - } - - public boolean getMostVisible() {return isMostVisible;} - - public void setMostVisible(boolean val) - { - boolean wasMostVisible = isMostVisible; - isMostVisible = val; - if (isMostVisible != wasMostVisible) - { - // "most visible" has changed, so redraw. - invalidate(); - } - } - - public boolean onSingleTap(int x, int y) - { - // see if an ink annotation has been tapped on - if (mInkAnnots != null) - { - boolean hit = false; - - // switch to page coordinates - Point pt = screenToPage(x, y); - - // iterate in reverse order - ListIterator<InkAnnotation> li = mInkAnnots.listIterator(mInkAnnots.size()); - while (li.hasPrevious()) - { - InkAnnotation annot = li.previous(); - annot.setSelected(false); - if(annot.hitTest(pt)) - { - if (!hit) - annot.setSelected(true); - hit = true; - } - } - - if (hit) - { - invalidate(); - return true; - } - } - - // NOTE: when double-tapping, a single-tap will also happen first. - // so that must be safe to do. - - requestFocus(); - return false; - } - - public void onDoubleTap(int x, int y) - { - requestFocus(); - } - - // during layout, a DocView-relative rect is calculated and stashed here. - private final Rect mChildRect = new Rect(); - public void setChildRect(Rect r) - { - mChildRect.set(r); - } - public Rect getChildRect() - { - return mChildRect; - } - - private ArrayList<InkAnnotation> mInkAnnots; - - public void startDraw(float x, float y, int color, float thickness) - { - // create annotation list - if (mInkAnnots == null) - mInkAnnots = new ArrayList<>(); - - // add a new annotation to the list - // convert thickness from pt to pixels - float px = thickness * (float)getFactor(); - InkAnnotation annot = new InkAnnotation(color, px); - mInkAnnots.add(annot); - - // add first point to the new annot, in page coords - PointF pScreen = new PointF(x, y); - PointF pPage = screenToPage(pScreen); - annot.add(pPage); - - invalidate(); - } - - public void continueDraw(float x, float y) - { - if (mInkAnnots!=null && mInkAnnots.size()>0) - { - // get the most recent annotation - InkAnnotation annot = mInkAnnots.get(mInkAnnots.size()-1); - - // add the point, in page coords - PointF pScreen = new PointF(x, y); - PointF pPage = screenToPage(pScreen); - annot.add(pPage); - - invalidate(); - } - } - - private class RenderTaskParams - { - RenderTaskParams(RenderListener listener, Matrix ctm, Bitmap bitmap, - int pageX0, int pageY0, int pageX1, int pageY1, - int patchX0, int patchY0, int patchX1, int patchY1, boolean showAnnotations) - { - this.listener = listener; - this.ctm = ctm; - this.bitmap = bitmap; - this.pageX0 = pageX0; - this.pageY0 = pageY0; - this.pageX1 = pageX1; - this.pageY1 = pageY1; - this.patchX0 = patchX0; - this.patchY0 = patchY0; - this.patchX1 = patchX1; - this.patchY1 = patchY1; - this.showAnnotations = showAnnotations; - } - - public RenderListener listener; - public Matrix ctm; - public Bitmap bitmap; - public int pageX0; - public int pageY0; - public int pageX1; - public int pageY1; - public int patchX0; - public int patchY0; - public int patchX1; - public int patchY1; - public boolean showAnnotations; - } - - // The definition of our task class - private class RenderTask extends AsyncTask<RenderTaskParams, Void, Void> - { - private RenderTaskParams params = null; - - @Override - protected void onPreExecute() - { - super.onPreExecute(); - } - - @Override - protected Void doInBackground(RenderTaskParams... paramList) - { - params = paramList[0]; - - AndroidDrawDevice dev = new AndroidDrawDevice(params.bitmap, params.pageX0, params.pageY0, params.pageX1, params.pageY1, params.patchX0, params.patchY0, params.patchX1, params.patchY1); - try - { - Cookie cookie = new Cookie(); - if (pageContents != null) - { - pageContents.run(dev, params.ctm, cookie); - } - if (annotContents != null && params.showAnnotations) - { - annotContents.run(dev, params.ctm, cookie); - } - } - catch (Exception e) - { - Log.e("mupdf", e.getMessage()); - } - finally - { - dev.destroy(); - } - - return null; - } - - @Override - protected void onProgressUpdate(Void... values) - { - super.onProgressUpdate(values); - } - - @Override - protected void onPostExecute(Void result) - { - super.onPostExecute(result); - params.listener.progress(0); - } - } - - private InkAnnotation getSelectedInkAnnotation() - { - if (mInkAnnots != null) - { - // iterate in reverse order - ListIterator<InkAnnotation> li = mInkAnnots.listIterator(mInkAnnots.size()); - while (li.hasPrevious()) - { - InkAnnotation annot = li.previous(); - if (annot.isSelected()) - return annot; - } - } - - return null; - } - - public boolean hasInkAnnotationSelected() - { - return (getSelectedInkAnnotation() != null); - } - - public void setSelectedInkLineColor(int val) - { - InkAnnotation annot = getSelectedInkAnnotation(); - if (annot != null) - { - annot.setLineColor(val); - invalidate(); - } - } - - public void setSelectedInkLineThickness(float val) - { - InkAnnotation annot = getSelectedInkAnnotation(); - if (annot != null) - { - float px = val * (float)getFactor(); - annot.setLineThickness(px); - invalidate(); - } - } - - public void deleteSelectedInkAnnotation() - { - InkAnnotation annot = getSelectedInkAnnotation(); - if (annot != null) - { - mInkAnnots.remove(annot); - invalidate(); - } - } - -//----------------------------------------------------- - - public class InkAnnotation - { - private float mLineThickness; - public void setLineThickness(float lineThickness) {mLineThickness = lineThickness;} - - private int mLineColor; - public void setLineColor(int lineColor) {mLineColor = lineColor;} - - private boolean mSelected = false; - public void setSelected(boolean sel) {mSelected = sel;} - public boolean isSelected() {return mSelected;} - - private ArrayList<PointF> mArc; - - // touch margin is 2mm either side of the arc - private final float HIT_MARGIN = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_MM, 2, - getResources().getDisplayMetrics()); - - public InkAnnotation(int lineColor, float lineThickness) - { - mLineColor = lineColor; - mLineThickness = lineThickness; - mArc = new ArrayList<>(); - } - - public void add(PointF p) - { - mArc.add(p); - } - - public boolean hitTest(Point pt) - { - PointF p1, p2; - PointF ptf = new PointF(pt); - - if (mArc.size() >= 2) - { - Iterator<PointF> iit = mArc.iterator(); - p1 = iit.next(); - while (iit.hasNext()) - { - p2 = iit.next(); - - // test - double d = LineToPointDistance2D(p1, p2, ptf); - d = pageToScreen(d); - - if (d <= HIT_MARGIN) - { - return true; - } - - p1 = p2; - } - } - else - { - p1 = mArc.get(0); - - // test - double d = Distance(p1, ptf); - d = pageToScreen(d); - - if (d <= HIT_MARGIN) - { - return true; - } - - } - - return false; - } - - public void draw(Canvas canvas) - { - Path path = new Path(); - PointF pPage; - PointF pView = new PointF(); - - Paint paint = new Paint(); - paint.setAntiAlias(true); - paint.setDither(true); - paint.setStrokeJoin(Paint.Join.ROUND); - paint.setStrokeCap(Paint.Cap.ROUND); - paint.setStyle(Paint.Style.FILL); - paint.setStrokeWidth(mLineThickness * mScale); - paint.setColor(mLineColor); - - RectF bounds = new RectF(); - - if (mArc.size() >= 2) - { - Iterator<PointF> iit = mArc.iterator(); - pPage = iit.next(); - pageToView(pPage, pView); - float mX = pView.x; - float mY = pView.y; - path.moveTo(mX, mY); - while (iit.hasNext()) - { - pPage = iit.next(); - pageToView(pPage, pView); - float x = pView.x; - float y = pView.y; - path.quadTo(mX, mY, (x + mX) / 2, (y + mY) / 2); - mX = x; - mY = y; - } - path.lineTo(mX, mY); - paint.setStyle(Paint.Style.STROKE); - canvas.drawPath(path, paint); - - path.computeBounds(bounds, true); - } - else - { - pPage = mArc.get(0); - pageToView(pPage, pView); - float r = mLineThickness * mScale / 2; - bounds.set(pView.x-r, pView.y-r, pView.x+r, pView.y+r); - canvas.drawCircle(pView.x, pView.y, r, paint); - } - - if (isSelected()) - { - // expand the bounds to account for ine thickness - float px = mLineThickness * mScale / 2; - bounds.inset(-px, -px); - - mHighlightingRect.set((int)bounds.left, (int)bounds.top, (int)bounds.right, (int)bounds.bottom); - canvas.drawRect(mHighlightingRect, mSelectionHighlightPainter); - } - } - - private double DotProduct(PointF pointA, PointF pointB, PointF pointC) - { - double[] AB = new double[2]; - double[] BC = new double[2]; - AB[0] = pointB.x - pointA.x; - AB[1] = pointB.y - pointA.y; - BC[0] = pointC.x - pointB.x; - BC[1] = pointC.y - pointB.y; - double dot = AB[0] * BC[0] + AB[1] * BC[1]; - - return dot; - } - - //Compute the cross product AB x AC - private double CrossProduct(PointF pointA, PointF pointB, PointF pointC) - { - double[] AB = new double[2]; - double[] AC = new double[2]; - AB[0] = pointB.x - pointA.x; - AB[1] = pointB.y - pointA.y; - AC[0] = pointC.x - pointA.x; - AC[1] = pointC.y - pointA.y; - double cross = AB[0] * AC[1] - AB[1] * AC[0]; - - return cross; - } - - //Compute the distance from A to B - double Distance(PointF pointA, PointF pointB) - { - double d1 = pointA.x - pointB.x; - double d2 = pointA.y - pointB.y; - - return Math.sqrt(d1 * d1 + d2 * d2); - } - - //Compute the distance from AB to C - double LineToPointDistance2D(PointF pointA, PointF pointB, PointF pointC) - { - double dist = CrossProduct(pointA, pointB, pointC) / Distance(pointA, pointB); - if (true) - { - double dot1 = DotProduct(pointA, pointB, pointC); - if (dot1 > 0) - return Distance(pointB, pointC); - - double dot2 = DotProduct(pointB, pointA, pointC); - if (dot2 > 0) - return Distance(pointA, pointC); - } - return Math.abs(dist); - } - } - -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocProofView.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocProofView.java deleted file mode 100644 index cdcd73ef..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocProofView.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.artifex.mupdf.android; - -import android.app.Activity; -import android.content.Context; -import android.util.AttributeSet; -import android.view.View; - -public class DocProofView extends DocViewBase -{ - public DocProofView(Context context) - { - super(context); - initialize(context); - } - - public DocProofView(Context context, AttributeSet attrs) - { - super(context, attrs); - initialize(context); - } - - public DocProofView(Context context, AttributeSet attrs, int defStyle) - { - super(context, attrs, defStyle); - initialize(context); - } - - private void initialize(Context context) - { - } - - @Override - protected void onLayout(boolean changed, int left, int top, int right, int bottom) - { - // not if we've been finished - if (finished()) - return; - - super.onLayout(changed, left, top, right, bottom); - - // see if we've been given a start page - handleStartPage(); - } - - @Override - public void handleStartPage() - { - // if we've been given a start page, go there. - if (getStartPage()>0) - { - setCurrentPage(getStartPage()-1); - setStartPage(0); // but only once - } - } - - private int mCurrentPage = 0; - public int getCurrentPage() {return mCurrentPage;} - - public void setCurrentPage(int pageNum) - { - if (pageNum != mCurrentPage) - { - // stop rendering the current page - DocPageView pv = (DocPageView)getOrCreateChild(0); - pv.stopRender(); - - mCurrentPage = pageNum; - - // when the page changes, reset what's in view. - clearChildViews(); - removeAllViewsInLayout(); - - // scroll to 0,0 and do a new layout. -// smoothScrollBy(getScrollX(),getScrollY()); - requestLayout(); - } - } - - @Override - protected int getPageCount() - { - int count = super.getPageCount(); - if (count==0) - return 0; // no pages yet - - // always return one page - return 1; - } - - @Override - protected View getViewFromAdapter(int index) - { - // only one view at a time, so we're not going to use the adapter - // we'll just create and reuse a single view - if (mDocPageView==null) { - final Activity activity = (Activity) mContext; - mDocPageView = new DocPageView(activity, getDoc()); - } - - mDocPageView.setupPage(mCurrentPage, getWidth(), 1); - return mDocPageView; - } - - private DocPageView mDocPageView = null; - - @Override - protected void doSingleTap(float fx, float fy) - { - } - - @Override - public boolean shouldAdjustScaleEnd() - { - return false; - } -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocReflowView.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocReflowView.java deleted file mode 100644 index c5a2c2b4..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocReflowView.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.artifex.mupdf.android; - -import android.content.Context; -import android.os.Build; -import android.util.AttributeSet; -import android.util.Base64; -import android.view.MotionEvent; -import android.webkit.WebView; -import android.webkit.WebViewClient; - -public class DocReflowView extends WebView -{ - private float mScale; - private float mStartScale; - - public DocReflowView(Context context) - { - super(context); - initialize(context); - } - - public DocReflowView(Context context, AttributeSet attrs) - { - super(context, attrs); - initialize(context); - } - - public DocReflowView(Context context, AttributeSet attrs, int defStyle) - { - super(context, attrs, defStyle); - initialize(context); - } - - private void initialize(Context context) - { - getSettings().setJavaScriptEnabled(true); - getSettings().setBuiltInZoomControls(true); - getSettings().setDisplayZoomControls(false); - getSettings().setUseWideViewPort(true); - - mScale = getResources().getDisplayMetrics().density; - - setWebViewClient(new MyWebViewClient()); - } - - public void setHTML(byte bytes[]) - { - // preserve zoom level between pages - - int zoom = (int)(100 * mScale); - - String b64 = Base64.encodeToString(bytes, Base64.DEFAULT); - loadData(b64, "text/html; charset=utf-8", "base64"); - - setInitialScale(zoom); - scrollTo(0, 0); - } - - private void doJavaScript(String javaScript) - { - if (Build.VERSION.SDK_INT >= 19) - { - evaluateJavascript(javaScript, null); - } - else - { - loadUrl("javascript:" + javaScript); - } - } - - @Override - public boolean onTouchEvent(MotionEvent event) - { - if ((event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_DOWN) - { - // do something when user interaction begins - mStartScale = mScale; - } - - if ((event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_UP) - { - // do something when user interaction ends - if (mScale != mStartScale) - { - scrollTo(0, getScrollY()); - doJavaScript("document.getElementById('content').style.width = window.innerWidth;"); - } - mStartScale = mScale; - } - - return super.onTouchEvent(event); - } - - public class MyWebViewClient extends WebViewClient - { - @Override - public void onScaleChanged(final WebView webView, float oldScale, float newScale) - { - mScale = newScale; - } - } - -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocView.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocView.java deleted file mode 100644 index 11ad2601..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocView.java +++ /dev/null @@ -1,613 +0,0 @@ -package com.artifex.mupdf.android; - - -import android.content.Context; -import android.graphics.Point; -import android.graphics.Rect; -import android.util.AttributeSet; -import android.util.DisplayMetrics; -import android.util.TypedValue; -import android.view.MotionEvent; -import android.widget.RelativeLayout; -import android.widget.Toast; - -import com.artifex.mupdf.fitz.Page; -import com.artifex.mupdf.fitz.R; - -public class DocView extends DocViewBase implements DragHandleListener -{ - // selection handles - private DragHandle mSelectionHandleTopLeft = null; - private DragHandle mSelectionHandleBottomRight = null; - - // dot size and padding - private int selectionHandlePadPx; - private int selectionHandleSizePx; - - // selection - DocPageView selectionStartPage = null; - Point selectionStartLoc = new Point(); - DocPageView selectionEndPage = null; - Point selectionEndLoc = new Point(); - - // searching - // what we're searching for - private String mSearchNeedle = ""; - // current page we're searching - private int mSearchPage = 0; - // array of matching rects - private com.artifex.mupdf.fitz.Rect mSearchRects[] = null; - // index into the array - private int mSearchIndex = -1; - - public DocView(Context context) - { - super(context); - initialize(context); - } - - public DocView(Context context, AttributeSet attrs) - { - super(context, attrs); - initialize(context); - } - - public DocView(Context context, AttributeSet attrs, int defStyle) - { - super(context, attrs, defStyle); - initialize(context); - } - - private void initialize(Context context) - { - DisplayMetrics metrics = context.getResources().getDisplayMetrics(); - - int padDp = context.getResources().getInteger(R.integer.selection_dot_padding); - int sizeDp = context.getResources().getInteger(R.integer.selection_dot_size); - - TypedValue outValue = new TypedValue(); - getResources().getValue(R.dimen.selection_dot_scale, outValue, true); - float scale = outValue.getFloat(); - - selectionHandlePadPx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, padDp, metrics); - selectionHandleSizePx = (int) (scale * TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, sizeDp, metrics)); - } - - // create the selection handles - public void setupHandles(RelativeLayout layout) - { - // selection handles - mSelectionHandleTopLeft = setupHandle(layout, DragHandle.SELECTION_TOP_LEFT); - mSelectionHandleBottomRight = setupHandle(layout, DragHandle.SELECTION_BOTTOM_RIGHT); - } - - // create a single DragHandle of a particular kind - private DragHandle setupHandle(RelativeLayout layout, int kind) - { - // create - DragHandle dh; - if (kind == DragHandle.DRAG) - dh = new DragHandle(getContext(), R.layout.drag_handle, kind); - else if (kind == DragHandle.ROTATE) - dh = new DragHandle(getContext(), R.layout.rotate_handle, kind); - else - dh = new DragHandle(getContext(), R.layout.resize_handle, kind); - - // add to the layout, initially hidden - layout.addView(dh); - dh.show(false); - - // establish the listener - dh.setDragHandleListener(this); - - return dh; - } - - // show or hide the selection handles - private void showSelectionHandles(boolean show) - { - mSelectionHandleTopLeft.show(show); - mSelectionHandleBottomRight.show(show); - } - - @Override - protected void doSingleTap(float fx, float fy) - { - // find the page view that was tapped. - Point p = eventToScreen(fx, fy); - final DocPageView dpv = findPageViewContainingPoint(p.x, p.y, false); - if (dpv == null) - return; - - if (!getDrawMode()) - { - if (dpv.onSingleTap(p.x, p.y)) - { - onChangeSelection(); - return; - } - onChangeSelection(); - } - - if (hasSelection()) - { - clearSelection(); - onChangeSelection(); - } - else - { - // point in screen coordinates, result in page coordinates - Rect r = dpv.selectWord(p); - if (r != null) - { - showSelectionHandles(true); - - selectionStartPage = dpv; - selectionStartLoc.set(r.left, r.top); - selectionEndPage = dpv; - selectionEndLoc.set(r.right, r.bottom); - - moveHandlesToCorners(); - - onChangeSelection(); - } - } - } - - private void clearSelection() - { - selectionStartPage = null; - selectionEndPage = null; - showSelectionHandles(false); - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - cv.removeSelection(); - if (cv.isReallyVisible()) - cv.invalidate(); - } - } - - public boolean hasSelection() - { - return (selectionStartPage != null && selectionEndPage != null); - } - - public boolean hasInkAnnotationSelected() - { - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - if (cv.hasInkAnnotationSelected()) - return true; - } - - return false; - } - - public void setSelectedInkLineColor(int val) - { - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - if (cv.hasInkAnnotationSelected()) - cv.setSelectedInkLineColor(val); - } - } - - public void setSelectedInkLineThickness(float val) - { - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - if (cv.hasInkAnnotationSelected()) - cv.setSelectedInkLineThickness(val); - } - } - - private void onChangeSelection() - { - if (mSelectionChangeListener != null) - mSelectionChangeListener.onSelectionChanged(); - } - - private SelectionChangeListener mSelectionChangeListener = null; - public void setSelectionChangeListener (SelectionChangeListener l) {mSelectionChangeListener = l;} - public interface SelectionChangeListener - { - public void onSelectionChanged(); - } - - @Override - protected void doDoubleTap(float fx, float fy) - { - } - - private Point viewToScreen(Point p) - { - Point newPoint = new Point(p); - - Rect r = new Rect(); - this.getGlobalVisibleRect(r); - - newPoint.offset(r.left, r.top); - - return newPoint; - } - - // position a handle, given page coordinates - protected void positionHandle(DragHandle handle, DocPageView dpv, int pageX, int pageY) - { - if (handle != null) - { - // convert to DocPageView-based coords - Point p = dpv.pageToView(pageX, pageY); - - // offset to 0,0 - p.offset(dpv.getLeft(), dpv.getTop()); - - // offset to position in the scrolling view (this) - p.offset(-getScrollX(), -getScrollY()); - - // offset based on handle size and padding - p.offset(-selectionHandlePadPx - selectionHandleSizePx / 2, -selectionHandlePadPx - selectionHandleSizePx / 2); - - // move it - handle.moveTo(p.x, p.y); - } - } - - @Override - public void onStartDrag(DragHandle handle) - { - } - - @Override - public void onDrag(DragHandle handle) - { - if (handle == mSelectionHandleTopLeft) - { - Point p1 = mSelectionHandleTopLeft.getPosition(); - p1.offset(selectionHandlePadPx + selectionHandleSizePx / 2, selectionHandlePadPx + selectionHandleSizePx / 2); - p1 = viewToScreen(p1); - DocPageView pageView1 = findPageViewContainingPoint(p1.x, p1.y, false); - if (pageView1 != null) - { - selectionStartPage = pageView1; - p1 = pageView1.screenToPage(p1); - selectionStartLoc.set(p1.x, p1.y); - onChangeSelection(); - } - } - - if (handle == mSelectionHandleBottomRight) - { - Point p2 = mSelectionHandleBottomRight.getPosition(); - p2.offset(selectionHandlePadPx + selectionHandleSizePx / 2, selectionHandlePadPx + selectionHandleSizePx / 2); - p2 = viewToScreen(p2); - DocPageView pageView2 = findPageViewContainingPoint(p2.x, p2.y, false); - if (pageView2 != null) - { - selectionEndPage = pageView2; - p2 = pageView2.screenToPage(p2); - selectionEndLoc.set(p2.x, p2.y); - onChangeSelection(); - } - } - - // TODO: for now, we're dealing with one page at a time - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - if (cv.isReallyVisible() && cv == selectionStartPage && cv == selectionEndPage) - { - cv.setSelection(selectionStartLoc, selectionEndLoc); - } - else - { - cv.removeSelection(); - } - cv.invalidate(); - } - } - - @Override - public void onEndDrag(DragHandle handle) - { - moveHandlesToCorners(); - } - - @Override - protected void onLayout(boolean changed, int left, int top, int right, int bottom) - { - super.onLayout(changed, left, top, right, bottom); - - moveHandlesToCorners(); - } - - private void moveHandlesToCorners() - { - if (selectionStartPage != null && selectionEndPage != null) - { - Point p1 = selectionStartPage.getSelectionStart(); - Point p2 = selectionEndPage.getSelectionEnd(); - - if (p1 != null && p2 != null) - { - selectionStartLoc.set(p1.x, p1.y); - selectionEndLoc.set(p2.x, p2.y); - positionHandle(mSelectionHandleTopLeft, selectionStartPage, selectionStartLoc.x, selectionStartLoc.y); - positionHandle(mSelectionHandleBottomRight, selectionEndPage, selectionEndLoc.x, selectionEndLoc.y); - } - } - } - - // clear the selection on all pages - private void removeSearchHighlights() - { - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - cv.setSearchHighlight(null); - } - } - - // change what's being searched for - private void setNeedle(String needle) - { - if (!needle.equals(mSearchNeedle)) - { - mSearchNeedle = needle; - mSearchRects = null; - } - } - - public void onSearchNext(String needle) - { - setNeedle(needle); - removeSearchHighlights(); - - if (doSearch(1, mSearchPage)) - { - DocPageView dpv = (DocPageView)getOrCreateChild(mSearchPage); - dpv.setSearchHighlight(mSearchRects[mSearchIndex]); - scrollRectIntoView(mSearchPage, mSearchRects[mSearchIndex]); - } - } - - public void onSearchPrevious(String needle) - { - setNeedle(needle); - removeSearchHighlights(); - - if (doSearch(-1, mSearchPage)) - { - DocPageView dpv = (DocPageView)getOrCreateChild(mSearchPage); - dpv.setSearchHighlight(mSearchRects[mSearchIndex]); - scrollRectIntoView(mSearchPage, mSearchRects[mSearchIndex]); - } - } - - // performs a search for the next match. - // direction - 1 for forward, -1 for backward - // startPage - used as a test for circularity. - - private boolean doSearch(int direction, int startPage) - { - if (mSearchRects == null) - { - // see if we have matches for this page - DocPageView dpv = (DocPageView)getOrCreateChild(mSearchPage); - Page page = dpv.getPage(); - mSearchRects = page.search(mSearchNeedle); - - if (mSearchRects!=null && mSearchRects.length>0) - { - // matches found, return the first one - if (direction>0) - mSearchIndex = 0; - else - mSearchIndex = mSearchRects.length-1; - return true; - } - } - - // look forward or backward for the next match - if (mSearchRects!=null && mSearchRects.length>0) - { - if (direction>0) - { - if (mSearchIndex+1 < mSearchRects.length && mSearchIndex+1 >= 0) - { - mSearchIndex++; - return true; - } - } - else - { - if (mSearchIndex-1 < mSearchRects.length && mSearchIndex-1 >= 0) - { - mSearchIndex--; - return true; - } - } - } - - // no more matches on this page, go to the next (or previous) page - if (direction>0) - { - mSearchPage++; - if (mSearchPage >= getPageCount()) - mSearchPage = 0; - } - else - { - mSearchPage--; - if (mSearchPage < 0) - mSearchPage = getPageCount()-1; - } - mSearchRects = null; - - // give up if we're still looking - if (mSearchPage == startPage) - return false; - - // look on the next page - return doSearch(direction, startPage); - } - - public void scrollRectIntoView(int pageNum, com.artifex.mupdf.fitz.Rect box) - { - // get our viewport - Rect viewport = new Rect(); - getGlobalVisibleRect(viewport); - viewport.offset(0, -viewport.top); - - // get the location of the box's lower left corner, - // relative to the viewport - DocPageView cv = (DocPageView) getOrCreateChild(pageNum); - Point point = cv.pageToView((int) box.x0, (int) box.y1); - Rect childRect = cv.getChildRect(); - point.y += childRect.top; - point.y -= getScrollY(); - - // if the point is outside the viewport, scroll so it is. - if (point.y < viewport.top || point.y >= viewport.bottom) - { - int diff = (viewport.top + viewport.bottom) / 2 - point.y; - smoothScrollBy(0, diff); - } - } - - public void onHighlight() - { - if (hasSelection()) - { - Toast.makeText(getContext(),"onHighlight", Toast.LENGTH_SHORT).show(); - } - } - - private boolean mNoteMode = false; - public boolean getNoteMode() {return mNoteMode;} - public void onNoteMode() - { - mNoteMode = !mNoteMode; - mDrawMode = false; - clearSelection(); - onChangeSelection(); - } - - private boolean mDrawMode = false; - public boolean getDrawMode() {return mDrawMode;} - public void onDrawMode() - { - mDrawMode = !mDrawMode; - mNoteMode = false; - clearSelection(); - onChangeSelection(); - } - - public void onDelete() - { - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - if (cv.hasInkAnnotationSelected()) - cv.deleteSelectedInkAnnotation(); - } - } - - @Override - public boolean onTouchEvent(MotionEvent event) - { - if (mDrawMode) - { - float x = event.getX(); - float y = event.getY(); - switch (event.getAction()) - { - case MotionEvent.ACTION_DOWN: - touch_start(x, y); - break; - case MotionEvent.ACTION_MOVE: - touch_move(x, y); - break; - case MotionEvent.ACTION_UP: - touch_up(); - break; - } - - return true; - } - - return super.onTouchEvent(event); - } - - private float mX, mY; - private static final float TOUCH_TOLERANCE = 2; - - private int mCurrentInkLineColor = 0xFFFF0000; - public void setInkLineColor(int val) - { - mCurrentInkLineColor=val; - - // also change any selected annotation - if (hasInkAnnotationSelected()) - setSelectedInkLineColor(val); - } - public int getInkLineColor() {return mCurrentInkLineColor;} - - private float mCurrentInkLineThickness = 4.5f; - public float getInkLineThickness() {return mCurrentInkLineThickness;} - public void setInkLineThickness(float val) - { - mCurrentInkLineThickness=val; - - // also change any selected annotation - if (hasInkAnnotationSelected()) - setSelectedInkLineThickness(val); - } - - private void touch_start(float x, float y) - { - Point p = eventToScreen(x, y); - final DocPageView dpv = findPageViewContainingPoint(p.x, p.y, false); - if (dpv != null) - { - dpv.startDraw(p.x, p.y, mCurrentInkLineColor, mCurrentInkLineThickness); - } - - mX = x; - mY = y; - } - - private void touch_move(float x, float y) { - - float dx = Math.abs(x - mX); - float dy = Math.abs(y - mY); - if (dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE) - { - Point p = eventToScreen(x, y); - final DocPageView dpv = findPageViewContainingPoint(p.x, p.y, false); - if (dpv != null) - { - dpv.continueDraw(p.x, p.y); - } - mX = x; - mY = y; - } - } - - private void touch_up() - { - // NOOP - } - -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocViewBase.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocViewBase.java deleted file mode 100755 index 4d35aa96..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocViewBase.java +++ /dev/null @@ -1,1044 +0,0 @@ -package com.artifex.mupdf.android; - -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.Point; -import android.graphics.Rect; -import android.os.Handler; -import android.util.AttributeSet; -import android.util.DisplayMetrics; -import android.util.SparseArray; -import android.view.GestureDetector; -import android.view.MotionEvent; -import android.view.ScaleGestureDetector; -import android.view.View; -import android.view.WindowManager; -import android.widget.Adapter; -import android.widget.AdapterView; -import android.widget.Scroller; - -import com.artifex.mupdf.fitz.Document; -import com.artifex.mupdf.fitz.R; - -public class DocViewBase - extends AdapterView<Adapter> - implements GestureDetector.OnGestureListener, ScaleGestureDetector.OnScaleGestureListener, Runnable -{ - private static final int GAP = 20; - - private static final float MIN_SCALE = .15f; - private static final float MAX_SCALE = 5.0f; - - private PageAdapter mAdapter; - private boolean mFinished = false; - - private final SparseArray<View> mChildViews = new SparseArray<View>(3); - - private boolean mScaling; // Whether the user is currently pinch zooming - private float mScale = 1.0f; - private int mXScroll; // Scroll amounts recorded from events. - private int mYScroll; // and then accounted for in onLayout - - private GestureDetector mGestureDetector; - private ScaleGestureDetector mScaleGestureDetector; - - // bitmaps for rendering - // these are created by the activity and set using setBitmaps() - private final static double OVERSIZE_FACTOR = 1.0; - private final Bitmap[] bitmaps = {null, null}; - - private int bitmapIndex = 0; - private boolean renderRequested = false; - private int renderCount = 0; - - // used during layout - private final Rect mChildRect = new Rect(); - private final Rect mViewport = new Rect(); - private final Point mViewportOrigin = new Point(); - private final Rect mBlockRect = new Rect(); - private final Rect mLastBlockRect = new Rect(); - private int mLastLayoutColumns = 1; - protected int mPageCollectionHeight; - private int mPageCollectionWidth; - - // for flinging - private static final int MOVING_DIAGONALLY = 0; - private static final int MOVING_LEFT = 1; - private static final int MOVING_RIGHT = 2; - private static final int MOVING_UP = 3; - private static final int MOVING_DOWN = 4; - - private static final float MIN_FLING_VELOCITY = 750.0f; - private static final float MAX_FLING_VELOCITY = 16000.0f; - private static final long FLING_THROTTLE_TIME = 10; - - private static final int MIN_FLING_TIME = 400; - private static final int MAX_FLING_TIME = 1000; - - private static final float MIN_FLING_FACTOR = 0.333f; - private static final float MAX_FLING_FACTOR = 1.0f; - - private Scroller mScroller; - private Stepper mStepper; - private int mScrollerLastX; - private int mScrollerLastY; - private long mFlingStartTime; - - // for single- and double-tapping - private long mLastTapTime = 0; - private float lastTapX; - private float lastTapY; - private int mTapStatus = 0; - - private static final int DOUBLE_TAP_TIME = 300; - private static final int SHOW_KEYBOARD_TIME = 500; - - // the document. - private Document mDoc; - - private boolean mStarted = false; - - private boolean mShowAnnotations = false; - - // on each layout, compute the page that has the most visible height. - // That's considered to be the "current" page for purposes of drawing the blue dot - // on the pages list. - private int mostVisibleChild = -1; - private final Rect mostVisibleRect = new Rect(); - - public DocViewBase(Context context) - { - super(context); - initialize(context); - } - - public DocViewBase(Context context, AttributeSet attrs) - { - super(context, attrs); - initialize(context); - } - - public DocViewBase(Context context, AttributeSet attrs, int defStyle) - { - super(context, attrs, defStyle); - initialize(context); - } - - protected Context mContext = null; - - private void initialize(Context context) - { - mContext = context; - mGestureDetector = new GestureDetector(context, this); - mScaleGestureDetector = new ScaleGestureDetector(context, this); - mScroller = new Scroller(context); - mStepper = new Stepper(this, this); - - makeBitmaps(); - } - - private void makeBitmaps() - { - // get current screen size - WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); - DisplayMetrics metrics = new DisplayMetrics(); - wm.getDefaultDisplay().getMetrics(metrics); - int screenW = metrics.widthPixels; - int screenH = metrics.heightPixels; - - // make two bitmaps. - // make them large enough for both screen orientations, so we don't have to - // change them when the orientation changes. - - int w = (int) (screenW * OVERSIZE_FACTOR); - int h = (int) (screenH * OVERSIZE_FACTOR); - int size = Math.max(w, h); - for (int i = 0; i < bitmaps.length; i++) - bitmaps[i] = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888); - - DocPageView.bitmapMarginX = (w - screenW) / 2; - DocPageView.bitmapMarginY = (h - screenH) / 2; - } - - public void start (Document doc) - { - mDoc = doc; - mAdapter = new PageAdapter(mContext); - mAdapter.setWidth(getWidth()); - mAdapter.setDocument(mDoc); - mScale = 1.0f; - mStarted = true; - triggerRender(); - } - - public void clone(final DocViewBase docView) - { - mAdapter = new PageAdapter(mContext); - mAdapter.setWidth(docView.getWidth()); - mDoc = docView.getDoc(); - mAdapter.setDocument(mDoc); - - int pagelist_width_percentage = getContext().getResources().getInteger(R.integer.pagelist_width_percentage); - mScale = ((float) pagelist_width_percentage) / 100f; - - mStarted = true; - triggerRender(); - } - - public Document getDoc() - { - return mDoc; - } - - private void onScaleChild(View v, Float scale) - { - ((DocPageView) v).setNewScale(scale); - } - - public void onOrientationChange() - { - triggerRender(); - } - - private void onSizeChange(float factor) - { - mScale *= factor; - scaleChildren(); - requestLayout(); - } - - public boolean onDown(MotionEvent arg0) - { - mScroller.forceFinished(true); - return true; - } - - public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) - { - // not while we're scaling - if (mScaling) - return true; - - // not while a previous fling is underway - if (!mScroller.isFinished()) - return true; - - // must be really flinging - float vel = Math.max(Math.abs(velocityX),Math.abs(velocityY)); - if (vel<MIN_FLING_VELOCITY) - return false; - - mFlingStartTime = System.currentTimeMillis(); - - // adjust the distance and the time based on fling velocity - float ratio =(Math.abs(velocityY)-MIN_FLING_VELOCITY)/(MAX_FLING_VELOCITY-MIN_FLING_VELOCITY); - float dy = getHeight()*MIN_FLING_FACTOR + ratio*getHeight()*(MAX_FLING_FACTOR-MIN_FLING_FACTOR); - float dt = MIN_FLING_TIME + ratio*(MAX_FLING_TIME-MIN_FLING_TIME); - - if (velocityY<0) - smoothScrollBy(0, -(int)dy, (int)dt); - else - smoothScrollBy(0, (int)dy, (int)dt); - - return true; - } - - public void setScale(float val) - { - mScale = val; - } - - public void onLongPress(MotionEvent e) - { - } - - public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) - { - - // not if we're scaling - if (mScaling) - return true; - - // not if a previous fling is underway - if (!mScroller.isFinished()) - return true; - - // accumulate scrolling amount. - mXScroll -= distanceX; - mYScroll -= distanceY; - - requestLayout(); - - return true; - } - - public void onShowPress(MotionEvent e) - { - } - - protected DocPageView findPageViewContainingPoint(int x, int y, boolean includeMargin) - { - int childCount = getChildCount(); - for (int i = 0; i < childCount; i++) - { - // get the rect for the page - View child = getChildAt(i); - Rect childRect = new Rect(); - child.getGlobalVisibleRect(childRect); - - // add in the margin - if (includeMargin) - { - childRect.left -= GAP / 2; - childRect.right += GAP / 2; - childRect.top -= GAP / 2; - childRect.bottom += GAP / 2; - } - - // see if the rect contains the point - if (childRect.contains(x, y)) - return (DocPageView) child; - } - - return null; - } - - protected Point eventToScreen(float fx, float fy) - { - int x = Math.round(fx); - int y = Math.round(fy); - Rect docRect = new Rect(); - getGlobalVisibleRect(docRect); - x += docRect.left; - y += docRect.top; - - return new Point(x, y); - } - - protected void doSingleTap(float fx, float fy) - { - // find the page view that was tapped. - Point p = eventToScreen(fx, fy); - final DocPageView dpv = findPageViewContainingPoint(p.x, p.y, false); - if (dpv == null) - return; - - // see if the age wants to handle the single tap - boolean handled = dpv.onSingleTap(p.x, p.y); - - // if not, ... - if (!handled) - { - // schedule a task in the near future to check if we're still a single-tap. - final Handler handler = new Handler(); - final Point tappedPoint = p; - handler.postDelayed(new Runnable() - { - @Override - public void run() - { - if (mTapStatus == 1) - { - // still single - } - else - { - // double - } - mTapStatus = 0; - } - }, SHOW_KEYBOARD_TIME); - } - } - - protected void doDoubleTap(float fx, float fy) - { - Point p = eventToScreen(fx, fy); - DocPageView v = findPageViewContainingPoint(p.x, p.y, false); - if (v != null) - { - v.onDoubleTap(p.x, p.y); - } - } - - public boolean onSingleTapUp(final MotionEvent e) - { - long now = System.currentTimeMillis(); - if (mLastTapTime != 0 && ((now - mLastTapTime) < DOUBLE_TAP_TIME)) - { - mTapStatus = 2; - doDoubleTap(lastTapX, lastTapY); - mLastTapTime = 0; - } - else - { - mLastTapTime = now; - lastTapX = e.getX(); - lastTapY = e.getY(); - doSingleTap(lastTapX, lastTapY); - mTapStatus = 1; - } - - return false; - } - - private void scaleChildren() - { - // scale children - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - cv.setNewScale(mScale); - } - } - - public boolean onScale(ScaleGestureDetector detector) - { - // new scale factor - float previousScale = mScale; - mScale = Math.min(Math.max(mScale * detector.getScaleFactor(), MIN_SCALE), MAX_SCALE); - - // did we really scale? - if (mScale == previousScale) - return true; - - // scale children - scaleChildren(); - - // maintain focus while scaling - double scale = mScale / previousScale; - double currentFocusX = detector.getFocusX(); - double currentFocusY = detector.getFocusY(); - double viewFocusX = (int) currentFocusX + getScrollX(); - double viewFocusY = (int) currentFocusY + getScrollY(); - int diffX = (int) (viewFocusX * (1 - scale)); - int diffY = (int) (viewFocusY * (1 - scale)); - mXScroll += diffX; - mYScroll += diffY; - - requestLayout(); - - return true; - } - - public boolean onScaleBegin(ScaleGestureDetector detector) - { - - mScaling = true; - - // Ignore any scroll amounts yet to be accounted for: the - // screen is not showing the effect of them, so they can - // only confuse the user - mXScroll = mYScroll = 0; - - return true; - } - - public boolean shouldAdjustScaleEnd() - { - return true; - } - - public void onScaleEnd(ScaleGestureDetector detector) - { - if (shouldAdjustScaleEnd()) - { - // When a pinch-scale is done, we want to get n-across - // to fit properly. - - // get current viewport - Rect viewport = new Rect(); - getGlobalVisibleRect(viewport); - - // if we're at one column and wider than the viewport, - // leave it alone. - if (mLastLayoutColumns == 0 && mPageCollectionWidth >= viewport.width()) - { - mScaling = false; - return; - } - - // ratio of the viewport width to layout width - float ratio = ((float) (viewport.width())) / ((float) (mPageCollectionWidth)); - - // set a new scale factor - mScale *= ratio; - scaleChildren(); - - // scroll horizontally so the left edge is flush with the viewport. - mXScroll += getScrollX(); - - // scroll vertically to maintain the center. - int oldy = mViewport.centerY() - mLastBlockRect.top; - int newy = (int) ((float) oldy * ratio); - mYScroll -= (newy-oldy); - - requestLayout(); - } - - mScaling = false; - } - - @Override - public boolean onTouchEvent(MotionEvent event) - { - - if ((event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_DOWN) - { - // do something when user interaction begins - } - - if ((event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_UP) - { - // do something when user interaction ends - triggerRender(); - } - - mScaleGestureDetector.onTouchEvent(event); - mGestureDetector.onTouchEvent(event); - - return true; - } - - protected int getPageCount() - { - Adapter adapter = getAdapter(); - if (null != adapter) - return adapter.getCount(); - return 0; - } - - protected void onLayout(boolean changed, int left, int top, int right, int bottom) - { - super.onLayout(changed, left, top, right, bottom); - - if (!mStarted) - return; - - // not if there are no pages - if (getPageCount() == 0) - return; - - int numDocPages = getPageCount(); - - // not if we've been finished - if (finished()) - return; - - // perform any pending scrolling - scrollBy(-mXScroll, -mYScroll); - mXScroll = mYScroll = 0; - - // get current viewport - mViewportOrigin.set(getScrollX(), getScrollY()); - getGlobalVisibleRect(mViewport); - mViewport.offsetTo(mViewportOrigin.x, mViewportOrigin.y); - - // find the widest child - int maxw = 0; - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - - int childWidth = cv.getCalculatedWidth(); - if (childWidth > maxw) - maxw = childWidth; - } - - // how many columns? - double dcol = (double) (mViewport.width() + GAP) / (double) (maxw + GAP); - int columns = (int) dcol; - - // lay them out - mostVisibleChild = -1; - int mostVisibleChildHeight = -1; - int childTop = 0; - mPageCollectionHeight = 0; - mPageCollectionWidth = 0; - int column = 0; - mBlockRect.setEmpty(); - - for (int i = 0; i < numDocPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - int childWidth = cv.getCalculatedWidth(); - int childHeight = cv.getCalculatedHeight(); - int childLeft = column * (maxw + GAP); - int childRight = childLeft + childWidth; - int childBottom = childTop + childHeight; - mChildRect.set(childLeft, childTop, childRight, childBottom); - - // stash the rect in the page view for later use. - cv.setChildRect(mChildRect); - - // at each layout, we remember the entire width and height of the laid-out - // pages. This is used in applying constraints to scrolling amounts. - if (childBottom > mPageCollectionHeight) - mPageCollectionHeight = childBottom; - if (childRight > mPageCollectionWidth) - mPageCollectionWidth = childRight; - - if (mBlockRect.isEmpty()) - mBlockRect.set(mChildRect); - else - mBlockRect.union(mChildRect); - - if (mChildRect.intersect(mViewport) && i < numDocPages) - { - // visible, so include in layout - if (cv.getParent() == null) - addChildToLayout(cv); - cv.layout(childLeft, childTop, childRight, childBottom); - cv.invalidate(); - - // determine the "most visible" child. - if (cv.getGlobalVisibleRect(mostVisibleRect)) - { - int h = mostVisibleRect.height(); - if (h > mostVisibleChildHeight) - { - mostVisibleChildHeight = h; - mostVisibleChild = i; - } - } - } - else - { - // not visible, so remove from layout - removeViewInLayout(cv); - } - - column++; - if (column >= columns) - { - column = 0; - childTop += childHeight; - childTop += GAP; - } - } - - // if the number of columns has changed, do some scrolling to adjust - if (mScaling && columns >= 1 && mLastLayoutColumns >= 1 && mLastLayoutColumns != columns) - { - // x - center in the viewport - int dx = mBlockRect.centerX() - mViewport.centerX(); - scrollBy(dx, 0); - - // y - attempt to keep what's in the center of the viewport in view. - int oldy = mViewport.centerY() - mLastBlockRect.top; - int newy = (int) ((float) oldy * mBlockRect.height() / mLastBlockRect.height()); - scrollBy(0, newy - oldy); - } - mLastLayoutColumns = columns; - mLastBlockRect.set(mBlockRect); - - // see if we're handling a start page - handleStartPage(); - - triggerRender(); - } - - public int getMostVisiblePage() - { - return mostVisibleChild; - } - - // start page, get and set. - private int mStartPage = 0; - - public void setStartPage(int page) - { - mStartPage = page; - } - - protected int getStartPage() - { - return mStartPage; - } - - // handle start page - public void handleStartPage() - { - // if we've been given a start page, go there. - final int start = getStartPage(); - if (start > 0) - { - setStartPage(0); // but just once - - // post all of this so that we get an additional layout request - final Handler handler = new Handler(); - handler.post(new Runnable() - { - @Override - public void run() - { - DocPageView cv = (DocPageView) getOrCreateChild(start - 1); - Rect r = cv.getChildRect(); - scrollBy(0, r.top); - requestLayout(); - } - }); - } - } - - // override the view's scrollBy() function so we can - // take the opportunity to apply some constraints - - @Override - public void scrollBy(int dx, int dy) - { - Point p = constrainScrollBy(dx, dy); - super.scrollBy(p.x, p.y); - } - - // apply contraints to every scroll request. - - protected Point constrainScrollBy(int dx, int dy) - { - int vph; - int vpw; - { - Rect viewport = new Rect(); - getGlobalVisibleRect(viewport); - vph = viewport.height(); - vpw = viewport.width(); - } - int sx = getScrollX(); - int sy = getScrollY(); - - if (mPageCollectionWidth <= vpw) - { - // not too far to the right - if (mPageCollectionWidth - sx - dx > vpw) - dx = 0; - - // not too far to the left - if (sx + dx > 0) - dx = -sx; - } - else - { - // not too far to the right - if (mPageCollectionWidth < sx + vpw + dx) - dx = 0; - - // not too far to the left - if (sx + dx < 0) - dx = -sx; - } - - if (mPageCollectionHeight <= vph) - { - // not too far down - if (mPageCollectionHeight - sy - dy > vph) - dy = 0; - - // not too far up - if (sy + dy > 0) - dy = -sy; - } - else - { - // not too far down - if (sy + dy < 0) - dy = -sy; - - // not too far up. - if (mPageCollectionHeight + 2 * vph / 3 < sy + vph + dy) - dy = 0; - } - - return new Point(dx, dy); - } - - @Override - public Adapter getAdapter() - { - return mAdapter; - } - - @Override - public View getSelectedView() - { - return null; - } - - @Override - public void setAdapter(Adapter adapter) - { - mAdapter = (PageAdapter) adapter; - requestLayout(); - } - - @Override - public void setSelection(int arg0) - { - throw new UnsupportedOperationException("setSelection is not supported"); - } - - private View getCached() - { - return null; - } - - protected View getOrCreateChild(int i) - { - View v = mChildViews.get(i); - if (v == null) - { - v = getViewFromAdapter(i); - mChildViews.append(i, v); // Record the view against it's adapter index - onScaleChild(v, mScale); - } - - return v; - } - - protected void clearChildViews() - { - mChildViews.clear(); - } - - protected View getViewFromAdapter(int index) - { - return getAdapter().getView(index, getCached(), this); - } - - private void addChildToLayout(View v) - { - LayoutParams params = v.getLayoutParams(); - if (params == null) - { - params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); - } - addViewInLayout(v, 0, params, true); - } - - protected void triggerRender() - { - // Note that a render is needed - renderRequested = true; - - // If the previous render has completed, start a new one. Otherwise - // a new one will start as soon as the previous one completes. - if (renderCount == 0) - renderPages(); - } - - private void renderPages() - { - renderRequested = false; - - if (mFinished) - return; - - if (bitmaps == null) - return; - - // Rotate to the next bitmap - bitmapIndex++; - if (bitmapIndex >= bitmaps.length) - bitmapIndex = 0; - - // iterate through the children - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - if (mFinished) - return; - - final DocPageView cv = (DocPageView) getOrCreateChild(i); - if (cv.getParent() != null && cv.isReallyVisible()) - { - // Count up as we kick off rendering of each visible page - renderCount++; - cv.render(bitmaps[bitmapIndex], new RenderListener() - { - @Override - public void progress(int error) - { - - if (error == 0) - cv.invalidate(); - - // Count down as they complete - renderCount--; - - if (renderCount == 0) - { - if (renderRequested) - { - // If this phase of rendering has completed and another has - // been requested, start it now - renderPages(); - } - else { - if (mIdleRenderListener != null) - mIdleRenderListener.onIdle(); - } - } - } - }, mShowAnnotations); - } - } - } - - @Override - public void run() - { - if (!mScroller.isFinished()) - { - mScroller.computeScrollOffset(); - int x = mScroller.getCurrX(); - int y = mScroller.getCurrY(); - mXScroll += x - mScrollerLastX; - mYScroll += y - mScrollerLastY; - mScrollerLastX = x; - mScrollerLastY = y; - - // limit the amount of repeated layouts. - long tNow = System.currentTimeMillis(); - long diff = tNow - mFlingStartTime; - if (diff > FLING_THROTTLE_TIME) - { - requestLayout(); - mFlingStartTime = tNow; - } - - mStepper.prod(); - } - else - { - // one more - long tNow = System.currentTimeMillis(); - if (tNow != mFlingStartTime) - requestLayout(); - } - } - - public void finish() - { - // we're done with this view. - mFinished = true; - - // first, hide and remove all the children - int numPages = getPageCount(); - for (int i = 0; i < numPages; i++) - { - DocPageView cv = (DocPageView) getOrCreateChild(i); - cv.setVisibility(GONE); - removeViewInLayout(cv); - cv.finish(); - } - - // get rid of bitmaps - for (int i=0;i<bitmaps.length;i++) - { - if (null != bitmaps[i]) - { - bitmaps[i].recycle(); - bitmaps[i] = null; - } - } - } - - public boolean finished() - { - return mFinished; - } - - protected void smoothScrollBy(int dx, int dy) - { - smoothScrollBy(dx, dy, 400); - } - - protected void smoothScrollBy(int dx, int dy, int ms) - { - mScrollerLastX = mScrollerLastY = 0; - mScroller.startScroll(0, 0, dx, dy, ms); - mStepper.prod(); - } - - public void scrollToPage(int pageNumber) - { - // scroll to bring the page into view - - int scrollTime = 400; - - // get current viewport - Rect viewport = new Rect(); - getGlobalVisibleRect(viewport); - - // offset it based on current scroll position - Point viewportOrigin = new Point(); - viewportOrigin.set(getScrollX(), getScrollY()); - viewport.offsetTo(viewportOrigin.x, viewportOrigin.y); - - // get page rect from last layout - DocPageView cv = (DocPageView) getOrCreateChild(pageNumber); - Rect childRect = cv.getChildRect(); - - // scroll - if ((childRect.height()) > viewport.height()) - { - // put the top of the page at the top and the left at 0 - smoothScrollBy(getScrollX(), getScrollY() - childRect.top, scrollTime); - } - else - { - // if the whole page is not visible, move the center of the page at the center - if (childRect.top < viewport.top || childRect.bottom > viewport.bottom) - { - if (childRect.top == 0) - smoothScrollBy(0, getScrollY(), scrollTime); - else - smoothScrollBy(0, getScrollY() + viewport.height() / 2 - (childRect.bottom + childRect.top) / 2, scrollTime); - } - } - } - - private Point viewToScreen(Point p) - { - Point newPoint = new Point(p); - - Rect r = new Rect(); - this.getGlobalVisibleRect(r); - - newPoint.offset(r.left, r.top); - - return newPoint; - } - - public void toggleAnnotations() - { - mShowAnnotations = !mShowAnnotations; - triggerRender(); - } - - public void onShowPages() - { - int page_width_percentage = getContext().getResources().getInteger(R.integer.page_width_percentage); - int pagelist_width_percentage = getContext().getResources().getInteger(R.integer.pagelist_width_percentage); - - onSizeChange((float) (page_width_percentage) / (float) (page_width_percentage + pagelist_width_percentage)); - } - - public void onHidePages() - { - int page_width_percentage = getContext().getResources().getInteger(R.integer.page_width_percentage); - int pagelist_width_percentage = getContext().getResources().getInteger(R.integer.pagelist_width_percentage); - - onSizeChange((float) (page_width_percentage + pagelist_width_percentage) / (float) (page_width_percentage)); - } - - private IdleRenderListener mIdleRenderListener = null; - public void setIdleRenderListener(IdleRenderListener l) {mIdleRenderListener=l;} - - public interface IdleRenderListener - { - public void onIdle(); - } - -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DragHandle.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DragHandle.java deleted file mode 100644 index c2bceb47..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DragHandle.java +++ /dev/null @@ -1,179 +0,0 @@ -package com.artifex.mupdf.android; - -import android.content.Context; -import android.graphics.Point; -import android.view.MotionEvent; -import android.view.View; -import android.widget.FrameLayout; - -public class DragHandle extends FrameLayout implements View.OnTouchListener -{ - // for tracking movement - private int mDragDeltaX; - private int mDragDeltaY; - private boolean mIsDragging = false; - - // the actual current position - private int mPositionX = 0; - private int mPositionY = 0; - - // DragHandleListener - private DragHandleListener mDragHandleListener; - - // kinds for selection - public static final int SELECTION_TOP_LEFT = 1; - public static final int SELECTION_BOTTOM_RIGHT = 2; - - // kinds for resizing - public static final int RESIZE_TOP_LEFT = 3; - public static final int RESIZE_TOP_RIGHT = 4; - public static final int RESIZE_BOTTOM_LEFT = 5; - public static final int RESIZE_BOTTOM_RIGHT = 6; - - // kind for dragging and rotating - public static final int DRAG = 7; - public static final int ROTATE = 8; - - private int mKind = 0; - - public DragHandle(Context context, int resource, int kind) - { - super(context); - - mDragHandleListener = null; - mKind = kind; - - // inflate with the given resource - View.inflate(context, resource, this); - - // set our touch listener - setOnTouchListener(this); - } - - public int getKind() - { - return mKind; - } - - // test to see if this handle is a selection handle - public boolean isSelectionKind() - { - return (mKind == SELECTION_TOP_LEFT || mKind == SELECTION_BOTTOM_RIGHT); - } - - // test to see if this handle is a resize handle - public boolean isResizeKind() - { - return (mKind == RESIZE_TOP_LEFT || - mKind == RESIZE_TOP_RIGHT || - mKind == RESIZE_BOTTOM_LEFT || - mKind == RESIZE_BOTTOM_RIGHT); - } - - // test to see if this handle is a drag handle - public boolean isDragKind() - { - return (mKind == DRAG); - } - - // test to see if this handle is a rotate handle - public boolean isRotateKind() - { - return (mKind == ROTATE); - } - - public void setDragHandleListener(DragHandleListener listener) - { - mDragHandleListener = listener; - } - - // this view is shown at the corners of a selection. - // We use a touch listener to drag it within its parent. - // It's parent is a RelativeLayout, so we effect moving by adjusting - // offsets. The actual top and left are always 0,0. - - @Override - public boolean onTouch(View view, MotionEvent event) - { - final int X = (int) event.getRawX(); - final int Y = (int) event.getRawY(); - - final DragHandle theHandle = this; - - switch (event.getAction() & MotionEvent.ACTION_MASK) - { - case MotionEvent.ACTION_DOWN: - Point position = getPosition(); - mDragDeltaX = X - position.x; - mDragDeltaY = Y - position.y; - mIsDragging = true; - - if (mDragHandleListener != null) - { - mDragHandleListener.onStartDrag(theHandle); - } - - break; - - case MotionEvent.ACTION_UP: - mIsDragging = false; - - if (mDragHandleListener != null) - { - mDragHandleListener.onEndDrag(theHandle); - } - - break; - - case MotionEvent.ACTION_MOVE: - - moveTo(X - mDragDeltaX, Y - mDragDeltaY); - - if (mDragHandleListener != null) - { - mDragHandleListener.onDrag(theHandle); - } - - break; - } - return true; - } - - public void show(boolean bShow) - { - if (bShow) - setVisibility(View.VISIBLE); - else - setVisibility(View.GONE); - } - - public Point getPosition() - { - return new Point(mPositionX, mPositionY); - } - - public void moveTo(int x, int y) - { - offsetLeftAndRight(x - mPositionX); - offsetTopAndBottom(y - mPositionY); - - mPositionX = x; - mPositionY = y; - - invalidate(); - } - - @Override - protected void onLayout(boolean changed, int left, int top, int right, int bottom) - { - super.onLayout(changed, left, top, right, bottom); - - // we control the position by setting offsets - // The actual position is always 0,0. - // Because of this, we need to reapply the offsets here. - - offsetLeftAndRight(mPositionX); - offsetTopAndBottom(mPositionY); - } - -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DragHandleListener.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DragHandleListener.java deleted file mode 100644 index 60c4e3ea..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DragHandleListener.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.artifex.mupdf.android; - -public interface DragHandleListener -{ - void onStartDrag(DragHandle handle); - - void onDrag(DragHandle handle); - - void onEndDrag(DragHandle handle); -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/LineWidthDialog.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/LineWidthDialog.java deleted file mode 100644 index beea9d98..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/LineWidthDialog.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.artifex.mupdf.android; - -import android.content.Context; -import android.database.DataSetObserver; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.PopupWindow; -import android.widget.TextView; - -import com.artifex.mupdf.fitz.R; - -import kankan.wheel.widget.OnWheelScrollListener; -import kankan.wheel.widget.WheelView; -import kankan.wheel.widget.adapters.WheelViewAdapter; - -public class LineWidthDialog -{ - private static final int POPUP_OFFSET = 30; - - private static final float values[] = new float[] {0.25f, 0.5f, 1, 1.5f, 3, 4.5f, 6, 8, 12, 18, 24}; - - public static void show(Context context, View anchor, float val, final WidthChangedListener listener) - { - float currentValue = val; - - View layout = View.inflate(context, R.layout.line_width_dialog, null); - - View wv = layout.findViewById(R.id.wheel); - WheelView wheel = (WheelView)wv; - - final LineWidthAdapter adapter = new LineWidthAdapter(context, values); - - wheel.setViewAdapter(adapter); - wheel.setVisibleItems(5); - - wheel.setCurrentItem(0); - for (int i=0;i<values.length;i++) - { - if (values[i] == currentValue) - wheel.setCurrentItem(i); - } - - wheel.addScrollingListener(new OnWheelScrollListener() { - @Override - public void onScrollingStarted(WheelView wheel) {} - - @Override - public void onScrollingFinished(WheelView wheel) { - listener.onWidthChanged(values[wheel.getCurrentItem()]); - } - }); - - // make a popup window - final PopupWindow popup = new PopupWindow(layout, - ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); - popup.setFocusable(true); - - // now show the popup - popup.showAsDropDown(anchor,POPUP_OFFSET,POPUP_OFFSET); - } - - public static class LineWidthAdapter implements WheelViewAdapter - { - public LineWidthAdapter(Context context, float values[]) { - super(); - mValues = values; - mContext = context; - } - - private Context mContext; - private float mValues[]; - - @Override - public View getItem(int position, View convertView, ViewGroup parent) - { - // make a View if needed. - if (convertView == null) - { - LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - convertView = inflater.inflate(R.layout.line_width_item, parent, false); - } - - // get the value - float value = values[position]; - - // set the text string - TextView tv = ((TextView)convertView.findViewById(R.id.value)); - if(value == (int) value) - tv.setText(String.format("%d pt",(int)value)); - else - tv.setText(String.format("%s pt",value)); - - // adjust the height of the line - int h = (int)(value*3f/2f); - if (h<1) - h = 1; - View bar = ((View)convertView.findViewById(R.id.bar)); - bar.getLayoutParams().height = h; - bar.setLayoutParams(bar.getLayoutParams()); - - return convertView; - } - - @Override - public int getItemsCount() { - return mValues.length; - } - - @Override - public View getEmptyItem(View convertView, ViewGroup parent) { - return null; - } - - @Override - public void registerDataSetObserver(DataSetObserver observer) { - } - - @Override - public void unregisterDataSetObserver(DataSetObserver observer) { - } - } - - public interface WidthChangedListener { - void onWidthChanged(float value); - } - -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/PageAdapter.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/PageAdapter.java deleted file mode 100644 index 6de56b6a..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/PageAdapter.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.artifex.mupdf.android; - -import android.app.Activity; -import android.content.Context; -import android.view.View; -import android.view.ViewGroup; -import android.widget.BaseAdapter; - -import com.artifex.mupdf.fitz.Document; - -public class PageAdapter extends BaseAdapter -{ - private final Context mContext; - private Document mDoc; - - public PageAdapter(Context c) - { - mContext = c; - } - - public void setDocument(Document doc) - { - mDoc = doc; - } - - private int mWidth; - - public void setWidth(int w) - { - mWidth = w; - } - - @Override - public int getCount() - { - return mDoc.countPages(); - } - - public Object getItem(int position) - { - return null; // not used - } - - public long getItemId(int position) - { - return 0; // not used - } - - public View getView(final int position, View convertView, ViewGroup parent) - { - // make or reuse a view - DocPageView pageView; - - final Activity activity = (Activity) mContext; - if (convertView == null) - { - // make a new one - pageView = new DocPageView(activity, mDoc); - } - else - { - // reuse an existing one - pageView = (DocPageView) convertView; - } - - // set up the page - pageView.setupPage(position, mWidth, 1); - - return pageView; - } -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ProofActivity.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ProofActivity.java deleted file mode 100644 index 8a0abac4..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ProofActivity.java +++ /dev/null @@ -1,478 +0,0 @@ -package com.artifex.mupdf.android; - - -import android.app.Activity; -import android.app.ProgressDialog; -import android.content.Context; -import android.graphics.drawable.ColorDrawable; -import android.net.Uri; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.view.ViewTreeObserver; -import android.view.WindowManager; -import android.view.animation.Animation; -import android.view.animation.TranslateAnimation; -import android.widget.Adapter; -import android.widget.BaseAdapter; -import android.widget.Button; -import android.widget.CheckBox; -import android.widget.CompoundButton; -import android.widget.FrameLayout; -import android.widget.ImageButton; -import android.widget.ListView; -import android.widget.TextView; - -import com.artifex.mupdf.fitz.Document; -import com.artifex.mupdf.fitz.Page; -import com.artifex.mupdf.fitz.R; -import com.artifex.mupdf.fitz.Separation; - -import java.io.File; -import java.io.FileFilter; -import java.util.LinkedList; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class ProofActivity extends Activity implements View.OnClickListener, DocViewBase.IdleRenderListener -{ - private DocProofView mDocView; - private Document mDoc=null; - private String mPath; - - private ToolbarButton mFirstPageButton; - private ToolbarButton mPreviousPageButton; - private ToolbarButton mNextPageButton; - private ToolbarButton mLastPageButton; - private ToolbarButton mColorsUpButton; - private ToolbarButton mColorsDownButton; - private ImageButton mBackButton; - private Button mApplyButton; - - @Override - protected void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - - // get the file path - Uri uri = getIntent().getData(); - final String path = Uri.decode(uri.getEncodedPath()); - mPath = path; - - // get the starting page - final int startingPage = getIntent().getIntExtra("startingPage", 0); - - // set up UI - setContentView(R.layout.activity_proof_view); - mDocView = (DocProofView) findViewById(R.id.proof_view); - - mFirstPageButton = (ToolbarButton)findViewById(R.id.proof_first_page); - mFirstPageButton.setOnClickListener(this); - - mPreviousPageButton = (ToolbarButton)findViewById(R.id.proof_previous_page); - mPreviousPageButton.setOnClickListener(this); - - mNextPageButton = (ToolbarButton)findViewById(R.id.proof_next_page); - mNextPageButton.setOnClickListener(this); - - mLastPageButton = (ToolbarButton)findViewById(R.id.proof_last_page); - mLastPageButton.setOnClickListener(this); - - mBackButton = (ImageButton) findViewById(R.id.proof_back_button); - mBackButton.setOnClickListener(this); - - mColorsUpButton = (ToolbarButton) findViewById(R.id.proof_colors_button_up); - mColorsUpButton.setOnClickListener(this); - - mColorsDownButton = (ToolbarButton) findViewById(R.id.proof_colors_button_down); - mColorsDownButton.setOnClickListener(this); - - mApplyButton = (Button) findViewById(R.id.proof_apply_button); - mApplyButton.setOnClickListener(this); - mApplyButton.setEnabled(false); - - // wait for layout to open the document - final ProofActivity activity = this; - mDocView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { - public void onGlobalLayout() { - mDocView.getViewTreeObserver().removeOnGlobalLayoutListener(this); - - spinner = createAndShowWaitSpinner(activity); - - mDocView.post(new Runnable() { - @Override - public void run() - { - // Go! - mWaitingForIdle = true; - mDoc = new Document(path); - mDocView.start(mDoc); - mDocView.setIdleRenderListener(activity); - mDocView.setCurrentPage(startingPage); - } - }); - } - }); - } - - private ProgressDialog spinner = null; - - @Override - public void finish() - { - // stop the view - mDocView.finish(); - - // kill the document - mDoc.destroy(); - - // delete the .gproof file - Utilities.deleteFile(mPath); - - // delete temp files left by the proofing. - // these are of the form gprf_n_xxxxxx - File dir = new File(mPath).getParentFile(); - final Pattern pattern = Pattern.compile("gprf_.*_.*"); - File[] files = dir.listFiles(new FileFilter() - { - public boolean accept(File file) - { - Matcher matcher = pattern.matcher(file.getName()); - return matcher.matches(); - } - }); - for (File file:files) - { - System.out.println(String.format("deleting %s", file.getAbsolutePath())); - file.delete(); - } - - super.finish(); - } - - @Override - public void onClick(View v) - { - int pageCount = mDocView.getDoc().countPages(); // the real page count - int currentPage = mDocView.getCurrentPage(); - - if (v == mFirstPageButton) - { - if (currentPage != 0) - gotoPage(v, 0); - } - else if (v == mPreviousPageButton) - { - if (currentPage>0) - gotoPage(v, currentPage-1); - } - else if (v == mNextPageButton) - { - if (currentPage+1<pageCount) - gotoPage(v, currentPage+1); - } - else if (v == mLastPageButton) - { - if (currentPage != pageCount-1) - gotoPage(v, pageCount-1); - } - else if (v == mBackButton) - { - finish(); - } - else if (v == mColorsUpButton || v == mColorsDownButton ) - { - onColorsButton(); - } - else if (v == mApplyButton) - { - mApplyButton.setEnabled(false); - updateColors(); - } - } - - - private int colorsWidth = -1; - private void onColorsButton() - { - // toggle the colors panel - final View v = findViewById(R.id.proof_color_host); - int vis = v.getVisibility(); - if (colorsWidth ==-1) - colorsWidth = v.getWidth(); - - if (vis == View.VISIBLE) - { - mColorsDownButton.setVisibility(View.GONE); - mColorsUpButton.setVisibility(View.VISIBLE); - - Animation anim = new TranslateAnimation(0, colorsWidth, 0, 0); - anim.setDuration(350); - anim.setAnimationListener(new Animation.AnimationListener() { - public void onAnimationStart(Animation animation) { - v.setVisibility(View.INVISIBLE); - } - public void onAnimationRepeat(Animation animation) {} - public void onAnimationEnd(Animation animation) {} - }); - v.startAnimation(anim); - } - else - { - mColorsDownButton.setVisibility(View.VISIBLE); - mColorsUpButton.setVisibility(View.GONE); - - Animation anim = new TranslateAnimation(colorsWidth, 0, 0, 0); - anim.setDuration(350); - anim.setAnimationListener(new Animation.AnimationListener() { - public void onAnimationStart(Animation animation) { - v.setVisibility(View.VISIBLE); - } - public void onAnimationRepeat(Animation animation) {} - public void onAnimationEnd(Animation animation) {} - }); - v.startAnimation(anim); - } - } - - private void gotoPage(View v, final int pageNum) - { - spinner = createAndShowWaitSpinner(this); - mWaitingForIdle = true; - v.post(new Runnable() { - @Override - public void run() { - mDocView.setCurrentPage(pageNum); - } - }); - } - - private void setPageLabel() - { - int page = mDocView.getCurrentPage()+1; - int count = mDocView.getDoc().countPages(); - String s = String.format("Page %d of %d", page, count); - TextView tv = (TextView) findViewById(R.id.proof_page_n_of_n); - tv.setText(s); - } - - private boolean mWaitingForIdle = false; - private boolean mWaitingForSpinner = false; - private ListView mColorList = null; - private ChooseColorAdapter mColorAdapter = null; - - @Override - public void onIdle() - { - // called when page rendering has become idle - - if (mWaitingForSpinner) - { - spinner.dismiss(); - mWaitingForSpinner = false; - } - - if (mWaitingForIdle) - { - spinner.dismiss(); - setPageLabel(); - - // get the current page - DocPageView dpv = (DocPageView)mDocView.getViewFromAdapter(mDocView.getCurrentPage()); - Page page = dpv.getPage(); - - // count the separations - int numSeparations = page.countSeparations(); - - // set up the list - mColorList = (ListView)findViewById(R.id.proof_color_list); - mColorAdapter = new ChooseColorAdapter(getLayoutInflater(), new ColorChangeListener() { - @Override - public void onColorChange() { - mApplyButton.setEnabled(true); - } - }); - mColorList.setAdapter(mColorAdapter); - - // get each one - for (int i=0; i<numSeparations; i++) - { - // get it - Separation sep = page.getSeparation(i); - String name = sep.name; - - // transform to a color that can be used to colorize icons - int alpha = (sep.bgra >> 24) & 0xFF; - int red = (sep.bgra >> 16) & 0xFF; - int green = (sep.bgra >> 8 ) & 0xFF; - int blue = (sep.bgra >> 0 ) & 0xFF; - int color = (alpha << 24) | (red << 16) | (green << 8) | (blue << 0); - - mColorAdapter.add(new ChooseColorItem(sep.name, color, true, sep)); - } - - mColorList.getLayoutParams().width = getWidestView(getBaseContext(), mColorAdapter); - - } - mWaitingForIdle = false; - } - - public void updateColors() - { - // get the current page - DocPageView dpv = (DocPageView)mDocView.getViewFromAdapter(mDocView.getCurrentPage()); - Page page = dpv.getPage(); - - int numSeparations = mColorAdapter.getCount(); - for (int i=0; i<numSeparations; i++) - { - ChooseColorItem item = (ChooseColorItem)mColorAdapter.getItem(i); - Separation sep = item.separation; - boolean checked = item.checked; - String name = item.name; - - page.enableSeparation(i, checked); - } - - spinner = createAndShowWaitSpinner(this); - mWaitingForSpinner = true; - mDocView.triggerRender(); - } - - private static int getWidestView(Context context, Adapter adapter) - { - int maxWidth = 0; - View view = null; - FrameLayout fakeParent = new FrameLayout(context); - for (int i=0, count=adapter.getCount(); i<count; i++) { - view = adapter.getView(i, view, fakeParent); - view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); - int width = view.getMeasuredWidth(); - if (width > maxWidth) { - maxWidth = width; - } - } - return maxWidth; - } - - private static ProgressDialog createAndShowWaitSpinner(Context mContext) - { - ProgressDialog dialog = new ProgressDialog(mContext); - try { - dialog.show(); - } - catch (WindowManager.BadTokenException e) { - } - dialog.setCancelable(false); - dialog.setIndeterminate(true); - dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); - dialog.setContentView(R.layout.wait_spinner); - return dialog; - } - - //--------------------------------------------------------------------------------------------------------- - - public class ChooseColorItem - { - public String name; - public int color; - public boolean checked; - Separation separation; - - public ChooseColorItem(String name, int color, boolean checked, Separation separation) - { - this.checked = checked; - this.name = name; - this.color = color; - this.separation = separation; - } - } - - //--------------------------------------------------------------------------------------------------------- - - public interface ColorChangeListener - { - void onColorChange(); - } - - public class ChooseColorAdapter extends BaseAdapter - { - private final LinkedList<ChooseColorItem> mItems; - private final LayoutInflater mInflater; - ColorChangeListener mColorChangeListener = null; - - public ChooseColorAdapter(LayoutInflater inflater, ColorChangeListener listener) - { - mInflater = inflater; - mColorChangeListener = listener; - mItems = new LinkedList<>(); - } - - public void clear() - { - mItems.clear(); - } - - public void add(ChooseColorItem item) - { - mItems.add(item); - notifyDataSetChanged(); - } - - public int getCount() - { - return mItems.size(); - } - - public Object getItem(int i) - { - return mItems.get(i); - } - - public long getItemId(int arg0) - { - return 0; - } - - public View getView(int position, View convertView, ViewGroup parent) - { - View v; - if (convertView == null) - { - v = mInflater.inflate(R.layout.proof_color_list_entry, null); - } - else - { - v = convertView; - } - - final ChooseColorItem item = mItems.get(position); - - v.setTag(item); - - View swatch = v.findViewById(R.id.proof_entry_color_swatch); - swatch.setBackgroundColor(item.color); - - ((CheckBox) v.findViewById(R.id.proof_entry_checkbox)).setChecked(item.checked); - - ((CheckBox) v.findViewById(R.id.proof_entry_checkbox)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() - { - @Override - public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) - { - item.checked = isChecked; - if (mColorChangeListener!=null) - mColorChangeListener.onColorChange(); - } - }); - - ((TextView) v.findViewById(R.id.proof_entry_label)).setText(item.name); - - return v; - } - - } - - -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/RenderListener.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/RenderListener.java deleted file mode 100644 index 37a3432b..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/RenderListener.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.artifex.mupdf.android; - -public interface RenderListener -{ - void progress(int error); -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/Stepper.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/Stepper.java deleted file mode 100644 index aeef6704..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/Stepper.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.artifex.mupdf.android; - -import android.annotation.SuppressLint; -import android.os.Build; -import android.view.View; - -public class Stepper -{ - private final View mPoster; - private final Runnable mTask; - private boolean mPending; - - public Stepper(View v, Runnable r) - { - mPoster = v; - mTask = r; - mPending = false; - } - - @SuppressLint("NewApi") - public void prod() - { - if (!mPending) - { - mPending = true; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) - { - mPoster.postOnAnimation(new Runnable() - { - @Override - public void run() - { - mPending = false; - mTask.run(); - } - }); - } - else - { - mPoster.post(new Runnable() - { - @Override - public void run() - { - mPending = false; - mTask.run(); - } - }); - - } - } - } -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ToolbarButton.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ToolbarButton.java deleted file mode 100644 index 5760df48..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ToolbarButton.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.artifex.mupdf.android; - -import android.content.Context; -import android.graphics.PorterDuff; -import android.support.annotation.ColorInt; -import android.util.AttributeSet; -import android.widget.ImageButton; - -public class ToolbarButton extends ImageButton -{ - // Color.GRAY (0xFF888888) is too dark. Use something lighter. - @ColorInt - private static final int MYGRAY = 0xFFAAAAAA; - - public ToolbarButton(Context context) { - super(context); - } - - public ToolbarButton(Context context, AttributeSet attrs) { - super(context, attrs); - } - - @Override public void setEnabled(boolean enabled) - { - super.setEnabled(enabled); - if (enabled) - setColorFilter(null); - else - setColorFilter(MYGRAY, PorterDuff.Mode.SRC_IN); - } -} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/Utilities.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/Utilities.java deleted file mode 100644 index cecfae0e..00000000 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/Utilities.java +++ /dev/null @@ -1,383 +0,0 @@ -package com.artifex.mupdf.android; - -import android.app.Activity; -import android.app.AlertDialog; -import android.content.Context; -import android.content.DialogInterface; -import android.view.LayoutInflater; -import android.view.View; -import android.webkit.MimeTypeMap; -import android.widget.EditText; - -import com.artifex.mupdf.fitz.R; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -public class Utilities -{ - public static boolean copyFile(String src, String dst, boolean overwrite) - { - File dstf = new File(dst); - File srcf = new File(src); - - // if we can't overwrite, error - if (!overwrite && dstf.exists()) - return false; - - // if we must overwrite but can't delete, error - if (overwrite && dstf.exists()) { - boolean deleted = deleteFile(dst); - if (!deleted) - return false; - } - - // now copy - copyWithStreams(srcf, dstf); - - return true; - } - - private static void copyWithStreams(File aSourceFile, File aTargetFile) - { - InputStream inStream = null; - OutputStream outStream = null; - - try - { - try - { - byte[] bucket = new byte[32*1024]; - inStream = new BufferedInputStream(new FileInputStream(aSourceFile)); - outStream = new BufferedOutputStream(new FileOutputStream(aTargetFile, false)); - int bytesRead = 0; - while(bytesRead != -1) - { - bytesRead = inStream.read(bucket); //-1, 0, or more - if(bytesRead > 0){ - outStream.write(bucket, 0, bytesRead); - } - } - } - finally - { - if (inStream != null) - inStream.close(); - if (outStream != null) - outStream.close(); - } - } - catch (FileNotFoundException ex){ - } - catch (IOException ex){ - } - } - - public static boolean deleteFile (String path) - { - try - { - File fileToDelete = new File(path); - if (fileToDelete.exists()) { - fileToDelete.delete(); - } - } - catch(Exception e) - { - return false; - } - - return true; - } - - public static boolean renameFile (String oldPath, String newPath) - { - File fOld = new File(oldPath); - File fNew = new File(newPath); - return fOld.renameTo(fNew); - } - - // this function safely replaces a file by first renaming it - // and, if the copy fails, renaming it back. - public static boolean replaceFile (String srcPath, String dstPath) - { - // source file must exist - File srcFile = new File(srcPath); - if (!srcFile.exists()) - return false; - - // destination file may or may not exist - File dstFile = new File(dstPath); - boolean dstExists = dstFile.exists(); - String tmp = dstPath+"xxx"; - - // if tmp exists, error - File tmpFile = new File(tmp); - if (tmpFile.exists()) - return false; - - // rename the destination temporarily - if (dstExists) { - if (!renameFile(dstPath,tmp)) { - // rename error, do nothing else. - return false; - } - } - - // copy the file - if (!copyFile(srcPath,dstPath,true)) { - // copy failed, put the destination back - if (dstExists) { - if (!renameFile(tmp,dstPath)) { - // bad mojo here. Can't rename back, - // file appears lost. - } - } - return false; - } - - // copy succeeded, now delete the tmp file - deleteFile(tmp); - - return true; - } - - // get the extension part of the filename, not including the "." - public static String getExtension(String filename) - { - String filenameArray[] = filename.split("\\."); - - if (filenameArray.length<=1) - { - // no extension - return ""; - } - - String extension = filenameArray[filenameArray.length-1]; - extension = extension.toLowerCase(); - return extension; - } - - public static void showMessage(final Activity activity, final String title, final String body) - { - showMessage(activity, title, body, activity.getResources().getString(R.string.ok)); - } - public static void showMessage(final Activity activity, final String title, final String body, final String okLabel) - { - activity.runOnUiThread(new Runnable() { - @Override - public void run() { - new AlertDialog.Builder(activity) - .setTitle(title) - .setMessage(body) - .setCancelable(false) - .setPositiveButton(okLabel, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - } - }).create().show(); - } - }); - } - - public static void showMessageAndFinish(final Activity activity, final String title, final String body) - { - activity.runOnUiThread(new Runnable() { - @Override - public void run() { - new AlertDialog.Builder(activity) - .setTitle(title) - .setMessage(body) - .setCancelable(false) - .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - activity.finish(); - } - }).create().show(); - } - }); - } - - public static void passwordDialog( final Activity activity, final passwordDialogListener listener) - { - activity.runOnUiThread(new Runnable() - { - @Override - public void run() - { - AlertDialog.Builder dialog = new AlertDialog.Builder(activity); - LayoutInflater li = LayoutInflater.from(activity); - View promptsView = li.inflate(R.layout.password_prompt, null); - - final EditText et = (EditText)(promptsView.findViewById(R.id.editTextDialogUserInput)); - - dialog.setView(promptsView); - - dialog.setTitle(""); - - dialog.setPositiveButton(activity.getResources().getString(R.string.ok), new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - if (listener!=null) - { - String password = et.getText().toString(); - listener.onOK(password); - } - } - }); - - dialog.setNegativeButton(activity.getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - if (listener!=null) - listener.onCancel(); - } - }); - - dialog.create().show(); - } - }); - } - - public interface passwordDialogListener - { - void onOK(String password); - void onCancel(); - } - - public static void yesNoMessage(final Activity activity, final String title, final String body, - final String yesButtonLabel, final String noButtonLabel, - final Runnable yesRunnable, final Runnable noRunnable) - { - activity.runOnUiThread(new Runnable() { - @Override - public void run() { - - AlertDialog.Builder dialog = new AlertDialog.Builder(activity); - - dialog.setTitle(title); - dialog.setMessage(body); - - dialog.setPositiveButton(yesButtonLabel, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - if (yesRunnable!=null) - yesRunnable.run(); - } - }); - - dialog.setNegativeButton(noButtonLabel, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - if (noRunnable!=null) - noRunnable.run(); - } - }); - - dialog.create(); - dialog.show(); - } - }); - } - - public static File extractAssetToFile(Context context, String file) - { - File cacheFile = new File(context.getCacheDir(), file); - try - { - InputStream inputStream = context.getAssets().open(file); - try - { - FileOutputStream outputStream = new FileOutputStream(cacheFile); - try - { - byte[] buf = new byte[1024]; - int len; - while ((len = inputStream.read(buf)) > 0) - { - outputStream.write(buf, 0, len); - } - } finally - { - outputStream.close(); - } - } finally - { - inputStream.close(); - } - } - catch (IOException e) - { - e.printStackTrace(); - return null; - } - return cacheFile; - } - - public static String extractAssetToString(Context context, String file) - { - String json; - try { - InputStream is = context.getAssets().open(file); - int size = is.available(); - byte[] buffer = new byte[size]; - is.read(buffer); - is.close(); - json = new String(buffer, "UTF-8"); - } catch (IOException ex) { - ex.printStackTrace(); - return null; - } - return json; - } - - public static String removeExtention(String filePath) - { - File f = new File(filePath); - - // if it's a directory, don't remove the extention - if (f.isDirectory()) - return filePath; - - String name = f.getName(); - - // Now we know it's a file - don't need to do any special hidden - // checking or contains() checking because of: - final int lastPeriodPos = name.lastIndexOf('.'); - if (lastPeriodPos <= 0) - { - // No period after first character - return name as it was passed in - return filePath; - } - else - { - // Remove the last period and everything after it - File renamed = new File(f.getParent(), name.substring(0, lastPeriodPos)); - return renamed.getPath(); - } - } - - public static String getMimeType (String path) - { - String ext = Utilities.getExtension(path); - String mime = null; - if (ext != null) { - mime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(ext); - } - return mime; - } -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/ItemsRange.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/ItemsRange.java deleted file mode 100644 index 8b58a557..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/ItemsRange.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Android Wheel Control. - * https://code.google.com/p/android-wheel/ - * - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget; - -/** - * Range for visible items. - */ -public class ItemsRange { - // First item number - private int first; - - // Items count - private int count; - - /** - * Default constructor. Creates an empty range - */ - public ItemsRange() { - this(0, 0); - } - - /** - * Constructor - * @param first the number of first item - * @param count the count of items - */ - public ItemsRange(int first, int count) { - this.first = first; - this.count = count; - } - - /** - * Gets number of first item - * @return the number of the first item - */ - public int getFirst() { - return first; - } - - /** - * Gets number of last item - * @return the number of last item - */ - public int getLast() { - return getFirst() + getCount() - 1; - } - - /** - * Get items count - * @return the count of items - */ - public int getCount() { - return count; - } - - /** - * Tests whether item is contained by range - * @param index the item number - * @return true if item is contained - */ - public boolean contains(int index) { - return index >= getFirst() && index <= getLast(); - } -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/OnWheelChangedListener.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/OnWheelChangedListener.java deleted file mode 100644 index baad897c..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/OnWheelChangedListener.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget; - -/** - * Wheel changed listener interface. - * <p>The onChanged() method is called whenever current wheel positions is changed: - * <li> New Wheel position is set - * <li> Wheel view is scrolled - */ -public interface OnWheelChangedListener { - /** - * Callback method to be invoked when current item changed - * @param wheel the wheel view whose state has changed - * @param oldValue the old value of current item - * @param newValue the new value of current item - */ - void onChanged(WheelView wheel, int oldValue, int newValue); -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/OnWheelClickedListener.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/OnWheelClickedListener.java deleted file mode 100644 index 040bfc7b..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/OnWheelClickedListener.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget; - -/** - * Wheel clicked listener interface. - * <p>The onItemClicked() method is called whenever a wheel item is clicked - * <li> New Wheel position is set - * <li> Wheel view is scrolled - */ -public interface OnWheelClickedListener { - /** - * Callback method to be invoked when current item clicked - * @param wheel the wheel view - * @param itemIndex the index of clicked item - */ - void onItemClicked(WheelView wheel, int itemIndex); -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/OnWheelScrollListener.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/OnWheelScrollListener.java deleted file mode 100644 index 8571a4fe..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/OnWheelScrollListener.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2010 Yuri Kanivets - * - * 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 kankan.wheel.widget; - -/** - * Wheel scrolled listener interface. - */ -public interface OnWheelScrollListener { - /** - * Callback method to be invoked when scrolling started. - * @param wheel the wheel view whose state has changed. - */ - void onScrollingStarted(WheelView wheel); - - /** - * Callback method to be invoked when scrolling ended. - * @param wheel the wheel view whose state has changed. - */ - void onScrollingFinished(WheelView wheel); -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelAdapter.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelAdapter.java deleted file mode 100644 index 841c0b15..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelAdapter.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2010 Yuri Kanivets - * - * 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 kankan.wheel.widget; - -/** - * Wheel adapter interface - * - * @deprecated Use WheelViewAdapter - */ -public interface WheelAdapter { - /** - * Gets items count - * @return the count of wheel items - */ - public int getItemsCount(); - - /** - * Gets a wheel item by index. - * - * @param index the item index - * @return the wheel item text or null - */ - public String getItem(int index); - - /** - * Gets maximum item length. It is used to determine the wheel width. - * If -1 is returned there will be used the default wheel width. - * - * @return the maximum item length or -1 - */ - public int getMaximumLength(); -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelRecycle.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelRecycle.java deleted file mode 100644 index 242fc89e..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelRecycle.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Android Wheel Control. - * https://code.google.com/p/android-wheel/ - * - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget; - -import android.view.View; -import android.widget.LinearLayout; - -import java.util.LinkedList; -import java.util.List; - -/** - * Recycle stores wheel items to reuse. - */ -public class WheelRecycle { - // Cached items - private List<View> items; - - // Cached empty items - private List<View> emptyItems; - - // Wheel view - private WheelView wheel; - - /** - * Constructor - * @param wheel the wheel view - */ - public WheelRecycle(WheelView wheel) { - this.wheel = wheel; - } - - /** - * Recycles items from specified layout. - * There are saved only items not included to specified range. - * All the cached items are removed from original layout. - * - * @param layout the layout containing items to be cached - * @param firstItem the number of first item in layout - * @param range the range of current wheel items - * @return the new value of first item number - */ - public int recycleItems(LinearLayout layout, int firstItem, ItemsRange range) { - int index = firstItem; - for (int i = 0; i < layout.getChildCount();) { - if (!range.contains(index)) { - recycleView(layout.getChildAt(i), index); - layout.removeViewAt(i); - if (i == 0) { // first item - firstItem++; - } - } else { - i++; // go to next item - } - index++; - } - return firstItem; - } - - /** - * Gets item view - * @return the cached view - */ - public View getItem() { - return getCachedView(items); - } - - /** - * Gets empty item view - * @return the cached empty view - */ - public View getEmptyItem() { - return getCachedView(emptyItems); - } - - /** - * Clears all views - */ - public void clearAll() { - if (items != null) { - items.clear(); - } - if (emptyItems != null) { - emptyItems.clear(); - } - } - - /** - * Adds view to specified cache. Creates a cache list if it is null. - * @param view the view to be cached - * @param cache the cache list - * @return the cache list - */ - private List<View> addView(View view, List<View> cache) { - if (cache == null) { - cache = new LinkedList<View>(); - } - - cache.add(view); - return cache; - } - - /** - * Adds view to cache. Determines view type (item view or empty one) by index. - * @param view the view to be cached - * @param index the index of view - */ - private void recycleView(View view, int index) { - int count = wheel.getViewAdapter().getItemsCount(); - - if ((index < 0 || index >= count) && !wheel.isCyclic()) { - // empty view - emptyItems = addView(view, emptyItems); - } else { - while (index < 0) { - index = count + index; - } - index %= count; - items = addView(view, items); - } - } - - /** - * Gets view from specified cache. - * @param cache the cache - * @return the first view from cache. - */ - private View getCachedView(List<View> cache) { - if (cache != null && cache.size() > 0) { - View view = cache.get(0); - cache.remove(0); - return view; - } - return null; - } - -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelScroller.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelScroller.java deleted file mode 100644 index 0372da1a..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelScroller.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Android Wheel Control. - * https://code.google.com/p/android-wheel/ - * - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget; - -import android.content.Context; -import android.os.Handler; -import android.os.Message; -import android.view.GestureDetector; -import android.view.MotionEvent; -import android.view.GestureDetector.SimpleOnGestureListener; -import android.view.animation.Interpolator; -import android.widget.Scroller; - -/** - * Scroller class handles scrolling events and updates the - */ -public class WheelScroller { - /** - * Scrolling listener interface - */ - public interface ScrollingListener { - /** - * Scrolling callback called when scrolling is performed. - * @param distance the distance to scroll - */ - void onScroll(int distance); - - /** - * Starting callback called when scrolling is started - */ - void onStarted(); - - /** - * Finishing callback called after justifying - */ - void onFinished(); - - /** - * Justifying callback called to justify a view when scrolling is ended - */ - void onJustify(); - } - - /** Scrolling duration */ - private static final int SCROLLING_DURATION = 400; - - /** Minimum delta for scrolling */ - public static final int MIN_DELTA_FOR_SCROLLING = 1; - - // Listener - private ScrollingListener listener; - - // Context - private Context context; - - // Scrolling - private GestureDetector gestureDetector; - private Scroller scroller; - private int lastScrollY; - private float lastTouchedY; - private boolean isScrollingPerformed; - - /** - * Constructor - * @param context the current context - * @param listener the scrolling listener - */ - public WheelScroller(Context context, ScrollingListener listener) { - gestureDetector = new GestureDetector(context, gestureListener); - gestureDetector.setIsLongpressEnabled(false); - - scroller = new Scroller(context); - - this.listener = listener; - this.context = context; - } - - /** - * Set the the specified scrolling interpolator - * @param interpolator the interpolator - */ - public void setInterpolator(Interpolator interpolator) { - scroller.forceFinished(true); - scroller = new Scroller(context, interpolator); - } - - /** - * Scroll the wheel - * @param distance the scrolling distance - * @param time the scrolling duration - */ - public void scroll(int distance, int time) { - scroller.forceFinished(true); - - lastScrollY = 0; - - scroller.startScroll(0, 0, 0, distance, time != 0 ? time : SCROLLING_DURATION); - setNextMessage(MESSAGE_SCROLL); - - startScrolling(); - } - - /** - * Stops scrolling - */ - public void stopScrolling() { - scroller.forceFinished(true); - } - - /** - * Handles Touch event - * @param event the motion event - * @return - */ - public boolean onTouchEvent(MotionEvent event) { - switch (event.getAction()) { - case MotionEvent.ACTION_DOWN: - lastTouchedY = event.getY(); - scroller.forceFinished(true); - clearMessages(); - break; - - case MotionEvent.ACTION_MOVE: - // perform scrolling - int distanceY = (int)(event.getY() - lastTouchedY); - if (distanceY != 0) { - startScrolling(); - listener.onScroll(distanceY); - lastTouchedY = event.getY(); - } - break; - } - - if (!gestureDetector.onTouchEvent(event) && event.getAction() == MotionEvent.ACTION_UP) { - justify(); - } - - return true; - } - - // gesture listener - private SimpleOnGestureListener gestureListener = new SimpleOnGestureListener() { - public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { - // Do scrolling in onTouchEvent() since onScroll() are not call immediately - // when user touch and move the wheel - return true; - } - - public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { - lastScrollY = 0; - final int maxY = 0x7FFFFFFF; - final int minY = -maxY; - scroller.fling(0, lastScrollY, 0, (int) -velocityY, 0, 0, minY, maxY); - setNextMessage(MESSAGE_SCROLL); - return true; - } - }; - - // Messages - private final int MESSAGE_SCROLL = 0; - private final int MESSAGE_JUSTIFY = 1; - - /** - * Set next message to queue. Clears queue before. - * - * @param message the message to set - */ - private void setNextMessage(int message) { - clearMessages(); - animationHandler.sendEmptyMessage(message); - } - - /** - * Clears messages from queue - */ - private void clearMessages() { - animationHandler.removeMessages(MESSAGE_SCROLL); - animationHandler.removeMessages(MESSAGE_JUSTIFY); - } - - // animation handler - private Handler animationHandler = new Handler() { - public void handleMessage(Message msg) { - scroller.computeScrollOffset(); - int currY = scroller.getCurrY(); - int delta = lastScrollY - currY; - lastScrollY = currY; - if (delta != 0) { - listener.onScroll(delta); - } - - // scrolling is not finished when it comes to final Y - // so, finish it manually - if (Math.abs(currY - scroller.getFinalY()) < MIN_DELTA_FOR_SCROLLING) { - currY = scroller.getFinalY(); - scroller.forceFinished(true); - } - if (!scroller.isFinished()) { - animationHandler.sendEmptyMessage(msg.what); - } else if (msg.what == MESSAGE_SCROLL) { - justify(); - } else { - finishScrolling(); - } - } - }; - - /** - * Justifies wheel - */ - private void justify() { - listener.onJustify(); - setNextMessage(MESSAGE_JUSTIFY); - } - - /** - * Starts scrolling - */ - private void startScrolling() { - if (!isScrollingPerformed) { - isScrollingPerformed = true; - listener.onStarted(); - } - } - - /** - * Finishes scrolling - */ - void finishScrolling() { - if (isScrollingPerformed) { - listener.onFinished(); - isScrollingPerformed = false; - } - } -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelView.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelView.java deleted file mode 100644 index e8324e88..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/WheelView.java +++ /dev/null @@ -1,889 +0,0 @@ -/* - * Android Wheel Control. - * https://code.google.com/p/android-wheel/ - * - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget; - -import android.content.Context; -import android.database.DataSetObserver; -import android.graphics.Canvas; -import android.graphics.drawable.Drawable; -import android.graphics.drawable.GradientDrawable; -import android.graphics.drawable.GradientDrawable.Orientation; -import android.media.AudioManager; -import android.util.AttributeSet; -import android.view.MotionEvent; -import android.view.SoundEffectConstants; -import android.view.View; -import android.view.ViewGroup.LayoutParams; -import android.view.animation.Interpolator; -import android.widget.LinearLayout; - -import com.artifex.mupdf.fitz.R; - -import java.util.LinkedList; -import java.util.List; - -import kankan.wheel.widget.adapters.WheelViewAdapter; - - - -/** - * Numeric wheel view. - * - * @author Yuri Kanivets - */ -public class WheelView extends View { - - /** Top and bottom shadows colors */ - private static final int[] SHADOWS_COLORS = new int[] { 0xFF111111, - 0x00AAAAAA, 0x00AAAAAA }; - - /** Top and bottom items offset (to hide that) */ - private static final int ITEM_OFFSET_PERCENT = 10; - - /** Left and right padding value */ - private static final int PADDING = 10; - - /** Default count of visible items */ - private static final int DEF_VISIBLE_ITEMS = 5; - - // Wheel Values - private int currentItem = 0; - - // Count of visible items - private int visibleItems = DEF_VISIBLE_ITEMS; - - // Item height - private int itemHeight = 0; - - // Center Line - private Drawable centerDrawable; - - // // Shadows drawables - private GradientDrawable topShadow; - private GradientDrawable bottomShadow; - - // Scrolling - private WheelScroller scroller; - private boolean isScrollingPerformed; - private int scrollingOffset; - - // Cyclic - boolean isCyclic = false; - - // Items layout - private LinearLayout itemsLayout; - - // The number of first item in layout - private int firstItem; - - // View adapter - private WheelViewAdapter viewAdapter; - - // Recycle - private WheelRecycle recycle = new WheelRecycle(this); - - // Listeners - private List<OnWheelChangedListener> changingListeners = new LinkedList<OnWheelChangedListener>(); - private List<OnWheelScrollListener> scrollingListeners = new LinkedList<OnWheelScrollListener>(); - private List<OnWheelClickedListener> clickingListeners = new LinkedList<OnWheelClickedListener>(); - - /** - * Constructor - */ - public WheelView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - initData(context); - } - - /** - * Constructor - */ - public WheelView(Context context, AttributeSet attrs) { - super(context, attrs); - initData(context); - } - - /** - * Constructor - */ - public WheelView(Context context) { - super(context); - initData(context); - } - - /** - * Initializes class data - * @param context the context - */ - private void initData(Context context) { - scroller = new WheelScroller(getContext(), scrollingListener); - } - - // Scrolling listener - WheelScroller.ScrollingListener scrollingListener = new WheelScroller.ScrollingListener() { - public void onStarted() { - isScrollingPerformed = true; - notifyScrollingListenersAboutStart(); - } - - public void onScroll(int distance) { - doScroll(distance); - - int height = getHeight(); - if (scrollingOffset > height) { - scrollingOffset = height; - scroller.stopScrolling(); - } else if (scrollingOffset < -height) { - scrollingOffset = -height; - scroller.stopScrolling(); - } - } - - public void onFinished() { - if (isScrollingPerformed) { - notifyScrollingListenersAboutEnd(); - isScrollingPerformed = false; - } - - scrollingOffset = 0; - invalidate(); - } - - public void onJustify() { - if (Math.abs(scrollingOffset) > WheelScroller.MIN_DELTA_FOR_SCROLLING) { - scroller.scroll(scrollingOffset, 0); - } - } - }; - - /** - * Set the the specified scrolling interpolator - * @param interpolator the interpolator - */ - public void setInterpolator(Interpolator interpolator) { - scroller.setInterpolator(interpolator); - } - - /** - * Gets count of visible items - * - * @return the count of visible items - */ - public int getVisibleItems() { - return visibleItems; - } - - /** - * Sets the desired count of visible items. - * Actual amount of visible items depends on wheel layout parameters. - * To apply changes and rebuild view call measure(). - * - * @param count the desired count for visible items - */ - public void setVisibleItems(int count) { - visibleItems = count; - } - - /** - * Gets view adapter - * @return the view adapter - */ - public WheelViewAdapter getViewAdapter() { - return viewAdapter; - } - - // Adapter listener - private DataSetObserver dataObserver = new DataSetObserver() { - @Override - public void onChanged() { - invalidateWheel(false); - } - - @Override - public void onInvalidated() { - invalidateWheel(true); - } - }; - - /** - * Sets view adapter. Usually new adapters contain different views, so - * it needs to rebuild view by calling measure(). - * - * @param viewAdapter the view adapter - */ - public void setViewAdapter(WheelViewAdapter viewAdapter) { - if (this.viewAdapter != null) { - this.viewAdapter.unregisterDataSetObserver(dataObserver); - } - this.viewAdapter = viewAdapter; - if (this.viewAdapter != null) { - this.viewAdapter.registerDataSetObserver(dataObserver); - } - - invalidateWheel(true); - } - - /** - * Adds wheel changing listener - * @param listener the listener - */ - public void addChangingListener(OnWheelChangedListener listener) { - changingListeners.add(listener); - } - - /** - * Removes wheel changing listener - * @param listener the listener - */ - public void removeChangingListener(OnWheelChangedListener listener) { - changingListeners.remove(listener); - } - - /** - * Notifies changing listeners - * @param oldValue the old wheel value - * @param newValue the new wheel value - */ - protected void notifyChangingListeners(int oldValue, int newValue) { - for (OnWheelChangedListener listener : changingListeners) { - listener.onChanged(this, oldValue, newValue); - } - - // play a sound. - // TODO: something better - this.playSoundEffect(SoundEffectConstants.CLICK); - } - - /** - * Adds wheel scrolling listener - * @param listener the listener - */ - public void addScrollingListener(OnWheelScrollListener listener) { - scrollingListeners.add(listener); - } - - /** - * Removes wheel scrolling listener - * @param listener the listener - */ - public void removeScrollingListener(OnWheelScrollListener listener) { - scrollingListeners.remove(listener); - } - - /** - * Notifies listeners about starting scrolling - */ - protected void notifyScrollingListenersAboutStart() { - for (OnWheelScrollListener listener : scrollingListeners) { - listener.onScrollingStarted(this); - } - } - - /** - * Notifies listeners about ending scrolling - */ - protected void notifyScrollingListenersAboutEnd() { - for (OnWheelScrollListener listener : scrollingListeners) { - listener.onScrollingFinished(this); - } - } - - /** - * Adds wheel clicking listener - * @param listener the listener - */ - public void addClickingListener(OnWheelClickedListener listener) { - clickingListeners.add(listener); - } - - /** - * Removes wheel clicking listener - * @param listener the listener - */ - public void removeClickingListener(OnWheelClickedListener listener) { - clickingListeners.remove(listener); - } - - /** - * Notifies listeners about clicking - */ - protected void notifyClickListenersAboutClick(int item) { - for (OnWheelClickedListener listener : clickingListeners) { - listener.onItemClicked(this, item); - } - } - - /** - * Gets current value - * - * @return the current value - */ - public int getCurrentItem() { - return currentItem; - } - - /** - * Sets the current item. Does nothing when index is wrong. - * - * @param index the item index - * @param animated the animation flag - */ - public void setCurrentItem(int index, boolean animated) { - if (viewAdapter == null || viewAdapter.getItemsCount() == 0) { - return; // throw? - } - - int itemCount = viewAdapter.getItemsCount(); - if (index < 0 || index >= itemCount) { - if (isCyclic) { - while (index < 0) { - index += itemCount; - } - index %= itemCount; - } else{ - return; // throw? - } - } - if (index != currentItem) { - if (animated) { - int itemsToScroll = index - currentItem; - if (isCyclic) { - int scroll = itemCount + Math.min(index, currentItem) - Math.max(index, currentItem); - if (scroll < Math.abs(itemsToScroll)) { - itemsToScroll = itemsToScroll < 0 ? scroll : -scroll; - } - } - scroll(itemsToScroll, 0); - } else { - scrollingOffset = 0; - - int old = currentItem; - currentItem = index; - - notifyChangingListeners(old, currentItem); - - invalidate(); - } - } - } - - /** - * Sets the current item w/o animation. Does nothing when index is wrong. - * - * @param index the item index - */ - public void setCurrentItem(int index) { - setCurrentItem(index, false); - } - - /** - * Tests if wheel is cyclic. That means before the 1st item there is shown the last one - * @return true if wheel is cyclic - */ - public boolean isCyclic() { - return isCyclic; - } - - /** - * Set wheel cyclic flag - * @param isCyclic the flag to set - */ - public void setCyclic(boolean isCyclic) { - this.isCyclic = isCyclic; - invalidateWheel(false); - } - - /** - * Invalidates wheel - * @param clearCaches if true then cached views will be clear - */ - public void invalidateWheel(boolean clearCaches) { - if (clearCaches) { - recycle.clearAll(); - if (itemsLayout != null) { - itemsLayout.removeAllViews(); - } - scrollingOffset = 0; - } else if (itemsLayout != null) { - // cache all items - recycle.recycleItems(itemsLayout, firstItem, new ItemsRange()); - } - - invalidate(); - } - - /** - * Initializes resources - */ - private void initResourcesIfNecessary() { - if (centerDrawable == null) { - centerDrawable = getContext().getResources().getDrawable(R.drawable.wheel_val); - } - - if (topShadow == null) { - topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS); - } - - if (bottomShadow == null) { - bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS); - } - - setBackgroundResource(R.drawable.wheel_bg); - } - - /** - * Calculates desired height for layout - * - * @param layout - * the source layout - * @return the desired layout height - */ - private int getDesiredHeight(LinearLayout layout) { - if (layout != null && layout.getChildAt(0) != null) { - itemHeight = layout.getChildAt(0).getMeasuredHeight(); - } - - int desired = itemHeight * visibleItems - itemHeight * ITEM_OFFSET_PERCENT / 50; - - return Math.max(desired, getSuggestedMinimumHeight()); - } - - /** - * Returns height of wheel item - * @return the item height - */ - private int getItemHeight() { - if (itemHeight != 0) { - return itemHeight; - } - - if (itemsLayout != null && itemsLayout.getChildAt(0) != null) { - itemHeight = itemsLayout.getChildAt(0).getHeight(); - return itemHeight; - } - - return getHeight() / visibleItems; - } - - /** - * Calculates control width and creates text layouts - * @param widthSize the input layout width - * @param mode the layout mode - * @return the calculated control width - */ - private int calculateLayoutWidth(int widthSize, int mode) { - initResourcesIfNecessary(); - - // TODO: make it static - itemsLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); - itemsLayout.measure(MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.UNSPECIFIED), - MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); - int width = itemsLayout.getMeasuredWidth(); - - if (mode == MeasureSpec.EXACTLY) { - width = widthSize; - } else { - width += 2 * PADDING; - - // Check against our minimum width - width = Math.max(width, getSuggestedMinimumWidth()); - - if (mode == MeasureSpec.AT_MOST && widthSize < width) { - width = widthSize; - } - } - - itemsLayout.measure(MeasureSpec.makeMeasureSpec(width - 2 * PADDING, MeasureSpec.EXACTLY), - MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); - - return width; - } - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - int widthMode = MeasureSpec.getMode(widthMeasureSpec); - int heightMode = MeasureSpec.getMode(heightMeasureSpec); - int widthSize = MeasureSpec.getSize(widthMeasureSpec); - int heightSize = MeasureSpec.getSize(heightMeasureSpec); - - buildViewForMeasuring(); - - int width = calculateLayoutWidth(widthSize, widthMode); - - int height; - if (heightMode == MeasureSpec.EXACTLY) { - height = heightSize; - } else { - height = getDesiredHeight(itemsLayout); - - if (heightMode == MeasureSpec.AT_MOST) { - height = Math.min(height, heightSize); - } - } - - setMeasuredDimension(width, height); - } - - @Override - protected void onLayout(boolean changed, int l, int t, int r, int b) { - layout(r - l, b - t); - } - - /** - * Sets layouts width and height - * @param width the layout width - * @param height the layout height - */ - private void layout(int width, int height) { - int itemsWidth = width - 2 * PADDING; - - itemsLayout.layout(0, 0, itemsWidth, height); - } - - @Override - protected void onDraw(Canvas canvas) { - super.onDraw(canvas); - - if (viewAdapter != null && viewAdapter.getItemsCount() > 0) { - updateView(); - - drawItems(canvas); - drawCenterRect(canvas); - } - -// drawShadows(canvas); - } - - /** - * Draws shadows on top and bottom of control - * @param canvas the canvas for drawing - */ - private void drawShadows(Canvas canvas) { - int height = (int)(1.5 * getItemHeight()); - topShadow.setBounds(0, 0, getWidth(), height); - topShadow.draw(canvas); - - bottomShadow.setBounds(0, getHeight() - height, getWidth(), getHeight()); - bottomShadow.draw(canvas); - } - - /** - * Draws items - * @param canvas the canvas for drawing - */ - private void drawItems(Canvas canvas) { - canvas.save(); - - int top = (currentItem - firstItem) * getItemHeight() + (getItemHeight() - getHeight()) / 2; - canvas.translate(PADDING, - top + scrollingOffset); - - itemsLayout.draw(canvas); - - canvas.restore(); - } - - /** - * Draws rect for current value - * @param canvas the canvas for drawing - */ - private void drawCenterRect(Canvas canvas) { - int center = getHeight() / 2; - int offset = (int) (getItemHeight() / 2 * 1.2); - centerDrawable.setBounds(0, center - offset, getWidth(), center + offset); - centerDrawable.draw(canvas); - } - - @Override - public boolean onTouchEvent(MotionEvent event) { - if (!isEnabled() || getViewAdapter() == null) { - return true; - } - - switch (event.getAction()) { - case MotionEvent.ACTION_MOVE: - if (getParent() != null) { - getParent().requestDisallowInterceptTouchEvent(true); - } - break; - - case MotionEvent.ACTION_UP: - if (!isScrollingPerformed) { - int distance = (int) event.getY() - getHeight() / 2; - if (distance > 0) { - distance += getItemHeight() / 2; - } else { - distance -= getItemHeight() / 2; - } - int items = distance / getItemHeight(); - if (items != 0 && isValidItemIndex(currentItem + items)) { - notifyClickListenersAboutClick(currentItem + items); - } - } - break; - } - - return scroller.onTouchEvent(event); - } - - /** - * Scrolls the wheel - * @param delta the scrolling value - */ - private void doScroll(int delta) { - scrollingOffset += delta; - - int itemHeight = getItemHeight(); - int count = scrollingOffset / itemHeight; - - int pos = currentItem - count; - int itemCount = viewAdapter.getItemsCount(); - - int fixPos = scrollingOffset % itemHeight; - if (Math.abs(fixPos) <= itemHeight / 2) { - fixPos = 0; - } - if (isCyclic && itemCount > 0) { - if (fixPos > 0) { - pos--; - count++; - } else if (fixPos < 0) { - pos++; - count--; - } - // fix position by rotating - while (pos < 0) { - pos += itemCount; - } - pos %= itemCount; - } else { - // - if (pos < 0) { - count = currentItem; - pos = 0; - } else if (pos >= itemCount) { - count = currentItem - itemCount + 1; - pos = itemCount - 1; - } else if (pos > 0 && fixPos > 0) { - pos--; - count++; - } else if (pos < itemCount - 1 && fixPos < 0) { - pos++; - count--; - } - } - - int offset = scrollingOffset; - if (pos != currentItem) { - setCurrentItem(pos, false); - } else { - invalidate(); - } - - // update offset - scrollingOffset = offset - count * itemHeight; - if (scrollingOffset > getHeight()) { - scrollingOffset = scrollingOffset % getHeight() + getHeight(); - } - } - - /** - * Scroll the wheel - * @param itemsToSkip items to scroll - * @param time scrolling duration - */ - public void scroll(int itemsToScroll, int time) { - int distance = itemsToScroll * getItemHeight() - scrollingOffset; - scroller.scroll(distance, time); - } - - /** - * Calculates range for wheel items - * @return the items range - */ - private ItemsRange getItemsRange() { - if (getItemHeight() == 0) { - return null; - } - - int first = currentItem; - int count = 1; - - while (count * getItemHeight() < getHeight()) { - first--; - count += 2; // top + bottom items - } - - if (scrollingOffset != 0) { - if (scrollingOffset > 0) { - first--; - } - count++; - - // process empty items above the first or below the second - int emptyItems = scrollingOffset / getItemHeight(); - first -= emptyItems; - count += Math.asin(emptyItems); - } - return new ItemsRange(first, count); - } - - /** - * Rebuilds wheel items if necessary. Caches all unused items. - * - * @return true if items are rebuilt - */ - private boolean rebuildItems() { - boolean updated = false; - ItemsRange range = getItemsRange(); - if (itemsLayout != null) { - int first = recycle.recycleItems(itemsLayout, firstItem, range); - updated = firstItem != first; - firstItem = first; - } else { - createItemsLayout(); - updated = true; - } - - if (!updated) { - updated = firstItem != range.getFirst() || itemsLayout.getChildCount() != range.getCount(); - } - - if (firstItem > range.getFirst() && firstItem <= range.getLast()) { - for (int i = firstItem - 1; i >= range.getFirst(); i--) { - if (!addViewItem(i, true)) { - break; - } - firstItem = i; - } - } else { - firstItem = range.getFirst(); - } - - int first = firstItem; - for (int i = itemsLayout.getChildCount(); i < range.getCount(); i++) { - if (!addViewItem(firstItem + i, false) && itemsLayout.getChildCount() == 0) { - first++; - } - } - firstItem = first; - - return updated; - } - - /** - * Updates view. Rebuilds items and label if necessary, recalculate items sizes. - */ - private void updateView() { - if (rebuildItems()) { - calculateLayoutWidth(getWidth(), MeasureSpec.EXACTLY); - layout(getWidth(), getHeight()); - } - } - - /** - * Creates item layouts if necessary - */ - private void createItemsLayout() { - if (itemsLayout == null) { - itemsLayout = new LinearLayout(getContext()); - itemsLayout.setOrientation(LinearLayout.VERTICAL); - } - } - - /** - * Builds view for measuring - */ - private void buildViewForMeasuring() { - // clear all items - if (itemsLayout != null) { - recycle.recycleItems(itemsLayout, firstItem, new ItemsRange()); - } else { - createItemsLayout(); - } - - // add views - int addItems = visibleItems / 2; - for (int i = currentItem + addItems; i >= currentItem - addItems; i--) { - if (addViewItem(i, true)) { - firstItem = i; - } - } - } - - /** - * Adds view for item to items layout - * @param index the item index - * @param first the flag indicates if view should be first - * @return true if corresponding item exists and is added - */ - private boolean addViewItem(int index, boolean first) { - View view = getItemView(index); - if (view != null) { - if (first) { - itemsLayout.addView(view, 0); - } else { - itemsLayout.addView(view); - } - - return true; - } - - return false; - } - - /** - * Checks whether intem index is valid - * @param index the item index - * @return true if item index is not out of bounds or the wheel is cyclic - */ - private boolean isValidItemIndex(int index) { - return viewAdapter != null && viewAdapter.getItemsCount() > 0 && - (isCyclic || index >= 0 && index < viewAdapter.getItemsCount()); - } - - /** - * Returns view for specified item - * @param index the item index - * @return item view or empty view if index is out of bounds - */ - private View getItemView(int index) { - if (viewAdapter == null || viewAdapter.getItemsCount() == 0) { - return null; - } - int count = viewAdapter.getItemsCount(); - if (!isValidItemIndex(index)) { - return viewAdapter.getEmptyItem(recycle.getEmptyItem(), itemsLayout); - } else { - while (index < 0) { - index = count + index; - } - } - - index %= count; - return viewAdapter.getItem(index, recycle.getItem(), itemsLayout); - } - - /** - * Stops scrolling - */ - public void stopScrolling() { - scroller.stopScrolling(); - } -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/AbstractWheelAdapter.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/AbstractWheelAdapter.java deleted file mode 100644 index 8d7f1447..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/AbstractWheelAdapter.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget.adapters; - -import android.database.DataSetObserver; -import android.view.View; -import android.view.ViewGroup; - -import java.util.LinkedList; -import java.util.List; - -/** - * Abstract Wheel adapter. - */ -public abstract class AbstractWheelAdapter implements WheelViewAdapter { - // Observers - private List<DataSetObserver> datasetObservers; - - @Override - public View getEmptyItem(View convertView, ViewGroup parent) { - return null; - } - - @Override - public void registerDataSetObserver(DataSetObserver observer) { - if (datasetObservers == null) { - datasetObservers = new LinkedList<DataSetObserver>(); - } - datasetObservers.add(observer); - } - - @Override - public void unregisterDataSetObserver(DataSetObserver observer) { - if (datasetObservers != null) { - datasetObservers.remove(observer); - } - } - - /** - * Notifies observers about data changing - */ - protected void notifyDataChangedEvent() { - if (datasetObservers != null) { - for (DataSetObserver observer : datasetObservers) { - observer.onChanged(); - } - } - } - - /** - * Notifies observers about invalidating data - */ - protected void notifyDataInvalidatedEvent() { - if (datasetObservers != null) { - for (DataSetObserver observer : datasetObservers) { - observer.onInvalidated(); - } - } - } -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/AbstractWheelTextAdapter.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/AbstractWheelTextAdapter.java deleted file mode 100644 index 620c8e74..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/AbstractWheelTextAdapter.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget.adapters; - -import android.content.Context; -import android.graphics.Typeface; -import android.util.Log; -import android.view.Gravity; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -/** - * Abstract wheel adapter provides common functionality for adapters. - */ -public abstract class AbstractWheelTextAdapter extends AbstractWheelAdapter { - - /** Text view resource. Used as a default view for adapter. */ - public static final int TEXT_VIEW_ITEM_RESOURCE = -1; - - /** No resource constant. */ - protected static final int NO_RESOURCE = 0; - - /** Default text color */ - public static final int DEFAULT_TEXT_COLOR = 0xFF101010; - - /** Default text color */ - public static final int LABEL_COLOR = 0xFF700070; - - /** Default text size */ - public static final int DEFAULT_TEXT_SIZE = 24; - - // Text settings - private int textColor = DEFAULT_TEXT_COLOR; - private int textSize = DEFAULT_TEXT_SIZE; - - // Current context - protected Context context; - // Layout inflater - protected LayoutInflater inflater; - - // Items resources - protected int itemResourceId; - protected int itemTextResourceId; - - // Empty items resources - protected int emptyItemResourceId; - - /** - * Constructor - * @param context the current context - */ - protected AbstractWheelTextAdapter(Context context) { - this(context, TEXT_VIEW_ITEM_RESOURCE); - } - - /** - * Constructor - * @param context the current context - * @param itemResource the resource ID for a layout file containing a TextView to use when instantiating items views - */ - protected AbstractWheelTextAdapter(Context context, int itemResource) { - this(context, itemResource, NO_RESOURCE); - } - - /** - * Constructor - * @param context the current context - * @param itemResource the resource ID for a layout file containing a TextView to use when instantiating items views - * @param itemTextResource the resource ID for a text view in the item layout - */ - protected AbstractWheelTextAdapter(Context context, int itemResource, int itemTextResource) { - this.context = context; - itemResourceId = itemResource; - itemTextResourceId = itemTextResource; - - inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - } - - /** - * Gets text color - * @return the text color - */ - public int getTextColor() { - return textColor; - } - - /** - * Sets text color - * @param textColor the text color to set - */ - public void setTextColor(int textColor) { - this.textColor = textColor; - } - - /** - * Gets text size - * @return the text size - */ - public int getTextSize() { - return textSize; - } - - /** - * Sets text size - * @param textSize the text size to set - */ - public void setTextSize(int textSize) { - this.textSize = textSize; - } - - /** - * Gets resource Id for items views - * @return the item resource Id - */ - public int getItemResource() { - return itemResourceId; - } - - /** - * Sets resource Id for items views - * @param itemResourceId the resource Id to set - */ - public void setItemResource(int itemResourceId) { - this.itemResourceId = itemResourceId; - } - - /** - * Gets resource Id for text view in item layout - * @return the item text resource Id - */ - public int getItemTextResource() { - return itemTextResourceId; - } - - /** - * Sets resource Id for text view in item layout - * @param itemTextResourceId the item text resource Id to set - */ - public void setItemTextResource(int itemTextResourceId) { - this.itemTextResourceId = itemTextResourceId; - } - - /** - * Gets resource Id for empty items views - * @return the empty item resource Id - */ - public int getEmptyItemResource() { - return emptyItemResourceId; - } - - /** - * Sets resource Id for empty items views - * @param emptyItemResourceId the empty item resource Id to set - */ - public void setEmptyItemResource(int emptyItemResourceId) { - this.emptyItemResourceId = emptyItemResourceId; - } - - - /** - * Returns text for specified item - * @param index the item index - * @return the text of specified items - */ - protected abstract CharSequence getItemText(int index); - - @Override - public View getItem(int index, View convertView, ViewGroup parent) { - if (index >= 0 && index < getItemsCount()) { - if (convertView == null) { - convertView = getView(itemResourceId, parent); - } - TextView textView = getTextView(convertView, itemTextResourceId); - if (textView != null) { - CharSequence text = getItemText(index); - if (text == null) { - text = ""; - } - textView.setText(text); - - if (itemResourceId == TEXT_VIEW_ITEM_RESOURCE) { - configureTextView(textView); - } - } - return convertView; - } - return null; - } - - @Override - public View getEmptyItem(View convertView, ViewGroup parent) { - if (convertView == null) { - convertView = getView(emptyItemResourceId, parent); - } - if (emptyItemResourceId == TEXT_VIEW_ITEM_RESOURCE && convertView instanceof TextView) { - configureTextView((TextView)convertView); - } - - return convertView; - } - - /** - * Configures text view. Is called for the TEXT_VIEW_ITEM_RESOURCE views. - * @param view the text view to be configured - */ - protected void configureTextView(TextView view) { - view.setTextColor(textColor); - view.setGravity(Gravity.CENTER); - view.setTextSize(textSize); - view.setLines(1); -// view.setTypeface(Typeface.SANS_SERIF, Typeface.BOLD); - view.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL); - } - - /** - * Loads a text view from view - * @param view the text view or layout containing it - * @param textResource the text resource Id in layout - * @return the loaded text view - */ - private TextView getTextView(View view, int textResource) { - TextView text = null; - try { - if (textResource == NO_RESOURCE && view instanceof TextView) { - text = (TextView) view; - } else if (textResource != NO_RESOURCE) { - text = (TextView) view.findViewById(textResource); - } - } catch (ClassCastException e) { - Log.e("AbstractWheelAdapter", "You must supply a resource ID for a TextView"); - throw new IllegalStateException( - "AbstractWheelAdapter requires the resource ID to be a TextView", e); - } - - return text; - } - - /** - * Loads view from resources - * @param resource the resource Id - * @return the loaded view or null if resource is not set - */ - private View getView(int resource, ViewGroup parent) { - switch (resource) { - case NO_RESOURCE: - return null; - case TEXT_VIEW_ITEM_RESOURCE: - return new TextView(context); - default: - return inflater.inflate(resource, parent, false); - } - } -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/AdapterWheel.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/AdapterWheel.java deleted file mode 100644 index 000001cd..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/AdapterWheel.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget.adapters; - -import android.content.Context; - -import kankan.wheel.widget.WheelAdapter; - -/** - * Adapter class for old wheel adapter (deprecated WheelAdapter class). - * - * @deprecated Will be removed soon - */ -public class AdapterWheel extends AbstractWheelTextAdapter { - - // Source adapter - private WheelAdapter adapter; - - /** - * Constructor - * @param context the current context - * @param adapter the source adapter - */ - public AdapterWheel(Context context, WheelAdapter adapter) { - super(context); - - this.adapter = adapter; - } - - /** - * Gets original adapter - * @return the original adapter - */ - public WheelAdapter getAdapter() { - return adapter; - } - - @Override - public int getItemsCount() { - return adapter.getItemsCount(); - } - - @Override - protected CharSequence getItemText(int index) { - return adapter.getItem(index); - } - -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/ArrayWheelAdapter.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/ArrayWheelAdapter.java deleted file mode 100644 index c9d430d7..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/ArrayWheelAdapter.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget.adapters; - -import android.content.Context; - -/** - * The simple Array wheel adapter - * @param <T> the element type - */ -public class ArrayWheelAdapter<T> extends AbstractWheelTextAdapter { - - // items - private T items[]; - - /** - * Constructor - * @param context the current context - * @param items the items - */ - public ArrayWheelAdapter(Context context, T items[]) { - super(context); - - //setEmptyItemResource(TEXT_VIEW_ITEM_RESOURCE); - this.items = items; - } - - public void setItems(T items[]) - { - this.items = items; - } - - @Override - public CharSequence getItemText(int index) { - if (index >= 0 && index < items.length) { - T item = items[index]; - if (item instanceof CharSequence) { - return (CharSequence) item; - } - return item.toString(); - } - return null; - } - - @Override - public int getItemsCount() { - return items.length; - } -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/ArrayWheelAdapterColor.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/ArrayWheelAdapterColor.java deleted file mode 100644 index cf4a9954..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/ArrayWheelAdapterColor.java +++ /dev/null @@ -1,50 +0,0 @@ -package kankan.wheel.widget.adapters; - -import android.content.Context; -import android.graphics.Color; -import android.widget.TextView; - -public class ArrayWheelAdapterColor<T> extends AbstractWheelTextAdapter { - - // items - private T items[]; - - public ArrayWheelAdapterColor(Context context, T items[]) { - super(context); - - this.items = items; - } - - @Override - public CharSequence getItemText(int index) { - if (index >= 0 && index < items.length) { - T item = items[index]; - if (item instanceof CharSequence) { - return (CharSequence) item; - } - return item.toString(); - } - return null; - } - - @Override - public int getItemsCount() { - return items.length; - } - - @Override - protected void configureTextView(TextView view) { - super.configureTextView(view); - - // if the text ends with "(red)" - // color it red. - String text = view.getText().toString(); - if (text.endsWith("(red)")) - { - text = text.replace("(red)",""); - view.setText(text); - view.setTextColor(Color.parseColor("#ff0000")); - } - } - -}
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/NumericWheelAdapter.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/NumericWheelAdapter.java deleted file mode 100644 index ec8b9c86..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/NumericWheelAdapter.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget.adapters; - -import android.content.Context; - -/** - * Numeric Wheel adapter. - */ -public class NumericWheelAdapter extends AbstractWheelTextAdapter { - - /** The default min value */ - public static final int DEFAULT_MAX_VALUE = 9; - - /** The default max value */ - private static final int DEFAULT_MIN_VALUE = 0; - - // Values - private int minValue; - private int maxValue; - - // format - private String format; - - /** - * Constructor - * @param context the current context - */ - public NumericWheelAdapter(Context context) { - this(context, DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE); - } - - /** - * Constructor - * @param context the current context - * @param minValue the wheel min value - * @param maxValue the wheel max value - */ - public NumericWheelAdapter(Context context, int minValue, int maxValue) { - this(context, minValue, maxValue, null); - } - - /** - * Constructor - * @param context the current context - * @param minValue the wheel min value - * @param maxValue the wheel max value - * @param format the format string - */ - public NumericWheelAdapter(Context context, int minValue, int maxValue, String format) { - super(context); - - this.minValue = minValue; - this.maxValue = maxValue; - this.format = format; - } - - @Override - public CharSequence getItemText(int index) { - if (index >= 0 && index < getItemsCount()) { - int value = minValue + index; - return format != null ? String.format(format, value) : Integer.toString(value); - } - return null; - } - - @Override - public int getItemsCount() { - return maxValue - minValue + 1; - } -} diff --git a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/WheelViewAdapter.java b/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/WheelViewAdapter.java deleted file mode 100644 index db256570..00000000 --- a/platform/android/example/mupdf/src/main/java/kankan/wheel/widget/adapters/WheelViewAdapter.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2011 Yuri Kanivets - * - * 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 kankan.wheel.widget.adapters; - -import android.database.DataSetObserver; -import android.view.View; -import android.view.ViewGroup; - -/** - * Wheel items adapter interface - */ -public interface WheelViewAdapter { - /** - * Gets items count - * @return the count of wheel items - */ - public int getItemsCount(); - - /** - * Get a View that displays the data at the specified position in the data set - * - * @param index the item index - * @param convertView the old view to reuse if possible - * @param parent the parent that this view will eventually be attached to - * @return the wheel item View - */ - public View getItem(int index, View convertView, ViewGroup parent); - - /** - * Get a View that displays an empty wheel item placed before the first or after - * the last wheel item. - * - * @param convertView the old view to reuse if possible - * @param parent the parent that this view will eventually be attached to - * @return the empty item View - */ - public View getEmptyItem(View convertView, ViewGroup parent); - - /** - * Register an observer that is called when changes happen to the data used by this adapter. - * @param observer the observer to be registered - */ - public void registerDataSetObserver(DataSetObserver observer); - - /** - * Unregister an observer that has previously been registered - * @param observer the observer to be unregistered - */ - void unregisterDataSetObserver (DataSetObserver observer); -} diff --git a/platform/android/example/mupdf/src/main/res/activity_doc_view.xml b/platform/android/example/mupdf/src/main/res/activity_doc_view.xml deleted file mode 100755 index 00065cf6..00000000 --- a/platform/android/example/mupdf/src/main/res/activity_doc_view.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"> - - <com.artifex.mupdf.android.DocActivityView - android:id="@+id/doc_view" - android:layout_width="match_parent" - android:layout_height="match_parent"> - </com.artifex.mupdf.android.DocActivityView> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/drawable/apply_button.xml b/platform/android/example/mupdf/src/main/res/drawable/apply_button.xml deleted file mode 100644 index 4f5c926c..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/apply_button.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_enabled="false"> - <shape> - <solid android:color="@color/white" /> - </shape> - </item> - <item android:state_enabled="true"> - <shape> - <solid android:color="#ff535353" /> - </shape> - </item> -</selector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/button.xml b/platform/android/example/mupdf/src/main/res/drawable/button.xml deleted file mode 100644 index 9258d530..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/button.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_pressed="true"> - <shape> - <solid android:color="@color/button_pressed" /> - <corners android:radius="12dp"/> - <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> - </shape> - </item> - <item android:state_focused="true"> - <shape> - <solid android:color="@color/button_normal" /> - <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> - </shape> - </item> - <item android:state_selected="true"> - <shape> - <solid android:color="@color/button_selected" /> - <corners android:radius="12dp"/> - <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> - </shape> - </item> - <item> - <shape> - <solid android:color="@color/button_normal" /> - <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> - </shape> - </item> -</selector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/color_box.xml b/platform/android/example/mupdf/src/main/res/drawable/color_box.xml deleted file mode 100644 index c8b47a52..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/color_box.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <stroke android:width="1dp" android:color="#ff000000" /> - <solid android:color="#ffffffff" /> -</shape> diff --git a/platform/android/example/mupdf/src/main/res/drawable/colors.xml b/platform/android/example/mupdf/src/main/res/drawable/colors.xml deleted file mode 100644 index eff1250e..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/colors.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <stroke android:width="1dp" android:color="#797979" /> - <solid android:color="@color/bluish_grey" /> - <corners - android:radius="7dp" /> - <padding - android:top="10dp" - android:left="10dp" - android:right="10dp" - android:bottom="10dp" - /> -</shape> diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_back.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_back.xml deleted file mode 100644 index 8973b8cd..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_back.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="2.518" - android:pathData="M 8.353 24.329 L 43.359 24.329" /> - <path - android:strokeColor="#333333" - android:strokeWidth="2.518" - android:pathData="M 20.729 11.168 L 7.789 24.297 L 20.825 36.58 " /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_delete.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_delete.xml deleted file mode 100755 index d027b030..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_delete.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="1.331" - android:pathData="M 25 9.92 C 33.3284540274 9.92 40.08 16.6715459726 40.08 25 C 40.08 33.3284540274 33.3284540274 40.08 25 40.08 C 16.6715459726 40.08 9.92 33.3284540274 9.92 25 C 9.92 16.6715459726 16.6715459726 9.92 25 9.92 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.774" - android:pathData="M 17.622 32.934 L 32.257 18.299" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.774" - android:pathData="M 32.257 32.934 L 17.622 18.297" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_draw.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_draw.xml deleted file mode 100644 index 808efdaa..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_draw.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M33.1075,16.6386 L38.7232,19.2633 L31.7612,34.159 L26.1455,31.5343 -L33.1075,16.6386 Z" /> - <path - android:fillColor="#333333" - android:pathData="M25.735,32.435 L31.334,35.052 L25.884,39.634 Z" /> - <path - android:fillColor="#333333" - android:pathData="M39.29,18.067 L41.299,13.773 C41.358,13.646,41.302,13.495,41.176,13.435 -L36.02,11.025 C35.893,10.965,35.741,11.021,35.682,11.148 L33.675,15.442 -L39.29,18.067 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.04" - android:strokeLineCap="round" - android:pathData="M8.738,10.366 C8.738,10.366,26.245,13.833,24.685,17.3 -C23.125,20.765,9.953,21.286,8.738,25.793 C7.525,30.3,24.859,39.313,24.859,39.313" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_find.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_find.xml deleted file mode 100644 index 71020d8f..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_find.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M22.205,8.403c6.879,0,12.452,5.574,12.452,12.452 -c0,6.876-5.573,12.45-12.452,12.45c-6.877,0-12.451-5.574-12.451-12.45C9.754,13.977,15.328,8.403,22.205,8.403 -M22.205,10.016 -c-5.977,0-10.838,4.862-10.838,10.839c0,5.976,4.861,10.838,10.838,10.838c5.977,0,10.84-4.862,10.84-10.838 -C33.045,14.877,28.182,10.016,22.205,10.016" /> - <path - android:strokeColor="#333333" - android:strokeWidth="2.348" - android:pathData="M 41.27 40.573 L 29.534 28.836" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_find_next.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_find_next.xml deleted file mode 100755 index 57d0f47e..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_find_next.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M17.508,11.042c5.84,0,10.572,4.733,10.572,10.573 -c0,5.84-4.732,10.573-10.572,10.573S6.935,27.455,6.935,21.615C6.935,15.775,11.668,11.042,17.508,11.042 -M17.508,13.391 -c-4.535,0-8.225,3.689-8.225,8.224s3.69,8.225,8.225,8.225s8.224-3.689,8.224-8.225S22.043,13.391,17.508,13.391" /> - <path - android:strokeColor="#333333" - android:strokeWidth="2.348" - android:pathData="M 33.695 38.359 L 23.73 28.395" /> - <path - android:fillColor="#333333" - android:pathData="M 31.18 19.878 H 37.413 V 24.173 H 31.18 V 19.878 Z" /> - <path - android:fillColor="#333333" - android:pathData="M 36.143 27.409 L 41.59 21.981 L 36.143 16.533 " /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_find_previous.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_find_previous.xml deleted file mode 100755 index 83f0295c..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_find_previous.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M17.508,11.042c5.84,0,10.572,4.733,10.572,10.573 -c0,5.84-4.732,10.573-10.572,10.573S6.935,27.455,6.935,21.615C6.935,15.775,11.668,11.042,17.508,11.042 -M17.508,13.391 -c-4.535,0-8.225,3.689-8.225,8.224s3.69,8.225,8.225,8.225s8.224-3.689,8.224-8.225S22.043,13.391,17.508,13.391" /> - <path - android:strokeColor="#333333" - android:strokeWidth="2.348" - android:pathData="M 33.695 38.359 L 23.73 28.395" /> - <path - android:fillColor="#333333" - android:pathData="M 34.836 19.878 H 41.068 V 24.173 H 34.836 V 19.878 Z" /> - <path - android:fillColor="#333333" - android:pathData="M 36.107 27.409 L 30.66 21.981 L 36.107 16.533 " /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_first_page.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_first_page.xml deleted file mode 100755 index 10714831..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_first_page.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M30.001,9.334l7.808,7.792v23.538H12.191V9.334H30.001z -M30.418,8.326H11.182v33.348h27.636V16.708 L30.418,8.326z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.034" - android:pathData="M 29.965 8.911 L 29.965 16.931 L 37.957 16.931 " /> - <path - android:strokeColor="#333333" - android:strokeWidth="0.833" - android:pathData="M 25.445 38.609 L 25.445 11.317" /> - <path - android:fillColor="#333333" - android:pathData="M 22.26 14.942 L 28.51 14.942 L 25.385 10.817 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_highlight.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_highlight.xml deleted file mode 100755 index f42b88d9..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_highlight.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M 20.629 22.61 L 27.374 29.355 L 22.483 30.848 L 19.701 28.068 Z" /> - <path - android:fillColor="#333333" - android:pathData="M27.909,28.668l12.17-12.032c0.153-0.154,0.153-0.404,0.001-0.557l-6.199-6.251 -c-0.154-0.154-0.404-0.155-0.559-0.001L21.154,21.861L27.909,28.668z" /> - <path - android:fillColor="#333333" - android:pathData="M 18.992 28.629 L 14.841 32.359 L 20.726 32.404 L 21.803 31.594 Z" /> - <path - android:fillColor="#333333" - android:pathData="M 9.76 34.59 H 40.24 V 40.287 H 9.76 V 34.59 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_last_page.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_last_page.xml deleted file mode 100755 index 24796a83..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_last_page.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M30.001,9.334l7.808,7.792v23.538H12.191V9.334H30.001z -M30.418,8.326H11.182v33.348h27.636V16.708 L30.418,8.326z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.034" - android:pathData="M 29.965 8.911 L 29.965 16.931 L 37.957 16.931 " /> - <path - android:strokeColor="#333333" - android:strokeWidth="0.833" - android:pathData="M 25.028 10.818 L 25.028 38.11" /> - <path - android:fillColor="#333333" - android:pathData="M 21.842 34.484 L 28.093 34.484 L 24.967 38.609 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_line_color.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_line_color.xml deleted file mode 100755 index 1c79066a..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_line_color.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#81DBE7" - android:strokeWidth="1.56" - android:pathData="M40.797,35.303 -c0,1.518-1.229,2.747-2.747,2.747h-26.1c-1.516,0-2.747-1.229-2.747-2.747V14.698c0-1.518,1.231-2.748,2.747-2.748h26.1 -c1.519,0,2.747,1.23,2.747,2.748V35.303z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_line_thickness.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_line_thickness.xml deleted file mode 100755 index 1e48a6c9..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_line_thickness.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="2.6" - android:pathData="M40.797,35.303 -c0,1.518-1.229,2.747-2.747,2.747h-26.1c-1.517,0-2.747-1.229-2.747-2.747V14.698c0-1.518,1.23-2.748,2.747-2.748h26.1 -c1.519,0,2.747,1.23,2.747,2.748V35.303z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_next_page.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_next_page.xml deleted file mode 100755 index 3fe059c0..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_next_page.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M30.001,9.334 L37.809,17.126 L37.809,40.664 L12.191,40.664 L12.191,9.334 -L30.001,9.334 Z M30.418,8.326 L11.182,8.326 L11.182,41.674 L38.818,41.674 -L38.818,16.708 L30.418,8.326 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.034" - android:pathData="M29.965,8.911 L29.965,16.931 L37.957,16.931" /> - <path - android:strokeColor="#333333" - android:strokeWidth="0.61563909" - android:pathData="M15.0721,27.4841 L29.6391,27.3044" /> - <path - android:fillColor="#333333" - android:pathData="M28.9723,30.1418 L29.1012,23.8921 L33.1609,27.1026 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_note.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_note.xml deleted file mode 100755 index 1f5732e3..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_note.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="1.372" - android:strokeMiterLimit="10" - android:pathData="M12.204,32.945 -H10.09c-0.632,0-1.145-0.516-1.145-1.145V11.896c0-0.63,0.513-1.143,1.145-1.143h29.821c0.632,0,1.144,0.513,1.144,1.143v19.904 -c0,0.629-0.512,1.145-1.144,1.145H18.507l-6.303,6.301V32.945z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.769" - android:strokeMiterLimit="10" - android:pathData="M 16.993 17.862 L 30.559 17.862" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.769" - android:strokeMiterLimit="10" - android:pathData="M 16.993 26.564 L 28.381 26.564" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.769" - android:strokeMiterLimit="10" - android:pathData="M 16.993 22.213 L 31.885 22.213" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_open_in.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_open_in.xml deleted file mode 100755 index ba08fa0a..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_open_in.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="1.56" - android:strokeMiterLimit="10" - android:pathData="M36.801,26.869 -v9.601c0,0.6-0.486,1.086-1.085,1.086H12.121c-0.599,0-1.085-0.486-1.085-1.086V12.875c0-0.6,0.486-1.086,1.085-1.086h11.286" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.56" - android:pathData="M 33.42 8.107 L 41.235 16.035 L 33.364 23.454 " /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.56" - android:pathData="M40.443,15.752 c0,0-13.591-1.817-16.473,4.985" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_prev_page.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_prev_page.xml deleted file mode 100755 index 3e6b01ce..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_prev_page.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M30.001,9.334 L37.809,17.126 L37.809,40.664 L12.191,40.664 L12.191,9.334 -L30.001,9.334 Z M30.418,8.326 L11.182,8.326 L11.182,41.674 L38.818,41.674 -L38.818,16.708 L30.418,8.326 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.034" - android:pathData="M29.965,8.911 L29.965,16.931 L37.957,16.931" /> - <path - android:strokeColor="#333333" - android:strokeWidth="0.61563909" - android:pathData="M33.1595,26.8018 L18.5914,26.7872" /> - <path - android:fillColor="#333333" - android:pathData="M19.0837,30.2063 L15.0672,26.9421 L19.296,23.9589 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_print.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_print.xml deleted file mode 100755 index 2ea50da6..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_print.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#231F20" - android:strokeWidth="1.358" - android:pathData="M 16.584 9.143 H 33.395 V 15.468 H 16.584 V 9.143 Z" /> - <path - android:strokeColor="#231F20" - android:strokeWidth="1.358" - android:pathData="M42.099,19.197H7.73 -c-0.218,0-0.395,0.154-0.395,0.343v15.771c0,0.191,0.177,0.346,0.395,0.346h4.355l1.516-7.161h22.86l1.374,7.161h4.263 -c0.219,0,0.393-0.154,0.393-0.346V19.541C42.491,19.351,42.317,19.197,42.099,19.197z" /> - <path - android:strokeColor="#231F20" - android:strokeWidth="1.358" - android:pathData="M 32.812 32.95 L 17.162 32.95 L 15.09 42.75 L 34.689 42.75 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.358" - android:pathData="M 16.584 9.143 H 33.395 V 15.468 H 16.584 V 9.143 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.358" - android:pathData="M42.099,19.197H7.73 -c-0.218,0-0.395,0.154-0.395,0.343v15.771c0,0.191,0.177,0.346,0.395,0.346h4.355l1.516-7.161h22.86l1.374,7.161h4.263 -c0.219,0,0.393-0.154,0.393-0.346V19.541C42.491,19.351,42.317,19.197,42.099,19.197z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.358" - android:pathData="M 32.812 32.95 L 17.162 32.95 L 15.09 42.75 L 34.689 42.75 Z" /> - <path - android:fillColor="#333333" - android:pathData="M 38.13 21.442 H 40.422 V 23.734 H 38.13 V 21.442 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_proof.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_proof.xml deleted file mode 100644 index fb38e07a..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_proof.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="1.768" - android:pathData="M35.25,27.5 C35.25,34.68,30.661,38.5,25,38.5 S14.75,34.68,14.75,27.5 -S25,11.5,25,11.5 S35.25,20.32,35.25,27.5 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.768" - android:strokeLineCap="round" - android:pathData="M18.167,26.001 C18.167,26.001,17.412,29.521,18.917,31.5 -C20.438,33.5,22.375,33.75,22.375,33.75" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_down.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_down.xml deleted file mode 100755 index 78e38809..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_down.xml +++ /dev/null @@ -1,648 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:pathData="M15.771,20.94 L15.775,20.94 L15.775,20.941 L15.771,20.941 L15.771,20.94 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M21.48,19.821 C21.576,19.832,21.672,19.849,21.766,19.864 -C21.671,19.85,21.576,19.833,21.48,19.821 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M17.847,20.089 C17.92,20.068,17.994,20.051,18.066,20.033 -C17.993,20.051,17.92,20.068,17.847,20.089 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M18.933,19.86 C19.026,19.845,19.118,19.829,19.211,19.818 -C19.118,19.829,19.026,19.846,18.933,19.86 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M22.663,20.048 C22.73,20.065,22.799,20.081,22.866,20.099 -C22.799,20.081,22.73,20.064,22.663,20.048 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M30.82,19.822 C30.91,19.833,30.998,19.849,31.088,19.863 -C30.998,19.85,30.91,19.833,30.82,19.822 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M32.039,20.06 C32.086,20.073,32.139,20.083,32.185,20.097 -C32.139,20.083,32.086,20.072,32.039,20.06 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M28.027,19.895 C28.099,19.882,28.172,19.873,28.242,19.862 -C28.172,19.874,28.1,19.882,28.027,19.895 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M26.605,20.266 C26.628,20.258,26.652,20.248,26.675,20.241 -C26.652,20.248,26.629,20.258,26.605,20.266 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M15.778,20.938 L15.775,20.939 L15.775,20.939 Z" /> - <path - android:fillColor="#ED2427" - android:pathData="M17.847,20.089 C17.92,20.068,17.993,20.051,18.066,20.033 -C18.351,19.961,18.638,19.904,18.933,19.86 -C19.026,19.845,19.118,19.829,19.211,19.818 -C19.581,19.773,19.954,19.743,20.335,19.743 -C20.724,19.743,21.105,19.774,21.481,19.821 -C21.577,19.833,21.671,19.849,21.767,19.864 -C22.072,19.911,22.371,19.971,22.663,20.048 -C22.73,20.065,22.799,20.081,22.866,20.099 C23.621,20.311,24.336,20.616,24.999,21 -C25.507,20.707,26.043,20.461,26.606,20.266 -C26.629,20.258,26.653,20.248,26.676,20.241 -C27.112,20.094,27.565,19.978,28.028,19.895 -C28.1,19.882,28.173,19.874,28.243,19.862 -C28.708,19.792,29.179,19.744,29.663,19.744 -C30.056,19.744,30.44,19.775,30.821,19.823 -C30.911,19.834,30.999,19.85,31.089,19.864 -C31.411,19.913,31.73,19.978,32.04,20.06 -C32.087,20.073,32.14,20.083,32.186,20.097 -C32.956,20.313,33.684,20.624,34.358,21.019 -C34.358,21.018,34.358,21.016,34.358,21.015 -C34.358,15.911,30.198,11.773,25.064,11.773 -C19.96,11.773,15.817,15.87,15.776,20.94 -C15.776,20.939,15.777,20.939,15.779,20.939 -C16.423,20.574,17.118,20.29,17.847,20.089 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M34.275,22.189 C34.263,22.276,34.248,22.36,34.234,22.446 -C34.248,22.36,34.264,22.276,34.275,22.189 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M30.658,28.384 C30.644,28.394,30.629,28.405,30.613,28.415 -C30.629,28.405,30.645,28.394,30.658,28.384 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M34.045,23.362 C34.024,23.435,34.008,23.51,33.986,23.584 -C34.008,23.511,34.023,23.436,34.045,23.362 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M32.383,26.698 C32.373,26.713,32.362,26.726,32.352,26.739 -C32.361,26.727,32.373,26.711,32.383,26.698 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M33.084,25.667 C33.055,25.719,33.022,25.771,32.99,25.822 -C33.021,25.771,33.055,25.719,33.084,25.667 Z" /> - <path - android:fillColor="#3A54A4" - android:pathData="M34.357,21.019 C34.357,21.416,34.324,21.806,34.275,22.19 -C34.263,22.277,34.248,22.361,34.234,22.447 -C34.187,22.759,34.123,23.064,34.045,23.363 -C34.024,23.436,34.008,23.511,33.986,23.585 -C33.771,24.322,33.466,25.019,33.084,25.668 -C33.055,25.72,33.022,25.772,32.99,25.823 -C32.804,26.127,32.601,26.419,32.383,26.699 -C32.373,26.712,32.362,26.727,32.352,26.74 -C31.86,27.358,31.29,27.908,30.659,28.385 -C30.645,28.395,30.63,28.406,30.614,28.416 C30.3,28.65,29.973,28.869,29.63,29.062 -C29.626,29.453,29.593,29.837,29.542,30.218 -C29.532,30.284,29.521,30.351,29.511,30.419 -C29.456,30.757,29.388,31.087,29.298,31.409 -C29.288,31.454,29.278,31.497,29.265,31.538 -C29.05,32.284,28.742,32.989,28.357,33.645 -C28.337,33.678,28.316,33.709,28.296,33.743 -C28.107,34.054,27.903,34.352,27.681,34.636 -C27.671,34.65,27.663,34.661,27.654,34.671 -C27.174,35.284,26.615,35.831,25.997,36.306 -C25.987,36.314,25.976,36.32,25.968,36.327 -C25.66,36.559,25.338,36.776,25.002,36.97 -C25.002,36.972,25.002,36.972,25.001,36.972 -C26.372,37.765,27.963,38.228,29.665,38.228 -C34.802,38.228,38.96,34.089,38.96,28.984 -C38.957,25.588,37.107,22.625,34.357,21.019 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M25.961,21.642 C25.979,21.655,25.997,21.667,26.013,21.681 -C25.998,21.667,25.979,21.654,25.961,21.642 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.508,27.532 C29.524,27.638,29.543,27.742,29.555,27.85 -C29.543,27.742,29.523,27.639,29.508,27.532 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M31.088,19.863 C31.41,19.913,31.729,19.977,32.039,20.059 -C31.729,19.978,31.41,19.912,31.088,19.863 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.662,19.743 C30.055,19.743,30.439,19.774,30.82,19.822 -C30.439,19.774,30.055,19.743,29.662,19.743 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M27.645,23.287 C27.678,23.33,27.709,23.374,27.743,23.417 -C27.709,23.374,27.678,23.33,27.645,23.287 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.262,26.418 C29.289,26.515,29.311,26.613,29.336,26.71 -C29.311,26.613,29.289,26.515,29.262,26.418 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M28.279,24.202 C28.316,24.264,28.355,24.328,28.394,24.391 -C28.355,24.328,28.316,24.265,28.279,24.202 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.662,19.743 C29.178,19.743,28.707,19.791,28.242,19.861 -C28.705,19.791,29.178,19.743,29.662,19.743 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M34.355,21.02 C34.355,21.416,34.324,21.806,34.275,22.19 -C34.324,21.806,34.357,21.417,34.357,21.019 -C33.683,20.624,32.955,20.313,32.185,20.097 -C32.953,20.314,33.682,20.627,34.355,21.02 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M32.99,25.822 C32.804,26.126,32.601,26.42,32.383,26.698 -C32.602,26.418,32.805,26.126,32.99,25.822 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M33.986,23.584 C33.771,24.321,33.466,25.02,33.084,25.667 -C33.467,25.018,33.771,24.321,33.986,23.584 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.629,29.056 C29.629,29.058,29.629,29.058,29.629,29.062 -C29.973,28.869,30.299,28.65,30.613,28.416 -C30.301,28.647,29.973,28.862,29.629,29.056 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M26.676,20.24 C27.112,20.092,27.565,19.978,28.028,19.894 -C27.564,19.978,27.111,20.093,26.676,20.24 Z" /> - <path - android:fillColor="#B9529E" - android:pathData="M32.186,20.097 C32.139,20.083,32.086,20.073,32.04,20.06 -C31.729,19.978,31.411,19.914,31.089,19.864 -C30.999,19.85,30.911,19.834,30.821,19.823 -C30.44,19.775,30.055,19.744,29.663,19.744 -C29.179,19.744,28.706,19.792,28.243,19.862 -C28.173,19.873,28.1,19.883,28.028,19.895 -C27.565,19.979,27.112,20.092,26.676,20.241 -C26.653,20.249,26.629,20.259,26.606,20.266 -C26.047,20.462,25.524,20.721,25.022,21.013 -C25.349,21.204,25.663,21.413,25.962,21.642 -C25.98,21.655,25.998,21.667,26.014,21.681 -C26.621,22.148,27.17,22.687,27.645,23.287 -C27.678,23.33,27.709,23.374,27.743,23.417 -C27.934,23.669,28.112,23.931,28.28,24.202 -C28.317,24.264,28.356,24.328,28.395,24.391 -C28.76,25.024,29.053,25.702,29.262,26.417 -C29.289,26.514,29.311,26.612,29.336,26.709 -C29.404,26.979,29.461,27.252,29.508,27.531 -C29.524,27.637,29.543,27.741,29.555,27.849 -C29.602,28.221,29.633,28.599,29.633,28.982 -C29.633,29.007,29.629,29.029,29.629,29.054 -C29.973,28.861,30.301,28.646,30.613,28.413 -C30.629,28.403,30.644,28.392,30.658,28.382 -C31.289,27.905,31.859,27.355,32.351,26.737 -C32.361,26.724,32.372,26.711,32.382,26.696 -C32.601,26.418,32.804,26.124,32.989,25.82 -C33.02,25.768,33.053,25.716,33.083,25.665 -C33.466,25.018,33.771,24.319,33.985,23.582 -C34.006,23.509,34.022,23.434,34.044,23.36 -C34.122,23.061,34.187,22.755,34.233,22.444 -C34.247,22.358,34.262,22.274,34.274,22.187 -C34.323,21.803,34.354,21.414,34.354,21.017 -C33.682,20.627,32.953,20.314,32.186,20.097 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M30.658,28.384 C31.289,27.907,31.859,27.358,32.351,26.739 -C31.859,27.356,31.289,27.907,30.658,28.384 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M34.234,22.446 C34.187,22.757,34.123,23.063,34.045,23.362 -C34.123,23.063,34.188,22.759,34.234,22.446 Z" /> - <path - android:fillColor="#594098" - android:pathData="M16.141,23.576 C16.112,23.479,16.09,23.381,16.066,23.282 -C16.089,23.381,16.112,23.479,16.141,23.576 Z" /> - <path - android:fillColor="#594098" - android:pathData="M15.775,20.939 C15.774,20.939,15.773,20.941,15.771,20.942 L15.771,21.014 -C15.771,20.989,15.775,20.964,15.775,20.939 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.741,26.69 C17.712,26.654,17.683,26.615,17.656,26.578 -C17.685,26.615,17.712,26.654,17.741,26.69 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.109,25.774 C17.073,25.717,17.036,25.661,17.004,25.602 -C17.038,25.661,17.074,25.718,17.109,25.774 Z" /> - <path - android:fillColor="#6ABC45" - android:pathData="M24.05,36.341 C24.026,36.321,24.002,36.306,23.977,36.286 -C23.371,35.817,22.824,35.278,22.351,34.677 -C22.323,34.642,22.296,34.605,22.268,34.566 -C22.069,34.308,21.886,34.039,21.717,33.757 -C21.681,33.7,21.645,33.646,21.613,33.587 C21.243,32.95,20.95,32.269,20.741,31.55 -C20.714,31.456,20.693,31.362,20.669,31.267 -C20.599,30.994,20.543,30.72,20.498,30.439 -C20.48,30.332,20.462,30.228,20.449,30.121 -C20.404,29.748,20.372,29.373,20.372,28.984 L20.372,28.982 -C19.356,28.39,18.465,27.611,17.742,26.691 -C17.713,26.655,17.686,26.616,17.657,26.579 -C17.46,26.32,17.279,26.053,17.111,25.775 -C17.075,25.718,17.04,25.662,17.006,25.603 -C16.64,24.97,16.349,24.292,16.142,23.577 -C16.113,23.48,16.091,23.382,16.067,23.283 -C15.998,23.014,15.942,22.744,15.899,22.468 -C15.881,22.361,15.863,22.256,15.849,22.147 -C15.804,21.776,15.773,21.4,15.773,21.016 L15.773,20.944 -C12.953,22.531,11.044,25.537,11.044,28.985 -C11.044,34.09,15.209,38.229,20.336,38.229 -C22.038,38.229,23.627,37.768,24.999,36.973 -C24.984,36.965,24.972,36.953,24.957,36.946 -C24.64,36.761,24.339,36.558,24.05,36.341 Z" /> - <path - android:fillColor="#594098" - android:pathData="M15.897,22.467 C15.879,22.361,15.86,22.253,15.847,22.146 -C15.861,22.255,15.879,22.359,15.897,22.467 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.715,24.216 C21.682,24.271,21.648,24.323,21.615,24.38 -C21.647,24.323,21.682,24.271,21.715,24.216 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.35,23.296 C22.324,23.328,22.301,23.362,22.275,23.397 -C22.3,23.362,22.324,23.328,22.35,23.296 Z" /> - <path - android:fillColor="#594098" - android:pathData="M24.024,21.651 C24.015,21.658,24.006,21.665,23.997,21.672 -C24.006,21.665,24.015,21.658,24.024,21.651 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.371,28.979 L20.371,28.979 L20.371,28.979 Z" /> - <path - android:fillColor="#594098" - android:pathData="M24.999,21 C24.336,20.615,23.622,20.311,22.866,20.099 -C23.619,20.313,24.336,20.615,24.999,21 C24.999,21.001,24.999,21.001,24.999,21 Z" /> - <path - android:fillColor="#594098" - android:pathData="M16.065,23.282 C15.996,23.015,15.94,22.743,15.897,22.467 -C15.94,22.743,15.997,23.014,16.065,23.282 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.656,26.578 C17.459,26.32,17.278,26.052,17.11,25.774 -C17.278,26.052,17.458,26.319,17.656,26.578 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.004,25.603 C16.638,24.972,16.348,24.291,16.14,23.577 -C16.347,24.292,16.639,24.97,17.004,25.603 Z" /> - <path - android:fillColor="#594098" - android:pathData="M15.778,20.938 C16.424,20.576,17.119,20.292,17.847,20.088 -C17.118,20.29,16.423,20.574,15.778,20.938 Z" /> - <path - android:fillColor="#594098" - android:pathData="M19.211,19.818 C19.581,19.771,19.953,19.743,20.335,19.743 -C19.954,19.743,19.581,19.773,19.211,19.818 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.741,26.69 C18.464,27.61,19.355,28.389,20.371,28.981 L20.371,28.979 -C19.353,28.39,18.463,27.607,17.741,26.69 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.767,19.864 C22.071,19.912,22.371,19.971,22.663,20.048 -C22.371,19.972,22.072,19.911,21.767,19.864 Z" /> - <path - android:fillColor="#F4EA11" - android:pathData="M20.371,28.979 C20.371,28.973,20.372,28.969,20.372,28.965 -C20.372,28.584,20.404,28.213,20.449,27.844 -C20.463,27.74,20.481,27.635,20.497,27.532 -C20.542,27.248,20.6,26.969,20.671,26.695 -C20.694,26.603,20.715,26.512,20.741,26.423 -C20.95,25.7,21.246,25.017,21.616,24.379 -C21.649,24.322,21.683,24.27,21.716,24.215 -C21.888,23.931,22.075,23.658,22.276,23.396 -C22.302,23.362,22.325,23.328,22.351,23.295 -C22.83,22.687,23.385,22.143,23.998,21.671 -C24.008,21.664,24.016,21.657,24.025,21.65 C24.335,21.414,24.66,21.195,25,21 -C24.337,20.614,23.62,20.312,22.867,20.098 -C22.8,20.08,22.732,20.064,22.664,20.047 -C22.372,19.971,22.071,19.911,21.768,19.863 -C21.674,19.848,21.578,19.831,21.482,19.82 -C21.106,19.773,20.725,19.742,20.336,19.742 -C19.955,19.742,19.582,19.77,19.212,19.817 -C19.119,19.828,19.027,19.844,18.934,19.859 -C18.64,19.904,18.351,19.96,18.067,20.032 -C17.995,20.05,17.921,20.067,17.848,20.088 -C17.119,20.291,16.424,20.575,15.779,20.938 -C15.778,20.938,15.776,20.939,15.776,20.939 -C15.776,20.963,15.772,20.989,15.772,21.014 -C15.772,21.398,15.803,21.774,15.848,22.145 -C15.861,22.252,15.88,22.36,15.898,22.466 -C15.941,22.742,15.998,23.015,16.066,23.281 -C16.09,23.38,16.112,23.478,16.141,23.575 -C16.349,24.29,16.639,24.971,17.005,25.601 -C17.037,25.66,17.074,25.716,17.11,25.773 -C17.278,26.05,17.459,26.319,17.656,26.577 -C17.683,26.614,17.712,26.653,17.741,26.689 -C18.463,27.607,19.353,28.39,20.371,28.979 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.48,19.821 C21.104,19.774,20.723,19.743,20.334,19.743 -C20.724,19.743,21.104,19.774,21.48,19.821 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.371,28.979 C20.371,28.973,20.372,28.969,20.372,28.965 -C20.372,28.97,20.371,28.974,20.371,28.979 L20.371,28.979 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.496,27.533 C20.48,27.636,20.462,27.74,20.448,27.845 -C20.462,27.74,20.48,27.636,20.496,27.533 Z" /> - <path - android:fillColor="#594098" - android:pathData="M18.066,20.033 C18.35,19.961,18.638,19.905,18.933,19.86 -C18.639,19.904,18.352,19.961,18.066,20.033 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.74,26.424 C20.714,26.514,20.694,26.605,20.67,26.696 -C20.693,26.604,20.714,26.514,20.74,26.424 Z" /> - <path - android:fillColor="#594098" - android:pathData="M15.847,22.146 C15.802,21.775,15.771,21.399,15.771,21.015 -C15.771,21.398,15.802,21.774,15.847,22.146 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.629,29.062 C29.625,29.453,29.592,29.837,29.541,30.218 -C29.592,29.837,29.625,29.452,29.629,29.062 L29.629,29.062 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.447,30.12 C20.402,29.747,20.37,29.372,20.37,28.983 -C20.371,29.372,20.402,29.747,20.447,30.12 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.351,34.677 C22.825,35.279,23.371,35.818,23.977,36.286 -C23.371,35.817,22.825,35.278,22.351,34.677 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.51,30.419 C29.455,30.757,29.387,31.087,29.297,31.409 -C29.387,31.087,29.455,30.757,29.51,30.419 Z" /> - <path - android:fillColor="#594098" - android:pathData="M25.996,36.306 C26.614,35.831,27.172,35.285,27.653,34.671 -C27.172,35.284,26.613,35.831,25.996,36.306 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.264,31.538 C29.049,32.284,28.741,32.989,28.356,33.645 -C28.74,32.989,29.049,32.284,29.264,31.538 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.667,31.267 C20.597,30.994,20.541,30.72,20.496,30.439 -C20.542,30.72,20.597,30.993,20.667,31.267 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.268,34.565 C22.069,34.307,21.886,34.038,21.717,33.756 -C21.886,34.038,22.069,34.308,22.268,34.565 Z" /> - <path - android:fillColor="#594098" - android:pathData="M28.295,33.743 C28.106,34.054,27.902,34.352,27.68,34.636 -C27.902,34.353,28.105,34.054,28.295,33.743 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.612,33.587 C21.242,32.95,20.949,32.269,20.74,31.55 -C20.949,32.269,21.242,32.95,21.612,33.587 Z" /> - <path - android:fillColor="#594098" - android:pathData="M25.966,36.327 C25.658,36.559,25.336,36.776,25,36.97 -C25.336,36.776,25.659,36.56,25.966,36.327 Z" /> - <path - android:fillColor="#594098" - android:pathData="M24.955,36.944 C24.641,36.76,24.339,36.557,24.05,36.34 -C24.339,36.558,24.64,36.761,24.955,36.944 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.54,29.901 C22.589,29.915,22.64,29.926,22.689,29.94 -C22.64,29.927,22.589,29.915,22.54,29.901 Z" /> - <path - android:fillColor="#594098" - android:pathData="M26.184,30.183 C26.282,30.171,26.375,30.156,26.471,30.14 -C26.375,30.155,26.281,30.171,26.184,30.183 Z" /> - <path - android:fillColor="#594098" - android:pathData="M23.638,30.136 C23.728,30.15,23.817,30.165,23.907,30.177 -C23.817,30.165,23.729,30.149,23.638,30.136 Z" /> - <path - android:fillColor="#594098" - android:pathData="M27.322,29.97 C27.4,29.952,27.48,29.933,27.558,29.909 -C27.48,29.933,27.4,29.952,27.322,29.97 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.625,29.058 C29.625,29.058,29.627,29.058,29.629,29.056 -C29.629,29.031,29.633,29.009,29.633,28.984 -C29.633,29.009,29.625,29.034,29.625,29.058 Z" /> - <path - android:fillColor="#594098" - android:pathData="M27.645,23.287 C27.17,22.686,26.622,22.147,26.014,21.681 -C26.621,22.146,27.168,22.688,27.645,23.287 Z" /> - <path - android:fillColor="#594098" - android:pathData="M25.961,21.642 C25.661,21.413,25.348,21.204,25.021,21.013 L25.019,21.013 -C25.346,21.204,25.662,21.415,25.961,21.642 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.373,28.978 L20.373,28.978 L20.373,28.984 L20.373,28.984 L20.373,28.978 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.555,27.851 C29.602,28.223,29.633,28.601,29.633,28.984 -C29.633,28.601,29.602,28.223,29.555,27.851 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.274,23.396 C22.073,23.659,21.887,23.931,21.714,24.215 -C21.887,23.933,22.074,23.658,22.274,23.396 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.67,26.696 C20.599,26.969,20.542,27.249,20.496,27.533 -C20.542,27.25,20.599,26.97,20.67,26.696 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.448,27.845 C20.403,28.214,20.371,28.585,20.371,28.966 -C20.372,28.585,20.402,28.212,20.448,27.845 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.615,24.38 C21.245,25.018,20.949,25.701,20.74,26.424 -C20.949,25.702,21.245,25.017,21.615,24.38 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.336,26.71 C29.404,26.98,29.461,27.253,29.508,27.532 -C29.461,27.253,29.404,26.979,29.336,26.71 Z" /> - <path - android:fillColor="#FFFFFF" - android:pathData="M29.625,29.058 C29.625,29.035,29.633,29.009,29.633,28.984 -C29.633,28.601,29.602,28.223,29.555,27.851 -C29.543,27.743,29.524,27.639,29.508,27.533 -C29.461,27.254,29.404,26.98,29.336,26.711 -C29.311,26.614,29.289,26.516,29.262,26.419 -C29.053,25.705,28.76,25.024,28.395,24.393 -C28.356,24.33,28.317,24.266,28.28,24.204 -C28.112,23.933,27.934,23.671,27.743,23.419 -C27.71,23.376,27.679,23.332,27.645,23.289 -C27.168,22.689,26.622,22.147,26.014,21.683 -C25.998,21.669,25.979,21.657,25.962,21.644 -C25.662,21.417,25.347,21.206,25.02,21.015 -C24.686,21.21,24.353,21.408,24.047,21.639 -C24.039,21.644,24.032,21.65,24.025,21.654 -C24.016,21.661,24.007,21.668,23.998,21.675 -C23.383,22.147,22.831,22.692,22.351,23.299 -C22.325,23.331,22.302,23.365,22.276,23.4 -C22.075,23.662,21.889,23.936,21.716,24.219 -C21.683,24.274,21.649,24.326,21.616,24.383 -C21.246,25.02,20.95,25.705,20.741,26.427 -C20.715,26.517,20.695,26.608,20.671,26.699 -C20.6,26.972,20.543,27.253,20.497,27.536 -C20.481,27.639,20.463,27.743,20.449,27.848 -C20.403,28.215,20.372,28.588,20.372,28.969 -C20.372,28.973,20.371,28.977,20.371,28.983 L20.376,28.985 L20.376,28.985 -C21.049,29.378,21.775,29.688,22.54,29.905 -C22.589,29.919,22.64,29.93,22.689,29.944 C23,30.028,23.316,30.09,23.638,30.139 -C23.728,30.153,23.817,30.168,23.907,30.18 -C24.287,30.229,24.67,30.26,25.063,30.26 -C25.444,30.26,25.817,30.231,26.184,30.186 -C26.282,30.174,26.375,30.159,26.471,30.143 -C26.76,30.098,27.043,30.043,27.323,29.973 -C27.401,29.955,27.481,29.936,27.559,29.912 -C28.288,29.709,28.983,29.426,29.629,29.06 -C29.629,29.06,29.629,29.06,29.629,29.064 L29.629,29.064 -C29.629,29.06,29.629,29.06,29.629,29.058 -C29.627,29.058,29.625,29.058,29.625,29.058 Z" /> - <path - android:fillColor="#594098" - android:pathData="M28.395,24.392 C28.76,25.024,29.053,25.704,29.262,26.418 -C29.053,25.702,28.76,25.024,28.395,24.392 Z" /> - <path - android:fillColor="#594098" - android:pathData="M25,21.001 C25.007,21.005,25.012,21.011,25.019,21.013 L25.021,21.013 -C25.012,21.009,25.007,21.005,24.999,21 -C24.999,21.001,24.999,21.001,24.999,21.001 L25,21.001 Z" /> - <path - android:fillColor="#594098" - android:pathData="M27.742,23.417 C27.933,23.669,28.111,23.932,28.279,24.202 -C28.111,23.931,27.934,23.669,27.742,23.417 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M24.998,36.971 L24.998,36.971 L24.998,36.972 L24.998,36.972 L24.998,36.971 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M28.355,33.646 C28.335,33.679,28.314,33.71,28.294,33.744 -C28.314,33.71,28.336,33.679,28.355,33.646 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M25.996,36.306 C25.986,36.314,25.975,36.32,25.967,36.327 -C25.975,36.319,25.986,36.313,25.996,36.306 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M29.51,30.419 C29.52,30.351,29.531,30.284,29.541,30.218 -C29.531,30.284,29.52,30.351,29.51,30.419 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M29.297,31.409 C29.287,31.454,29.277,31.497,29.264,31.538 -C29.277,31.497,29.287,31.454,29.297,31.409 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M27.68,34.636 C27.67,34.65,27.662,34.661,27.653,34.671 -C27.662,34.661,27.67,34.649,27.68,34.636 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M24.999,36.972 L24.999,36.972 L25,36.97 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.371,28.981 L20.371,28.983 L20.371,28.981 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M24.955,36.944 C24.97,36.952,24.982,36.964,24.997,36.971 -C24.998,36.971,24.998,36.971,24.998,36.971 -C24.985,36.964,24.97,36.952,24.955,36.944 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.447,30.12 C20.46,30.227,20.478,30.331,20.496,30.438 -C20.48,30.331,20.46,30.226,20.447,30.12 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M21.716,33.757 C21.68,33.7,21.644,33.646,21.612,33.587 -C21.645,33.646,21.68,33.7,21.716,33.757 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M22.351,34.677 C22.323,34.642,22.296,34.605,22.268,34.566 -C22.296,34.604,22.323,34.642,22.351,34.677 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.74,31.55 C20.714,31.456,20.692,31.362,20.668,31.267 -C20.692,31.362,20.712,31.456,20.74,31.55 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M24.05,36.341 C24.026,36.321,24.002,36.306,23.977,36.286 -C24.002,36.306,24.026,36.321,24.05,36.341 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.371,28.979 L20.371,28.979 L20.371,28.981 L20.371,28.981 L20.371,28.979 Z" /> - <path - android:fillColor="#6FCBDC" - android:pathData="M27.559,29.909 C27.481,29.932,27.401,29.952,27.323,29.97 -C27.044,30.04,26.761,30.095,26.471,30.14 -C26.375,30.156,26.282,30.171,26.184,30.183 -C25.815,30.226,25.444,30.257,25.063,30.257 -C24.671,30.257,24.287,30.226,23.907,30.177 -C23.817,30.165,23.728,30.15,23.638,30.136 C23.315,30.087,23,30.023,22.689,29.941 -C22.639,29.927,22.589,29.916,22.54,29.902 -C21.77,29.687,21.045,29.377,20.371,28.982 L20.371,28.984 -C20.371,29.373,20.402,29.748,20.448,30.121 -C20.461,30.226,20.481,30.332,20.497,30.439 -C20.542,30.72,20.598,30.994,20.668,31.267 -C20.692,31.363,20.714,31.456,20.74,31.55 -C20.949,32.269,21.242,32.95,21.612,33.587 -C21.645,33.646,21.68,33.7,21.716,33.757 -C21.885,34.038,22.069,34.308,22.267,34.566 -C22.296,34.605,22.322,34.642,22.35,34.677 -C22.824,35.279,23.37,35.818,23.976,36.286 -C24.001,36.306,24.025,36.321,24.049,36.341 -C24.338,36.558,24.64,36.761,24.954,36.945 -C24.969,36.953,24.984,36.965,24.997,36.972 -C24.998,36.972,24.998,36.972,24.998,36.97 -C25.334,36.777,25.657,36.56,25.964,36.327 -C25.973,36.319,25.984,36.313,25.993,36.306 -C26.611,35.831,27.169,35.285,27.65,34.671 -C27.66,34.661,27.668,34.65,27.677,34.636 -C27.9,34.353,28.103,34.054,28.292,33.743 -C28.312,33.71,28.333,33.679,28.353,33.645 -C28.738,32.989,29.046,32.284,29.261,31.538 -C29.275,31.497,29.284,31.454,29.294,31.409 -C29.384,31.087,29.452,30.757,29.507,30.419 -C29.517,30.351,29.528,30.284,29.538,30.218 -C29.589,29.837,29.622,29.452,29.626,29.062 -C28.982,29.423,28.289,29.708,27.559,29.909 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M29.629,29.058 C28.983,29.423,28.287,29.706,27.559,29.91 -C28.289,29.709,28.983,29.424,29.629,29.062 -C29.629,29.058,29.629,29.058,29.629,29.058 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.371,28.981 C21.045,29.376,21.771,29.686,22.54,29.901 -C21.775,29.684,21.049,29.374,20.376,28.981 -C20.433,29.016,20.491,29.049,20.548,29.083 -C20.66,29.145,20.775,29.206,20.893,29.263 -C20.775,29.206,20.66,29.146,20.548,29.083 -C20.49,29.05,20.433,29.017,20.376,28.981 -C20.375,28.981,20.372,28.981,20.371,28.979 -C20.371,28.981,20.371,28.981,20.371,28.981 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M23.907,30.177 C24.287,30.226,24.671,30.257,25.063,30.257 -C24.67,30.257,24.287,30.226,23.907,30.177 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M22.689,29.94 C23,30.022,23.314,30.086,23.638,30.135 -C23.316,30.087,23,30.024,22.689,29.94 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M25.063,30.257 C25.444,30.257,25.815,30.226,26.184,30.183 -C25.817,30.228,25.444,30.257,25.063,30.257 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M26.471,30.14 C26.76,30.095,27.043,30.04,27.323,29.97 -C27.043,30.04,26.76,30.095,26.471,30.14 Z" /> - <path - android:fillColor="#000000" - android:strokeWidth="1" - android:pathData="M40.5984,32.3655 L47.2114,32.3225 L43.9421,38.071 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_up.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_up.xml deleted file mode 100755 index fead091c..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_up.xml +++ /dev/null @@ -1,648 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:pathData="M15.771,20.94 L15.775,20.94 L15.775,20.941 L15.771,20.941 L15.771,20.94 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M21.48,19.821 C21.576,19.832,21.672,19.849,21.766,19.864 -C21.671,19.85,21.576,19.833,21.48,19.821 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M17.847,20.089 C17.92,20.068,17.994,20.051,18.066,20.033 -C17.993,20.051,17.92,20.068,17.847,20.089 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M18.933,19.86 C19.026,19.845,19.118,19.829,19.211,19.818 -C19.118,19.829,19.026,19.846,18.933,19.86 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M22.663,20.048 C22.73,20.065,22.799,20.081,22.866,20.099 -C22.799,20.081,22.73,20.064,22.663,20.048 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M30.82,19.822 C30.91,19.833,30.998,19.849,31.088,19.863 -C30.998,19.85,30.91,19.833,30.82,19.822 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M32.039,20.06 C32.086,20.073,32.139,20.083,32.185,20.097 -C32.139,20.083,32.086,20.072,32.039,20.06 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M28.027,19.895 C28.099,19.882,28.172,19.873,28.242,19.862 -C28.172,19.874,28.1,19.882,28.027,19.895 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M26.605,20.266 C26.628,20.258,26.652,20.248,26.675,20.241 -C26.652,20.248,26.629,20.258,26.605,20.266 Z" /> - <path - android:fillColor="#7AC698" - android:pathData="M15.778,20.938 L15.775,20.939 L15.775,20.939 Z" /> - <path - android:fillColor="#ED2427" - android:pathData="M17.847,20.089 C17.92,20.068,17.993,20.051,18.066,20.033 -C18.351,19.961,18.638,19.904,18.933,19.86 -C19.026,19.845,19.118,19.829,19.211,19.818 -C19.581,19.773,19.954,19.743,20.335,19.743 -C20.724,19.743,21.105,19.774,21.481,19.821 -C21.577,19.833,21.671,19.849,21.767,19.864 -C22.072,19.911,22.371,19.971,22.663,20.048 -C22.73,20.065,22.799,20.081,22.866,20.099 C23.621,20.311,24.336,20.616,24.999,21 -C25.507,20.707,26.043,20.461,26.606,20.266 -C26.629,20.258,26.653,20.248,26.676,20.241 -C27.112,20.094,27.565,19.978,28.028,19.895 -C28.1,19.882,28.173,19.874,28.243,19.862 -C28.708,19.792,29.179,19.744,29.663,19.744 -C30.056,19.744,30.44,19.775,30.821,19.823 -C30.911,19.834,30.999,19.85,31.089,19.864 -C31.411,19.913,31.73,19.978,32.04,20.06 -C32.087,20.073,32.14,20.083,32.186,20.097 -C32.956,20.313,33.684,20.624,34.358,21.019 -C34.358,21.018,34.358,21.016,34.358,21.015 -C34.358,15.911,30.198,11.773,25.064,11.773 -C19.96,11.773,15.817,15.87,15.776,20.94 -C15.776,20.939,15.777,20.939,15.779,20.939 -C16.423,20.574,17.118,20.29,17.847,20.089 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M34.275,22.189 C34.263,22.276,34.248,22.36,34.234,22.446 -C34.248,22.36,34.264,22.276,34.275,22.189 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M30.658,28.384 C30.644,28.394,30.629,28.405,30.613,28.415 -C30.629,28.405,30.645,28.394,30.658,28.384 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M34.045,23.362 C34.024,23.435,34.008,23.51,33.986,23.584 -C34.008,23.511,34.023,23.436,34.045,23.362 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M32.383,26.698 C32.373,26.713,32.362,26.726,32.352,26.739 -C32.361,26.727,32.373,26.711,32.383,26.698 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M33.084,25.667 C33.055,25.719,33.022,25.771,32.99,25.822 -C33.021,25.771,33.055,25.719,33.084,25.667 Z" /> - <path - android:fillColor="#3A54A4" - android:pathData="M34.357,21.019 C34.357,21.416,34.324,21.806,34.275,22.19 -C34.263,22.277,34.248,22.361,34.234,22.447 -C34.187,22.759,34.123,23.064,34.045,23.363 -C34.024,23.436,34.008,23.511,33.986,23.585 -C33.771,24.322,33.466,25.019,33.084,25.668 -C33.055,25.72,33.022,25.772,32.99,25.823 -C32.804,26.127,32.601,26.419,32.383,26.699 -C32.373,26.712,32.362,26.727,32.352,26.74 -C31.86,27.358,31.29,27.908,30.659,28.385 -C30.645,28.395,30.63,28.406,30.614,28.416 C30.3,28.65,29.973,28.869,29.63,29.062 -C29.626,29.453,29.593,29.837,29.542,30.218 -C29.532,30.284,29.521,30.351,29.511,30.419 -C29.456,30.757,29.388,31.087,29.298,31.409 -C29.288,31.454,29.278,31.497,29.265,31.538 -C29.05,32.284,28.742,32.989,28.357,33.645 -C28.337,33.678,28.316,33.709,28.296,33.743 -C28.107,34.054,27.903,34.352,27.681,34.636 -C27.671,34.65,27.663,34.661,27.654,34.671 -C27.174,35.284,26.615,35.831,25.997,36.306 -C25.987,36.314,25.976,36.32,25.968,36.327 -C25.66,36.559,25.338,36.776,25.002,36.97 -C25.002,36.972,25.002,36.972,25.001,36.972 -C26.372,37.765,27.963,38.228,29.665,38.228 -C34.802,38.228,38.96,34.089,38.96,28.984 -C38.957,25.588,37.107,22.625,34.357,21.019 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M25.961,21.642 C25.979,21.655,25.997,21.667,26.013,21.681 -C25.998,21.667,25.979,21.654,25.961,21.642 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.508,27.532 C29.524,27.638,29.543,27.742,29.555,27.85 -C29.543,27.742,29.523,27.639,29.508,27.532 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M31.088,19.863 C31.41,19.913,31.729,19.977,32.039,20.059 -C31.729,19.978,31.41,19.912,31.088,19.863 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.662,19.743 C30.055,19.743,30.439,19.774,30.82,19.822 -C30.439,19.774,30.055,19.743,29.662,19.743 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M27.645,23.287 C27.678,23.33,27.709,23.374,27.743,23.417 -C27.709,23.374,27.678,23.33,27.645,23.287 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.262,26.418 C29.289,26.515,29.311,26.613,29.336,26.71 -C29.311,26.613,29.289,26.515,29.262,26.418 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M28.279,24.202 C28.316,24.264,28.355,24.328,28.394,24.391 -C28.355,24.328,28.316,24.265,28.279,24.202 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.662,19.743 C29.178,19.743,28.707,19.791,28.242,19.861 -C28.705,19.791,29.178,19.743,29.662,19.743 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M34.355,21.02 C34.355,21.416,34.324,21.806,34.275,22.19 -C34.324,21.806,34.357,21.417,34.357,21.019 -C33.683,20.624,32.955,20.313,32.185,20.097 -C32.953,20.314,33.682,20.627,34.355,21.02 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M32.99,25.822 C32.804,26.126,32.601,26.42,32.383,26.698 -C32.602,26.418,32.805,26.126,32.99,25.822 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M33.986,23.584 C33.771,24.321,33.466,25.02,33.084,25.667 -C33.467,25.018,33.771,24.321,33.986,23.584 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M29.629,29.056 C29.629,29.058,29.629,29.058,29.629,29.062 -C29.973,28.869,30.299,28.65,30.613,28.416 -C30.301,28.647,29.973,28.862,29.629,29.056 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M26.676,20.24 C27.112,20.092,27.565,19.978,28.028,19.894 -C27.564,19.978,27.111,20.093,26.676,20.24 Z" /> - <path - android:fillColor="#B9529E" - android:pathData="M32.186,20.097 C32.139,20.083,32.086,20.073,32.04,20.06 -C31.729,19.978,31.411,19.914,31.089,19.864 -C30.999,19.85,30.911,19.834,30.821,19.823 -C30.44,19.775,30.055,19.744,29.663,19.744 -C29.179,19.744,28.706,19.792,28.243,19.862 -C28.173,19.873,28.1,19.883,28.028,19.895 -C27.565,19.979,27.112,20.092,26.676,20.241 -C26.653,20.249,26.629,20.259,26.606,20.266 -C26.047,20.462,25.524,20.721,25.022,21.013 -C25.349,21.204,25.663,21.413,25.962,21.642 -C25.98,21.655,25.998,21.667,26.014,21.681 -C26.621,22.148,27.17,22.687,27.645,23.287 -C27.678,23.33,27.709,23.374,27.743,23.417 -C27.934,23.669,28.112,23.931,28.28,24.202 -C28.317,24.264,28.356,24.328,28.395,24.391 -C28.76,25.024,29.053,25.702,29.262,26.417 -C29.289,26.514,29.311,26.612,29.336,26.709 -C29.404,26.979,29.461,27.252,29.508,27.531 -C29.524,27.637,29.543,27.741,29.555,27.849 -C29.602,28.221,29.633,28.599,29.633,28.982 -C29.633,29.007,29.629,29.029,29.629,29.054 -C29.973,28.861,30.301,28.646,30.613,28.413 -C30.629,28.403,30.644,28.392,30.658,28.382 -C31.289,27.905,31.859,27.355,32.351,26.737 -C32.361,26.724,32.372,26.711,32.382,26.696 -C32.601,26.418,32.804,26.124,32.989,25.82 -C33.02,25.768,33.053,25.716,33.083,25.665 -C33.466,25.018,33.771,24.319,33.985,23.582 -C34.006,23.509,34.022,23.434,34.044,23.36 -C34.122,23.061,34.187,22.755,34.233,22.444 -C34.247,22.358,34.262,22.274,34.274,22.187 -C34.323,21.803,34.354,21.414,34.354,21.017 -C33.682,20.627,32.953,20.314,32.186,20.097 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M30.658,28.384 C31.289,27.907,31.859,27.358,32.351,26.739 -C31.859,27.356,31.289,27.907,30.658,28.384 Z" /> - <path - android:fillColor="#2A368E" - android:pathData="M34.234,22.446 C34.187,22.757,34.123,23.063,34.045,23.362 -C34.123,23.063,34.188,22.759,34.234,22.446 Z" /> - <path - android:fillColor="#594098" - android:pathData="M16.141,23.576 C16.112,23.479,16.09,23.381,16.066,23.282 -C16.089,23.381,16.112,23.479,16.141,23.576 Z" /> - <path - android:fillColor="#594098" - android:pathData="M15.775,20.939 C15.774,20.939,15.773,20.941,15.771,20.942 L15.771,21.014 -C15.771,20.989,15.775,20.964,15.775,20.939 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.741,26.69 C17.712,26.654,17.683,26.615,17.656,26.578 -C17.685,26.615,17.712,26.654,17.741,26.69 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.109,25.774 C17.073,25.717,17.036,25.661,17.004,25.602 -C17.038,25.661,17.074,25.718,17.109,25.774 Z" /> - <path - android:fillColor="#6ABC45" - android:pathData="M24.05,36.341 C24.026,36.321,24.002,36.306,23.977,36.286 -C23.371,35.817,22.824,35.278,22.351,34.677 -C22.323,34.642,22.296,34.605,22.268,34.566 -C22.069,34.308,21.886,34.039,21.717,33.757 -C21.681,33.7,21.645,33.646,21.613,33.587 C21.243,32.95,20.95,32.269,20.741,31.55 -C20.714,31.456,20.693,31.362,20.669,31.267 -C20.599,30.994,20.543,30.72,20.498,30.439 -C20.48,30.332,20.462,30.228,20.449,30.121 -C20.404,29.748,20.372,29.373,20.372,28.984 L20.372,28.982 -C19.356,28.39,18.465,27.611,17.742,26.691 -C17.713,26.655,17.686,26.616,17.657,26.579 -C17.46,26.32,17.279,26.053,17.111,25.775 -C17.075,25.718,17.04,25.662,17.006,25.603 -C16.64,24.97,16.349,24.292,16.142,23.577 -C16.113,23.48,16.091,23.382,16.067,23.283 -C15.998,23.014,15.942,22.744,15.899,22.468 -C15.881,22.361,15.863,22.256,15.849,22.147 -C15.804,21.776,15.773,21.4,15.773,21.016 L15.773,20.944 -C12.953,22.531,11.044,25.537,11.044,28.985 -C11.044,34.09,15.209,38.229,20.336,38.229 -C22.038,38.229,23.627,37.768,24.999,36.973 -C24.984,36.965,24.972,36.953,24.957,36.946 -C24.64,36.761,24.339,36.558,24.05,36.341 Z" /> - <path - android:fillColor="#594098" - android:pathData="M15.897,22.467 C15.879,22.361,15.86,22.253,15.847,22.146 -C15.861,22.255,15.879,22.359,15.897,22.467 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.715,24.216 C21.682,24.271,21.648,24.323,21.615,24.38 -C21.647,24.323,21.682,24.271,21.715,24.216 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.35,23.296 C22.324,23.328,22.301,23.362,22.275,23.397 -C22.3,23.362,22.324,23.328,22.35,23.296 Z" /> - <path - android:fillColor="#594098" - android:pathData="M24.024,21.651 C24.015,21.658,24.006,21.665,23.997,21.672 -C24.006,21.665,24.015,21.658,24.024,21.651 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.371,28.979 L20.371,28.979 L20.371,28.979 Z" /> - <path - android:fillColor="#594098" - android:pathData="M24.999,21 C24.336,20.615,23.622,20.311,22.866,20.099 -C23.619,20.313,24.336,20.615,24.999,21 C24.999,21.001,24.999,21.001,24.999,21 Z" /> - <path - android:fillColor="#594098" - android:pathData="M16.065,23.282 C15.996,23.015,15.94,22.743,15.897,22.467 -C15.94,22.743,15.997,23.014,16.065,23.282 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.656,26.578 C17.459,26.32,17.278,26.052,17.11,25.774 -C17.278,26.052,17.458,26.319,17.656,26.578 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.004,25.603 C16.638,24.972,16.348,24.291,16.14,23.577 -C16.347,24.292,16.639,24.97,17.004,25.603 Z" /> - <path - android:fillColor="#594098" - android:pathData="M15.778,20.938 C16.424,20.576,17.119,20.292,17.847,20.088 -C17.118,20.29,16.423,20.574,15.778,20.938 Z" /> - <path - android:fillColor="#594098" - android:pathData="M19.211,19.818 C19.581,19.771,19.953,19.743,20.335,19.743 -C19.954,19.743,19.581,19.773,19.211,19.818 Z" /> - <path - android:fillColor="#594098" - android:pathData="M17.741,26.69 C18.464,27.61,19.355,28.389,20.371,28.981 L20.371,28.979 -C19.353,28.39,18.463,27.607,17.741,26.69 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.767,19.864 C22.071,19.912,22.371,19.971,22.663,20.048 -C22.371,19.972,22.072,19.911,21.767,19.864 Z" /> - <path - android:fillColor="#F4EA11" - android:pathData="M20.371,28.979 C20.371,28.973,20.372,28.969,20.372,28.965 -C20.372,28.584,20.404,28.213,20.449,27.844 -C20.463,27.74,20.481,27.635,20.497,27.532 -C20.542,27.248,20.6,26.969,20.671,26.695 -C20.694,26.603,20.715,26.512,20.741,26.423 -C20.95,25.7,21.246,25.017,21.616,24.379 -C21.649,24.322,21.683,24.27,21.716,24.215 -C21.888,23.931,22.075,23.658,22.276,23.396 -C22.302,23.362,22.325,23.328,22.351,23.295 -C22.83,22.687,23.385,22.143,23.998,21.671 -C24.008,21.664,24.016,21.657,24.025,21.65 C24.335,21.414,24.66,21.195,25,21 -C24.337,20.614,23.62,20.312,22.867,20.098 -C22.8,20.08,22.732,20.064,22.664,20.047 -C22.372,19.971,22.071,19.911,21.768,19.863 -C21.674,19.848,21.578,19.831,21.482,19.82 -C21.106,19.773,20.725,19.742,20.336,19.742 -C19.955,19.742,19.582,19.77,19.212,19.817 -C19.119,19.828,19.027,19.844,18.934,19.859 -C18.64,19.904,18.351,19.96,18.067,20.032 -C17.995,20.05,17.921,20.067,17.848,20.088 -C17.119,20.291,16.424,20.575,15.779,20.938 -C15.778,20.938,15.776,20.939,15.776,20.939 -C15.776,20.963,15.772,20.989,15.772,21.014 -C15.772,21.398,15.803,21.774,15.848,22.145 -C15.861,22.252,15.88,22.36,15.898,22.466 -C15.941,22.742,15.998,23.015,16.066,23.281 -C16.09,23.38,16.112,23.478,16.141,23.575 -C16.349,24.29,16.639,24.971,17.005,25.601 -C17.037,25.66,17.074,25.716,17.11,25.773 -C17.278,26.05,17.459,26.319,17.656,26.577 -C17.683,26.614,17.712,26.653,17.741,26.689 -C18.463,27.607,19.353,28.39,20.371,28.979 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.48,19.821 C21.104,19.774,20.723,19.743,20.334,19.743 -C20.724,19.743,21.104,19.774,21.48,19.821 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.371,28.979 C20.371,28.973,20.372,28.969,20.372,28.965 -C20.372,28.97,20.371,28.974,20.371,28.979 L20.371,28.979 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.496,27.533 C20.48,27.636,20.462,27.74,20.448,27.845 -C20.462,27.74,20.48,27.636,20.496,27.533 Z" /> - <path - android:fillColor="#594098" - android:pathData="M18.066,20.033 C18.35,19.961,18.638,19.905,18.933,19.86 -C18.639,19.904,18.352,19.961,18.066,20.033 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.74,26.424 C20.714,26.514,20.694,26.605,20.67,26.696 -C20.693,26.604,20.714,26.514,20.74,26.424 Z" /> - <path - android:fillColor="#594098" - android:pathData="M15.847,22.146 C15.802,21.775,15.771,21.399,15.771,21.015 -C15.771,21.398,15.802,21.774,15.847,22.146 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.629,29.062 C29.625,29.453,29.592,29.837,29.541,30.218 -C29.592,29.837,29.625,29.452,29.629,29.062 L29.629,29.062 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.447,30.12 C20.402,29.747,20.37,29.372,20.37,28.983 -C20.371,29.372,20.402,29.747,20.447,30.12 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.351,34.677 C22.825,35.279,23.371,35.818,23.977,36.286 -C23.371,35.817,22.825,35.278,22.351,34.677 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.51,30.419 C29.455,30.757,29.387,31.087,29.297,31.409 -C29.387,31.087,29.455,30.757,29.51,30.419 Z" /> - <path - android:fillColor="#594098" - android:pathData="M25.996,36.306 C26.614,35.831,27.172,35.285,27.653,34.671 -C27.172,35.284,26.613,35.831,25.996,36.306 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.264,31.538 C29.049,32.284,28.741,32.989,28.356,33.645 -C28.74,32.989,29.049,32.284,29.264,31.538 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.667,31.267 C20.597,30.994,20.541,30.72,20.496,30.439 -C20.542,30.72,20.597,30.993,20.667,31.267 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.268,34.565 C22.069,34.307,21.886,34.038,21.717,33.756 -C21.886,34.038,22.069,34.308,22.268,34.565 Z" /> - <path - android:fillColor="#594098" - android:pathData="M28.295,33.743 C28.106,34.054,27.902,34.352,27.68,34.636 -C27.902,34.353,28.105,34.054,28.295,33.743 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.612,33.587 C21.242,32.95,20.949,32.269,20.74,31.55 -C20.949,32.269,21.242,32.95,21.612,33.587 Z" /> - <path - android:fillColor="#594098" - android:pathData="M25.966,36.327 C25.658,36.559,25.336,36.776,25,36.97 -C25.336,36.776,25.659,36.56,25.966,36.327 Z" /> - <path - android:fillColor="#594098" - android:pathData="M24.955,36.944 C24.641,36.76,24.339,36.557,24.05,36.34 -C24.339,36.558,24.64,36.761,24.955,36.944 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.54,29.901 C22.589,29.915,22.64,29.926,22.689,29.94 -C22.64,29.927,22.589,29.915,22.54,29.901 Z" /> - <path - android:fillColor="#594098" - android:pathData="M26.184,30.183 C26.282,30.171,26.375,30.156,26.471,30.14 -C26.375,30.155,26.281,30.171,26.184,30.183 Z" /> - <path - android:fillColor="#594098" - android:pathData="M23.638,30.136 C23.728,30.15,23.817,30.165,23.907,30.177 -C23.817,30.165,23.729,30.149,23.638,30.136 Z" /> - <path - android:fillColor="#594098" - android:pathData="M27.322,29.97 C27.4,29.952,27.48,29.933,27.558,29.909 -C27.48,29.933,27.4,29.952,27.322,29.97 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.625,29.058 C29.625,29.058,29.627,29.058,29.629,29.056 -C29.629,29.031,29.633,29.009,29.633,28.984 -C29.633,29.009,29.625,29.034,29.625,29.058 Z" /> - <path - android:fillColor="#594098" - android:pathData="M27.645,23.287 C27.17,22.686,26.622,22.147,26.014,21.681 -C26.621,22.146,27.168,22.688,27.645,23.287 Z" /> - <path - android:fillColor="#594098" - android:pathData="M25.961,21.642 C25.661,21.413,25.348,21.204,25.021,21.013 L25.019,21.013 -C25.346,21.204,25.662,21.415,25.961,21.642 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.373,28.978 L20.373,28.978 L20.373,28.984 L20.373,28.984 L20.373,28.978 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.555,27.851 C29.602,28.223,29.633,28.601,29.633,28.984 -C29.633,28.601,29.602,28.223,29.555,27.851 Z" /> - <path - android:fillColor="#594098" - android:pathData="M22.274,23.396 C22.073,23.659,21.887,23.931,21.714,24.215 -C21.887,23.933,22.074,23.658,22.274,23.396 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.67,26.696 C20.599,26.969,20.542,27.249,20.496,27.533 -C20.542,27.25,20.599,26.97,20.67,26.696 Z" /> - <path - android:fillColor="#594098" - android:pathData="M20.448,27.845 C20.403,28.214,20.371,28.585,20.371,28.966 -C20.372,28.585,20.402,28.212,20.448,27.845 Z" /> - <path - android:fillColor="#594098" - android:pathData="M21.615,24.38 C21.245,25.018,20.949,25.701,20.74,26.424 -C20.949,25.702,21.245,25.017,21.615,24.38 Z" /> - <path - android:fillColor="#594098" - android:pathData="M29.336,26.71 C29.404,26.98,29.461,27.253,29.508,27.532 -C29.461,27.253,29.404,26.979,29.336,26.71 Z" /> - <path - android:fillColor="#FFFFFF" - android:pathData="M29.625,29.058 C29.625,29.035,29.633,29.009,29.633,28.984 -C29.633,28.601,29.602,28.223,29.555,27.851 -C29.543,27.743,29.524,27.639,29.508,27.533 -C29.461,27.254,29.404,26.98,29.336,26.711 -C29.311,26.614,29.289,26.516,29.262,26.419 -C29.053,25.705,28.76,25.024,28.395,24.393 -C28.356,24.33,28.317,24.266,28.28,24.204 -C28.112,23.933,27.934,23.671,27.743,23.419 -C27.71,23.376,27.679,23.332,27.645,23.289 -C27.168,22.689,26.622,22.147,26.014,21.683 -C25.998,21.669,25.979,21.657,25.962,21.644 -C25.662,21.417,25.347,21.206,25.02,21.015 -C24.686,21.21,24.353,21.408,24.047,21.639 -C24.039,21.644,24.032,21.65,24.025,21.654 -C24.016,21.661,24.007,21.668,23.998,21.675 -C23.383,22.147,22.831,22.692,22.351,23.299 -C22.325,23.331,22.302,23.365,22.276,23.4 -C22.075,23.662,21.889,23.936,21.716,24.219 -C21.683,24.274,21.649,24.326,21.616,24.383 -C21.246,25.02,20.95,25.705,20.741,26.427 -C20.715,26.517,20.695,26.608,20.671,26.699 -C20.6,26.972,20.543,27.253,20.497,27.536 -C20.481,27.639,20.463,27.743,20.449,27.848 -C20.403,28.215,20.372,28.588,20.372,28.969 -C20.372,28.973,20.371,28.977,20.371,28.983 L20.376,28.985 L20.376,28.985 -C21.049,29.378,21.775,29.688,22.54,29.905 -C22.589,29.919,22.64,29.93,22.689,29.944 C23,30.028,23.316,30.09,23.638,30.139 -C23.728,30.153,23.817,30.168,23.907,30.18 -C24.287,30.229,24.67,30.26,25.063,30.26 -C25.444,30.26,25.817,30.231,26.184,30.186 -C26.282,30.174,26.375,30.159,26.471,30.143 -C26.76,30.098,27.043,30.043,27.323,29.973 -C27.401,29.955,27.481,29.936,27.559,29.912 -C28.288,29.709,28.983,29.426,29.629,29.06 -C29.629,29.06,29.629,29.06,29.629,29.064 L29.629,29.064 -C29.629,29.06,29.629,29.06,29.629,29.058 -C29.627,29.058,29.625,29.058,29.625,29.058 Z" /> - <path - android:fillColor="#594098" - android:pathData="M28.395,24.392 C28.76,25.024,29.053,25.704,29.262,26.418 -C29.053,25.702,28.76,25.024,28.395,24.392 Z" /> - <path - android:fillColor="#594098" - android:pathData="M25,21.001 C25.007,21.005,25.012,21.011,25.019,21.013 L25.021,21.013 -C25.012,21.009,25.007,21.005,24.999,21 -C24.999,21.001,24.999,21.001,24.999,21.001 L25,21.001 Z" /> - <path - android:fillColor="#594098" - android:pathData="M27.742,23.417 C27.933,23.669,28.111,23.932,28.279,24.202 -C28.111,23.931,27.934,23.669,27.742,23.417 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M24.998,36.971 L24.998,36.971 L24.998,36.972 L24.998,36.972 L24.998,36.971 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M28.355,33.646 C28.335,33.679,28.314,33.71,28.294,33.744 -C28.314,33.71,28.336,33.679,28.355,33.646 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M25.996,36.306 C25.986,36.314,25.975,36.32,25.967,36.327 -C25.975,36.319,25.986,36.313,25.996,36.306 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M29.51,30.419 C29.52,30.351,29.531,30.284,29.541,30.218 -C29.531,30.284,29.52,30.351,29.51,30.419 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M29.297,31.409 C29.287,31.454,29.277,31.497,29.264,31.538 -C29.277,31.497,29.287,31.454,29.297,31.409 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M27.68,34.636 C27.67,34.65,27.662,34.661,27.653,34.671 -C27.662,34.661,27.67,34.649,27.68,34.636 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M24.999,36.972 L24.999,36.972 L25,36.97 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.371,28.981 L20.371,28.983 L20.371,28.981 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M24.955,36.944 C24.97,36.952,24.982,36.964,24.997,36.971 -C24.998,36.971,24.998,36.971,24.998,36.971 -C24.985,36.964,24.97,36.952,24.955,36.944 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.447,30.12 C20.46,30.227,20.478,30.331,20.496,30.438 -C20.48,30.331,20.46,30.226,20.447,30.12 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M21.716,33.757 C21.68,33.7,21.644,33.646,21.612,33.587 -C21.645,33.646,21.68,33.7,21.716,33.757 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M22.351,34.677 C22.323,34.642,22.296,34.605,22.268,34.566 -C22.296,34.604,22.323,34.642,22.351,34.677 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.74,31.55 C20.714,31.456,20.692,31.362,20.668,31.267 -C20.692,31.362,20.712,31.456,20.74,31.55 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M24.05,36.341 C24.026,36.321,24.002,36.306,23.977,36.286 -C24.002,36.306,24.026,36.321,24.05,36.341 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.371,28.979 L20.371,28.979 L20.371,28.981 L20.371,28.981 L20.371,28.979 Z" /> - <path - android:fillColor="#6FCBDC" - android:pathData="M27.559,29.909 C27.481,29.932,27.401,29.952,27.323,29.97 -C27.044,30.04,26.761,30.095,26.471,30.14 -C26.375,30.156,26.282,30.171,26.184,30.183 -C25.815,30.226,25.444,30.257,25.063,30.257 -C24.671,30.257,24.287,30.226,23.907,30.177 -C23.817,30.165,23.728,30.15,23.638,30.136 C23.315,30.087,23,30.023,22.689,29.941 -C22.639,29.927,22.589,29.916,22.54,29.902 -C21.77,29.687,21.045,29.377,20.371,28.982 L20.371,28.984 -C20.371,29.373,20.402,29.748,20.448,30.121 -C20.461,30.226,20.481,30.332,20.497,30.439 -C20.542,30.72,20.598,30.994,20.668,31.267 -C20.692,31.363,20.714,31.456,20.74,31.55 -C20.949,32.269,21.242,32.95,21.612,33.587 -C21.645,33.646,21.68,33.7,21.716,33.757 -C21.885,34.038,22.069,34.308,22.267,34.566 -C22.296,34.605,22.322,34.642,22.35,34.677 -C22.824,35.279,23.37,35.818,23.976,36.286 -C24.001,36.306,24.025,36.321,24.049,36.341 -C24.338,36.558,24.64,36.761,24.954,36.945 -C24.969,36.953,24.984,36.965,24.997,36.972 -C24.998,36.972,24.998,36.972,24.998,36.97 -C25.334,36.777,25.657,36.56,25.964,36.327 -C25.973,36.319,25.984,36.313,25.993,36.306 -C26.611,35.831,27.169,35.285,27.65,34.671 -C27.66,34.661,27.668,34.65,27.677,34.636 -C27.9,34.353,28.103,34.054,28.292,33.743 -C28.312,33.71,28.333,33.679,28.353,33.645 -C28.738,32.989,29.046,32.284,29.261,31.538 -C29.275,31.497,29.284,31.454,29.294,31.409 -C29.384,31.087,29.452,30.757,29.507,30.419 -C29.517,30.351,29.528,30.284,29.538,30.218 -C29.589,29.837,29.622,29.452,29.626,29.062 -C28.982,29.423,28.289,29.708,27.559,29.909 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M29.629,29.058 C28.983,29.423,28.287,29.706,27.559,29.91 -C28.289,29.709,28.983,29.424,29.629,29.062 -C29.629,29.058,29.629,29.058,29.629,29.058 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M20.371,28.981 C21.045,29.376,21.771,29.686,22.54,29.901 -C21.775,29.684,21.049,29.374,20.376,28.981 -C20.433,29.016,20.491,29.049,20.548,29.083 -C20.66,29.145,20.775,29.206,20.893,29.263 -C20.775,29.206,20.66,29.146,20.548,29.083 -C20.49,29.05,20.433,29.017,20.376,28.981 -C20.375,28.981,20.372,28.981,20.371,28.979 -C20.371,28.981,20.371,28.981,20.371,28.981 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M23.907,30.177 C24.287,30.226,24.671,30.257,25.063,30.257 -C24.67,30.257,24.287,30.226,23.907,30.177 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M22.689,29.94 C23,30.022,23.314,30.086,23.638,30.135 -C23.316,30.087,23,30.024,22.689,29.94 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M25.063,30.257 C25.444,30.257,25.815,30.226,26.184,30.183 -C25.817,30.228,25.444,30.257,25.063,30.257 Z" /> - <path - android:fillColor="#009E95" - android:pathData="M26.471,30.14 C26.76,30.095,27.043,30.04,27.323,29.97 -C27.043,30.04,26.76,30.095,26.471,30.14 Z" /> - <path - android:fillColor="#000000" - android:strokeWidth="1" - android:pathData="M47.2019,37.4696 L40.5892,37.3945 L43.9606,31.7053 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_redo.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_redo.xml deleted file mode 100755 index 0d4c4be8..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_redo.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="1.56" - android:pathData="M 28.605 14.55 L 36.42 22.479 L 28.549 29.896 " /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.56" - android:pathData="M35.627,22.195 -c0,0-8.268-0.113-12.004,0.453c-3.737,0.567-9.741,2.04-8.948,11.778" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_reflow.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_reflow.xml deleted file mode 100644 index fee3f0c5..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_reflow.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="1.171" - android:pathData="M16.181,19.879 L34.026,19.879" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.171" - android:pathData="M16.181,24.803 L34.026,24.803" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.171" - android:pathData="M16.183,29.727 L25.848,29.727" /> - <path - android:fillColor="#333333" - android:pathData="M37.641,40.245 L12.36,40.245 L12.36,9.755 L37.641,9.755 L37.641,40.245 Z -M38.817,8.579 L11.182,8.579 L11.182,41.422 L38.817,41.422 L38.817,8.579 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.171" - android:pathData="M26.737,29.727 L31.35,29.727 C32.332,29.727,33.13,30.524,33.13,31.506 -L33.13,31.717 C33.13,32.699,32.332,33.492,31.35,33.492 L26.731,33.492" /> - <path - android:strokeColor="#333333" - android:strokeWidth="0.886" - android:strokeMiterLimit="10" - android:pathData="M28.904,35.771 L26.438,33.506 L28.891,31.232" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_save.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_save.xml deleted file mode 100755 index 0aa6421c..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_save.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M44.035,43.959H5.965V6.042h38.07V43.959z -M42.663,7.414H7.338v35.173h35.325V7.414z" /> - <path - android:fillColor="#333333" - android:pathData="M38.359,6.041v12.446c0,1.007-0.812,1.82-1.82,1.82h-23.23 -c-1.005,0-1.822-0.813-1.822-1.82V6.041H38.359 -M36.987,7.414H12.86v11.073c0,0.247,0.201,0.448,0.449,0.448h23.23 -c0.251,0,0.448-0.197,0.448-0.448V7.414z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.372" - android:strokeMiterLimit="10" - android:pathData="M 33.484 9.823 L 33.484 16.167" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.372" - android:strokeMiterLimit="10" - android:pathData="M 11.487 30.369 L 38.605 30.369" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.372" - android:strokeMiterLimit="10" - android:pathData="M 11.487 35.959 L 38.605 35.959" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_save_as.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_save_as.xml deleted file mode 100644 index 88b0c64d..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_save_as.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:fillColor="#333333" - android:pathData="M40.2505,24.3518 L44.6158,28.7518 L32.9436,40.3319 L28.5784,35.9319 -L40.2505,24.3518 Z" /> - <path - android:fillColor="#333333" - android:pathData="M27.881,36.635 L32.235,41.021 L25.537,43.443 Z" /> - <path - android:fillColor="#333333" - android:pathData="M45.559,27.822 L48.925,24.484 C49.025,24.384,49.025,24.223,48.926,24.124 -L44.918,20.084 C44.818,19.984,44.657,19.984,44.558,20.083 L41.193,23.421 -L45.559,27.822 Z" /> - <path - android:fillColor="#333333" - android:pathData="M36.081,5.721 L36.081,16.26 C36.081,17.112,35.393,17.801,34.54,17.801 -L14.872,17.801 C14.021,17.801,13.33,17.112,13.33,16.26 L13.33,5.721 -L36.081,5.721 M34.709,7.094 L14.703,7.094 L14.703,16.26 -C14.703,16.354,14.777,16.428,14.872,16.428 L34.54,16.428 -C34.635,16.428,34.709,16.354,34.709,16.26 L34.709,7.094 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.372" - android:strokeMiterLimit="10" - android:pathData="M31.955,8.923 L31.955,14.295" /> - <path - android:fillColor="#333333" - android:pathData="M32.52,30.27 L13.331,30.27 L13.331,31.836 L30.939,31.836 Z" /> - <path - android:fillColor="#333333" - android:pathData="M36.08,25.535 L13.33,25.535 L13.33,27.104 L34.472,27.104 Z" /> - <path - android:fillColor="#333333" - android:pathData="M8.656,5.719 L8.656,37.828 L24.032,37.828 L23.747,37.547 L24.993,36.334 -L10.15,36.334 L10.15,7.212 L39.393,7.212 L39.393,22.31 L40.887,20.853 -L40.887,5.719 L8.656,5.719 Z M40.887,37.828 L40.887,35.807 L38.811,37.828 -L40.887,37.828 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_selection_drag_handle.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_selection_drag_handle.xml deleted file mode 100644 index c5ae201f..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_selection_drag_handle.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="20dp" - android:height="20dp" - android:viewportWidth="20" - android:viewportHeight="20"> - - <path - android:fillColor="#4683C4" - android:pathData="M0,10 C0,4.478,4.478,0,10,0 C15.522,0,20,4.478,20,10 C20,15.523,15.522,20,10,20 -C4.478,20,0,15.523,0,10" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_selection_hand.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_selection_hand.xml deleted file mode 100644 index edefdd5b..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_selection_hand.xml +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="30dp" - android:height="30dp" - android:viewportWidth="30" - android:viewportHeight="30"> - - <clip-path - android:pathData="M0,0 L100,0 L100,100 L0,100 L0,0 Z" /> - <path - android:fillColor="#549fd7" - android:pathData="M15,0.25 C23.147,0.25,29.75,6.854,29.75,15 C29.75,23.147,23.147,29.75,15,29.75 -C6.854,29.75,0.25,23.147,0.25,15 C0.25,6.854,6.854,0.25,15,0.25" /> - <clip-path - android:pathData="M0,0 L100,0 L100,100 L0,100 L0,0 Z" /> - <path - android:strokeColor="#176c9a" - android:strokeWidth="0.52700001" - android:pathData="M15,0.25 C23.147,0.25,29.75,6.854,29.75,15 C29.75,23.147,23.147,29.75,15,29.75 -C6.854,29.75,0.25,23.147,0.25,15 C0.25,6.854,6.854,0.25,15,0.25" /> - <clip-path - android:pathData="M13.531,6.182 L13.531,7.291 C13.531,7.291,12.91,6.582,12.11,6.582 -C11.311,6.582,10.69,7.514,10.69,7.514 L10.645,14.394 -C10.645,14.394,8.484,12.199,7.255,12.199 C7.053,12.199,6.877,12.257,6.739,12.397 -C5.764,13.374,7.649,16.281,7.848,16.48 C8.048,16.68,10.401,20.586,10.6,20.787 -C10.8,20.985,12.82,24.381,16.239,24.381 -C19.658,24.381,21.878,20.743,21.878,19.988 L21.878,10.178 -C21.878,10.178,21.922,8.682,20.452,8.682 C19.387,8.682,19.124,9.599,19.124,9.599 -L19.124,7.423 C19.124,7.423,18.592,6.582,17.881,6.582 -C17.172,6.582,16.461,6.937,16.461,7.336 L16.461,13.951 L16.416,6.182 -C16.416,6.182,16.106,5.116,14.908,5.116 C13.709,5.116,13.531,6.182,13.531,6.182" /> - <path - android:fillColor="#dae8f4" - android:strokeColor="#dae8f4" - android:strokeWidth="1" - android:pathData="M5.50976,4.98888 L21.6678,4.98888 L21.6678,24.2539 L5.50976,24.2539 -L5.50976,4.98888 Z" /> - <group> - <clip-path - android:pathData="M0,0 L30,0 L30,30 L0,30 L0,0 Z" /> - <clip-path - android:pathData="M0,0 L100,0 L100,100 L0,100 L0,0 Z" /> - <path - android:strokeColor="#166c9c" - android:strokeWidth="0.52700001" - android:pathData="M14.908,5.116 C13.709,5.116,13.532,6.182,13.532,6.182 L13.532,7.291 -C13.532,7.291,12.91,6.582,12.111,6.582 C11.312,6.582,10.69,7.513,10.69,7.513 -L10.646,14.393 C10.646,14.393,8.484,12.199,7.255,12.199 -C7.054,12.199,6.877,12.258,6.74,12.396 C5.763,13.374,7.649,16.281,7.848,16.48 -C8.048,16.68,10.401,20.586,10.601,20.787 -C10.801,20.984,12.821,24.381,16.239,24.381 -C19.658,24.381,21.879,20.742,21.879,19.988 L21.879,10.178 -C21.879,10.178,21.923,8.681,20.453,8.681 C19.388,8.681,19.125,9.599,19.125,9.599 -L19.125,7.424 C19.125,7.424,18.593,6.582,17.882,6.582 -C17.173,6.582,16.462,6.937,16.462,7.336 L16.462,13.951 L16.417,6.182 -C16.416,6.182,16.106,5.116,14.908,5.116" /> - </group> - <group> - <clip-path - android:pathData="M0,0 L30,0 L30,30 L0,30 L0,0 Z" /> - <clip-path - android:pathData="M13.537,13.92 L13.537,7.467 L13.537,13.92 Z" /> - <path - android:fillColor="#549fd7ff" - android:pathData="M13.537,13.92 L13.537,7.467 L13.537,13.92 Z" /> - </group> - <group> - <clip-path - android:pathData="M0,0 L30,0 L30,30 L0,30 L0,0 Z" /> - <clip-path - android:pathData="M0,0 L100,0 L100,100 L0,100 L0,0 Z" /> - <path - android:strokeColor="#166c9c" - android:strokeWidth="0.52700001" - android:pathData="M13.537,13.919 L13.537,7.466" /> - </group> - <group> - <clip-path - android:pathData="M0,0 L30,0 L30,30 L0,30 L0,0 Z" /> - <clip-path - android:pathData="M19.094,14.025 L19.094,7.572 L19.094,14.025 Z" /> - <path - android:fillColor="#549fd7ff" - android:pathData="M19.094,14.025 L19.094,7.572 L19.094,14.025 Z" /> - </group> - <group> - <clip-path - android:pathData="M0,0 L30,0 L30,30 L0,30 L0,0 Z" /> - <clip-path - android:pathData="M0,0 L100,0 L100,100 L0,100 L0,0 Z" /> - <path - android:strokeColor="#166c9c" - android:strokeWidth="0.52700001" - android:pathData="M19.094,14.025 L19.094,7.572" /> - </group> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_selection_rotate.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_selection_rotate.xml deleted file mode 100644 index 91d00104..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_selection_rotate.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="20dp" - android:height="20dp" - android:viewportWidth="20" - android:viewportHeight="20"> - - <clip-path - android:pathData="M0,0 L20,0 L20,20 L0,20 L0,0 Z" /> - <path - android:fillColor="#FFFFFF" - android:pathData="M0,10 C0,4.477,4.477,0,9.999,0 C15.522,0,20,4.477,20,10 -C20,15.523,15.522,20,9.999,20 C4.477,20,0,15.523,0,10" /> - <clip-path - android:pathData="M0,0 L20,0 L20,20 L0,20 L0,0 Z" /> - <path - android:strokeColor="#4683C4" - android:strokeWidth="1.04" - android:pathData="M10.806,5.468 C13.296,5.855,15.202,8.008,15.202,10.607 -C15.202,13.479,12.873,15.807,9.999,15.807 C7.128,15.807,4.8,13.479,4.8,10.607 -C4.8,10.394,4.812,10.184,4.837,9.979" /> - <clip-path - android:pathData="M0,0 L20,0 L20,20 L0,20 L0,0 Z" /> - <path - android:fillColor="#4683C4" - android:pathData="M11.462,7.991 L7.925,5.506 L11.462,3.009 Z" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_share.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_share.xml deleted file mode 100755 index 4dd1cb69..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_share.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="1.613" - android:pathData="M 34.511 8.669 C 37.3641030176 8.669 39.677 10.9818969824 39.677 13.835 C 39.677 16.6881030176 37.3641030176 19.001 34.511 19.001 C 31.6578969824 19.001 29.345 16.6881030176 29.345 13.835 C 29.345 10.9818969824 31.6578969824 8.669 34.511 8.669 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.613" - android:pathData="M 34.511 28.424 C 37.3641030176 28.424 39.677 30.7368969824 39.677 33.59 C 39.677 36.4431030176 37.3641030176 38.756 34.511 38.756 C 31.6578969824 38.756 29.345 36.4431030176 29.345 33.59 C 29.345 30.7368969824 31.6578969824 28.424 34.511 28.424 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.613" - android:pathData="M 14.754 18.614 C 17.6071030176 18.614 19.92 20.9268969824 19.92 23.78 C 19.92 26.6331030176 17.6071030176 28.946 14.754 28.946 C 11.9008969824 28.946 9.588 26.6331030176 9.588 23.78 C 9.588 20.9268969824 11.9008969824 18.614 14.754 18.614 Z" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.613" - android:pathData="M 19.345 21.077 L 29.962 15.836" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.613" - android:pathData="M 19.345 21.077 L 29.962 15.836" /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.613" - android:pathData="M 29.962 31.829 L 19.345 26.588" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_toggle_annotations.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_toggle_annotations.xml deleted file mode 100644 index 0474cd95..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_toggle_annotations.xml +++ /dev/null @@ -1,4 +0,0 @@ -<vector android:height="50dp" android:viewportHeight="24.0" - android:viewportWidth="24.0" android:width="50dp" xmlns:android="http://schemas.android.com/apk/res/android"> - <path android:fillColor="#FF000000" android:pathData="M22,9.24l-7.19,-0.62L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21 12,17.27 18.18,21l-1.63,-7.03L22,9.24zM12,15.4V6.1l1.71,4.04 4.38,0.38 -3.32,2.88 1,4.28L12,15.4z"/> -</vector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_undo.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_undo.xml deleted file mode 100755 index b4ce9622..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/icon_undo.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="50dp" - android:height="50dp" - android:viewportWidth="50" - android:viewportHeight="50"> - - <path - android:strokeColor="#333333" - android:strokeWidth="1.56" - android:pathData="M 22.418 14.55 L 14.603 22.478 L 22.475 29.896 " /> - <path - android:strokeColor="#333333" - android:strokeWidth="1.56" - android:pathData="M15.396,22.196 -c0,0,8.268-0.113,12.005,0.452c3.737,0.567,9.741,2.039,8.948,11.779" /> -</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/number_format_popup.xml b/platform/android/example/mupdf/src/main/res/drawable/number_format_popup.xml deleted file mode 100644 index 5154168b..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/number_format_popup.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <stroke android:width="1dp" android:color="@color/formula_popup_background" /> - <solid android:color="@color/number_format_popup_background" /> - <corners - android:radius="7dp" /> - <padding - android:top="5dp" - android:left="5dp" - android:right="5dp" - android:bottom="5dp" - /> -</shape> diff --git a/platform/android/example/mupdf/src/main/res/drawable/rectangle.xml b/platform/android/example/mupdf/src/main/res/drawable/rectangle.xml deleted file mode 100644 index 158afcf8..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/rectangle.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="#ffffffff" /> -</shape> diff --git a/platform/android/example/mupdf/src/main/res/drawable/search_button.xml b/platform/android/example/mupdf/src/main/res/drawable/search_button.xml deleted file mode 100644 index c741b62c..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/search_button.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - - <item android:state_selected="true"> - <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- This is the line --> - <item> - <shape> - <padding android:left="1dp" android:top="2dp" android:right="1dp" android:bottom="0dp"/> - <solid android:color="#FFFFFFFF" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="12dp" - android:topRightRadius="12dp" /> - </shape> - </item> - <!-- This is the main color --> - <item> - <shape> - <solid android:color="@color/toolbar" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="12dp" - android:topRightRadius="12dp" /> - </shape> - </item> - </layer-list> - </item> - -</selector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/search_input_wrapper.xml b/platform/android/example/mupdf/src/main/res/drawable/search_input_wrapper.xml deleted file mode 100644 index 125d8559..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/search_input_wrapper.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="@color/white" /> - <stroke android:width="3dp" android:color="#888888"/> - <corners - android:bottomRightRadius="24dp" - android:bottomLeftRadius="24dp" - android:topLeftRadius="24dp" - android:topRightRadius="24dp" /> -</shape> diff --git a/platform/android/example/mupdf/src/main/res/drawable/search_text_input.xml b/platform/android/example/mupdf/src/main/res/drawable/search_text_input.xml deleted file mode 100644 index 9be97bd4..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/search_text_input.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - - <stroke android:width="1dp" - android:color="@color/transparent" /> - - <solid android:color="@color/transparent" /> - - <padding - android:top="0dp" - android:left="10dp" - android:bottom="0dp" - /> - -</shape> diff --git a/platform/android/example/mupdf/src/main/res/drawable/spinner_back.xml b/platform/android/example/mupdf/src/main/res/drawable/spinner_back.xml deleted file mode 100644 index c0d785a4..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/spinner_back.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <stroke android:width="1dp" android:color="#535353" /> - <solid android:color="@color/white" /> -</shape> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_left_selected.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_left_selected.xml deleted file mode 100644 index c466e842..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_left_selected.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- This is the line --> - <item> - <shape> - <padding android:left="1dp" android:top="2dp" android:right="1dp" android:bottom="0dp"/> - <solid android:color="#FFFFFFFF" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="12dp" - android:topRightRadius="0.1dp" /> - </shape> - </item> - <!-- This is the main color --> - <item> - <shape> - <solid android:color="@color/toolbar" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="12dp" - android:topRightRadius="0.1dp" /> - </shape> - </item> -</layer-list> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_left_selector.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_left_selector.xml deleted file mode 100644 index fe947ca9..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_left_selector.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - - <!-- Active tab --> - <item android:state_selected="true" android:state_focused="false" - android:state_pressed="false" android:drawable="@drawable/tab_left_selected" /> - - <!-- Inactive tab --> - <item android:state_selected="false" android:state_focused="false" - android:state_pressed="false" android:drawable="@drawable/tab_left_unselected" /> - - <!-- Pressed tab --> - <item android:state_pressed="true" android:drawable="@color/transparent" /> - - <!-- Selected tab (using d-pad) --> - <item android:state_focused="true" android:state_selected="true" - android:state_pressed="false" android:drawable="@color/transparent" /> - -</selector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_left_unselected.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_left_unselected.xml deleted file mode 100644 index e8414614..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_left_unselected.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- This is the line --> - <item> - <shape> - <padding android:left="1dp" android:top="2dp" android:right="1dp" android:bottom="0dp"/> - <solid android:color="#FFFFFFFF" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="12dp" - android:topRightRadius="0.1dp" /> - </shape> - </item> - <!-- This is the main color --> - <item> - <shape> - <solid android:color="#1B63BB" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="12dp" - android:topRightRadius="0.1dp" /> - </shape> - </item> -</layer-list> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_right_selected.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_right_selected.xml deleted file mode 100644 index 99121fd8..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_right_selected.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- This is the line --> - <item> - <shape> - <padding android:left="1dp" android:top="2dp" android:right="1dp" android:bottom="0dp"/> - <solid android:color="#FFFFFFFF" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="0.1dp" - android:topRightRadius="12dp" /> - </shape> - </item> - <!-- This is the main color --> - <item> - <shape> - <solid android:color="@color/toolbar" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="0.1dp" - android:topRightRadius="12dp" /> - </shape> - </item> -</layer-list> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_right_selector.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_right_selector.xml deleted file mode 100644 index 8f4d7caa..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_right_selector.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - - <!-- Active tab --> - <item android:state_selected="true" android:state_focused="false" - android:state_pressed="false" android:drawable="@drawable/tab_right_selected" /> - - <!-- Inactive tab --> - <item android:state_selected="false" android:state_focused="false" - android:state_pressed="false" android:drawable="@drawable/tab_right_unselected" /> - - <!-- Pressed tab --> - <item android:state_pressed="true" android:drawable="@color/transparent" /> - - <!-- Selected tab (using d-pad) --> - <item android:state_focused="true" android:state_selected="true" - android:state_pressed="false" android:drawable="@color/transparent" /> - -</selector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_right_unselected.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_right_unselected.xml deleted file mode 100644 index a33e0bcf..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_right_unselected.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- This is the line --> - <item> - <shape> - <padding android:left="1dp" android:top="2dp" android:right="1dp" android:bottom="0dp"/> - <solid android:color="#FFFFFFFF" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="0.1dp" - android:topRightRadius="12dp" /> - </shape> - </item> - <!-- This is the main color --> - <item> - <shape> - <solid android:color="#1B63BB" /> - <corners - android:bottomRightRadius="0.1dp" - android:bottomLeftRadius="0.1dp" - android:topLeftRadius="0.1dp" - android:topRightRadius="12dp" /> - </shape> - </item> -</layer-list> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_selected.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_selected.xml deleted file mode 100755 index 335752ab..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_selected.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> -<!-- This is the line --> -<item> - <shape> - <padding android:left="1dp" android:top="2dp" android:right="1dp" android:bottom="0dp"/> - <solid android:color="#FFFFFFFF" /> - </shape> -</item> -<!-- This is the main color --> -<item> - <shape> - <solid android:color="@color/toolbar" /> - </shape> -</item> -</layer-list> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_selector.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_selector.xml deleted file mode 100755 index dcb67b72..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_selector.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - - <!-- Active tab --> - <item android:state_selected="true" android:state_focused="false" - android:state_pressed="false" android:drawable="@drawable/tab_selected" /> - - <!-- Inactive tab --> - <item android:state_selected="false" android:state_focused="false" - android:state_pressed="false" android:drawable="@drawable/tab_unselected" /> - - <!-- Pressed tab --> - <item android:state_pressed="true" android:drawable="@color/transparent" /> - - <!-- Selected tab (using d-pad) --> - <item android:state_focused="true" android:state_selected="true" - android:state_pressed="false" android:drawable="@color/transparent" /> - -</selector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_text_selector.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_text_selector.xml deleted file mode 100755 index d25dcd4e..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_text_selector.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_selected="true" android:color="@android:color/black" /> - <item android:state_focused="true" android:color="@android:color/white" /> - <item android:state_pressed="true" android:color="@android:color/white" /> - <item android:color="@android:color/white" /> -</selector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/tab_unselected.xml b/platform/android/example/mupdf/src/main/res/drawable/tab_unselected.xml deleted file mode 100755 index a8c76430..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/tab_unselected.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> -<!-- This is the line --> -<item> - <shape> - <padding android:left="1dp" android:top="2dp" android:right="1dp" android:bottom="0dp"/> - <solid android:color="#FFFFFFFF" /> - </shape> -</item> -<!-- This is the main color --> -<item> - <shape> - <solid android:color="#1B63BB" /> - </shape> -</item> -</layer-list> diff --git a/platform/android/example/mupdf/src/main/res/drawable/toolbar_button.xml b/platform/android/example/mupdf/src/main/res/drawable/toolbar_button.xml deleted file mode 100644 index f25b3506..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/toolbar_button.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_pressed="true"> - <shape> - <solid android:color="@color/button_pressed" /> - <corners android:radius="12dp"/> - <!--<padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" />--> - </shape> - </item> - <item android:state_focused="true"> - <shape> - <solid android:color="@color/button_normal" /> - <!--<padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" />--> - </shape> - </item> - <item android:state_selected="true"> - <shape> - <solid android:color="@color/button_selected" /> - <corners android:radius="12dp"/> - <!--<padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" />--> - </shape> - </item> - <item> - <shape> - <solid android:color="@color/button_normal" /> - <!--<padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" />--> - </shape> - </item> -</selector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/toolbar_button2.xml b/platform/android/example/mupdf/src/main/res/drawable/toolbar_button2.xml deleted file mode 100644 index d624e85f..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/toolbar_button2.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_selected="true"> - <shape> - <solid android:color="@color/white" /> - <corners android:radius="12dp"/> - <!--<padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" />--> - </shape> - </item> - <item> - <shape> - <solid android:color="@color/button_normal" /> - <!--<padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" />--> - </shape> - </item> -</selector> diff --git a/platform/android/example/mupdf/src/main/res/drawable/transparent_color_swatch.xml b/platform/android/example/mupdf/src/main/res/drawable/transparent_color_swatch.xml deleted file mode 100644 index fdf3d369..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/transparent_color_swatch.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - - <item> - <shape> - <stroke android:color="@color/black" android:width="1dp" /> - <solid android:color="@color/white" /> - </shape> - </item> - - <item> - <rotate - android:fromDegrees="45"> - <shape - android:shape="line" > - <stroke android:color="@color/red" android:width="4dp" /> - </shape> - </rotate> - </item> - -</layer-list> diff --git a/platform/android/example/mupdf/src/main/res/drawable/wheel_bg.xml b/platform/android/example/mupdf/src/main/res/drawable/wheel_bg.xml deleted file mode 100644 index f9fdd27a..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/wheel_bg.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- - Android Wheel Control. - http://android-devblog.blogspot.com/2010/05/wheel-ui-contol.html - - Copyright 2010 Yuri Kanivets - 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. ---> - -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - <item> - <shape android:shape="rectangle"> - <solid android:color="#ffffff" /> - <stroke android:width="1dp" android:color="#ffffff" /> - </shape> - </item> - -</layer-list>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/wheel_val.xml b/platform/android/example/mupdf/src/main/res/drawable/wheel_val.xml deleted file mode 100644 index 45f7f5c9..00000000 --- a/platform/android/example/mupdf/src/main/res/drawable/wheel_val.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- - Android Wheel Control. - http://android-devblog.blogspot.com/2010/05/wheel-ui-contol.html - - Copyright 2010 Yuri Kanivets - 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. ---> - -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="#00ffffff"/> - <stroke android:width="1dp" - android:dashWidth="3px" - android:dashGap="3px" - android:color="#ff000000" /> -</shape> diff --git a/platform/android/example/mupdf/src/main/res/layout/activity_proof_view.xml b/platform/android/example/mupdf/src/main/res/layout/activity_proof_view.xml deleted file mode 100755 index 222a50b4..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/activity_proof_view.xml +++ /dev/null @@ -1,66 +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"> - - <LinearLayout - android:id="@+id/pagesTab" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@color/toolbar" - android:orientation="vertical"> - - <include layout="@layout/proof_toolbar"/> - - </LinearLayout> - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <com.artifex.mupdf.android.DocProofView - android:id="@+id/proof_view" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_toLeftOf="@+id/proof_color_host" - android:layout_alignParentTop="true" - android:layout_alignParentBottom="true" - android:layout_alignParentRight="true" - android:layout_alignParentLeft="true" - > - </com.artifex.mupdf.android.DocProofView> - - <LinearLayout android:orientation="vertical" - android:id="@+id/proof_color_host" - android:layout_width="wrap_content" - android:background="@drawable/color_box" - android:layout_alignParentRight="true" - android:layout_alignParentTop="true" - android:layout_alignParentBottom="true" - android:layout_height="match_parent"> - - <Button - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:id="@+id/proof_apply_button" - android:layout_gravity="center_horizontal" - android:background="@drawable/apply_button" - android:textColor="@color/white" - android:textSize="18sp" - android:padding="10dp" - android:layout_margin="10dp" - android:text="APPLY"/> - - <ListView android:id="@+id/proof_color_list" - android:background="@color/transparent" - android:layout_width="100dp" - android:layout_height="wrap_content"> - - </ListView> - - </LinearLayout> - - </RelativeLayout> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/annotate_toolbar.xml b/platform/android/example/mupdf/src/main/res/layout/annotate_toolbar.xml deleted file mode 100644 index 2dbc7897..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/annotate_toolbar.xml +++ /dev/null @@ -1,268 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - - <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/toolbar"> - - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/toolbar" - android:paddingTop="10dp" - android:paddingBottom="10dp"> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/highlight_button" - android:src="@drawable/icon_highlight" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="HIGHLIGHT"/> - </LinearLayout> - - <!--a divider--> - <View - android:layout_width="1dp" - android:paddingRight="3dp" android:paddingLeft="3dp" - android:layout_height="match_parent" - android:background="#FF8E8F90" /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:id="@+id/draw_tools_holder" - android:background="@drawable/toolbar_button2" - > - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button2" - android:id="@+id/draw_button" - android:src="@drawable/icon_draw" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="DRAW"/> - </LinearLayout> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button2" - android:id="@+id/line_color_button" - android:src="@drawable/icon_line_color" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text=""/> - </LinearLayout> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button2" - android:id="@+id/line_thickness_button" - android:src="@drawable/icon_line_thickness" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text=""/> - </LinearLayout> - - - </LinearLayout> - - <!--a divider--> - <View - android:layout_width="1dp" - android:paddingRight="3dp" - android:paddingLeft="3dp" - android:layout_height="match_parent" - android:background="#FF8E8F90" /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:id="@+id/note_holder" - android:background="@drawable/toolbar_button2" - > - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button2" - android:id="@+id/note_button" - android:src="@drawable/icon_note" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="NOTE"/> - </LinearLayout> - - - </LinearLayout> - - - <!--a divider--> - <View - android:layout_width="1dp" - android:paddingRight="3dp" android:paddingLeft="3dp" - android:layout_height="match_parent" - android:background="#FF8E8F90" /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/delete_button" - android:src="@drawable/icon_delete" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="DELETE"/> - </LinearLayout> - - - <!-- - this layout holds some buttons for testing - normally it's not shown. - --> - - <LinearLayout - android:visibility="gone" - android:layout_width="wrap_content" - android:layout_height="wrap_content"> - - <!--a divider--> - <View - android:layout_width="1dp" - android:paddingRight="3dp" android:paddingLeft="3dp" - android:layout_height="match_parent" - android:background="#FF8E8F90" /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/show_annot_button" - android:src="@drawable/icon_toggle_annotations" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="TOGGLE"/> - </LinearLayout> - - </LinearLayout> - - </LinearLayout> - - </HorizontalScrollView> - -</merge> diff --git a/platform/android/example/mupdf/src/main/res/layout/colors.xml b/platform/android/example/mupdf/src/main/res/layout/colors.xml deleted file mode 100644 index d7d7aa91..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/colors.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="@drawable/colors" - android:orientation="vertical" - > - - <RelativeLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentBottom="false" - android:layout_alignParentTop="true" - android:id="@+id/font_panel"> - - <TextView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:background="@color/bluish_grey" - android:textColor="#FFFFFFFF" - android:textSize="12pt" - android:id="@+id/color_dialog_title" /> - - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:id="@+id/fontcolors_row1" > - - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - - </LinearLayout> - - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:id="@+id/fontcolors_row2"> - - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - - </LinearLayout> - - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:id="@+id/fontcolors_row3"> - - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - <Button style="@style/font_color_button" android:background="#000000" android:tag="#000000"/> - - <Button style="@style/font_color_button" - android:id="@+id/transparent_color_button" - android:background="@drawable/transparent_color_swatch" - android:tag="transparent"/> - - </LinearLayout> - - </LinearLayout> - - </RelativeLayout> - - <!--<Button--> - <!--android:layout_width="wrap_content"--> - <!--android:layout_height="wrap_content"--> - <!--android:text="@string/done"--> - <!--android:id="@+id/done_button"--> - <!--android:background="@drawable/button"--> - <!--android:textColor="#FFFFFFFF"--> - <!--android:layout_gravity="right"/>--> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/doc_view.xml b/platform/android/example/mupdf/src/main/res/layout/doc_view.xml deleted file mode 100644 index 3fa9afa9..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/doc_view.xml +++ /dev/null @@ -1,215 +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"> - - <TabHost - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight = "0" - android:id="@+id/tabhost"> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> - - <View - android:layout_width="fill_parent" - android:layout_height="5dp" - android:background="#1B65BA"> - </View> - - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="#1B65BA"> - - <ImageButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:id="@+id/back_button" - android:src="@drawable/icon_back" - android:tint="@color/white" - android:background="@color/transparent" - android:layout_gravity="center_vertical"/> - - <Space - android:layout_width="30dp" - android:layout_height="1dp"/> - - <TabWidget - android:id="@android:id/tabs" - android:layout_width="300dp" - android:layout_height="match_parent"> - </TabWidget> - - <!--NOTE: undo and redo are "gone" for the time being.--> - - <ImageButton - android:visibility="gone" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:id="@+id/undo_button" - android:src="@drawable/icon_undo" - android:background="@color/transparent" - android:tint="@color/white" - android:layout_gravity="center_vertical" /> - - <ImageButton - android:visibility="gone" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:id="@+id/redo_button" - android:src="@drawable/icon_redo" - android:tint="@color/white" - android:background="@color/transparent" - android:layout_gravity="center_vertical" /> - - <ImageButton - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_centerVertical="true" - android:id="@+id/search_button" - android:src="@drawable/icon_find" - android:background="@drawable/search_button" - android:layout_gravity="center_vertical" - android:paddingLeft="10dp" - android:paddingRight="12dp"/> - - </LinearLayout> - - <FrameLayout - android:id="@android:id/tabcontent" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <LinearLayout - android:id="@+id/hiddenTab" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> - </LinearLayout> - - <LinearLayout - android:id="@+id/fileTab" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> - - <include layout="@layout/file_toolbar"/> - - </LinearLayout> - - <LinearLayout - android:id="@+id/annotateTab" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@color/toolbar" - android:orientation="vertical"> - - <include layout="@layout/annotate_toolbar"/> - - </LinearLayout> - - <LinearLayout - android:id="@+id/pagesTab" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@color/toolbar" - android:orientation="vertical"> - - <include layout="@layout/pages_toolbar"/> - - </LinearLayout> - - <LinearLayout - android:id="@+id/searchTab" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:visibility="gone" - android:orientation="vertical"> - - <include layout="@layout/search_toolbar"/> - - </LinearLayout> - - </FrameLayout> - </LinearLayout> - </TabHost> - - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_weight = "1" - android:id="@+id/outer_container"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="0dip" - android:layout_weight="@integer/page_width_percentage" - android:layout_height="match_parent" - android:id="@+id/doc_outer_container" - android:background="@color/black"> - - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:id="@+id/doc_wrapper" > - - <com.artifex.mupdf.android.DocView - android:id="@+id/doc_view_inner" - android:layout_width="match_parent" - android:layout_height="match_parent"> - </com.artifex.mupdf.android.DocView> - - <com.artifex.mupdf.android.DocReflowView - android:id="@+id/doc_reflow_view" - android:visibility="gone" - android:layout_width="match_parent" - android:layout_height="match_parent"> - </com.artifex.mupdf.android.DocReflowView> - - </RelativeLayout> - - </LinearLayout> - - <LinearLayout - android:orientation="vertical" - android:layout_width="0dip" - android:layout_weight="@integer/pagelist_width_percentage" - android:layout_height="match_parent" - android:background="#000000" - android:visibility="gone" - android:id="@+id/pages_container" - android:paddingLeft="6dp" - android:paddingRight="6dp"> - </LinearLayout> - - </LinearLayout> - - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight = "0" - android:id="@+id/footer"> - - <TextView - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/footer" - android:textColor="@color/footer_text" - android:gravity="center_horizontal" - android:id="@+id/footer_text"/> - - </LinearLayout> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/drag_handle.xml b/platform/android/example/mupdf/src/main/res/layout/drag_handle.xml deleted file mode 100644 index a3ca66a2..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/drag_handle.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content" > - - <ImageView - android:id="@+id/drag_handle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/icon_selection_hand" - android:padding="15dp" - android:scaleX="0.8" - android:scaleY="0.8" - /> - -</RelativeLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/file_toolbar.xml b/platform/android/example/mupdf/src/main/res/layout/file_toolbar.xml deleted file mode 100644 index 69251b1f..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/file_toolbar.xml +++ /dev/null @@ -1,187 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - - <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/toolbar"> - - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/toolbar" - android:paddingTop="10dp" - android:paddingBottom="10dp"> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/save_button" - android:src="@drawable/icon_save" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="SAVE"/> - </LinearLayout> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/save_as_button" - android:src="@drawable/icon_save_as" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="SAVE AS"/> - </LinearLayout> - - <!--a divider--> - <View - android:layout_width="1dp" - android:paddingRight="3dp" android:paddingLeft="3dp" - android:layout_height="match_parent" - android:background="#FF8E8F90" /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/print_button" - android:src="@drawable/icon_print" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="PRINT"/> - </LinearLayout> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/share_button" - android:src="@drawable/icon_share" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="SHARE"/> - </LinearLayout> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/open_in_button" - android:src="@drawable/icon_open_in" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="OPEN IN"/> - </LinearLayout> - - <!--a divider--> - <View - android:layout_width="1dp" - android:paddingRight="3dp" android:paddingLeft="3dp" - android:layout_height="match_parent" - android:background="#FF8E8F90" /> - - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/proof_button" - android:src="@drawable/icon_proof" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="PROOF"/> - </LinearLayout> - - </LinearLayout> - - </HorizontalScrollView> - -</merge> diff --git a/platform/android/example/mupdf/src/main/res/layout/line_width_dialog.xml b/platform/android/example/mupdf/src/main/res/layout/line_width_dialog.xml deleted file mode 100644 index 5c47ab1d..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/line_width_dialog.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:orientation="vertical" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="@drawable/number_format_popup"> - - <kankan.wheel.widget.WheelView - android:layout_width="300dp" - android:layout_height="wrap_content" - android:id="@+id/wheel"> - - </kankan.wheel.widget.WheelView> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/line_width_item.xml b/platform/android/example/mupdf/src/main/res/layout/line_width_item.xml deleted file mode 100644 index 0d960c7e..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/line_width_item.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <View - android:id="@+id/bar" - android:layout_gravity="center_vertical" - android:layout_width="200dp" - android:layout_marginLeft="5dp" - android:layout_marginRight="5dp" - android:layout_height="1dp" - android:background="@color/black" /> - - <TextView - android:id="@+id/value" - android:layout_gravity="center_vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="10dp" - android:textColor="@color/black" - android:textSize="20sp"/> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/pages_toolbar.xml b/platform/android/example/mupdf/src/main/res/layout/pages_toolbar.xml deleted file mode 100644 index 22e01a20..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/pages_toolbar.xml +++ /dev/null @@ -1,110 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - - <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/toolbar"> - - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/toolbar" - android:paddingTop="10dp" - android:paddingBottom="10dp"> - - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/first_page_button" - android:src="@drawable/icon_first_page" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="FIRST PAGE"/> - </LinearLayout> - - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp" - > - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/last_page_button" - android:src="@drawable/icon_last_page" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="LAST PAGE"/> - </LinearLayout> - - - <!--a divider--> - <View - android:layout_width="1dp" - android:paddingRight="8dp" - android:paddingLeft="8dp" - android:layout_height="match_parent" - android:background="#FF8E8F90" /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp" - > - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/reflow_button" - android:src="@drawable/icon_reflow" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="REFLOW"/> - </LinearLayout> - - </LinearLayout> - - </HorizontalScrollView> - -</merge> diff --git a/platform/android/example/mupdf/src/main/res/layout/password_prompt.xml b/platform/android/example/mupdf/src/main/res/layout/password_prompt.xml deleted file mode 100644 index b8b8d678..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/password_prompt.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/layout_root" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" - android:padding="10dp" > - - <TextView - android:id="@+id/textView1" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Password for document:" - android:labelFor="@+id/editTextDialogUserInput" - android:textAppearance="?android:attr/textAppearanceLarge" /> - - <EditText - android:id="@+id/editTextDialogUserInput" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:inputType="textPassword" > - - <requestFocus /> - - </EditText> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/proof_color_list_entry.xml b/platform/android/example/mupdf/src/main/res/layout/proof_color_list_entry.xml deleted file mode 100644 index a15478a8..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/proof_color_list_entry.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:background="@color/transparent" - android:padding="5dp" - > - - <View - android:paddingLeft="5dp" - android:paddingRight="5dp" - android:layout_gravity="center_vertical" - android:id="@+id/proof_entry_color_swatch" - android:layout_width="32dp" - android:layout_height="32dp" - android:background="@drawable/rectangle"/> - - <CheckBox - android:layout_gravity="center_vertical" - android:id="@+id/proof_entry_checkbox" - android:layout_width="wrap_content" - android:layout_height="wrap_content"/> - - <TextView - android:layout_gravity="center_vertical" - android:id="@+id/proof_entry_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/black" - android:textSize="20sp"/> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/proof_dialog.xml b/platform/android/example/mupdf/src/main/res/layout/proof_dialog.xml deleted file mode 100644 index 526e04e8..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/proof_dialog.xml +++ /dev/null @@ -1,144 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/layout_root" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" - android:background="#ffe0e0e0" - android:padding="10dp"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:textColor="#ff000000" - android:paddingBottom="15dp" - android:text="Proof Settings:"/> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textColor="#ff000000" - android:text="Print Profile:"/> - - <RelativeLayout - android:padding="10dp" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/spinner_back"> - <Spinner - android:id="@+id/print_profile_spinner" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="16sp" - android:background="@null" - android:entries="@array/proof_print_profiles" - android:minHeight="0dp" /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:textSize="16sp" - android:textColor="#535353" - android:text="▼"/> - </RelativeLayout> - - <TextView - android:paddingTop="10dp" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textColor="#ff000000" - android:text="Soft Proof Profile:"/> - - <RelativeLayout - android:padding="10dp" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/spinner_back"> - <Spinner - android:id="@+id/display_profile_spinner" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="16sp" - android:background="@null" - android:entries="@array/proof_display_profiles" - android:minHeight="0dp" /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:textSize="16sp" - android:textColor="#535353" - android:text="▼"/> - </RelativeLayout> - - <TextView - android:paddingTop="10dp" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textColor="#ff000000" - android:text="Resolution:"/> - - <RelativeLayout - android:padding="10dp" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/spinner_back"> - <Spinner - android:id="@+id/resolution_spinner" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="16sp" - android:background="@null" - android:entries="@array/proof_resolutions" - android:minHeight="0dp" /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:textSize="16sp" - android:textColor="#535353" - android:text="▼"/> - </RelativeLayout> - - <LinearLayout android:orientation="horizontal" - android:paddingTop="15dp" - android:layout_width="wrap_content" - android:layout_height="wrap_content"> - - <View - android:layout_width="20dp" - android:layout_height="1dp" - android:layout_weight="1" - /> - - <Button - android:id="@+id/cancel_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - style="@style/proofButton" - android:text="CANCEL"/> - - <View - android:layout_width="20dp" - android:layout_height="1dp" - /> - - <Button - android:id="@+id/ok_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - style="@style/proofButton" - android:text="OK"/> - - <View - android:layout_width="20dp" - android:layout_height="1dp" - android:layout_weight="1" - /> - - - </LinearLayout> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/proof_toolbar.xml b/platform/android/example/mupdf/src/main/res/layout/proof_toolbar.xml deleted file mode 100644 index 7eda855b..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/proof_toolbar.xml +++ /dev/null @@ -1,213 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - - <!--<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"--> - <!--android:layout_width="match_parent"--> - <!--android:layout_height="match_parent"--> - <!--android:background="@color/toolbar">--> - - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/toolbar" - android:paddingTop="10dp" - android:paddingBottom="10dp"> - - <ImageButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:id="@+id/proof_back_button" - android:src="@drawable/icon_back" - android:tint="@color/black" - android:background="@color/transparent" - android:layout_gravity="center_vertical"/> - - <!--a divider--> - <View - android:layout_width="1dp" - android:paddingRight="3dp" - android:paddingLeft="3dp" - android:layout_height="match_parent" - android:background="#FF8E8F90" /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/proof_first_page" - android:src="@drawable/icon_first_page" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="FIRST PAGE"/> - </LinearLayout> - - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/proof_previous_page" - android:src="@drawable/icon_prev_page" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="PREVIOUS PAGE"/> - </LinearLayout> - - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/proof_next_page" - android:src="@drawable/icon_next_page" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="NEXT PAGE"/> - </LinearLayout> - - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center_horizontal" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/proof_last_page" - android:src="@drawable/icon_last_page" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="LAST PAGE"/> - </LinearLayout> - - <!--a divider--> - <View - android:layout_width="1dp" - android:paddingRight="3dp" - android:paddingLeft="3dp" - android:layout_height="match_parent" - android:background="#FF8E8F90" /> - - <TextView android:gravity="center_vertical" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:paddingLeft="10dp" - android:paddingRight="10dp" - android:textColor="@color/black" - android:textSize="18sp" - android:id="@+id/proof_page_n_of_n"/> - - <!--this pushes things to the right--> - <View - android:layout_width="0dp" - android:layout_height="0dp" - android:layout_weight="1" - /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp"> - - <com.artifex.mupdf.android.ToolbarButton - android:visibility="gone" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/proof_colors_button_up" - android:src="@drawable/icon_proof_colors_up" /> - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:layout_centerVertical="true" - android:background="@drawable/toolbar_button" - android:id="@+id/proof_colors_button_down" - android:src="@drawable/icon_proof_colors_down" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center" - android:textColor="@color/black" - android:textSize="11sp" - android:text="COLORS"/> - - </LinearLayout> - - <View - android:layout_width="20dp" - android:layout_height="1dp" - /> - - - </LinearLayout> - - <!--</HorizontalScrollView>--> - -</merge> diff --git a/platform/android/example/mupdf/src/main/res/layout/resize_handle.xml b/platform/android/example/mupdf/src/main/res/layout/resize_handle.xml deleted file mode 100644 index 443aaad5..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/resize_handle.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content" > - - <ImageView - android:id="@+id/drag_handle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/icon_selection_drag_handle" - android:padding="16dp" - android:scaleX="0.8" - android:scaleY="0.8" - /> - -</RelativeLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/rotate_handle.xml b/platform/android/example/mupdf/src/main/res/layout/rotate_handle.xml deleted file mode 100644 index 6a4dadf7..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/rotate_handle.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content" > - - <ImageView - android:id="@+id/drag_handle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/icon_selection_rotate" - android:padding="15dp" - android:scaleX="0.8" - android:scaleY="0.8" - /> - -</RelativeLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/search_toolbar.xml b/platform/android/example/mupdf/src/main/res/layout/search_toolbar.xml deleted file mode 100644 index 2b67e67d..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/search_toolbar.xml +++ /dev/null @@ -1,112 +0,0 @@ -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - - <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/toolbar"> - - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/toolbar" - android:paddingTop="10dp" - android:paddingBottom="10dp" - android:gravity="center_vertical" - > - - <Space - android:layout_width="15dp" - android:layout_height="1dp"/> - - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="@drawable/search_input_wrapper" - android:padding="5dp"> - - <Space - android:layout_width="5dp" - android:layout_height="1dp"/> - - <ImageView - android:layout_width="40dp" - android:layout_height="40dp" - android:id="@+id/device_icon" - android:src="@drawable/icon_find" - android:scaleType="centerCrop" - /> - - <EditText - android:hint="@string/find" - android:textColorHint="#B3B3B3" - android:layout_width="wrap_content" - android:layout_height="fill_parent" - android:minWidth="400dp" - android:id="@+id/search_text_input" - android:textSize="20sp" - android:background="@drawable/search_text_input" - android:textColor="@color/black" - android:maxLines="1" - android:inputType="text" - /> - - </LinearLayout> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp" - android:gravity="center" - > - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:background="@drawable/toolbar_button" - android:id="@+id/search_next_button" - android:src="@drawable/icon_find_next" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/black" - android:textSize="11sp" - android:text="@string/next_upper"/> - </LinearLayout> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="10dp" - android:paddingRight="10dp" - android:gravity="center" - > - - <com.artifex.mupdf.android.ToolbarButton - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:scaleType="fitXY" - android:background="@drawable/toolbar_button" - android:id="@+id/search_previous_button" - android:src="@drawable/icon_find_previous" /> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/black" - android:textSize="11sp" - android:text="@string/previous_upper"/> - </LinearLayout> - - </LinearLayout> - - - </HorizontalScrollView> - -</merge> diff --git a/platform/android/example/mupdf/src/main/res/layout/tab.xml b/platform/android/example/mupdf/src/main/res/layout/tab.xml deleted file mode 100644 index 9fb91aff..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/tab.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/tabsLayout" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="@drawable/tab_selector" - android:padding="10dip" - android:gravity="center" - android:orientation="vertical"> - - <TextView android:id="@+id/tabText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/title" - android:textSize="15dip" - android:textColor="@drawable/tab_text_selector" /> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/tab_left.xml b/platform/android/example/mupdf/src/main/res/layout/tab_left.xml deleted file mode 100644 index e4354528..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/tab_left.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/tabsLayout" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="@drawable/tab_left_selector" - android:padding="10dip" - android:gravity="center" - android:orientation="vertical"> - - <TextView android:id="@+id/tabText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/title" - android:textSize="15dip" - android:textColor="@drawable/tab_text_selector" /> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/tab_right.xml b/platform/android/example/mupdf/src/main/res/layout/tab_right.xml deleted file mode 100644 index 8d83bbab..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/tab_right.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/tabsLayout" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="@drawable/tab_right_selector" - android:padding="10dip" - android:gravity="center" - android:orientation="vertical"> - - <TextView android:id="@+id/tabText" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/title" - android:textSize="15dip" - android:textColor="@drawable/tab_text_selector" /> - -</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/wait_spinner.xml b/platform/android/example/mupdf/src/main/res/layout/wait_spinner.xml deleted file mode 100644 index 6e174a7f..00000000 --- a/platform/android/example/mupdf/src/main/res/layout/wait_spinner.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:background="@android:color/transparent" > - - <ProgressBar - android:id="@+id/wait_spinner" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerInParent="true" /> - -</RelativeLayout> diff --git a/platform/android/example/mupdf/src/main/res/values/colors.xml b/platform/android/example/mupdf/src/main/res/values/colors.xml deleted file mode 100644 index 79610396..00000000 --- a/platform/android/example/mupdf/src/main/res/values/colors.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <color name="button_normal">#00000000</color> - <color name="button_selected">#FFBFC1C2</color> - <color name="button_outline">#FF000000</color> - <color name="button_pressed">#FF2572AC</color> - - <color name="toolbar">#DDDFE0</color> - <color name="transparent">#00000000</color> - <color name="my_blue">#FF65FFFF</color> - <color name="white">#FFFFFFFF</color> - <color name="red">#FFFF0000</color> - <color name="black">#000000</color> - <color name="bluish_grey">#43657D</color> - <color name="ltgrey">#CCCCCC</color> - - <color name="sheet_button_normal">#DFDFDF</color> - <color name="sheet_button_plus_normal">#878787</color> - <color name="sheet_button_selected">#2EC0EF</color> - <color name="sheet_button_text_selected">#ffffff</color> - <color name="sheet_button_text">#000000</color> - - <color name="alignment_button_selected">#1176BA</color> - <color name="alignment_dialog_background">#42515F</color> - - <color name="footer">#DFDFDF</color> - <color name="footer_text">#717171</color> - - <color name="breadcrumb_background">#546371</color> - - <color name="formula_popup_background">#42515F</color> - <color name="number_format_popup_background">#42515F</color> - <color name="explorer_blue">#1eb3dc</color> - - <!-- argb overlay color --> - <color name="control_overlay">#44BBFFFF</color> - <!-- rgb version (against white) --> - <color name="control_box">#E7FEFE</color> - - <!-- Slider colors --> - <color name="slider_track_color">#444444</color> - <color name="slider_thumb_color">#0080FF</color> - - <!-- text highlighting --> - <color name="text_highlight_color">#66CCFF</color> - - <color name="blue_dot_color">#0080FF</color> - -</resources> diff --git a/platform/android/example/mupdf/src/main/res/values/integers.xml b/platform/android/example/mupdf/src/main/res/values/integers.xml deleted file mode 100644 index f7f1e528..00000000 --- a/platform/android/example/mupdf/src/main/res/values/integers.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - - <integer name="page_width_percentage">90</integer> - <integer name="pagelist_width_percentage">10</integer> - - <integer name="text_highlight_alpha">60</integer> - - <integer name="selection_dot_size">20</integer> - <integer name="selection_dot_padding">16</integer> - - <item name="selection_dot_scale" format="float" type="dimen">0.80</item> - -</resources> diff --git a/platform/android/example/mupdf/src/main/res/values/strings.xml b/platform/android/example/mupdf/src/main/res/values/strings.xml deleted file mode 100644 index 16f9c2bc..00000000 --- a/platform/android/example/mupdf/src/main/res/values/strings.xml +++ /dev/null @@ -1,59 +0,0 @@ -<resources> - <string name="app_name">mupdf</string> - <string name="find">Find</string> - <string name="title">Title</string> - - <string name="hidden_tab">HIDDEN</string> - <string name="file_tab">FILE</string> - <string name="annotate_tab">ANNOTATE</string> - <string name="pages_tab">PAGES</string> - - <string name="next_upper">NEXT</string> - <string name="previous_upper">PREVIOUS</string> - <string name="ok">OK</string> - <string name="cancel">Cancel</string> - - <string name="background">Background</string> - <string name="color">Color</string> - - <string name="proof">Proof</string> - - <string-array name="proof_print_profiles"> - <item>US Web Coated SWOP</item> - <item>Coated FOGRA39</item> - <item>Euroscale Coated</item> - <item>Japan Web Coated</item> - </string-array> - - <string-array name="proof_print_profile_files"> - <item>USWebCoatedSWOP.icc</item> - <item>CoatedFOGRA39.icc</item> - <item>EuroscaleCoated.icc</item> - <item>JapanWebCoated.icc</item> - </string-array> - - <string-array name="proof_display_profiles"> - <item>sRGB</item> - <item>Adobe RGB 1998</item> - <item>CIE RGB</item> - <item>Wide Gamut RGB</item> - </string-array> - - <string-array name="proof_display_profile_files"> - <item>sRGB Color Space Profile.icm</item> - <item>AdobeRGB1998.icc</item> - <item>CIERGB.icc</item> - <item>WideGamutRGB.icc</item> - </string-array> - - <string-array name="proof_resolutions"> - <item>72</item> - <item>96</item> - <item>150</item> - <item>300</item> - <item>600</item> - <item>1200</item> - <item>2400</item> - </string-array> - -</resources> diff --git a/platform/android/example/mupdf/src/main/res/values/styles.xml b/platform/android/example/mupdf/src/main/res/values/styles.xml deleted file mode 100644 index b8dc1a02..00000000 --- a/platform/android/example/mupdf/src/main/res/values/styles.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - - <!-- font color selection button. --> - <style name="font_color_button" parent="@android:style/Widget.Button"> - <item name="android:layout_height">20pt</item> - <item name="android:layout_width">20pt</item> - <item name="android:layout_margin">12dp</item> - </style> - - <style name="proofButton" parent="@style/Widget.AppCompat.Button.Borderless"> - <item name="android:textColor">#ffffffff</item> - <item name="android:background">#ff535353</item> - </style> - -</resources> diff --git a/platform/android/example/mupdf/src/main/res/wait_spinner.xml b/platform/android/example/mupdf/src/main/res/wait_spinner.xml deleted file mode 100644 index 6e174a7f..00000000 --- a/platform/android/example/mupdf/src/main/res/wait_spinner.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:background="@android:color/transparent" > - - <ProgressBar - android:id="@+id/wait_spinner" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerInParent="true" /> - -</RelativeLayout> diff --git a/platform/android/example/settings.gradle b/platform/android/example/settings.gradle deleted file mode 100644 index c70199dd..00000000 --- a/platform/android/example/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app', ':mupdf' |