├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-xhdpi │ │ │ ├── close_white.png │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ ├── player_status_pause_white.png │ │ │ └── player_status_start_white.png │ │ ├── drawable │ │ │ ├── btn_round_player_bg.xml │ │ │ └── ic_launcher_background.xml │ │ └── layout │ │ │ ├── main.xml │ │ │ └── float_music.xml │ │ ├── java │ │ └── com │ │ │ └── dk │ │ │ └── en │ │ │ └── floatingview │ │ │ ├── Test2_1Activity.java │ │ │ ├── Test1_1Activity.java │ │ │ ├── Test1Activity.java │ │ │ ├── Test2Activity.java │ │ │ ├── TestActivity.java │ │ │ └── App.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── floatingview ├── .gitignore ├── gradle.properties ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── dk │ │ └── floatingview │ │ ├── MagnetViewListener.java │ │ ├── IFloatingView.java │ │ ├── FloatLifecycle.java │ │ ├── FloatWindow.java │ │ ├── DkFloatingView.java │ │ ├── FloatingView.java │ │ └── FloatingMagnetView.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── preview └── 1.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── README.md ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /floatingview/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /floatingview/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_NAME=EnFloatingView -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':floatingview' 2 | -------------------------------------------------------------------------------- /floatingview/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /preview/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Doonkey/DkFloatingView/HEAD/preview/1.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | DkFloatingView 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Doonkey/DkFloatingView/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/close_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Doonkey/DkFloatingView/HEAD/app/src/main/res/mipmap-xhdpi/close_white.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Doonkey/DkFloatingView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Doonkey/DkFloatingView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/player_status_pause_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Doonkey/DkFloatingView/HEAD/app/src/main/res/mipmap-xhdpi/player_status_pause_white.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/player_status_start_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Doonkey/DkFloatingView/HEAD/app/src/main/res/mipmap-xhdpi/player_status_start_white.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Mar 15 15:13:07 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-4.6-all.zip 7 | -------------------------------------------------------------------------------- /floatingview/src/main/java/com/dk/floatingview/MagnetViewListener.java: -------------------------------------------------------------------------------- 1 | package com.dk.floatingview; 2 | 3 | import android.view.MotionEvent; 4 | 5 | public interface MagnetViewListener { 6 | 7 | void onRemove(FloatingMagnetView magnetView); 8 | 9 | void onClick(MotionEvent event); 10 | } 11 | -------------------------------------------------------------------------------- /floatingview/src/main/java/com/dk/floatingview/IFloatingView.java: -------------------------------------------------------------------------------- 1 | package com.dk.floatingview; 2 | 3 | import android.view.View; 4 | 5 | public interface IFloatingView { 6 | 7 | void show(); 8 | void hide(); 9 | 10 | View getView(); 11 | 12 | void setOnClickListener(DkFloatingView.ViewClickListener listener); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_round_player_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /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 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /floatingview/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 |