├── .gradle ├── 6.1.1 │ ├── gc.properties │ ├── fileChanges │ │ └── last-build.bin │ ├── fileHashes │ │ ├── fileHashes.bin │ │ └── fileHashes.lock │ └── executionHistory │ │ ├── executionHistory.bin │ │ └── executionHistory.lock ├── vcs-1 │ └── gc.properties ├── buildOutputCleanup │ ├── cache.properties │ ├── outputFiles.bin │ └── buildOutputCleanup.lock └── checksums │ └── checksums.lock ├── Drawer ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── layout │ │ │ │ │ ├── open_handle.xml │ │ │ │ │ ├── open_content.xml │ │ │ │ │ ├── test_drag.xml │ │ │ │ │ ├── activity_drawer.xml │ │ │ │ │ └── activity_main.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── yanxuwen │ │ │ │ └── drawer │ │ │ │ ├── DrawerActivity.java │ │ │ │ ├── TextDragLayout.java │ │ │ │ └── MainActivity.java │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── yanxuwen │ │ │ │ └── drawer │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── yanxuwen │ │ │ └── drawer │ │ │ └── ExampleInstrumentedTest.java │ ├── build.gradle │ └── proguard-rules.pro ├── mydrawer │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── attrs.xml │ │ │ │ └── anim │ │ │ │ │ ├── fare_out.xml │ │ │ │ │ └── fare_in.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── yanxuwen │ │ │ │ └── mydrawer │ │ │ │ ├── RecyclerViewImpl.java │ │ │ │ ├── NotchScreenUtils.java │ │ │ │ ├── DrawerLayout.java │ │ │ │ └── BaseDragLayout.java │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── yanxuwen │ │ │ │ └── mydrawer │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── yanxuwen │ │ │ └── mydrawer │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── .idea │ ├── caches │ │ ├── gradle_models.ser │ │ └── build_file_checksums.ser │ ├── compiler.xml │ ├── vcs.xml │ ├── misc.xml │ ├── modules.xml │ ├── runConfigurations.xml │ ├── gradle.xml │ ├── jarRepositories.xml │ ├── codeStyles │ │ └── Project.xml │ └── dbnavigator.xml ├── .gitignore ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── build.gradle ├── gradle.properties ├── install.gradle ├── bintray.gradle ├── gradlew.bat └── gradlew ├── TestApplication ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── layout │ │ │ │ │ └── activity_main.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── yanxuwen │ │ │ │ └── testapplication │ │ │ │ └── MainActivity.java │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── yanxuwen │ │ │ │ └── testapplication │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── yanxuwen │ │ │ └── testapplication │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── .idea │ ├── copyright │ │ └── profiles_settings.xml │ ├── modules.xml │ ├── runConfigurations.xml │ ├── gradle.xml │ ├── compiler.xml │ └── misc.xml ├── .gitignore ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── .idea ├── vcs.xml ├── compiler.xml ├── misc.xml ├── gradle.xml └── workspace.xml ├── gradle └── wrapper │ └── gradle-wrapper.properties ├── local.properties ├── .gitignore ├── README.md ├── gradlew.bat └── gradlew /.gradle/6.1.1/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Drawer/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Drawer/mydrawer/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /.gradle/6.1.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TestApplication/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /TestApplication/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /Drawer/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':mydrawer' 2 | -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Mon Mar 08 14:21:38 CST 2021 2 | gradle.version=6.1.1 3 | -------------------------------------------------------------------------------- /.gradle/checksums/checksums.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/.gradle/checksums/checksums.lock -------------------------------------------------------------------------------- /Drawer/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Drawer 3 | 4 | -------------------------------------------------------------------------------- /Drawer/.idea/caches/gradle_models.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/.idea/caches/gradle_models.ser -------------------------------------------------------------------------------- /.gradle/6.1.1/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/.gradle/6.1.1/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /.gradle/6.1.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/.gradle/6.1.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /Drawer/mydrawer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | myDrawer 3 | 4 | -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /TestApplication/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Drawer/.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TestApplication 3 | 4 | -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/6.1.1/executionHistory/executionHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/.gradle/6.1.1/executionHistory/executionHistory.bin -------------------------------------------------------------------------------- /.gradle/6.1.1/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/.gradle/6.1.1/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Drawer/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/Drawer/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Drawer/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /TestApplication/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yanxuwen/MyDrawer/HEAD/TestApplication/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Drawer/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Drawer/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /Drawer/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /Drawer/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Jul 06 13:24:44 CST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /TestApplication/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jun 20 15:45:44 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /Drawer/mydrawer/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # For customization when using a Version Control System, please read the 6 | # header note. 7 | #Mon Mar 08 14:21:39 CST 2021 8 | sdk.dir=E\:\\sdk 9 | -------------------------------------------------------------------------------- /Drawer/mydrawer/src/main/res/anim/fare_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.ear 17 | *.zip 18 | *.tar.gz 19 | *.rar 20 | 21 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 22 | hs_err_pid* 23 | -------------------------------------------------------------------------------- /Drawer/mydrawer/src/main/res/anim/fare_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /Drawer/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /TestApplication/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Drawer/mydrawer/src/main/java/com/yanxuwen/mydrawer/RecyclerViewImpl.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.mydrawer; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * @author bsnl_yanxuwen 7 | * @date 2021/3/8 14:59 8 | * Description : 9 | */ 10 | public interface RecyclerViewImpl { 11 | boolean canScrollHorizontally(int direction); 12 | 13 | boolean canScrollVertically(int direction); 14 | 15 | View getRecyclerView(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Drawer/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Drawer/app/src/test/java/com/yanxuwen/drawer/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.drawer; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /Drawer/mydrawer/src/test/java/com/yanxuwen/mydrawer/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.mydrawer; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /TestApplication/app/src/test/java/com/yanxuwen/testapplication/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.testapplication; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /Drawer/app/src/main/res/layout/open_handle.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /Drawer/app/src/main/res/layout/open_content.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /Drawer/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /TestApplication/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /Drawer/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /TestApplication/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /TestApplication/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Drawer/app/src/main/res/layout/test_drag.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 16 | 17 | -------------------------------------------------------------------------------- /TestApplication/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /TestApplication/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /TestApplication/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /Drawer/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | buildToolsVersion "28.0.3" 6 | defaultConfig { 7 | applicationId "com.yanxuwen.drawer" 8 | minSdkVersion 18 9 | targetSdkVersion 28 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(dir: 'libs', include: ['*.jar']) 24 | implementation 'com.android.support:appcompat-v7:28.0.0' 25 | implementation project(path: ':mydrawer') 26 | } 27 | -------------------------------------------------------------------------------- /Drawer/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } 6 | jcenter() 7 | google() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.5.2' 11 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' 12 | classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' 13 | } 14 | 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } 20 | maven { url 'https://jitpack.io' } 21 | jcenter() 22 | google() 23 | } 24 | } 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } -------------------------------------------------------------------------------- /Drawer/mydrawer/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Drawer/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 20 | -------------------------------------------------------------------------------- /Drawer/app/src/androidTest/java/com/yanxuwen/drawer/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.drawer; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.yanxuwen.drawer", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Drawer/mydrawer/src/androidTest/java/com/yanxuwen/mydrawer/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.mydrawer; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.yanxuwen.mydrawer.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /TestApplication/app/src/androidTest/java/com/yanxuwen/testapplication/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.testapplication; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.yanxuwen.testapplication", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Drawer/app/src/main/java/com/yanxuwen/drawer/DrawerActivity.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.drawer; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.os.Handler; 6 | import android.widget.Toast; 7 | 8 | import com.yanxuwen.mydrawer.DrawerLayout; 9 | 10 | public class DrawerActivity extends Activity implements DrawerLayout.OnDrawerStatusListener { 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_drawer); 15 | final DrawerLayout mDrawerLayout = (DrawerLayout) findViewById(R.id.dragLayout); 16 | new Handler().postDelayed(new Runnable() { 17 | 18 | @Override 19 | public void run() { 20 | mDrawerLayout.open(); 21 | } 22 | }, 5000); 23 | mDrawerLayout.setOnDrawerStatusListener(this); 24 | } 25 | 26 | @Override 27 | public void onStatus(boolean isOpen) { 28 | Toast.makeText(this, isOpen ? "打开" : "关闭", Toast.LENGTH_LONG).show(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Drawer/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 22 | 23 | -------------------------------------------------------------------------------- /Drawer/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in E:\studio\android_sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /Drawer/mydrawer/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in E:\studio\android_sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /TestApplication/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /Drawer/app/src/main/res/layout/activity_drawer.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 17 | 18 | 21 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TestApplication/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.0" 6 | defaultConfig { 7 | applicationId "com.yanxuwen.testapplication" 8 | minSdkVersion 15 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile 'com.android.support:appcompat-v7:25.+' 28 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 29 | testCompile 'junit:junit:4.12' 30 | } 31 | -------------------------------------------------------------------------------- /Drawer/mydrawer/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | ext { 4 | bintrayName = 'mydrawer' 5 | artifact = bintrayName 6 | libraryName = 'mydrawer' 7 | libraryDescription = 'mydrawer' 8 | libraryVersion = main_version 9 | } 10 | 11 | android { 12 | compileSdkVersion 28 13 | buildToolsVersion "28.0.3" 14 | defaultConfig { 15 | minSdkVersion 15 16 | targetSdkVersion 28 17 | versionCode 1 18 | versionName "1.0" 19 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 20 | javaCompileOptions { 21 | annotationProcessorOptions { 22 | includeCompileClasspath true 23 | } 24 | } 25 | buildTypes { 26 | release { 27 | minifyEnabled false 28 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 29 | } 30 | } 31 | } 32 | } 33 | dependencies { 34 | implementation fileTree(dir: 'libs', include: ['*.jar']) 35 | implementation 'com.android.support:appcompat-v7:28.0.0' 36 | } 37 | 38 | apply from: '../install.gradle' 39 | apply from: '../bintray.gradle' 40 | -------------------------------------------------------------------------------- /Drawer/app/src/main/java/com/yanxuwen/drawer/TextDragLayout.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.drawer; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.util.Log; 6 | import android.view.View; 7 | import android.widget.ImageView; 8 | import android.widget.Toast; 9 | 10 | import com.yanxuwen.mydrawer.BaseDragLayout; 11 | 12 | /** 13 | * 作者:严旭文 on 2017/2/16 15:37 14 | * 邮箱:420255048@qq.com 15 | */ 16 | public class TextDragLayout extends BaseDragLayout { 17 | ImageView iv_cover; 18 | public TextDragLayout(Context context) { 19 | super(context); 20 | } 21 | 22 | public TextDragLayout(Context context, AttributeSet attrs) { 23 | super(context, attrs, 0); 24 | } 25 | 26 | public TextDragLayout(Context context, AttributeSet attrs, int defStyle) { 27 | super(context, attrs, defStyle); 28 | } 29 | 30 | @Override 31 | public void onViewStatus(boolean isOpen) { 32 | 33 | } 34 | 35 | @Override 36 | public void onViewOffset(float mOffset) { 37 | if(iv_cover!=null){ 38 | iv_cover.setAlpha((float) (mOffset*0.8)); 39 | } 40 | } 41 | 42 | @Override 43 | public void initView() { 44 | iv_cover= (ImageView) findViewById(R.id.iv_cover); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /TestApplication/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Drawer/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | # When configured, Gradle will run in incubating parallel mode. 10 | # This option should only be used with decoupled projects. More details, visit 11 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 12 | # org.gradle.parallel=true 13 | org.gradle.daemon=true 14 | 15 | bintrayRepo=maven 16 | main_version=1.2.2 17 | publishedGroupId=com.yanxuwen.mydrawer 18 | siteUrl=https://github.com/yanxuwen/mydrawer 19 | gitUrl=https://github.com/yanxuwen/mydrawer.git 20 | developerId=yxe 21 | developerName=yanxuwen 22 | developerEmail=420255048@qq.com 23 | #android.useAndroidX=true 24 | #android.enableJetifier=true 25 | 26 | 27 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 28 | 29 | #org.gradle.jvmargs= -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005, 30 | #Dorg.gradle.debug=true 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Drawer/install.gradle: -------------------------------------------------------------------------------- 1 | // backup of [https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle] 2 | 3 | apply plugin: 'com.github.dcendents.android-maven' 4 | 5 | group = publishedGroupId // Maven Group ID for the artifact 6 | 7 | install { 8 | repositories.mavenInstaller { 9 | // This generates POM.xml with proper parameters 10 | pom { 11 | project { 12 | packaging 'aar' 13 | groupId publishedGroupId 14 | artifactId artifact 15 | 16 | // Add your description here 17 | name libraryName 18 | description libraryDescription 19 | url siteUrl 20 | 21 | // Set your license 22 | licenses { 23 | license { 24 | name 'The Apache Software License, Version 2.0' 25 | url 'http://www.apache.org/licenses/LICENSE-2.0.txt' 26 | } 27 | } 28 | developers { 29 | developer { 30 | id developerId 31 | name developerName 32 | email developerEmail 33 | } 34 | } 35 | scm { 36 | connection gitUrl 37 | developerConnection gitUrl 38 | url siteUrl 39 | 40 | } 41 | } 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Drawer/.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | -------------------------------------------------------------------------------- /Drawer/app/src/main/java/com/yanxuwen/drawer/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.drawer; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.util.Log; 7 | import android.view.KeyEvent; 8 | import android.view.View; 9 | import android.widget.Toast; 10 | 11 | import com.yanxuwen.mydrawer.BaseDragLayout; 12 | 13 | public class MainActivity extends AppCompatActivity { 14 | TextDragLayout mTextDragLayout; 15 | 16 | 17 | 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_main); 23 | 24 | mTextDragLayout = (TextDragLayout)findViewById(R.id.includ_text_drag); 25 | mTextDragLayout.setMoveEventSize(200); 26 | 27 | } 28 | public void onFullRight(View v){ 29 | if (mTextDragLayout.isOpen()){ 30 | mTextDragLayout.close(BaseDragLayout.MODE_DRAG_RIGHT); 31 | } else { 32 | mTextDragLayout.open(BaseDragLayout.MODE_DRAG_RIGHT); 33 | } 34 | } 35 | 36 | public void onFullLeft(View v){ 37 | if (mTextDragLayout.isOpen()){ 38 | mTextDragLayout.close(BaseDragLayout.MODE_DRAG_LEFT); 39 | } else { 40 | mTextDragLayout.open(BaseDragLayout.MODE_DRAG_LEFT); 41 | } } 42 | 43 | public void onFullBottom(View v){ 44 | Toast.makeText(this,"没有设置",Toast.LENGTH_SHORT).show(); 45 | } 46 | 47 | public void onFullTop(View v){ 48 | Toast.makeText(this,"没有设置",Toast.LENGTH_SHORT).show(); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /TestApplication/app/src/main/java/com/yanxuwen/testapplication/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.yanxuwen.testapplication; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.webkit.WebSettings; 6 | import android.webkit.WebView; 7 | import android.webkit.WebViewClient; 8 | 9 | public class MainActivity extends AppCompatActivity { 10 | 11 | String url="http://project.gmm-zc.cn/hesk/ylys/雁庐馆演示.html"; 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | setContentView(R.layout.activity_main); 16 | WebView webview = (WebView) findViewById(R.id.webview); 17 | WebSettings webSettings = webview.getSettings(); 18 | webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN); 19 | webview.setInitialScale(50); 20 | webSettings.setJavaScriptEnabled(true); 21 | webSettings.setUseWideViewPort(true); //将图片调整到适合webview的大小 22 | webSettings.setLoadWithOverviewMode(true); // 缩放至屏幕的大小 23 | //缩放操作 24 | webSettings.setSupportZoom(true); //支持缩放,默认为true。是下面那个的前提。 25 | webSettings.setBuiltInZoomControls(true); //设置内置的缩放控件。若为false,则该WebView不可缩放 26 | webSettings.setDisplayZoomControls(false); //隐藏原生的缩放控件 27 | //其他细节操作 28 | webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); //关闭webview中缓存 29 | webSettings.setAllowFileAccess(true); //设置可以访问文件 30 | webSettings.setJavaScriptCanOpenWindowsAutomatically(true); //支持通过JS打开新窗口 31 | webSettings.setLoadsImagesAutomatically(true); //支持自动加载图片 32 | webSettings.setDefaultTextEncodingName("utf-8");//设置编码格式 33 | //布局内跳转 34 | webview.setWebViewClient(new WebViewClient(){ 35 | @Override 36 | public boolean shouldOverrideUrlLoading(WebView view, String url) { 37 | view.loadUrl(url); //在当前的webview中跳转到新的url 38 | return true; 39 | } 40 | }); 41 | webview.loadUrl(url); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Drawer/bintray.gradle: -------------------------------------------------------------------------------- 1 | // backup of [https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle] 2 | 3 | apply plugin: 'com.jfrog.bintray' 4 | 5 | version = libraryVersion 6 | 7 | if (project.hasProperty("android")) { // Android libraries 8 | task sourcesJar(type: Jar) { 9 | classifier = 'sources' 10 | from android.sourceSets.main.java.srcDirs 11 | } 12 | 13 | task javadoc(type: Javadoc) { 14 | source = android.sourceSets.main.java.srcDirs 15 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) 16 | } 17 | } else { // Java libraries 18 | task sourcesJar(type: Jar, dependsOn: classes) { 19 | classifier = 'sources' 20 | from sourceSets.main.allSource 21 | } 22 | } 23 | 24 | task javadocJar(type: Jar, dependsOn: javadoc) { 25 | classifier = 'javadoc' 26 | from javadoc.destinationDir 27 | } 28 | 29 | artifacts { 30 | archives javadocJar 31 | archives sourcesJar 32 | } 33 | 34 | javadoc { 35 | failOnError false 36 | options{ 37 | encoding "UTF-8" 38 | charSet 'UTF-8' 39 | author true 40 | version true 41 | links "http://docs.oracle.com/javase/7/docs/api" 42 | } 43 | } 44 | 45 | // Bintray 46 | Properties properties = new Properties() 47 | properties.load(project.rootProject.file('local.properties').newDataInputStream()) 48 | 49 | bintray { 50 | user = properties.getProperty("bintray.user") 51 | key = properties.getProperty("bintray.apikey") 52 | 53 | configurations = ['archives'] 54 | pkg { 55 | repo = "maven" 56 | name = bintrayName 57 | desc = libraryDescription 58 | websiteUrl = siteUrl 59 | vcsUrl = gitUrl 60 | licenses = ["Apache-2.0"] 61 | publish = true 62 | publicDownloadNumbers = true 63 | version { 64 | desc = libraryDescription 65 | gpg { 66 | sign = true //Determines whether to GPG sign the files. The default is false 67 | passphrase = properties.getProperty("bintray.gpg.password") 68 | //Optional. The passphrase for GPG signing' 69 | } 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /Drawer/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 15 | 16 |