Skip to content

Commit

Permalink
Fix 4 for popups: don't use workaround for O MR1 == API 27
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus Weidner committed Nov 26, 2018
1 parent 080044b commit 7b50b87
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId 'org.pocketworkstation.pckeyboard'
minSdkVersion 14
targetSdkVersion 26
versionCode 1040006
versionName "v1.40.6"
versionCode 1040007
versionName "v1.40.7"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public CandidateView(Context context, AttributeSet attrs) {
mPreviewPopup.setBackgroundDrawable(null);
mPreviewPopup.setAnimationStyle(R.style.KeyPreviewAnimation);
// Enable clipping for Android P, keep disabled for older versions.
boolean clippingEnabled = (Build.VERSION.SDK_INT > Build.VERSION_CODES.O);
boolean clippingEnabled = (Build.VERSION.SDK_INT >= 28 /* Build.VERSION_CODES.P */);
mPreviewPopup.setClippingEnabled(clippingEnabled);
mColorNormal = res.getColor(R.color.candidate_normal);
mColorRecommended = res.getColor(R.color.candidate_recommended);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public LatinKeyboardView(Context context, AttributeSet attrs, int defStyle) {
// If true, popups are forced to remain inside the keyboard area. If false,
// they can extend above it. Enable clipping just for Android P since drawing
// outside the keyboard area doesn't work on that version.
boolean clippingEnabled = (Build.VERSION.SDK_INT > Build.VERSION_CODES.O);
boolean clippingEnabled = (Build.VERSION.SDK_INT >= 28 /* Build.VERSION_CODES.P */);

if (previewLayout != 0) {
mPreviewPopup = new PopupWindow(context);
Expand Down

0 comments on commit 7b50b87

Please sign in to comment.