Commit 36fd7757 by Yujin Seo

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
......@@ -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="false"
android:hardwareAccelerated="true"
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>
......
......@@ -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>
......
......@@ -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>
......@@ -6,7 +6,13 @@
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="match_parent"
android:orientation="vertical"
android:padding="20dp">
<LinearLayout
android:layout_width="match_parent"
......@@ -36,5 +42,5 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/setting_fragment" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?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>
......@@ -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
......@@ -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
......@@ -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);
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 outSize = new Point();
display.getSize(outSize);
return outSize;
Point size = new Point();
display.getSize(size);
displayWidth = size.x;
displayHeight = size.y;
}
return new Point(displayWidth, displayHeight);
}
public static Size getDisplaySize2(Context context) {
......
......@@ -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));
......
......@@ -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,15 +607,15 @@ 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));
......@@ -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();
}
......
......@@ -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;
......@@ -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,17 +223,36 @@ 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) {
......@@ -279,7 +304,6 @@ 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;
......
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