Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
78a945b2
Commit
78a945b2
authored
Sep 19, 2025
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コード整理
parent
576e38ac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
16 deletions
+14
-16
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/util/DisplayUtil.java
+3
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/GuideViewActivity.java
+0
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
+5
-5
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ThumbnailSeekBarLayout.java
+6
-7
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/util/DisplayUtil.java
View file @
78a945b2
...
@@ -22,15 +22,15 @@ public class DisplayUtil {
...
@@ -22,15 +22,15 @@ public class DisplayUtil {
public
static
Point
getDisplaySize
(
Context
context
)
{
public
static
Point
getDisplaySize
(
Context
context
)
{
WindowManager
wm
=
(
WindowManager
)
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
);
WindowManager
wm
=
(
WindowManager
)
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
);
int
displayWidth
;
int
displayWidth
;
int
displayHeight
;
int
displayHeight
;
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
R
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
R
)
{
WindowMetrics
metrics
=
wm
.
getCurrentWindowMetrics
();
WindowMetrics
metrics
=
wm
.
getCurrentWindowMetrics
();
Rect
bounds
=
metrics
.
getBounds
();
Rect
bounds
=
metrics
.
getBounds
();
WindowInsets
windowInsets
=
metrics
.
getWindowInsets
();
WindowInsets
windowInsets
=
metrics
.
getWindowInsets
();
android
.
graphics
.
Insets
insets
=
windowInsets
.
getInsets
(
android
.
graphics
.
Insets
insets
=
windowInsets
.
getInsets
(
WindowInsets
.
Type
.
systemBars
()
|
WindowInsets
.
Type
.
displayCutout
()
WindowInsets
.
Type
.
systemBars
()
|
WindowInsets
.
Type
.
displayCutout
()
);
);
displayWidth
=
bounds
.
width
()
-
(
insets
.
left
+
insets
.
right
);
displayWidth
=
bounds
.
width
()
-
(
insets
.
left
+
insets
.
right
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/GuideViewActivity.java
View file @
78a945b2
...
@@ -22,7 +22,6 @@ import android.graphics.Path;
...
@@ -22,7 +22,6 @@ import android.graphics.Path;
import
android.graphics.RectF
;
import
android.graphics.RectF
;
import
android.graphics.drawable.Drawable
;
import
android.graphics.drawable.Drawable
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.preference.PreferenceManager
;
import
android.preference.PreferenceManager
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
View file @
78a945b2
...
@@ -630,19 +630,19 @@ public class ContentViewActivity extends ABVContentViewActivity {
...
@@ -630,19 +630,19 @@ public class ContentViewActivity extends ABVContentViewActivity {
if
(
hasMultiPages
)
{
// サムネイルバーとページ番号表示
if
(
hasMultiPages
)
{
// サムネイルバーとページ番号表示
mPageNumberLayout
=
(
RelativeLayout
)
getLayoutInflater
().
inflate
(
R
.
layout
.
page_number
,
null
);
mPageNumberLayout
=
(
RelativeLayout
)
getLayoutInflater
().
inflate
(
R
.
layout
.
page_number
,
null
);
int
height
=
(
int
)
((
isNormalSize
()?
ThumbnailSeekBarLayout
.
NORMAL_HEIGHT
:
ThumbnailSeekBarLayout
.
LARGE_HEIGHT
)
*
getResources
().
getDisplayMetrics
().
density
);
// サムネイルバーの高さ
int
height
=
(
int
)
((
isNormalSize
()?
ThumbnailSeekBarLayout
.
NORMAL_HEIGHT
:
ThumbnailSeekBarLayout
.
LARGE_HEIGHT
)
*
getResources
().
getDisplayMetrics
().
density
);
// サムネイルバーの高さ
mLThumViewSize
=
(
int
)
(
200
*
(
float
)
height
/
ThumbnailSeekBarLayout
.
LARGE_HEIGHT
);
// 大サムネイル表示領域の設定
mLThumViewSize
=
(
int
)
(
200
*
(
float
)
height
/
ThumbnailSeekBarLayout
.
LARGE_HEIGHT
);
// 大サムネイル表示領域の設定
mSeekBarLayout
=
new
ThumbnailSeekBarLayout
(
this
,
mFoxitPdfCore
,
getContentId
(),
mAllPageCount
,
isLandscapeView
,
mDisplaySize
.
width
,
mDisplaySize
.
height
,
isNormalSize
(),
mPageNumberLayout
);
mSeekBarLayout
=
new
ThumbnailSeekBarLayout
(
this
,
mFoxitPdfCore
,
getContentId
(),
mAllPageCount
,
isLandscapeView
,
mDisplaySize
.
width
,
mDisplaySize
.
height
,
isNormalSize
(),
mPageNumberLayout
);
mSeekBarLayout
.
setId
(
id
.
seekbar_layout_id
);
// 番号は適当
mSeekBarLayout
.
setId
(
id
.
seekbar_layout_id
);
// 番号は適当
mSeekBarLayout
.
setVisibility
(
View
.
INVISIBLE
);
mSeekBarLayout
.
setVisibility
(
View
.
INVISIBLE
);
mSeekBarLayout
.
setFitsSystemWindows
(
true
);
mSeekBarLayout
.
setFitsSystemWindows
(
true
);
RelativeLayout
.
LayoutParams
param2
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
height
);
RelativeLayout
.
LayoutParams
param2
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
height
);
param2
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_BOTTOM
);
param2
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_BOTTOM
);
mMainLayout
.
addView
(
mSeekBarLayout
,
param2
);
mMainLayout
.
addView
(
mSeekBarLayout
,
param2
);
mMainLayout
.
setFitsSystemWindows
(
true
);
mMainLayout
.
setFitsSystemWindows
(
true
);
mPageNumberLayout
.
setVisibility
(
View
.
INVISIBLE
);
mPageNumberLayout
.
setVisibility
(
View
.
INVISIBLE
);
RelativeLayout
.
LayoutParams
param
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
(
int
)(
convertDensitySize
(
50
)
+
0.5f
));
RelativeLayout
.
LayoutParams
param
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
(
int
)(
convertDensitySize
(
50
)
+
0.5f
));
param
.
setMargins
(
0
,
0
,
0
,
10
);
param
.
setMargins
(
0
,
0
,
0
,
10
);
param
.
addRule
(
RelativeLayout
.
ABOVE
,
mSeekBarLayout
.
getId
());
param
.
addRule
(
RelativeLayout
.
ABOVE
,
mSeekBarLayout
.
getId
());
mMainLayout
.
addView
(
mPageNumberLayout
,
param
);
mMainLayout
.
addView
(
mPageNumberLayout
,
param
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ThumbnailSeekBarLayout.java
View file @
78a945b2
...
@@ -92,7 +92,6 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
...
@@ -92,7 +92,6 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
private
boolean
isReady
;
private
boolean
isReady
;
private
boolean
mSeekingFlag
=
false
;
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
)
{
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 {
...
@@ -106,9 +105,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
this
.
mPageNumberLayout
=
pageNumberLayout
;
this
.
mPageNumberLayout
=
pageNumberLayout
;
mPdfThumbnailProvider
=
new
PdfThumbnailProvider
(
context
,
foxitPdfCore
,
contentId
,
isNormalSize
);
mPdfThumbnailProvider
=
new
PdfThumbnailProvider
(
context
,
foxitPdfCore
,
contentId
,
isNormalSize
);
mPdfThumbnailProvider
.
setIsLandscape
(
isLandscapeView
);
mPdfThumbnailProvider
.
setIsLandscape
(
isLandscapeView
);
// if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
// isOver35 = true;
// }
landWidthDiffMS
=
mPdfThumbnailProvider
.
landWidthM
-
mPdfThumbnailProvider
.
landWidthS
;
landWidthDiffMS
=
mPdfThumbnailProvider
.
landWidthM
-
mPdfThumbnailProvider
.
landWidthS
;
portWidthDiffMS
=
mPdfThumbnailProvider
.
portWidthM
-
mPdfThumbnailProvider
.
portWidthS
;
portWidthDiffMS
=
mPdfThumbnailProvider
.
portWidthM
-
mPdfThumbnailProvider
.
portWidthS
;
marginL
=
(
int
)
(
marginL
*
mPdfThumbnailProvider
.
getRatio
(
isNormalSize
));
marginL
=
(
int
)
(
marginL
*
mPdfThumbnailProvider
.
getRatio
(
isNormalSize
));
...
@@ -239,12 +236,12 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
...
@@ -239,12 +236,12 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
);
);
insetLeft
=
systemBars
.
left
;
insetLeft
=
systemBars
.
left
;
insetTop
=
systemBars
.
top
;
insetTop
=
systemBars
.
top
;
}
else
{
}
else
{
insetTop
=
0
;
insetTop
=
0
;
insetLeft
=
0
;
insetLeft
=
0
;
}
}
for
(
int
i
=
0
;
i
<
maxThumCount
;
i
++)
{
for
(
int
i
=
0
;
i
<
maxThumCount
;
i
++)
{
ImageView
smallImageView
=
new
ImageView
(
getContext
());
ImageView
smallImageView
=
new
ImageView
(
getContext
());
final
int
page
=
indexToPages
[
i
];
final
int
page
=
indexToPages
[
i
];
smallImageView
.
setLayoutParams
(
params
);
smallImageView
.
setLayoutParams
(
params
);
...
@@ -262,7 +259,6 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
...
@@ -262,7 +259,6 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
case
MotionEvent
.
ACTION_DOWN
:
case
MotionEvent
.
ACTION_DOWN
:
// 中サイズのサムネイル表示
// 中サイズのサムネイル表示
showMidThum
(
page
,
((
View
)
v
.
getParent
()).
getLeft
()
+
v
.
getLeft
()
-
(
isLandscapeView
?
landWidthDiffMS:
portWidthDiffMS
)
/
2
);
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
)
{
if
(
getContext
()
instanceof
ContentViewActivity
)
{
int
left
=
((
View
)
v
.
getParent
()).
getLeft
()
+
v
.
getLeft
()
+
v
.
getWidth
()
/
2
-
((
ContentViewActivity
)
getContext
()).
getLThumViewSize
()
/
2
;
int
left
=
((
View
)
v
.
getParent
()).
getLeft
()
+
v
.
getLeft
()
+
v
.
getWidth
()
/
2
-
((
ContentViewActivity
)
getContext
()).
getLThumViewSize
()
/
2
;
...
@@ -283,6 +279,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
...
@@ -283,6 +279,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
}
}
int
pageX
=
(
int
)
(
firstCenterX
+
newPage
*
interval
);
// 現在ページ(大サムネイルの表示ページ)のx座標(さらに正確にするには各小サムネイル間のページ数で割って計算すべきだが)
int
pageX
=
(
int
)
(
firstCenterX
+
newPage
*
interval
);
// 現在ページ(大サムネイルの表示ページ)のx座標(さらに正確にするには各小サムネイル間のページ数で割って計算すべきだが)
Logger
.
d
(
TAG
,
"newPage="
+
newPage
+
" x="
+
x
+
" y="
+
y
+
" firstX="
+
firstCenterX
+
" lastX="
+
lastCenterX
+
" interval="
+
interval
+
" pageX="
+
pageX
);
Logger
.
d
(
TAG
,
"newPage="
+
newPage
+
" x="
+
x
+
" y="
+
y
+
" firstX="
+
firstCenterX
+
" lastX="
+
lastCenterX
+
" interval="
+
interval
+
" pageX="
+
pageX
);
if
(
x
<
pageX
-
interval
&&
newPage
>
0
)
{
// 前のページ
if
(
x
<
pageX
-
interval
&&
newPage
>
0
)
{
// 前のページ
newPage
=
(
int
)
((
x
-
firstCenterX
+
interval
)
/
interval
);
newPage
=
(
int
)
((
x
-
firstCenterX
+
interval
)
/
interval
);
}
}
...
@@ -292,6 +289,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
...
@@ -292,6 +289,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
else
{
else
{
break
;
break
;
}
}
if
(
newPage
>=
0
&&
newPage
<
maxPageCount
)
{
if
(
newPage
>=
0
&&
newPage
<
maxPageCount
)
{
// 中サイズのサムネイル表示
// 中サイズのサムネイル表示
showMidThum
(
newPage
,
(
int
)
(
x
-
(
isLandscapeView
?
mPdfThumbnailProvider
.
landWidthM
:
mPdfThumbnailProvider
.
portWidthM
)
/
2
));
showMidThum
(
newPage
,
(
int
)
(
x
-
(
isLandscapeView
?
mPdfThumbnailProvider
.
landWidthM
:
mPdfThumbnailProvider
.
portWidthM
)
/
2
));
...
@@ -622,4 +620,5 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
...
@@ -622,4 +620,5 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
public
boolean
isSeeking
()
{
public
boolean
isSeeking
()
{
return
mSeekingFlag
;
return
mSeekingFlag
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment