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
36fd7757
Commit
36fd7757
authored
Sep 30, 2025
by
Yujin Seo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'contract/sato/1.0.620_67472' into 'contract/sato/1.0.630'
Contract/sato/1.0.620 67472 See merge request
!333
parents
46bb4157
ca5601ac
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
143 additions
and
69 deletions
+143
-69
ABVJE_Launcher_Android/AndroidManifest.xml
+15
-15
ABVJE_Res_Default_Android/res/values-normal/style.xml
+3
-1
ABVJE_Res_Default_Android/res/values/dimens.xml
+9
-0
ABVJE_UI_Android/res/layout/ac_setting_main.xml
+30
-23
ABVJE_UI_Android/res/values/dimens.xml
+0
-11
ABVJE_UI_Android/res/values/themes_abook.xml
+2
-0
ABVJE_UI_Android/res/values/themes_style.xml
+7
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/util/DisplayUtil.java
+26
-4
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/GuideViewActivity.java
+2
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
+13
-5
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ThumbnailSeekBarLayout.java
+36
-9
No files found.
ABVJE_Launcher_Android/AndroidManifest.xml
View file @
36fd7757
...
...
@@ -118,7 +118,7 @@
android:name=
"jp.agentec.abook.abv.ui.home.activity.PreSplashActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:launchMode=
"singleTask"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
android:exported=
"true"
>
android:theme=
"@
style/Theme_fits_full
"
android:exported=
"true"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
...
...
@@ -157,45 +157,45 @@
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.SplashScreenActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
/>
android:theme=
"@
style/Theme_fits_full
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.LoginActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:label=
"LoginActivity"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
/>
android:theme=
"@
style/Theme_fits_full
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:hardwareAccelerated=
"
fals
e"
android:hardwareAccelerated=
"
tru
e"
android:theme=
"@android:style/Theme.NoTitleBar.Fullscreen"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:theme=
"@
android:style/Theme.NoTitleBar
"
>
android:theme=
"@
style/Theme_fits
"
>
</activity>
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.EnqueteWebViewActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:theme=
"@
android:style/Theme.NoTitleBar
"
>
android:theme=
"@
style/Theme_fits
"
>
</activity>
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.PreviewActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
>
android:theme=
"@
style/Theme_fits_full
"
>
</activity>
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.VideoViewActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
>
android:theme=
"@
style/Theme_fits_full
"
>
</activity>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.LoginPasswordChangeActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:label=
"LoginPasswordChangeActivity"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
>
android:theme=
"@
style/Theme_fits_full
"
>
</activity>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity"
android:theme=
"@
android:style/Theme.NoTitleBar
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.ChangePasswordActivity"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.ABookSettingActivity"
android:theme=
"@
style/Theme_fits
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.ChangePasswordActivity"
android:theme=
"@
style/Theme_fits_full
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.ChangePasswordActivityDialog"
android:theme=
"@style/Theme.MyTheme.ModalDialog"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.HelpActivity"
android:configChanges=
"orientation|screenSize"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.GuideViewActivity"
android:configChanges=
"orientation|screenSize"
/>
...
...
@@ -204,11 +204,11 @@
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.AudioPlayActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
/>
android:theme=
"@
style/Theme_fits_full
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity"
android:hardwareAccelerated=
"false"
android:configChanges=
"keyboardHidden"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
/>
android:theme=
"@
style/Theme_fits_full
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.common.activity.ShowPushMessageDailogActivity"
android:theme=
"@android:style/Theme.Translucent.NoTitleBar"
android:exported=
"true"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
@@ -237,10 +237,10 @@
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
>
android:theme=
"@
style/Theme_fits_full
"
>
</activity>
<!-- @Form QRコードリーダー -->
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.CaptureQRCodeActivity"
android:theme=
"@
android:style/Theme.NoTitleBar.Fullscreen
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.CaptureQRCodeActivity"
android:theme=
"@
style/Theme_fits_full
"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.CaptureQRCodeActivityDialog"
android:theme=
"@android:style/Theme.Holo.Dialog.NoActionBar"
/>
</application>
...
...
ABVJE_Res_Default_Android/res/values-normal/style.xml
View file @
36fd7757
...
...
@@ -9,7 +9,9 @@
<item
name=
"android:windowBackground"
>
@color/transparent
</item>
</style>
<style
name=
"AppTheme"
parent=
"android:Theme.Light"
/>
<style
name=
"AppTheme"
parent=
"android:Theme.Light"
>
<item
name=
"android:fitsSystemWindows"
>
true
</item>
</style>
<style
name=
"Theme_Contentdetailview"
parent=
"android:style/Theme.Translucent"
>
<item
name=
"android:windowContentOverlay"
>
@null
</item>
...
...
ABVJE_Res_Default_Android/res/values/dimens.xml
View file @
36fd7757
...
...
@@ -21,4 +21,13 @@
<dimen
name=
"operation_title_text_size"
>
20sp
</dimen>
<dimen
name=
"operation_title_normal_width"
>
200dp
</dimen>
<dimen
name=
"operation_title_large_width"
>
400dp
</dimen>
<dimen
name=
"opeartion_title_text_size"
/>
<dimen
name=
"report_status_height_1"
>
48dp
</dimen>
<dimen
name=
"report_status_height_2"
>
32dp
</dimen>
<dimen
name=
"report_status_height_3"
>
24dp
</dimen>
<dimen
name=
"report_status_width_1"
>
80dp
</dimen>
<dimen
name=
"report_status_width_2"
>
36dp
</dimen>
</resources>
ABVJE_UI_Android/res/layout/ac_setting_main.xml
View file @
36fd7757
...
...
@@ -6,35 +6,41 @@
android:layout_height=
"match_parent"
android:background=
"@drawable/setting_bg"
android:orientation=
"vertical"
android:
padding=
"20dp
"
>
android:
fitsSystemWindows=
"true
"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_cont
ent"
android:
gravity=
"center_
vertical"
android:padding
Bottom=
"10dp"
>
android:layout_height=
"
match_par
ent"
android:
orientation=
"
vertical"
android:padding
=
"20dp"
>
<ImageButton
android:id=
"@+id/app_icon"
android:layout_width=
"wrap_content"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:
background=
"@drawable/icon
"
android:
src=
"@null"
/
>
android:
gravity=
"center_vertical
"
android:
paddingBottom=
"10dp"
>
<TextView
android:id=
"@+id/textView1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"20dp"
android:text=
"@string/setting"
android:textAppearance=
"?android:attr/textAppearanceLarge"
/>
</LinearLayout>
<ImageButton
android:id=
"@+id/app_icon"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/icon"
android:src=
"@null"
/>
<fragment
android:id=
"@+id/pref_fragment"
android:name=
"jp.agentec.abook.abv.ui.home.activity.ABookSettingFragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:layout=
"@layout/setting_fragment"
/>
<TextView
android:id=
"@+id/textView1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"20dp"
android:text=
"@string/setting"
android:textAppearance=
"?android:attr/textAppearanceLarge"
/>
</LinearLayout>
<fragment
android:id=
"@+id/pref_fragment"
android:name=
"jp.agentec.abook.abv.ui.home.activity.ABookSettingFragment"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:layout=
"@layout/setting_fragment"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
ABVJE_UI_Android/res/values/dimens.xml
deleted
100644 → 0
View file @
46bb4157
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen
name=
"opeartion_title_text_size"
/>
<dimen
name=
"report_status_height_1"
>
48dp
</dimen>
<dimen
name=
"report_status_height_2"
>
32dp
</dimen>
<dimen
name=
"report_status_height_3"
>
24dp
</dimen>
<dimen
name=
"report_status_width_1"
>
80dp
</dimen>
<dimen
name=
"report_status_width_2"
>
36dp
</dimen>
</resources>
ABVJE_UI_Android/res/values/themes_abook.xml
View file @
36fd7757
...
...
@@ -30,6 +30,7 @@
<item
name=
"android:textViewStyle"
>
@style/TextViewABook
</item>
<item
name=
"android:alertDialogStyle"
>
@style/Theme_ABookAlertDialog
</item>
<item
name=
"android:fitsSystemWindows"
>
true
</item>
</style>
</resources>
\ No newline at end of file
ABVJE_UI_Android/res/values/themes_style.xml
View file @
36fd7757
...
...
@@ -69,5 +69,10 @@
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@drawable/translucent_background</item>
</style> -->
<style
name=
"Theme_fits_full"
parent=
"android:style/Theme.NoTitleBar.Fullscreen"
>
<item
name=
"android:fitsSystemWindows"
>
true
</item>
</style>
<style
name=
"Theme_fits"
parent=
"android:style/Theme.NoTitleBar"
>
<item
name=
"android:fitsSystemWindows"
>
true
</item>
</style>
</resources>
\ No newline at end of file
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/util/DisplayUtil.java
View file @
36fd7757
...
...
@@ -4,10 +4,13 @@ import jp.agentec.abook.abv.bl.common.log.Logger;
import
jp.agentec.abook.abv.ui.common.vo.Size
;
import
android.content.Context
;
import
android.graphics.Point
;
import
android.graphics.Rect
;
import
android.os.Build
;
import
android.util.DisplayMetrics
;
import
android.view.Display
;
import
android.view.WindowInsets
;
import
android.view.WindowManager
;
import
android.view.WindowMetrics
;
public
class
DisplayUtil
{
...
...
@@ -18,10 +21,29 @@ public class DisplayUtil {
*/
public
static
Point
getDisplaySize
(
Context
context
)
{
WindowManager
wm
=
(
WindowManager
)
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
);
Display
display
=
wm
.
getDefaultDisplay
();
Point
outSize
=
new
Point
();
display
.
getSize
(
outSize
);
return
outSize
;
int
displayWidth
;
int
displayHeight
;
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
R
)
{
WindowMetrics
metrics
=
wm
.
getCurrentWindowMetrics
();
Rect
bounds
=
metrics
.
getBounds
();
WindowInsets
windowInsets
=
metrics
.
getWindowInsets
();
android
.
graphics
.
Insets
insets
=
windowInsets
.
getInsets
(
WindowInsets
.
Type
.
navigationBars
()
|
WindowInsets
.
Type
.
displayCutout
()
);
displayWidth
=
bounds
.
width
()
-
(
insets
.
left
+
insets
.
right
);
displayHeight
=
bounds
.
height
()
-
(
insets
.
top
+
insets
.
bottom
);
}
else
{
Display
display
=
wm
.
getDefaultDisplay
();
Point
size
=
new
Point
();
display
.
getSize
(
size
);
displayWidth
=
size
.
x
;
displayHeight
=
size
.
y
;
}
return
new
Point
(
displayWidth
,
displayHeight
);
}
public
static
Size
getDisplaySize2
(
Context
context
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/GuideViewActivity.java
View file @
36fd7757
...
...
@@ -472,9 +472,11 @@ public class GuideViewActivity extends ABVContentViewActivity {
mSeekBarLayout
=
new
ThumbnailSeekBarLayout
(
this
,
mFoxitPdfCore
,
getContentId
(),
mAllPageCount
,
isLandscapeView
,
mDisplaySize
.
width
,
mDisplaySize
.
height
,
isNormalSize
(),
mPageNumberLayout
);
mSeekBarLayout
.
setId
(
id
.
seekbar_layout_id
);
// 番号は適当
mSeekBarLayout
.
setVisibility
(
View
.
INVISIBLE
);
mSeekBarLayout
.
setFitsSystemWindows
(
true
);
RelativeLayout
.
LayoutParams
param2
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
height
);
param2
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_BOTTOM
);
mMainLayout
.
addView
(
mSeekBarLayout
,
param2
);
mMainLayout
.
setFitsSystemWindows
(
true
);
mPageNumberLayout
.
setVisibility
(
View
.
INVISIBLE
);
RelativeLayout
.
LayoutParams
param
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
(
int
)(
convertDensitySize
(
50
)
+
0.5f
));
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
View file @
36fd7757
...
...
@@ -40,6 +40,8 @@ import android.view.View.OnKeyListener;
import
android.view.View.OnTouchListener
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.view.WindowInsets
;
import
android.view.WindowInsetsController
;
import
android.view.WindowManager
;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationUtils
;
...
...
@@ -605,17 +607,17 @@ public class ContentViewActivity extends ABVContentViewActivity {
configureSize
();
mMainLayout
=
new
MmainLayout
(
getApplicationContext
()
);
mMainLayout
=
new
MmainLayout
(
this
);
// ダミーのSurfaceViewを追加する。これを行わないとコンテンツの2ページ目に埋め込み動画がある場合は画面が一瞬真っ黒になる。
// SurfaceViewをLayoutにaddViewするタイミングで起きるが、大きさ0のSurfaceViewをここでセットすることで避けられる。
mMainLayout
.
addView
(
new
SurfaceView
(
this
),
new
ViewGroup
.
LayoutParams
(
0
,
0
));
mMainLayout
.
setFitsSystemWindows
(
true
);
mContentWrapLayout
=
new
RelativeLayout
(
this
);
mContentWrapLayout
=
new
RelativeLayout
(
getApplicationContext
());
mPageScrollView
=
new
PageScrollView
(
getApplicationContext
());
mPageScrollView
=
new
PageScrollView
(
this
);
mPageScrollView
.
setHorizontalScrollBarEnabled
(
false
);
// ScrollBarを非表示
mPageScrollView
.
addView
(
mContentWrapLayout
,
new
ViewGroup
.
LayoutParams
(
mAllPageCount
*
mDisplaySize
.
width
,
FP
));
mPageScrollView
.
addView
(
mContentWrapLayout
,
new
ViewGroup
.
LayoutParams
(
mAllPageCount
*
mDisplaySize
.
width
,
FP
));
RelativeLayout
.
LayoutParams
param0
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
param0
.
addRule
(
RelativeLayout
.
CENTER_IN_PARENT
);
...
...
@@ -633,9 +635,11 @@ public class ContentViewActivity extends ABVContentViewActivity {
mSeekBarLayout
=
new
ThumbnailSeekBarLayout
(
this
,
mFoxitPdfCore
,
getContentId
(),
mAllPageCount
,
isLandscapeView
,
mDisplaySize
.
width
,
mDisplaySize
.
height
,
isNormalSize
(),
mPageNumberLayout
);
mSeekBarLayout
.
setId
(
id
.
seekbar_layout_id
);
// 番号は適当
mSeekBarLayout
.
setVisibility
(
View
.
INVISIBLE
);
mSeekBarLayout
.
setFitsSystemWindows
(
true
);
RelativeLayout
.
LayoutParams
param2
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
height
);
param2
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_BOTTOM
);
mMainLayout
.
addView
(
mSeekBarLayout
,
param2
);
mMainLayout
.
setFitsSystemWindows
(
true
);
mPageNumberLayout
.
setVisibility
(
View
.
INVISIBLE
);
RelativeLayout
.
LayoutParams
param
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
(
int
)(
convertDensitySize
(
50
)
+
0.5f
));
...
...
@@ -1476,6 +1480,10 @@ public class ContentViewActivity extends ABVContentViewActivity {
return
false
;
}
if
(
mSeekBarLayout
!=
null
&&
mSeekBarLayout
.
isSeeking
())
{
return
false
;
}
if
(
mPageScrollView
.
isZooming
()
==
false
&&
!
isEnqueteOpening
)
{
stopVideo
();
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ThumbnailSeekBarLayout.java
View file @
36fd7757
...
...
@@ -23,6 +23,7 @@ import android.graphics.BitmapFactory;
import
android.graphics.BitmapFactory.Options
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.graphics.drawable.Drawable
;
import
android.os.Build
;
import
android.os.Handler
;
import
android.os.Process
;
import
android.view.Gravity
;
...
...
@@ -30,6 +31,9 @@ import android.view.LayoutInflater;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.WindowInsets
;
import
android.view.WindowManager
;
import
android.view.WindowMetrics
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
...
...
@@ -100,7 +104,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
this
.
mPageNumberLayout
=
pageNumberLayout
;
mPdfThumbnailProvider
=
new
PdfThumbnailProvider
(
context
,
foxitPdfCore
,
contentId
,
isNormalSize
);
mPdfThumbnailProvider
.
setIsLandscape
(
isLandscapeView
);
landWidthDiffMS
=
mPdfThumbnailProvider
.
landWidthM
-
mPdfThumbnailProvider
.
landWidthS
;
portWidthDiffMS
=
mPdfThumbnailProvider
.
portWidthM
-
mPdfThumbnailProvider
.
portWidthS
;
marginL
=
(
int
)
(
marginL
*
mPdfThumbnailProvider
.
getRatio
(
isNormalSize
));
...
...
@@ -110,9 +114,11 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
LayoutInflater
layoutInflater
=
(
LayoutInflater
)
context
.
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
seekBarLayout
=
(
RelativeLayout
)
layoutInflater
.
inflate
(
R
.
layout
.
thumb_seekbar
,
null
);
seekBarLayout
.
setFitsSystemWindows
(
true
);
addView
(
seekBarLayout
);
linearLayout
=
(
LinearLayout
)
seekBarLayout
.
findViewById
(
id
.
seekbar_liner
);
linearLayout
.
setFitsSystemWindows
(
true
);
width
=
isLandscapeView
?
mPdfThumbnailProvider
.
landWidthS
:
mPdfThumbnailProvider
.
portWidthS
;
height
=
isLandscapeView
?
mPdfThumbnailProvider
.
landHeightS
:
mPdfThumbnailProvider
.
portHeightS
;
...
...
@@ -217,19 +223,38 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
params
.
setMargins
(
marginS
,
marginS
,
marginS
,
marginS
);
params
.
gravity
=
Gravity
.
CENTER_VERTICAL
;
int
insetLeft
;
int
insetTop
;
WindowManager
wm
=
(
WindowManager
)
getContext
().
getSystemService
(
Context
.
WINDOW_SERVICE
);
if
(
wm
!=
null
&&
Build
.
VERSION
.
SDK_INT
>
Build
.
VERSION_CODES
.
UPSIDE_DOWN_CAKE
)
{
WindowMetrics
metrics
=
wm
.
getCurrentWindowMetrics
();
WindowInsets
insets
=
metrics
.
getWindowInsets
();
android
.
graphics
.
Insets
systemBars
=
insets
.
getInsets
(
WindowInsets
.
Type
.
systemBars
()
|
WindowInsets
.
Type
.
displayCutout
()
);
insetLeft
=
systemBars
.
left
;
insetTop
=
systemBars
.
top
;
}
else
{
insetTop
=
0
;
insetLeft
=
0
;
}
for
(
int
i
=
0
;
i
<
maxThumCount
;
i
++)
{
ImageView
smallImageView
=
new
ImageView
(
getContext
());
final
int
page
=
indexToPages
[
i
];
smallImageView
.
setLayoutParams
(
params
);
smallImageView
.
setImageBitmap
(
dummyThumWhite
);
smallImageView
.
setFitsSystemWindows
(
true
);
smallImageView
.
setOnTouchListener
(
new
OnTouchListener
()
{
@Override
public
boolean
onTouch
(
View
v
,
MotionEvent
ev
)
{
float
x
=
ev
.
getRawX
();
float
y
=
ev
.
getRawY
();
float
x
=
ev
.
getRawX
()
-
insetLeft
;
float
y
=
ev
.
getRawY
()
-
insetTop
;
Logger
.
d
(
TAG
,
"[onTouch]:page:"
+
page
+
" action="
+
str
(
ev
.
getAction
())
+
", count="
+
ev
.
getPointerCount
()+
" x="
+
x
+
" y="
+
y
);
switch
(
ev
.
getAction
()
&
MotionEvent
.
ACTION_MASK
)
{
case
MotionEvent
.
ACTION_DOWN
:
// 中サイズのサムネイル表示
...
...
@@ -254,7 +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
);
}
...
...
@@ -264,7 +289,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
else
{
break
;
}
if
(
newPage
>=
0
&&
newPage
<
maxPageCount
)
{
// 中サイズのサムネイル表示
showMidThum
(
newPage
,
(
int
)
(
x
-
(
isLandscapeView
?
mPdfThumbnailProvider
.
landWidthM
:
mPdfThumbnailProvider
.
portWidthM
)
/
2
));
...
...
@@ -276,10 +301,9 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
}
}
break
;
case
MotionEvent
.
ACTION_UP
:
mSeekingFlag
=
false
;
if
(
getContext
()
instanceof
ContentViewActivity
)
{
((
ContentViewActivity
)
getContext
()).
jumpToPage
(
newPage
>=
0
&&
newPage
<
maxPageCount
?
newPage:
page
);
// ページ遷移
((
ContentViewActivity
)
getContext
()).
setToolbarVisable
(
false
);
...
...
@@ -289,6 +313,9 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
((
GuideViewActivity
)
getContext
()).
setToolbarVisable
(
false
);
((
GuideViewActivity
)
getContext
()).
removeLargeThumView
();
}
v
.
post
(()
->
{
mSeekingFlag
=
false
;
});
clearImageView
();
newPage
=
-
1
;
break
;
...
...
@@ -444,7 +471,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
else
{
clearImageView
();
}
RelativeLayout
.
LayoutParams
params
=
new
RelativeLayout
.
LayoutParams
(
midWidth
,
midHeight
);
params
.
setMargins
(
left
,
marginM
,
marginM
,
marginM
);
params
.
addRule
(
RelativeLayout
.
CENTER_VERTICAL
,
RelativeLayout
.
TRUE
);
...
...
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