Skip to content

Commit

Permalink
完善代码
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchong211 committed Dec 20, 2021
1 parent 1c29814 commit 2fda8d1
Show file tree
Hide file tree
Showing 31 changed files with 3,084 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
.DS_Store
/build
/captures
.externalNativeBuild
.externalNativeBuild
.idea/
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Widget/BannerWidget/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/captures
.externalNativeBuild
.cxx
.idea/



Expand Down
76 changes: 76 additions & 0 deletions Widget/SwipeBackLib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
.idea/



# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries

# Keystore files
*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json
.idea/


Empty file.
13 changes: 13 additions & 0 deletions Widget/SwipeBackLib/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Widget/SwipeBackLib/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Widget/SwipeBackLib/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Widget/SwipeBackLib/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions Widget/SwipeBackLib/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions Widget/SwipeBackLib/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply from: rootProject.projectDir.absolutePath + "/yc.gradle"

android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
buildToolsVersion rootProject.ext.android["buildToolsVersion"]

defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
}

lintOptions {
abortOnError false
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation(rootProject.ext.dependencies["appcompat-v7"])
implementation(rootProject.ext.dependencies["annotations"])
}
Empty file.
21 changes: 21 additions & 0 deletions Widget/SwipeBackLib/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
1 change: 1 addition & 0 deletions Widget/SwipeBackLib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<manifest package="com.yc.swipe"/>
28 changes: 28 additions & 0 deletions Widget/SwipeBackLib/src/main/java/com/yc/swipe/ISwipeDelegate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.yc.swipe;


public interface ISwipeDelegate {
/**
* 是否支持滑动返回
*
* @return
*/
boolean isSupportSwipeBack();

/**
* 正在滑动返回
*
* @param slideOffset 从 0 到 1
*/
void onSwipeBackLayoutSlide(float slideOffset);

/**
* 没达到滑动返回的阈值,取消滑动返回动作,回到默认状态
*/
void onSwipeBackLayoutCancel();

/**
* 滑动返回执行完毕,销毁当前 Activity
*/
void onSwipeBackLayoutExecuted();
}
Loading

0 comments on commit 2fda8d1

Please sign in to comment.