diff --git a/.gitmodules b/.gitmodules index b5525f4..5a9ae89 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "pdfjs-dist"] - path = third_party/pdfjs-dist + path = app/pdfjs-dist url = https://github.com/mozilla/pdfjs-dist.git diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8c646c3..95cd277 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -9,7 +9,7 @@ if (useKeystoreProperties) { } plugins { - id("com.android.application") + id("com.android.library") id("kotlin-android") } @@ -29,21 +29,13 @@ android { buildToolsVersion = "32.0.0" defaultConfig { - applicationId = "org.grapheneos.pdfviewer" - minSdk = 26 + minSdk = 21 targetSdk = 31 - versionCode = 10 - versionName = versionCode.toString() resourceConfigurations.add("en") } buildTypes { - getByName("debug") { - applicationIdSuffix = ".debug" - } - getByName("release") { - isShrinkResources = true isMinifyEnabled = true proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") if (useKeystoreProperties) { diff --git a/third_party/pdfjs-dist b/app/pdfjs-dist similarity index 100% rename from third_party/pdfjs-dist rename to app/pdfjs-dist diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5aa5354..7647869 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,25 +2,7 @@ - - - - - - - - - - - - - - + { - detector.onTouchEvent(motionEvent); scaleDetector.onTouchEvent(motionEvent); return false; }); diff --git a/app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java b/app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java index 3dd440e..77ca5e9 100644 --- a/app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java +++ b/app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java @@ -1,18 +1,16 @@ package org.grapheneos.pdfviewer; -import android.annotation.SuppressLint; -import android.app.Activity; -import android.content.Intent; +import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Color; import android.net.Uri; import android.os.Bundle; +import android.util.AttributeSet; import android.util.Log; import android.view.Gravity; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; -import android.view.View; import android.webkit.CookieManager; import android.webkit.JavascriptInterface; import android.webkit.WebResourceRequest; @@ -24,13 +22,11 @@ import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.loader.app.LoaderManager; import androidx.loader.content.Loader; -import com.google.android.material.snackbar.Snackbar; - -import org.grapheneos.pdfviewer.databinding.WebviewBinding; import org.grapheneos.pdfviewer.fragment.DocumentPropertiesFragment; import org.grapheneos.pdfviewer.fragment.JumpToPageFragment; import org.grapheneos.pdfviewer.loader.DocumentPropertiesLoader; @@ -40,13 +36,9 @@ import java.io.InputStream; import java.util.HashMap; import java.util.List; -public class PdfViewer extends AppCompatActivity implements LoaderManager.LoaderCallbacks> { +public class PdfViewer extends WebView implements LoaderManager.LoaderCallbacks> { public static final String TAG = "PdfViewer"; - private static final String STATE_URI = "uri"; - private static final String STATE_PAGE = "page"; - private static final String STATE_ZOOM_RATIO = "zoomRatio"; - private static final String STATE_DOCUMENT_ORIENTATION_DEGREES = "documentOrientationDegrees"; private static final String KEY_PROPERTIES = "properties"; private static final String CONTENT_SECURITY_POLICY = @@ -92,12 +84,10 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader private static final float MAX_ZOOM_RATIO = 1.5f; private static final int ALPHA_LOW = 130; private static final int ALPHA_HIGH = 255; - private static final int ACTION_OPEN_DOCUMENT_REQUEST_CODE = 1; private static final int STATE_LOADED = 1; private static final int STATE_END = 2; private static final int PADDING = 10; - private Uri mUri; public int mPage; public int mNumPages; private float mZoomRatio = 1f; @@ -107,70 +97,27 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader private List mDocumentProperties; private InputStream mInputStream; - private WebviewBinding binding; private TextView mTextView; private Toast mToast; - private Snackbar snackbar; - private class Channel { - @JavascriptInterface - public int getWindowInsetTop() { - return windowInsetTop; - } + public AppCompatActivity activity; + String fileName; + Long fileSize; - @JavascriptInterface - public int getPage() { - return mPage; - } - - @JavascriptInterface - public float getZoomRatio() { - return mZoomRatio; - } - - @JavascriptInterface - public int getDocumentOrientationDegrees() { - return mDocumentOrientationDegrees; - } - - @JavascriptInterface - public void setNumPages(int numPages) { - mNumPages = numPages; - runOnUiThread(PdfViewer.this::invalidateOptionsMenu); - } - - @JavascriptInterface - public void setDocumentProperties(final String properties) { - if (mDocumentProperties != null) { - throw new SecurityException("mDocumentProperties not null"); - } - - final Bundle args = new Bundle(); - args.putString(KEY_PROPERTIES, properties); - runOnUiThread(() -> LoaderManager.getInstance(PdfViewer.this).restartLoader(DocumentPropertiesLoader.ID, args, PdfViewer.this)); - } - } - - @Override - @SuppressLint({"SetJavaScriptEnabled", "ClickableViewAccessibility"}) - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - binding = WebviewBinding.inflate(getLayoutInflater()); - setContentView(binding.getRoot()); - - binding.webview.setBackgroundColor(Color.TRANSPARENT); + void init(Context context) { + setBackgroundColor(Color.TRANSPARENT); if (BuildConfig.DEBUG) { WebView.setWebContentsDebuggingEnabled(true); } - binding.webview.setOnApplyWindowInsetsListener((view, insets) -> { + setOnApplyWindowInsetsListener((view, insets) -> { windowInsetTop = insets.getSystemWindowInsetTop(); - binding.webview.evaluateJavascript("updateInset()", null); + evaluateJavascript("updateInset()", null); return insets; }); - final WebSettings settings = binding.webview.getSettings(); + final WebSettings settings = getSettings(); settings.setAllowContentAccess(false); settings.setAllowFileAccess(false); settings.setCacheMode(WebSettings.LOAD_NO_CACHE); @@ -178,12 +125,12 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader CookieManager.getInstance().setAcceptCookie(false); - binding.webview.addJavascriptInterface(new Channel(), "channel"); + addJavascriptInterface(new Channel(), "channel"); - binding.webview.setWebViewClient(new WebViewClient() { + setWebViewClient(new WebViewClient() { private WebResourceResponse fromAsset(final String mime, final String path) { try { - InputStream inputStream = getAssets().open(path.substring(1)); + InputStream inputStream = context.getAssets().open(path.substring(1)); return new WebResourceResponse(mime, null, inputStream); } catch (IOException e) { return null; @@ -237,30 +184,12 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader @Override public void onPageFinished(WebView view, String url) { mDocumentState = STATE_LOADED; - invalidateOptionsMenu(); + activity.invalidateOptionsMenu(); } }); - GestureHelper.attach(PdfViewer.this, binding.webview, + GestureHelper.attach(context, this, new GestureHelper.GestureListener() { - @Override - public boolean onTapUp() { - if (mUri != null) { - binding.webview.evaluateJavascript("isTextSelected()", selection -> { - if (!Boolean.parseBoolean(selection)) { - if ((getWindow().getDecorView().getSystemUiVisibility() & - View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { - hideSystemUi(); - } else { - showSystemUi(); - } - } - }); - return true; - } - return false; - } - @Override public void onZoomIn(float value) { zoomIn(value, false); @@ -277,56 +206,82 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader } }); - mTextView = new TextView(this); + mTextView = new TextView(context); mTextView.setBackgroundColor(Color.DKGRAY); mTextView.setTextColor(ColorStateList.valueOf(Color.WHITE)); mTextView.setTextSize(18); mTextView.setPadding(PADDING, 0, PADDING, 0); + } - // If loaders are not being initialized in onCreate(), the result will not be delivered - // after orientation change (See FragmentHostCallback), thus initialize the - // loader manager impl so that the result will be delivered. - LoaderManager.getInstance(this); + public PdfViewer(@NonNull Context context) { + super(context); + init(context); + } - snackbar = Snackbar.make(binding.webview, "", Snackbar.LENGTH_LONG); + public PdfViewer(@NonNull Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + init(context); + } - final Intent intent = getIntent(); - if (Intent.ACTION_VIEW.equals(intent.getAction())) { - if (!"application/pdf".equals(intent.getType())) { - snackbar.setText(R.string.invalid_mime_type).show(); - return; - } - mUri = intent.getData(); - mPage = 1; + public PdfViewer(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + init(context); + } + + public void onCreateOptionMenu(Menu menu) { + MenuInflater inflater = activity.getMenuInflater(); + inflater.inflate(R.menu.pdf_viewer, menu); + } + + private class Channel { + @JavascriptInterface + public int getWindowInsetTop() { + return windowInsetTop; } - if (savedInstanceState != null) { - mUri = savedInstanceState.getParcelable(STATE_URI); - mPage = savedInstanceState.getInt(STATE_PAGE); - mZoomRatio = savedInstanceState.getFloat(STATE_ZOOM_RATIO); - mDocumentOrientationDegrees = savedInstanceState.getInt(STATE_DOCUMENT_ORIENTATION_DEGREES); + @JavascriptInterface + public int getPage() { + return mPage; } - if (mUri != null) { - if ("file".equals(mUri.getScheme())) { - snackbar.setText(R.string.legacy_file_uri).show(); - return; + @JavascriptInterface + public float getZoomRatio() { + return mZoomRatio; + } + + @JavascriptInterface + public int getDocumentOrientationDegrees() { + return mDocumentOrientationDegrees; + } + + @JavascriptInterface + public void setNumPages(int numPages) { + mNumPages = numPages; + activity.runOnUiThread(activity::invalidateOptionsMenu); + } + + @JavascriptInterface + public void setDocumentProperties(final String properties) { + if (mDocumentProperties != null) { + throw new SecurityException("mDocumentProperties not null"); } - loadPdf(); + final Bundle args = new Bundle(); + args.putString(KEY_PROPERTIES, properties); + activity.runOnUiThread(() -> LoaderManager.getInstance(PdfViewer.this.activity).restartLoader(DocumentPropertiesLoader.ID, args, PdfViewer.this)); } } @NonNull @Override public Loader> onCreateLoader(int id, Bundle args) { - return new DocumentPropertiesLoader(this, args.getString(KEY_PROPERTIES), mNumPages, mUri); + return new DocumentPropertiesLoader(activity, args.getString(KEY_PROPERTIES), mNumPages, fileName, fileSize); } @Override public void onLoadFinished(@NonNull Loader> loader, List data) { mDocumentProperties = data; - LoaderManager.getInstance(this).destroyLoader(DocumentPropertiesLoader.ID); + LoaderManager.getInstance(activity).destroyLoader(DocumentPropertiesLoader.ID); } @Override @@ -334,23 +289,18 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader mDocumentProperties = null; } - private void loadPdf() { - try { - if (mInputStream != null) { - mInputStream.close(); - } - mInputStream = getContentResolver().openInputStream(mUri); - } catch (IOException e) { - snackbar.setText(R.string.io_error).show(); - return; - } - - showSystemUi(); - binding.webview.loadUrl("https://localhost/viewer.html"); + public void loadPdf(InputStream inputStream, String fileName, Long fileSize) { + mPage = 1; + mDocumentProperties = null; + mInputStream = inputStream; + this.fileName = fileName; + this.fileSize = fileSize; + loadUrl("https://localhost/viewer.html"); + activity.invalidateOptionsMenu(); } private void renderPage(final int zoom) { - binding.webview.evaluateJavascript("onRenderPage(" + zoom + ")", null); + evaluateJavascript("onRenderPage(" + zoom + ")", null); } private void documentOrientationChanged(final int orientationDegreesOffset) { @@ -361,18 +311,11 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader renderPage(0); } - private void openDocument() { - Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); - intent.addCategory(Intent.CATEGORY_OPENABLE); - intent.setType("application/pdf"); - startActivityForResult(intent, ACTION_OPEN_DOCUMENT_REQUEST_CODE); - } - private void zoomIn(float value, boolean end) { if (mZoomRatio < MAX_ZOOM_RATIO) { mZoomRatio = Math.min(mZoomRatio + value, MAX_ZOOM_RATIO); renderPage(end ? 1 : 2); - invalidateOptionsMenu(); + activity.invalidateOptionsMenu(); } } @@ -380,7 +323,7 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader if (mZoomRatio > MIN_ZOOM_RATIO) { mZoomRatio = Math.max(mZoomRatio - value, MIN_ZOOM_RATIO); renderPage(end ? 1 : 2); - invalidateOptionsMenu(); + activity.invalidateOptionsMenu(); } } @@ -403,48 +346,7 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader mPage = selected_page; renderPage(0); showPageNumber(); - invalidateOptionsMenu(); - } - } - - private void showSystemUi() { - getWindow().getDecorView().setSystemUiVisibility( - View.SYSTEM_UI_FLAG_LAYOUT_STABLE | - View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | - View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); - } - - private void hideSystemUi() { - getWindow().getDecorView().setSystemUiVisibility( - View.SYSTEM_UI_FLAG_LAYOUT_STABLE | - View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | - View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | - View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | - View.SYSTEM_UI_FLAG_FULLSCREEN | - View.SYSTEM_UI_FLAG_IMMERSIVE); - } - - @Override - public void onSaveInstanceState(@NonNull Bundle savedInstanceState) { - super.onSaveInstanceState(savedInstanceState); - savedInstanceState.putParcelable(STATE_URI, mUri); - savedInstanceState.putInt(STATE_PAGE, mPage); - savedInstanceState.putFloat(STATE_ZOOM_RATIO, mZoomRatio); - savedInstanceState.putInt(STATE_DOCUMENT_ORIENTATION_DEGREES, mDocumentOrientationDegrees); - } - - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent resultData) { - super.onActivityResult(requestCode, resultCode, resultData); - - if (requestCode == ACTION_OPEN_DOCUMENT_REQUEST_CODE && resultCode == Activity.RESULT_OK) { - if (resultData != null) { - mUri = resultData.getData(); - mPage = 1; - mDocumentProperties = null; - loadPdf(); - invalidateOptionsMenu(); - } + activity.invalidateOptionsMenu(); } } @@ -453,22 +355,13 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader mToast.cancel(); } mTextView.setText(String.format("%s/%s", mPage, mNumPages)); - mToast = new Toast(getApplicationContext()); + mToast = new Toast(activity); mToast.setGravity(Gravity.BOTTOM | Gravity.END, PADDING, PADDING); mToast.setDuration(Toast.LENGTH_SHORT); mToast.setView(mTextView); mToast.show(); } - @Override - public boolean onCreateOptionsMenu(Menu menu) { - super.onCreateOptionsMenu(menu); - MenuInflater inflater = getMenuInflater(); - inflater.inflate(R.menu.pdf_viewer, menu); - return true; - } - - @Override public boolean onPrepareOptionsMenu(Menu menu) { final int[] ids = { R.id.action_zoom_in, R.id.action_zoom_out, R.id.action_jump_to_page, R.id.action_next, R.id.action_previous, R.id.action_first, R.id.action_last, @@ -499,7 +392,6 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader return true; } - @Override public boolean onOptionsItemSelected(MenuItem item) { final int itemId = item.getItemId(); if (itemId == R.id.action_previous) { @@ -514,9 +406,6 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader } else if (itemId == R.id.action_last) { onJumpToPageInDocument(mNumPages); return true; - } else if (itemId == R.id.action_open) { - openDocument(); - return true; } else if (itemId == R.id.action_zoom_out) { zoomOut(0.25f, true); return true; @@ -532,14 +421,13 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader } else if (itemId == R.id.action_view_document_properties) { DocumentPropertiesFragment .newInstance(mDocumentProperties) - .show(getSupportFragmentManager(), DocumentPropertiesFragment.TAG); + .show(activity.getSupportFragmentManager(), DocumentPropertiesFragment.TAG); return true; } else if (itemId == R.id.action_jump_to_page) { - new JumpToPageFragment() - .show(getSupportFragmentManager(), JumpToPageFragment.TAG); + JumpToPageFragment.newInstance(this) + .show(activity.getSupportFragmentManager(), JumpToPageFragment.TAG); return true; } - - return super.onOptionsItemSelected(item); + return false; } } diff --git a/app/src/main/java/org/grapheneos/pdfviewer/fragment/JumpToPageFragment.java b/app/src/main/java/org/grapheneos/pdfviewer/fragment/JumpToPageFragment.java index c907acf..586a0a3 100644 --- a/app/src/main/java/org/grapheneos/pdfviewer/fragment/JumpToPageFragment.java +++ b/app/src/main/java/org/grapheneos/pdfviewer/fragment/JumpToPageFragment.java @@ -20,15 +20,12 @@ public class JumpToPageFragment extends DialogFragment { private final static String STATE_PICKER_MAX = "picker_max"; private NumberPicker mPicker; + PdfViewer pdfViewer; - @Override - public void onActivityCreated(Bundle savedInstanceState) { - super.onActivityCreated(savedInstanceState); - if (savedInstanceState != null) { - mPicker.setMinValue(savedInstanceState.getInt(STATE_PICKER_MIN)); - mPicker.setMaxValue(savedInstanceState.getInt(STATE_PICKER_MAX)); - mPicker.setValue(savedInstanceState.getInt(STATE_PICKER_CUR)); - } + public static JumpToPageFragment newInstance(PdfViewer pdfViewer) { + JumpToPageFragment f = new JumpToPageFragment(); + f.pdfViewer = pdfViewer; + return f; } @NonNull @@ -36,8 +33,8 @@ public class JumpToPageFragment extends DialogFragment { public Dialog onCreateDialog(Bundle savedInstanceState) { mPicker = new NumberPicker(getActivity()); mPicker.setMinValue(1); - mPicker.setMaxValue(((PdfViewer)requireActivity()).mNumPages); - mPicker.setValue(((PdfViewer)requireActivity()).mPage); + mPicker.setMaxValue(pdfViewer.mNumPages); + mPicker.setValue(pdfViewer.mPage); final FrameLayout layout = new FrameLayout(getActivity()); layout.addView(mPicker, new FrameLayout.LayoutParams( @@ -49,7 +46,7 @@ public class JumpToPageFragment extends DialogFragment { .setView(layout) .setPositiveButton(android.R.string.ok, (dialogInterface, i) -> { mPicker.clearFocus(); - ((PdfViewer)requireActivity()).onJumpToPageInDocument(mPicker.getValue()); + pdfViewer.onJumpToPageInDocument(mPicker.getValue()); }) .setNegativeButton(android.R.string.cancel, null) .create(); diff --git a/app/src/main/java/org/grapheneos/pdfviewer/loader/DocumentPropertiesLoader.java b/app/src/main/java/org/grapheneos/pdfviewer/loader/DocumentPropertiesLoader.java index 0b341ca..3bafbe5 100644 --- a/app/src/main/java/org/grapheneos/pdfviewer/loader/DocumentPropertiesLoader.java +++ b/app/src/main/java/org/grapheneos/pdfviewer/loader/DocumentPropertiesLoader.java @@ -1,10 +1,7 @@ package org.grapheneos.pdfviewer.loader; import android.content.Context; -import android.database.Cursor; import android.graphics.Typeface; -import android.net.Uri; -import android.provider.OpenableColumns; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.style.StyleSpan; @@ -12,6 +9,8 @@ import android.util.Log; import androidx.loader.content.AsyncTaskLoader; +import org.grapheneos.pdfviewer.R; +import org.grapheneos.pdfviewer.Utils; import org.json.JSONException; import org.json.JSONObject; @@ -19,9 +18,6 @@ import java.text.ParseException; import java.util.ArrayList; import java.util.List; -import org.grapheneos.pdfviewer.R; -import org.grapheneos.pdfviewer.Utils; - public class DocumentPropertiesLoader extends AsyncTaskLoader> { public static final String TAG = "DocumentPropertiesLoader"; @@ -29,16 +25,17 @@ public class DocumentPropertiesLoader extends AsyncTaskLoader private final String mProperties; private final int mNumPages; - private final Uri mUri; - private Cursor mCursor; + String fileName; + Long fileSize; - public DocumentPropertiesLoader(Context context, String properties, int numPages, Uri uri) { + public DocumentPropertiesLoader(Context context, String properties, int numPages, String fileName, Long fileSize) { super(context); mProperties = properties; mNumPages = numPages; - mUri = uri; + this.fileName = fileName; + this.fileSize = fileSize; } @Override @@ -48,23 +45,8 @@ public class DocumentPropertiesLoader extends AsyncTaskLoader final String[] names = context.getResources().getStringArray(R.array.property_names); final List properties = new ArrayList<>(names.length); - mCursor = context.getContentResolver().query(mUri, null, null, null, null); - if (mCursor != null) { - mCursor.moveToFirst(); - - final int indexName = mCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME); - if (indexName >= 0) { - properties.add(getProperty(null, names[0], mCursor.getString(indexName))); - } - - final int indexSize = mCursor.getColumnIndex(OpenableColumns.SIZE); - if (indexSize >= 0) { - final long fileSize = Long.parseLong(mCursor.getString(indexSize)); - properties.add(getProperty(null, names[1], Utils.parseFileSize(fileSize))); - } - - mCursor.close(); - } + properties.add(getProperty(null, names[0], fileName)); + properties.add(getProperty(null, names[1], Utils.parseFileSize(fileSize))); try { final JSONObject json = new JSONObject(mProperties); @@ -89,9 +71,7 @@ public class DocumentPropertiesLoader extends AsyncTaskLoader @Override public void deliverResult(List properties) { - if (isReset()) { - onReleaseResources(); - } else if (isStarted()) { + if (!isReset() && isStarted()) { super.deliverResult(properties); } } @@ -106,26 +86,11 @@ public class DocumentPropertiesLoader extends AsyncTaskLoader cancelLoad(); } - @Override - public void onCanceled(List properties) { - super.onCanceled(properties); - - onReleaseResources(); - } - @Override protected void onReset() { super.onReset(); onStopLoading(); - onReleaseResources(); - } - - private void onReleaseResources() { - if (mCursor != null) { - mCursor.close(); - mCursor = null; - } } private CharSequence getProperty(final JSONObject json, String name, String specName) { diff --git a/app/src/main/res/drawable-hdpi/ic_insert_drive_file_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_insert_drive_file_white_24dp.png deleted file mode 100644 index 84755e4..0000000 Binary files a/app/src/main/res/drawable-hdpi/ic_insert_drive_file_white_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/ic_insert_drive_file_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_insert_drive_file_white_24dp.png deleted file mode 100644 index b51ce3e..0000000 Binary files a/app/src/main/res/drawable-mdpi/ic_insert_drive_file_white_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_insert_drive_file_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_insert_drive_file_white_24dp.png deleted file mode 100644 index 798ebd4..0000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_insert_drive_file_white_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_insert_drive_file_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_insert_drive_file_white_24dp.png deleted file mode 100644 index f3e153b..0000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_insert_drive_file_white_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_insert_drive_file_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_insert_drive_file_white_24dp.png deleted file mode 100644 index 5bd5690..0000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_insert_drive_file_white_24dp.png and /dev/null differ diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml deleted file mode 100644 index 2558bc4..0000000 --- a/app/src/main/res/drawable/ic_launcher_foreground.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - diff --git a/app/src/main/res/layout/webview.xml b/app/src/main/res/layout/webview.xml deleted file mode 100644 index 36674fc..0000000 --- a/app/src/main/res/layout/webview.xml +++ /dev/null @@ -1,5 +0,0 @@ - - diff --git a/app/src/main/res/menu/pdf_viewer.xml b/app/src/main/res/menu/pdf_viewer.xml index e1cc94d..fac76c3 100644 --- a/app/src/main/res/menu/pdf_viewer.xml +++ b/app/src/main/res/menu/pdf_viewer.xml @@ -19,12 +19,6 @@ android:title="@string/action_next" app:showAsAction="ifRoom" /> - - - - - - \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml deleted file mode 100644 index 7353dbd..0000000 --- a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/raw/keep.xml b/app/src/main/res/raw/keep.xml deleted file mode 100644 index 3b9412b..0000000 --- a/app/src/main/res/raw/keep.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/app/src/main/res/values-night/styles.xml b/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 0be3c24..0000000 --- a/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml deleted file mode 100644 index c5d5899..0000000 --- a/app/src/main/res/values/ic_launcher_background.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #FFFFFF - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 345df9b..9a1dd85 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -4,7 +4,6 @@ Previous page Next page - Open document First page Last page Zoom out diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml deleted file mode 100644 index 7c3f7d7..0000000 --- a/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - -