├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── attr.xml │ │ │ │ └── dimens.xml │ │ │ ├── drawable │ │ │ │ ├── img_haizeiwang.jpg │ │ │ │ ├── ytm_taobao_zan1.png │ │ │ │ ├── ytm_taobao_zan2.png │ │ │ │ ├── ytm_taobao_zan3.png │ │ │ │ └── ytm_icon_like_png.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ └── layout │ │ │ │ ├── activity_blur.xml │ │ │ │ ├── activity_periscope.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_indicator.xml │ │ │ │ └── activity_slide_select.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── ai │ │ │ │ └── code │ │ │ │ └── customview │ │ │ │ ├── activity │ │ │ │ ├── CommonWindowActivity.java │ │ │ │ ├── PeriscopeActivity.java │ │ │ │ ├── SlideSelectActivity.java │ │ │ │ ├── IndicatorActivity.java │ │ │ │ └── BlurActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ └── view │ │ │ │ ├── IndicatorView.java │ │ │ │ ├── BlurView.java │ │ │ │ ├── PeriscopeLayout.java │ │ │ │ └── SlideSelectView.java │ │ └── AndroidManifest.xml │ └── test │ │ └── java │ │ └── com │ │ └── ai │ │ └── code │ │ └── customview │ │ └── ExampleUnitTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── libs ├── armeabi │ ├── libijksdl.so │ ├── libijkffmpeg.so │ └── libijkplayer.so └── armeabi-v7a │ ├── libijksdl.so │ ├── libijkffmpeg.so │ └── libijkplayer.so ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── caches │ └── build_file_checksums.ser └── workspace.xml ├── .gitignore ├── README.md ├── gradle.properties ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /libs/armeabi/libijksdl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/libs/armeabi/libijksdl.so -------------------------------------------------------------------------------- /libs/armeabi/libijkffmpeg.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/libs/armeabi/libijkffmpeg.so -------------------------------------------------------------------------------- /libs/armeabi/libijkplayer.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/libs/armeabi/libijkplayer.so -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 自定义UI 3 | 4 | -------------------------------------------------------------------------------- /libs/armeabi-v7a/libijksdl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/libs/armeabi-v7a/libijksdl.so -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/armeabi-v7a/libijkffmpeg.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/libs/armeabi-v7a/libijkffmpeg.so -------------------------------------------------------------------------------- /libs/armeabi-v7a/libijkplayer.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/libs/armeabi-v7a/libijkplayer.so -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_haizeiwang.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/drawable/img_haizeiwang.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/ytm_taobao_zan1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/drawable/ytm_taobao_zan1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ytm_taobao_zan2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/drawable/ytm_taobao_zan2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ytm_taobao_zan3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/drawable/ytm_taobao_zan3.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ytm_icon_like_png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/drawable/ytm_icon_like_png.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AICode-Pan/Open-View/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | .idea/ 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | *.log 10 | build/ -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 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.6.4-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/ai/code/customview/activity/CommonWindowActivity.java: -------------------------------------------------------------------------------- 1 | package com.ai.code.customview.activity; 2 | 3 | import android.os.Bundle; 4 | import android.support.annotation.Nullable; 5 | import android.support.v7.app.AppCompatActivity; 6 | 7 | public class CommonWindowActivity extends AppCompatActivity { 8 | @Override 9 | protected void onCreate(@Nullable Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | setTitle("仿苹果 通用弹窗"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/test/java/com/ai/code/customview/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.ai.code.customview; 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 | } -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #00000000 4 | #fff 5 | #000 6 | #3F51B5 7 | #303F9F 8 | #FF4081 9 | #f92a2a 10 | #d8d8d8 11 | #eb535e 12 | #717171 13 | #33ffffff 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_blur.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 简介 2 | 通过Canvas或者继承View,写的一些常用的控件,记录一下。有需要的朋友可以自取。 3 | 4 | ### PersicopeLayout [效果](https://aicode-pan.oss-cn-beijing.aliyuncs.com/video/1592570155492374.mp4) 5 | 点赞动画,通过贝塞尔曲线绘制悬浮路径,图片复用。 6 |
7 | 8 | ### BlurView [效果](https://aicode-pan.oss-cn-beijing.aliyuncs.com/video/20200620110203.MP4) 9 | 仿IOS Blur控件。因为Android手机计算能力问题,Android没有类似控件。其实实现原理很简单,先裁剪View获取相应位 10 | 置Bitmap,再对Bitmap进行压缩处理和模糊处理,最后绘制出来就好了。为了使效果更像IOS的,我加了一个透明白色蒙板。 11 |
12 | 13 | ### IndicatorView [效果](https://aicode-pan.oss-cn-beijing.aliyuncs.com/video/1592570074332320.mp4) 14 | 指示器,用于画廊,导览,开屏广告,viewpager 15 |
16 | 17 | ### SlideSelectView [效果](https://aicode-pan.oss-cn-beijing.aliyuncs.com/video/1592570074324749.mp4) 18 | 滑动选择器 19 |
-------------------------------------------------------------------------------- /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 /Users/pan/Downloads/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 | -------------------------------------------------------------------------------- /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 | android.injected.testOnly=false 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_periscope.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 |