Commit 78a945b2 by Kang Donghun

コード整理

parent 576e38ac
......@@ -22,7 +22,6 @@ import android.graphics.Path;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
......
......@@ -92,7 +92,6 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
private boolean isReady;
private boolean mSeekingFlag = false;
// private boolean isOver35 = false;
public ThumbnailSeekBarLayout(Context context, FoxitPdfCore foxitPdfCore, long contentId, int maxPageCount, boolean isLandscapeView, int displayWidth, int displayHeight, boolean isNormalSize, RelativeLayout pageNumberLayout) {
......@@ -106,9 +105,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
this.mPageNumberLayout = pageNumberLayout;
mPdfThumbnailProvider = new PdfThumbnailProvider(context, foxitPdfCore, contentId, isNormalSize);
mPdfThumbnailProvider.setIsLandscape(isLandscapeView);
// if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
// isOver35 = true;
// }
landWidthDiffMS = mPdfThumbnailProvider.landWidthM - mPdfThumbnailProvider.landWidthS;
portWidthDiffMS = mPdfThumbnailProvider.portWidthM - mPdfThumbnailProvider.portWidthS;
marginL = (int) (marginL * mPdfThumbnailProvider.getRatio(isNormalSize));
......@@ -262,7 +259,6 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
case MotionEvent.ACTION_DOWN:
// 中サイズのサムネイル表示
showMidThum(page, ((View)v.getParent()).getLeft() + v.getLeft() - (isLandscapeView?landWidthDiffMS:portWidthDiffMS) / 2);
// showMidThum(page, (isOver35 ? v.getLeft() : ((View)v.getParent()).getLeft() + v.getLeft()) - (isLandscapeView?landWidthDiffMS:portWidthDiffMS) / 2);
// 大サイズのサムネイル表示
if (getContext() instanceof ContentViewActivity) {
int left = ((View)v.getParent()).getLeft() + v.getLeft() + v.getWidth() / 2 - ((ContentViewActivity)getContext()).getLThumViewSize() / 2;
......@@ -283,6 +279,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
}
int pageX = (int) (firstCenterX + newPage * interval); // 現在ページ(大サムネイルの表示ページ)のx座標(さらに正確にするには各小サムネイル間のページ数で割って計算すべきだが)
Logger.d(TAG, "newPage=" + newPage+ " x=" + x + " y=" + y + " firstX=" + firstCenterX + " lastX=" + lastCenterX + " interval=" + interval + " pageX=" + pageX);
if (x < pageX - interval && newPage > 0) { // 前のページ
newPage = (int) ((x - firstCenterX + interval) / interval);
}
......@@ -292,6 +289,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
else {
break;
}
if (newPage >= 0 && newPage < maxPageCount) {
// 中サイズのサムネイル表示
showMidThum(newPage, (int) (x - (isLandscapeView? mPdfThumbnailProvider.landWidthM: mPdfThumbnailProvider.portWidthM) / 2));
......@@ -622,4 +620,5 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
public boolean isSeeking() {
return mSeekingFlag;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment