Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复 Android P 上滑动返回闪屏 #183

Merged
merged 1 commit into from
Nov 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
Change Log
==========

Version 2.0.1 *(2019-11-16)*
----------------------------

* 修复 Android P 上滑动返回闪屏

Version 2.0.0 *(2019-11-10)*
----------------------------

* 支持 androidx

Version 1.2.1 *(2019-11-16)*
----------------------------

* 修复 Android P 上滑动返回闪屏

Version 1.2.0 *(2018-07-10)*
----------------------------

Version 1.2.0 *(2018-10-27)*
----------------------------

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
### 1.添加 Gradle 依赖

* androidx 项目用 [![Download](https://api.bintray.com/packages/bingoogolapple/maven/bga-swipebacklayout/images/download.svg)](https://bintray.com/bingoogolapple/maven/bga-swipebacklayout/_latestVersion) bga-swipebacklayout 后面的「latestVersion」指的是左边这个 Download 徽章后面的「数字」,请自行替换。
* 非 androidx 项目用 1.2.0 版本
* 非 androidx 项目用 1.2.1 版本

```groovy
dependencies {
Expand Down
4 changes: 2 additions & 2 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ android {
dependencies {
// 下面两个依赖是必须的
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
// implementation 'cn.bingoogolapple:bga-swipebacklayout:2.0.0@aar'
implementation 'cn.bingoogolapple:bga-swipebacklayout:2.0.1@aar'
// 上面两个依赖是必须的


implementation project(':library')
// implementation project(':library')


// 下面的依赖不是必须的,只是为了方便演示 demo
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ANDROID_BUILD_MIN_SDK_VERSION=14
ANDROID_BUILD_TARGET_SDK_VERSION=28
ANDROID_BUILD_SDK_VERSION=28

VERSION_NAME=2.0.0
VERSION_CODE=200
VERSION_NAME=2.0.1
VERSION_CODE=201

# 设置为 true,Android 插件会使用相应的 AndroidX 库,而非支持库
android.useAndroidX=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
import android.app.Activity;
import android.app.Application;
import android.content.Intent;
import androidx.annotation.DrawableRes;
import androidx.annotation.FloatRange;
import android.view.View;

import java.util.List;

import androidx.annotation.DrawableRes;
import androidx.annotation.FloatRange;

/**
* 作者:王浩 邮件:[email protected]
* 创建时间:17/1/4 下午3:44
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static boolean checkDeviceHasNavigationBar(Activity activity) {
return (realWidth - displayWidth) > 0 || (realHeight - displayHeight) > 0;
} else {
boolean hasNavigationBar = false;
Resources resources = activity.getResources();
Resources resources = Resources.getSystem();
int id = resources.getIdentifier("config_showNavigationBar", "bool", "android");
if (id > 0) {
hasNavigationBar = resources.getBoolean(id);
Expand Down
10 changes: 5 additions & 5 deletions library/src/main/res/anim/bga_sbl_activity_swipeback_exit.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="0"
android:fromXDelta="100%p"
android:fromYDelta="0"
android:toXDelta="100%p"
android:toYDelta="0"/>
android:duration="10"
android:fromXDelta="0"
android:fromYDelta="0"
android:toXDelta="100%p"
android:toYDelta="0" />