Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Ver 2.4.0 #94

Merged
merged 40 commits into from
Oct 15, 2018
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
bd8465b
Update SDK(Android P)
YoshihideSogawa Jul 3, 2018
96e1296
Add FOREGROUND_SERVICE permission
YoshihideSogawa Jul 3, 2018
07a1486
Update README
YoshihideSogawa Jul 3, 2018
12b9681
Update gradle version
YoshihideSogawa Aug 2, 2018
d6eb8c1
Add cutout's safe inset area
YoshihideSogawa Aug 2, 2018
d63e45c
Update README.md
YoshihideSogawa Aug 2, 2018
d6afbfd
Remove If statement when the status bar and SafeInsetRect are different
YoshihideSogawa Aug 3, 2018
f6a87c8
Cutout supports only portrait orientation.
YoshihideSogawa Aug 3, 2018
d7d059d
Add height of the status bar in landscape orientation
YoshihideSogawa Aug 3, 2018
d77c7ee
Update SDK (Android Studio 3.3 Canary4)
YoshihideSogawa Aug 3, 2018
d271361
Support Tall diaplay cutout
YoshihideSogawa Aug 3, 2018
10fd6f5
Delete update process from FloatingView
YoshihideSogawa Aug 3, 2018
b270a5c
Fix:Fixed a bug that the view shifted when touching after rotating th…
YoshihideSogawa Aug 6, 2018
c9c6386
Change : Set MainActivity to portrait
YoshihideSogawa Aug 6, 2018
da71914
Add: Update FloatingView when updating setSafeInsetRect
YoshihideSogawa Aug 6, 2018
b323ad9
Update SDK
YoshihideSogawa Aug 7, 2018
f895e5f
Added caution to demo app when obtain the Cutout.
YoshihideSogawa Sep 14, 2018
aed61c6
Update tools version
YoshihideSogawa Sep 14, 2018
909a531
Update README
YoshihideSogawa Sep 14, 2018
f5ad373
Merge pull request #90 from recruit-lifestyle/feature/support_p
YoshihideSogawa Sep 14, 2018
efd90a9
Avoid use deprecated class
YoshihideSogawa Sep 20, 2018
d388c74
Update gradle tools
YoshihideSogawa Sep 20, 2018
3fcb929
Fix lint warning
YoshihideSogawa Sep 20, 2018
d09d3d1
Update SDK
YoshihideSogawa Sep 25, 2018
88a6d48
Created a convenient method in FloatingViewManager.
YoshihideSogawa Sep 25, 2018
90243bc
Fix typo and space
YoshihideSogawa Sep 25, 2018
8608cde
Fix find navigation bar
YoshihideSogawa Sep 27, 2018
bb358d0
Refactor various name
YoshihideSogawa Sep 27, 2018
5a22d93
Add final
YoshihideSogawa Sep 27, 2018
78528f2
Fix find navigation bar
YoshihideSogawa Sep 28, 2018
123c510
Fix navigation bar auto hide mode
YoshihideSogawa Sep 28, 2018
c6a466b
Fix navigation bar auto hide mode
YoshihideSogawa Sep 28, 2018
857ef6c
Merge branch 'feature/fix_galaxy_bug' into feature/2.4.0-beta01
YoshihideSogawa Sep 28, 2018
b95b5d5
Merge pull request #92 from recruit-lifestyle/feature/2.4.0-beta01
YoshihideSogawa Sep 28, 2018
efca8e9
Fix IllegalArgumentException
YoshihideSogawa Oct 2, 2018
96447e0
Merge pull request #93 from recruit-lifestyle/feature/issue_89
YoshihideSogawa Oct 2, 2018
9fee801
Refactor startFloatingViewService method
YoshihideSogawa Oct 4, 2018
f2b0816
Merge pull request #95 from recruit-lifestyle/feature/refactor_sample
YoshihideSogawa Oct 4, 2018
13c0520
Refactor updateTouchXOffset
YoshihideSogawa Oct 4, 2018
0c7b987
Fix sample
YoshihideSogawa Oct 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added caution to demo app when obtain the Cutout.
  • Loading branch information
YoshihideSogawa committed Sep 14, 2018
commit f895e5f2f4fe220133c46b148a67764097e9eb7d
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.app.FragmentTransaction;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
Expand All @@ -17,6 +18,7 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;

import jp.co.recruit.floatingview.R;
import jp.co.recruit_lifestyle.sample.service.ChatHeadService;
Expand Down Expand Up @@ -145,10 +147,19 @@ private static void startFloatingViewService(Activity activity, boolean isCustom
// TODO:Rewrite with android-x
// TODO:Consider alternatives
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
// Note:FloatingView does not support the start of service on the landscape orientation (due to Cutout).
final DisplayCutout displayCutout = activity.getWindow().getDecorView().getRootWindowInsets().getDisplayCutout();
if (displayCutout != null) {
safeInsetRect.set(displayCutout.getSafeInsetLeft(), displayCutout.getSafeInsetTop(), displayCutout.getSafeInsetRight(), displayCutout.getSafeInsetBottom());

// *** You must follow these rules when obtain the cutout ***
// 1. 'windowLayoutInDisplayCutoutMode' do not be set to 'never'
if (activity.getWindow().getAttributes().layoutInDisplayCutoutMode == WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER) {
throw new RuntimeException("'windowLayoutInDisplayCutoutMode' do not be set to 'never'");
}
// 2. Do not set Activity to landscape
if(activity.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE){
throw new RuntimeException("Do not set Activity to landscape");
}
}
}

Expand Down