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

fix #122 fix #134 fix #138 #141

Merged
merged 2 commits into from
Oct 27, 2018
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
11 changes: 5 additions & 6 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion ANDROID_BUILD_SDK_VERSION as int
buildToolsVersion ANDROID_BUILD_TOOLS_VERSION

defaultConfig {
minSdkVersion ANDROID_BUILD_MIN_SDK_VERSION as int
Expand All @@ -14,8 +13,8 @@ android {

dependencies {
// 下面两个依赖是必须的
implementation 'com.android.support:support-v4:27.1.1'
implementation 'cn.bingoogolapple:bga-swipebacklayout:1.1.9@aar'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'cn.bingoogolapple:bga-swipebacklayout:1.2.0@aar'
// 上面两个依赖是必须的


Expand All @@ -27,9 +26,9 @@ dependencies {
implementation 'cn.bingoogolapple:bga-refreshlayout:1.1.8@aar'
implementation 'cn.bingoogolapple:bga-progressbar:1.0.1@aar'
implementation 'cn.bingoogolapple:bga-swipeitemlayout:1.0.4@aar'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:palette-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:palette-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.jaeger.statusbaruitl:library:1.4.0'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
Expand Down
27 changes: 4 additions & 23 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
## Project-wide Gradle settings.
#
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Tue Aug 01 00:54:36 CST 2017
#systemProp.http.proxyHost=localhost
#systemProp.http.proxyPort=50451

ANDROID_BUILD_MIN_SDK_VERSION=14
ANDROID_BUILD_TARGET_SDK_VERSION=27
ANDROID_BUILD_SDK_VERSION=27
ANDROID_BUILD_TOOLS_VERSION=27.0.3
ANDROID_BUILD_TARGET_SDK_VERSION=28
ANDROID_BUILD_SDK_VERSION=28

VERSION_NAME=1.1.9
VERSION_CODE=119
VERSION_NAME=1.2.0
VERSION_CODE=120
3 changes: 1 addition & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.library'

android {
compileSdkVersion ANDROID_BUILD_SDK_VERSION as int
buildToolsVersion ANDROID_BUILD_TOOLS_VERSION

defaultConfig {
minSdkVersion ANDROID_BUILD_MIN_SDK_VERSION as int
Expand All @@ -15,7 +14,7 @@ android {
}

dependencies {
compileOnly 'com.android.support:support-v4:27.1.1'
compileOnly 'com.android.support:support-v4:28.0.0'
}

// ./gradlew :library:clean :library:build :library:bintrayUpload -PpublishAar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ private void dimChildView(View v, float mag, int fadeColor) {
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
boolean result;
final int save = canvas.save(Canvas.CLIP_SAVE_FLAG);
final int save = canvas.save();

if (mCanSlide && !lp.slideable && mSlideableView != null) {
// Clip against the slider; no sense drawing what will immediately be covered.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ private UIUtil() {

/**
* 获取底部导航栏高度
*
* @param activity
* @return
*/
public static int getNavigationBarHeight(Activity activity) {
int navigationBarHeight = 0;
Expand All @@ -58,19 +55,13 @@ public static int getNavigationBarHeight(Activity activity) {

/**
* 是否为竖屏
*
* @param activity
* @return
*/
public static boolean isPortrait(Activity activity) {
return activity.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT;
}

/**
* 手机具有底部导航栏时,底部导航栏是否可见
*
* @param activity
* @return
*/
private static boolean isNavigationBarVisible(Activity activity) {
// View decorView = activity.getWindow().getDecorView();
Expand All @@ -85,7 +76,9 @@ private static boolean isNavigationBarVisible(Activity activity) {
Configuration conf = activity.getResources().getConfiguration();
if (Configuration.ORIENTATION_LANDSCAPE == conf.orientation) {
View contentView = decorView.findViewById(android.R.id.content);
show = (point.x != contentView.getWidth());
if (contentView != null) {
show = (point.x != contentView.getWidth());
}
} else {
Rect rect = new Rect();
decorView.getWindowVisibleDisplayFrame(rect);
Expand All @@ -97,9 +90,6 @@ private static boolean isNavigationBarVisible(Activity activity) {

/**
* 检测是否具有底部导航栏
*
* @param activity
* @return
*/
private static boolean checkDeviceHasNavigationBar(Activity activity) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
Expand Down Expand Up @@ -138,9 +128,6 @@ private static boolean checkDeviceHasNavigationBar(Activity activity) {

/**
* 获取屏幕高度,包括底部导航栏
*
* @param activity
* @return
*/
public static int getRealScreenHeight(Activity activity) {
WindowManager windowManager = activity.getWindowManager();
Expand All @@ -156,9 +143,6 @@ public static int getRealScreenHeight(Activity activity) {

/**
* 获取屏幕宽度,不包括右侧导航栏
*
* @param activity
* @return
*/
public static int getRealScreenWidth(Activity activity) {
WindowManager windowManager = activity.getWindowManager();
Expand Down