From e965eaf977017a071737444363b2d6c61e6851ee Mon Sep 17 00:00:00 2001 From: weiyixiong <542111388@qq.com> Date: Tue, 17 Nov 2015 09:53:54 +0800 Subject: [PATCH] clean code --- .idea/libraries/appcompat_v7_23_1_1.xml | 3 + .idea/libraries/support_v4_23_1_1.xml | 3 + .idea/misc.xml | 3 - .idea/workspace.xml | 505 ++++++++++++------ .../andpdf/pdfviewer/PdfViewerActivity.java | 41 +- 5 files changed, 335 insertions(+), 220 deletions(-) diff --git a/.idea/libraries/appcompat_v7_23_1_1.xml b/.idea/libraries/appcompat_v7_23_1_1.xml index c5c006c..c7518b9 100644 --- a/.idea/libraries/appcompat_v7_23_1_1.xml +++ b/.idea/libraries/appcompat_v7_23_1_1.xml @@ -1,5 +1,8 @@ + + + diff --git a/.idea/libraries/support_v4_23_1_1.xml b/.idea/libraries/support_v4_23_1_1.xml index 38f3df2..ae3691a 100644 --- a/.idea/libraries/support_v4_23_1_1.xml +++ b/.idea/libraries/support_v4_23_1_1.xml @@ -1,5 +1,8 @@ + + + diff --git a/.idea/misc.xml b/.idea/misc.xml index 3fecb4b..1cf1a31 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -63,9 +63,6 @@ - - $USER_HOME$/.subversion - diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b6ef384..bd61ed1 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -29,88 +29,101 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + + + - - + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2286,6 +2299,7 @@ + @@ -2316,6 +2330,7 @@ + @@ -2323,6 +2338,10 @@ @@ -2344,7 +2363,7 @@ - @@ -2358,25 +2377,7 @@ - - @@ -2662,6 +2635,9 @@ + + $USER_HOME$/.subversion + @@ -2689,13 +2665,12 @@ - + - - + @@ -2705,7 +2680,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + @@ -2723,11 +2747,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - @@ -2735,7 +2829,6 @@ - @@ -2751,7 +2844,6 @@ - @@ -2759,7 +2851,6 @@ - @@ -2767,7 +2858,6 @@ - @@ -2775,7 +2865,6 @@ - @@ -2783,7 +2872,6 @@ - @@ -2799,7 +2887,6 @@ - @@ -2807,7 +2894,6 @@ - @@ -2815,7 +2901,6 @@ - @@ -2823,22 +2908,86 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PdfView/src/main/java/net/sf/andpdf/pdfviewer/PdfViewerActivity.java b/PdfView/src/main/java/net/sf/andpdf/pdfviewer/PdfViewerActivity.java index a61954c..1f75148 100644 --- a/PdfView/src/main/java/net/sf/andpdf/pdfviewer/PdfViewerActivity.java +++ b/PdfView/src/main/java/net/sf/andpdf/pdfviewer/PdfViewerActivity.java @@ -148,36 +148,11 @@ public abstract class PdfViewerActivity extends Activity { super.onCreate(savedInstanceState); pdffilename = getFileName(); Log.i(TAG, "onCreate"); - //progress = ProgressDialog.show(PdfViewerActivity.this, "Loading", "Loading PDF Page"); - /*closeNavigationHandler = new Handler(); - closeNavigationThread = new Thread(new Runnable() { - - public void run() { - navigationPanel.startAnimation(AnimationUtils.loadAnimation(PdfViewerActivity.this, - R.anim.slide_out)); - navigationPanel.setVisibility(View.GONE); - } - });*/ - - /*if (navigationPanel == null) { - navigationPanel = ((ViewStub) findViewById(R.id.stub_navigation)).inflate(); - navigationPanel.setVisibility(View.GONE); - ImageButton previous = (ImageButton)navigationPanel.findViewById(R.id.navigation_previous); - previous.setBackgroundDrawable(null); - }*/ - uiHandler = new Handler(); restoreInstance(); if (mOldGraphView != null) { mGraphView = new GraphView(this); - //mGraphView.fileMillis = mOldGraphView.fileMillis; mGraphView.mBi = mOldGraphView.mBi; - //mGraphView.mLine1 = mOldGraphView.mLine1; - //mGraphView.mLine2 = mOldGraphView.mLine2; - //mGraphView.mLine3 = mOldGraphView.mLine3; - //mGraphView.mText = mOldGraphView.mText; - //mGraphView.pageParseMillis= mOldGraphView.pageParseMillis; - //mGraphView.pageRenderMillis= mOldGraphView.pageRenderMillis; mOldGraphView = null; mGraphView.mImageView.setImageBitmap(mGraphView.mBi); mGraphView.updateTexts(); @@ -243,25 +218,13 @@ public abstract class PdfViewerActivity extends Activity { private synchronized void startRenderThread(final int page, final float zoom) { if (backgroundThread != null) return; - mGraphView.showText("reading page " + page + ", zoom:" + zoom); //progress = ProgressDialog.show(PdfViewerActivity.this, "Loading", "Loading PDF Page"); backgroundThread = new Thread(new Runnable() { public void run() { try { if (mPdfFile != null) { - //progress = ProgressDialog.show(PdfViewerActivity.this, "Loading", "Loading PDF Page"); - - // File f = new File("/sdcard/andpdf.trace"); - // f.delete(); - // Log.e(TAG, "DEBUG.START"); - // Debug.startMethodTracing("andpdf"); showPage(page, zoom); - // Debug.stopMethodTracing(); - // Log.e(TAG, "DEBUG.STOP"); - - /*if (progress != null) - progress.dismiss();*/ } } catch (Exception e) { Log.e(TAG, e.getMessage(), e); @@ -515,8 +478,8 @@ public abstract class PdfViewerActivity extends Activity { mImageView.setLayoutParams(lpWrap1); mImageView.setPadding(5, 5, 5, 5); vl.addView(mImageView); - /*mImageView = (ImageView) findViewById(R.id.pdf_image); - if (mImageView == null) { + /*mImageView = (ImageView) findViewById(R.id.pdf_image); + if (mImageView == null) { Log.i(TAG, "mImageView is null!!!!!!"); } setPageBitmap(null);