├── .gradle
├── 4.3.1
│ ├── fileChanges
│ │ └── last-build.bin
│ ├── fileContent
│ │ └── fileContent.lock
│ ├── fileHashes
│ │ ├── fileHashes.bin
│ │ ├── fileHashes.lock
│ │ └── resourceHashesCache.bin
│ ├── javaCompile
│ │ ├── classAnalysis.bin
│ │ ├── jarAnalysis.bin
│ │ ├── javaCompile.lock
│ │ ├── taskHistory.bin
│ │ └── taskJars.bin
│ └── taskHistory
│ │ ├── taskHistory.bin
│ │ └── taskHistory.lock
├── 4.6
│ ├── fileChanges
│ │ └── last-build.bin
│ ├── fileContent
│ │ └── fileContent.lock
│ ├── fileHashes
│ │ ├── fileHashes.bin
│ │ ├── fileHashes.lock
│ │ └── resourceHashesCache.bin
│ ├── javaCompile
│ │ ├── classAnalysis.bin
│ │ ├── jarAnalysis.bin
│ │ ├── javaCompile.lock
│ │ ├── taskHistory.bin
│ │ └── taskJars.bin
│ └── taskHistory
│ │ ├── taskHistory.bin
│ │ └── taskHistory.lock
├── buildOutputCleanup
│ ├── buildOutputCleanup.lock
│ ├── cache.properties
│ └── outputFiles.bin
└── vcsWorkingDirs
│ └── gc.properties
├── .idea
├── caches
│ └── build_file_checksums.ser
├── codeStyles
│ └── Project.xml
├── gradle.xml
├── libraries
│ ├── Gradle__com_android_support_animated_vector_drawable_26_0_0.xml
│ ├── Gradle__com_android_support_appcompat_v7_26_0_0.xml
│ ├── Gradle__com_android_support_recyclerview_v7_26_0_0.xml
│ ├── Gradle__com_android_support_support_annotations_26_0_0_jar.xml
│ ├── Gradle__com_android_support_support_compat_26_0_0.xml
│ ├── Gradle__com_android_support_support_core_ui_26_0_0.xml
│ ├── Gradle__com_android_support_support_core_utils_26_0_0.xml
│ ├── Gradle__com_android_support_support_fragment_26_0_0.xml
│ ├── Gradle__com_android_support_support_media_compat_26_0_0.xml
│ ├── Gradle__com_android_support_support_v4_26_0_0.xml
│ ├── Gradle__com_android_support_support_vector_drawable_26_0_0.xml
│ ├── Gradle__com_android_support_test_espresso_espresso_core_2_2_2.xml
│ ├── Gradle__com_android_support_test_espresso_espresso_idling_resource_2_2_2.xml
│ ├── Gradle__com_android_support_test_exposed_instrumentation_api_publish_0_5.xml
│ ├── Gradle__com_android_support_test_rules_0_5.xml
│ ├── Gradle__com_android_support_test_runner_0_5.xml
│ ├── Gradle__com_github_CymChad_BaseRecyclerViewAdapterHelper_2_9_34.xml
│ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
│ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml
│ ├── Gradle__javax_annotation_javax_annotation_api_1_2_jar.xml
│ ├── Gradle__javax_inject_javax_inject_1_jar.xml
│ ├── Gradle__junit_junit_4_12_jar.xml
│ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
│ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
│ └── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── AndroidCustomView.iml
├── README.md
├── animation_button.md
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── stormdzh
│ │ └── androidcustomview
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── stormdzh
│ │ │ └── androidcustomview
│ │ │ ├── activity
│ │ │ ├── AnimationBtnActivity.java
│ │ │ ├── AnimationViewActivity.java
│ │ │ ├── BannerActivity.java
│ │ │ ├── BubbleViewActivity.java
│ │ │ ├── DragBallActivity.java
│ │ │ ├── FingerprintActivity.java
│ │ │ ├── HoverItemActivity.java
│ │ │ ├── ItemCenterRVActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MediaCameraActivity.java
│ │ │ ├── PayPsdViewActivity.java
│ │ │ ├── ProgressBarActivity.java
│ │ │ ├── RadarActivity.java
│ │ │ ├── SurfaceViewBubbleActivity.java
│ │ │ ├── TestActivity.java
│ │ │ ├── WaveByBezierActivity.java
│ │ │ └── WaveBySinCosActivity.java
│ │ │ ├── adapter
│ │ │ ├── HoverAdapter.java
│ │ │ ├── ItemCenter2Adapter.java
│ │ │ ├── ItemCenterAdapter.java
│ │ │ └── MainAdapter.java
│ │ │ ├── bean
│ │ │ ├── CircleBean.java
│ │ │ ├── TypeBean.java
│ │ │ ├── UserBean.java
│ │ │ └── WaveBean.java
│ │ │ ├── tagview
│ │ │ ├── TagActivity.java
│ │ │ ├── TagAdapter.java
│ │ │ ├── TagBean.java
│ │ │ └── recyclerview.md
│ │ │ ├── utils
│ │ │ ├── BezierUtil.java
│ │ │ ├── CharacterParser.java
│ │ │ ├── DisplayUtils.java
│ │ │ ├── FingerprintUtil.java
│ │ │ ├── PinyinComparator.java
│ │ │ └── mediacamera
│ │ │ │ ├── FileUtils.java
│ │ │ │ └── helper
│ │ │ │ ├── MediaHelper.java
│ │ │ │ └── PermissionHelper.java
│ │ │ └── widget
│ │ │ ├── AnimationButton.java
│ │ │ ├── BaseView.java
│ │ │ ├── BubbleView.java
│ │ │ ├── BubbleView2.java
│ │ │ ├── CircleProgressBarView.java
│ │ │ ├── DividerItemDecoration.java
│ │ │ ├── DragBallView.java
│ │ │ ├── FadeInTextView.java
│ │ │ ├── HorizontalProgressBar.java
│ │ │ ├── HoverItemDecoration.java
│ │ │ ├── IndexView.java
│ │ │ ├── IndicatorView.java
│ │ │ ├── ItemCenterRecyclerView.java
│ │ │ ├── LoadingButton.java
│ │ │ ├── LoadingLineView.java
│ │ │ ├── LoadingView.java
│ │ │ ├── PayPsdInputView.java
│ │ │ ├── ProductProgressBar.java
│ │ │ ├── RadarWaveView.java
│ │ │ ├── SuperDividerItemDecoration.java
│ │ │ ├── SurfaceBubbleView.java
│ │ │ ├── TXWaveViewByBezier.java
│ │ │ ├── TxBubbleLayout.java
│ │ │ ├── WaveViewByBezier.java
│ │ │ ├── WaveViewBySinCos.java
│ │ │ └── banner
│ │ │ ├── BannerView.java
│ │ │ ├── PagerOptions.java
│ │ │ ├── adapter
│ │ │ └── BannerViewPagerAdapter.java
│ │ │ ├── holder
│ │ │ ├── BannerViewHolder.java
│ │ │ └── BannerViewHolderCreator.java
│ │ │ └── listener
│ │ │ ├── OnPageChangeListener.java
│ │ │ └── OnPageClickListener.java
│ └── res
│ │ ├── drawable
│ │ ├── background_gradual_assarts.xml
│ │ ├── progress_color_horizontal.xml
│ │ ├── ripple_circle.xml
│ │ ├── shape_circle_bg.xml
│ │ ├── tag_bg_selector.xml
│ │ ├── tag_checked_bg.xml
│ │ ├── tag_normal_bg.xml
│ │ ├── tag_text_selector.xml
│ │ └── video_seekbar.xml
│ │ ├── layout
│ │ ├── activity_animation_btn.xml
│ │ ├── activity_animation_view.xml
│ │ ├── activity_banner.xml
│ │ ├── activity_bubble_view.xml
│ │ ├── activity_drag_ball.xml
│ │ ├── activity_finger_print.xml
│ │ ├── activity_hover_item.xml
│ │ ├── activity_item_center.xml
│ │ ├── activity_main.xml
│ │ ├── activity_mediacamera.xml
│ │ ├── activity_pay_psd_view.xml
│ │ ├── activity_pregress_bar.xml
│ │ ├── activity_radar.xml
│ │ ├── activity_surfaceview_bubble.xml
│ │ ├── activity_tag.xml
│ │ ├── activity_test.xml
│ │ ├── activity_wave_by_bezier.xml
│ │ ├── activity_wave_by_sin_cos.xml
│ │ ├── activity_webview.xml
│ │ ├── adapter_item_center.xml
│ │ ├── adapter_item_center2.xml
│ │ ├── adapter_item_hover_user.xml
│ │ ├── adapter_item_main.xml
│ │ ├── banner_item.xml
│ │ ├── banner_view_layout.xml
│ │ └── tag_layout.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ ├── beijing2x.jpg
│ │ ├── ic_launcher.png
│ │ └── start_logo_group.png
│ │ ├── mipmap-xxhdpi
│ │ ├── app_download.png
│ │ ├── banner_point_disabled.png
│ │ ├── banner_point_enabled.png
│ │ ├── bt_start.png
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_round.png
│ │ ├── icon_back_white.png
│ │ ├── icon_fanzhuan.png
│ │ ├── icon_video_ing.png
│ │ ├── kaibo_icon_huakuai.png
│ │ ├── live_close_icon.png
│ │ └── progress_tip_icon.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── beijing.jpg
│ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── stormdzh
│ └── androidcustomview
│ └── ExampleUnitTest.java
├── build.gradle
├── build
└── android-profile
│ ├── profile-2019-07-17-10-53-57-206.json
│ ├── profile-2019-07-17-10-53-57-206.rawproto
│ ├── profile-2019-07-17-10-55-29-933.json
│ ├── profile-2019-07-17-10-55-29-933.rawproto
│ ├── profile-2019-07-17-10-57-05-746.json
│ ├── profile-2019-07-17-10-57-05-746.rawproto
│ ├── profile-2019-07-17-10-57-33-584.json
│ ├── profile-2019-07-17-10-57-33-584.rawproto
│ ├── profile-2019-07-17-10-58-43-275.json
│ ├── profile-2019-07-17-10-58-43-275.rawproto
│ ├── profile-2019-07-17-11-03-43-295.json
│ ├── profile-2019-07-17-11-03-43-295.rawproto
│ ├── profile-2019-07-17-11-04-59-548.json
│ ├── profile-2019-07-17-11-04-59-548.rawproto
│ ├── profile-2019-07-17-11-11-52-506.json
│ ├── profile-2019-07-17-11-11-52-506.rawproto
│ ├── profile-2019-07-17-11-28-03-355.json
│ ├── profile-2019-07-17-11-28-03-355.rawproto
│ ├── profile-2019-07-17-11-28-33-124.json
│ ├── profile-2019-07-17-11-28-33-124.rawproto
│ ├── profile-2019-07-18-09-52-36-364.json
│ ├── profile-2019-07-18-09-52-36-364.rawproto
│ ├── profile-2019-07-18-09-52-39-201.json
│ ├── profile-2019-07-18-09-52-39-201.rawproto
│ ├── profile-2019-07-18-10-16-24-458.json
│ ├── profile-2019-07-18-10-16-24-458.rawproto
│ ├── profile-2019-07-18-10-17-14-983.json
│ ├── profile-2019-07-18-10-17-14-983.rawproto
│ ├── profile-2019-07-18-10-18-41-458.json
│ ├── profile-2019-07-18-10-18-41-458.rawproto
│ ├── profile-2019-07-18-10-19-19-448.json
│ ├── profile-2019-07-18-10-19-19-448.rawproto
│ ├── profile-2019-07-18-10-20-12-501.json
│ ├── profile-2019-07-18-10-20-12-501.rawproto
│ ├── profile-2019-07-18-10-23-14-475.json
│ ├── profile-2019-07-18-10-23-14-475.rawproto
│ ├── profile-2019-07-18-10-24-21-603.json
│ ├── profile-2019-07-18-10-24-21-603.rawproto
│ ├── profile-2019-07-18-10-24-28-045.json
│ ├── profile-2019-07-18-10-24-28-045.rawproto
│ ├── profile-2019-07-18-10-27-24-008.json
│ ├── profile-2019-07-18-10-27-24-008.rawproto
│ ├── profile-2019-07-18-10-28-46-717.json
│ ├── profile-2019-07-18-10-28-46-717.rawproto
│ ├── profile-2019-07-18-10-30-21-252.json
│ ├── profile-2019-07-18-10-30-21-252.rawproto
│ ├── profile-2019-07-18-10-30-59-125.json
│ ├── profile-2019-07-18-10-30-59-125.rawproto
│ ├── profile-2019-07-18-10-33-59-198.json
│ ├── profile-2019-07-18-10-33-59-198.rawproto
│ ├── profile-2019-07-18-10-34-40-195.json
│ ├── profile-2019-07-18-10-34-40-195.rawproto
│ ├── profile-2019-07-18-10-38-07-106.json
│ ├── profile-2019-07-18-10-38-07-106.rawproto
│ ├── profile-2019-07-18-10-38-34-907.json
│ ├── profile-2019-07-18-10-38-34-907.rawproto
│ ├── profile-2019-07-18-10-39-02-918.json
│ ├── profile-2019-07-18-10-39-02-918.rawproto
│ ├── profile-2019-07-18-10-39-29-007.json
│ ├── profile-2019-07-18-10-39-29-007.rawproto
│ ├── profile-2019-07-18-10-39-46-545.json
│ ├── profile-2019-07-18-10-39-46-545.rawproto
│ ├── profile-2019-07-18-10-40-41-007.json
│ ├── profile-2019-07-18-10-40-41-007.rawproto
│ ├── profile-2019-07-18-10-44-05-090.json
│ ├── profile-2019-07-18-10-44-05-090.rawproto
│ ├── profile-2019-07-18-10-44-43-192.json
│ ├── profile-2019-07-18-10-44-43-192.rawproto
│ ├── profile-2019-07-18-10-58-22-308.json
│ ├── profile-2019-07-18-10-58-22-308.rawproto
│ ├── profile-2019-07-18-11-01-10-802.json
│ ├── profile-2019-07-18-11-01-10-802.rawproto
│ ├── profile-2019-07-18-11-01-11-954.json
│ ├── profile-2019-07-18-11-01-11-954.rawproto
│ ├── profile-2019-07-18-11-15-24-083.json
│ ├── profile-2019-07-18-11-15-24-083.rawproto
│ ├── profile-2019-07-18-11-16-35-190.json
│ ├── profile-2019-07-18-11-16-35-190.rawproto
│ ├── profile-2019-07-18-11-16-48-169.json
│ └── profile-2019-07-18-11-16-48-169.rawproto
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
├── pay_psd_input_view.md
├── progress.md
└── settings.gradle
/.gradle/4.3.1/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/4.3.1/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/.gradle/4.3.1/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/.gradle/4.3.1/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/4.3.1/fileHashes/resourceHashesCache.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/fileHashes/resourceHashesCache.bin
--------------------------------------------------------------------------------
/.gradle/4.3.1/javaCompile/classAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/javaCompile/classAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/4.3.1/javaCompile/jarAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/javaCompile/jarAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/4.3.1/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/.gradle/4.3.1/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/4.3.1/javaCompile/taskJars.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/javaCompile/taskJars.bin
--------------------------------------------------------------------------------
/.gradle/4.3.1/taskHistory/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/taskHistory/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/4.3.1/taskHistory/taskHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.3.1/taskHistory/taskHistory.lock
--------------------------------------------------------------------------------
/.gradle/4.6/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/4.6/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/.gradle/4.6/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/.gradle/4.6/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/4.6/fileHashes/resourceHashesCache.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/fileHashes/resourceHashesCache.bin
--------------------------------------------------------------------------------
/.gradle/4.6/javaCompile/classAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/javaCompile/classAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/4.6/javaCompile/jarAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/javaCompile/jarAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/4.6/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/.gradle/4.6/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/4.6/javaCompile/taskJars.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/javaCompile/taskJars.bin
--------------------------------------------------------------------------------
/.gradle/4.6/taskHistory/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/taskHistory/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/4.6/taskHistory/taskHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/4.6/taskHistory/taskHistory.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Wed Jul 17 10:16:53 CST 2019
2 | gradle.version=4.3.1
3 |
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/outputFiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/buildOutputCleanup/outputFiles.bin
--------------------------------------------------------------------------------
/.gradle/vcsWorkingDirs/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.gradle/vcsWorkingDirs/gc.properties
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormdzh/AndroidCustomView/88e2dd2d889b6212228ad5292b92b978b975bc97/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
9 |
17 |
22 |
29 |
27 | * @author : xiaoyao 28 | * e-mail : xiaoyao@51vest.com 29 | * date : 2018/03/09 30 | * desc : 31 | * version : 1.0 32 | *33 | */ 34 | 35 | public class BannerActivity extends AppCompatActivity { 36 | 37 | private BannerView bannerView; 38 | private List
24 | * @author : xiaoyao 25 | * e-mail : xiaoyao@51vest.com 26 | * date : 2018/04/16 27 | * desc : 28 | * version : 1.0 29 | *30 | */ 31 | 32 | public class HoverItemActivity extends AppCompatActivity { 33 | private RecyclerView recyclerView; 34 | private IndexView indexView; 35 | private TextView showTextDialog; 36 | 37 | private HoverAdapter adapter; 38 | 39 | private List
21 | * @author : xiaoyao 22 | * e-mail : xiaoyao@51vest.com 23 | * date : 2018/05/07 24 | * desc : 25 | * version : 1.0 26 | *27 | */ 28 | 29 | public class ItemCenterRVActivity extends AppCompatActivity { 30 | private ItemCenterRecyclerView recyclerView; 31 | private ItemCenterRecyclerView recyclerView2; 32 | private ItemCenterAdapter adapter; 33 | private ItemCenter2Adapter adapter2; 34 | @Override 35 | protected void onCreate(@Nullable Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.activity_item_center); 38 | 39 | 40 | recyclerView = (ItemCenterRecyclerView) findViewById(R.id.recycler_view); 41 | recyclerView2 = (ItemCenterRecyclerView) findViewById(R.id.recycler_view_2); 42 | 43 | initRv(recyclerView); 44 | initRv(recyclerView2); 45 | recyclerView.setAdapter(adapter); 46 | recyclerView2.setAdapter(adapter2); 47 | 48 | // recyclerView2.addItemDecoration(new DividerItemDecoration(this,DividerItemDecoration.HORIZONTAL_LIST)); 49 | setSyncScroll(recyclerView,recyclerView2); 50 | 51 | } 52 | 53 | private void initRv(ItemCenterRecyclerView recyclerView) { 54 | LinearLayoutManager layoutManager = new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false); 55 | recyclerView.setLayoutManager(layoutManager); 56 | 57 | LinearSnapHelper linearSnapHelper = new LinearSnapHelper(); 58 | linearSnapHelper.attachToRecyclerView(recyclerView); 59 | 60 | adapter = new ItemCenterAdapter(this,recyclerView,getData()); 61 | adapter2 = new ItemCenter2Adapter(this,recyclerView,getData()); 62 | } 63 | 64 | private List
14 | * @author : xiaoyao 15 | * e-mail : xiaoyao@51vest.com 16 | * date : 2018/04/16 17 | * desc : 18 | * version : 1.0 19 | *20 | */ 21 | 22 | public class HoverAdapter extends BaseQuickAdapter
18 | * @author : xiaoyao 19 | * e-mail : xiaoyao@51vest.com 20 | * date : 2018/05/07 21 | * desc : 22 | * version : 1.0 23 | *24 | */ 25 | 26 | public class ItemCenter2Adapter extends BaseQuickAdapter
18 | * @author : xiaoyao 19 | * e-mail : xiaoyao@51vest.com 20 | * date : 2018/05/07 21 | * desc : 22 | * version : 1.0 23 | *24 | */ 25 | 26 | public class ItemCenterAdapter extends BaseQuickAdapter
14 | * @author : xiaoyao 15 | * e-mail : xiaoyao@51vest.com 16 | * date : 2018/05/14 17 | * desc : 18 | * version : 1.0 19 | *20 | */ 21 | 22 | public class MainAdapter extends BaseQuickAdapter
5 | * @author : xiaoyao 6 | * e-mail : xiaoyao@51vest.com 7 | * date : 2018/05/14 8 | * desc : 9 | * version : 1.0 10 | *11 | */ 12 | 13 | public class TypeBean { 14 | private String title; 15 | private int type; 16 | 17 | public TypeBean(String title, int type) { 18 | this.title = title; 19 | this.type = type; 20 | } 21 | 22 | public String getTitle() { 23 | return title; 24 | } 25 | 26 | public void setTitle(String title) { 27 | this.title = title; 28 | } 29 | 30 | public int getType() { 31 | return type; 32 | } 33 | 34 | public void setType(int type) { 35 | this.type = type; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/stormdzh/androidcustomview/bean/UserBean.java: -------------------------------------------------------------------------------- 1 | package com.stormdzh.androidcustomview.bean; 2 | 3 | /** 4 | *
5 | * @author : xiaoyao 6 | * e-mail : xiaoyao@51vest.com 7 | * date : 2018/04/16 8 | * desc : 9 | * version : 1.0 10 | *11 | */ 12 | 13 | public class UserBean { 14 | private String userName; 15 | private String sortLetters=""; 16 | 17 | 18 | public String getUserName() { 19 | return userName; 20 | } 21 | 22 | public void setUserName(String userName) { 23 | this.userName = userName; 24 | } 25 | 26 | public String getSortLetters() { 27 | return sortLetters; 28 | } 29 | 30 | public void setSortLetters(String sortLetters) { 31 | this.sortLetters = sortLetters; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/stormdzh/androidcustomview/bean/WaveBean.java: -------------------------------------------------------------------------------- 1 | package com.stormdzh.androidcustomview.bean; 2 | 3 | /** 4 | * Created by allen on 2016/12/14. 5 | * 水波参数的实体 6 | */ 7 | 8 | public class WaveBean { 9 | 10 | private int waveLength; 11 | 12 | private int waveAmplitude; 13 | 14 | private int waveColor; 15 | 16 | private int waveType; 17 | 18 | private int duration; 19 | 20 | public int getWaveLength() { 21 | return waveLength; 22 | } 23 | 24 | public void setWaveLength(int waveLength) { 25 | this.waveLength = waveLength; 26 | } 27 | 28 | public int getWaveAmplitude() { 29 | return waveAmplitude; 30 | } 31 | 32 | public void setWaveAmplitude(int waveAmplitude) { 33 | this.waveAmplitude = waveAmplitude; 34 | } 35 | 36 | public int getWaveColor() { 37 | return waveColor; 38 | } 39 | 40 | public void setWaveColor(int waveColor) { 41 | this.waveColor = waveColor; 42 | } 43 | 44 | public int getWaveType() { 45 | return waveType; 46 | } 47 | 48 | public void setWaveType(int waveType) { 49 | this.waveType = waveType; 50 | } 51 | 52 | public int getDuration() { 53 | return duration; 54 | } 55 | 56 | public void setDuration(int duration) { 57 | this.duration = duration; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/stormdzh/androidcustomview/tagview/TagActivity.java: -------------------------------------------------------------------------------- 1 | package com.stormdzh.androidcustomview.tagview; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | import android.support.v7.widget.GridLayoutManager; 6 | import android.support.v7.widget.RecyclerView; 7 | 8 | import com.stormdzh.androidcustomview.R; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | public class TagActivity extends AppCompatActivity { 14 | 15 | private RecyclerView tagRecyclerView; 16 | 17 | private static final int MAX = 9; 18 | private List
8 | * 贝塞尔曲线计算工具类
9 | */
10 |
11 | public class BezierUtil {
12 |
13 |
14 | /**
15 | * 二阶贝塞尔曲线
16 | * B(t) = Po*(1-t)^2 + 2*p1*t*(1-t)+t^2*p2
17 | *
18 | * @param t 曲线长度比例
19 | * @param p0 起始点
20 | * @param p1 控制点
21 | * @param p2 终止点
22 | * @return t对应的点
23 | */
24 | public static PointF CalculateBezierPointForQuadratic(float t, PointF p0, PointF p1, PointF p2) {
25 | PointF point = new PointF();
26 | float temp = 1 - t;
27 | // point.x = temp * temp * p0.x + 2 * t * temp * p1.x + t * t * p2.x;
28 | // point.y = temp * temp * p0.y + 2 * t * temp * p1.y + t * t * p2.y;
29 | point.x = (float) (Math.pow(temp, 2) * p0.x + 2 * t * temp * p1.x + Math.pow(t, 2) * p2.x);
30 | point.y = (float) (Math.pow(temp, 2) * p0.y + 2 * t * temp * p1.y + Math.pow(t, 2) * p2.y);
31 | return point;
32 | }
33 |
34 | /**
35 | * 三
36 | * 阶贝塞尔曲线
37 | * B(t) = Po*(1-t)^3 + 3*p1*t*(1-t)^2+3*p2*t^2*(1-t)+p3*t^3,
38 | *
39 | * @param t 曲线长度比例
40 | * @param p0 起始点
41 | * @param p1 控制点1
42 | * @param p2 控制点2
43 | * @param p3 终止点
44 | * @return t对应的点
45 | */
46 | public static PointF CalculateBezierPointForCubic(float t, PointF p0, PointF p1, PointF p2, PointF p3) {
47 | PointF point = new PointF();
48 | float temp = 1 - t;
49 | // point.x = p0.x * temp * temp * temp + 3 * p1.x * t * temp * temp + 3 * p2.x * t * t * temp + p3.x * t * t * t;
50 | // point.y = p0.y * temp * temp * temp + 3 * p1.y * t * temp * temp + 3 * p2.y * t * t * temp + p3.y * t * t * t;
51 | point.x = (float) (p0.x * Math.pow(temp, 3) + 3 * p1.x * t * Math.pow(temp, 2) + 3 * p2.x * Math.pow(t, 2) * temp + p3.x * Math.pow(t, 3));
52 | point.y = (float) (p0.y * Math.pow(temp, 3) + 3 * p1.y * t * Math.pow(temp, 2) + 3 * p2.y * Math.pow(t, 2) * temp + p3.y * Math.pow(t, 3));
53 | return point;
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stormdzh/androidcustomview/utils/DisplayUtils.java:
--------------------------------------------------------------------------------
1 | package com.stormdzh.androidcustomview.utils;
2 |
3 | import android.content.Context;
4 | import android.util.DisplayMetrics;
5 | import android.view.WindowManager;
6 |
7 | /**
8 | * 与屏幕信息有关的类,包括屏幕的长宽、分辨率、长度换算
9 | *
10 | */
11 | public class DisplayUtils {
12 |
13 |
14 | /**
15 | * 获取屏幕分辨率
16 | * @param context
17 | * @return
18 | */
19 | public static int[] getScreenDispaly(Context context) {
20 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
21 | int width = windowManager.getDefaultDisplay().getWidth();// 手机屏幕的宽度
22 | int height = windowManager.getDefaultDisplay().getHeight();// 手机屏幕的高度
23 | int result[] = { width, height };
24 | return result;
25 | }
26 |
27 | /** 获取屏幕宽度 */
28 | public static int getDisplayWidth(Context context) {
29 | if (context != null) {
30 | DisplayMetrics dm = context.getResources().getDisplayMetrics();
31 | int w_screen = dm.widthPixels;
32 | // int h_screen = dm.heightPixels;
33 | return w_screen;
34 | }
35 | return 720;
36 | }
37 |
38 | /** 获取屏幕高度 */
39 | public static int getDisplayHight(Context context) {
40 | if (context != null) {
41 | DisplayMetrics dm = context.getResources().getDisplayMetrics();
42 | // int w_screen = dm.widthPixels;
43 | int h_screen = dm.heightPixels;
44 | return h_screen;
45 | }
46 | return 1280;
47 | }
48 |
49 | public static int dip2px(Context context, float dipValue) {
50 | final float scale = context.getResources().getDisplayMetrics().density;
51 | return (int) (dipValue * scale + 0.5f);
52 | }
53 |
54 | public static int px2dip(Context context, float pxValue) {
55 | final float scale = context.getResources().getDisplayMetrics().density;
56 | return (int) (pxValue / scale + 0.5f);
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stormdzh/androidcustomview/utils/FingerprintUtil.java:
--------------------------------------------------------------------------------
1 | package com.stormdzh.androidcustomview.utils;
2 |
3 | import android.app.KeyguardManager;
4 | import android.content.Context;
5 | import android.os.Build;
6 | import android.os.Bundle;
7 | import android.support.v4.hardware.fingerprint.FingerprintManagerCompat;
8 | import android.support.v4.os.CancellationSignal;
9 |
10 | /**
11 | * Created by xiaoyao on 2017/9/14.
12 | * 指纹识别工具类
13 | */
14 |
15 | public class FingerprintUtil {
16 |
17 | private static CancellationSignal cancellationSignal;
18 |
19 | public static void callFingerPrint(Context context, final OnCallBackListener listener) {
20 |
21 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
22 | return;
23 | }
24 | FingerprintManagerCompat managerCompat = FingerprintManagerCompat.from(context);
25 | if (!managerCompat.isHardwareDetected()) { //判断设备是否支持
26 | if (listener != null)
27 | listener.onSupportFailed();
28 | return;
29 | }
30 |
31 | KeyguardManager keyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
32 | if (!keyguardManager.isKeyguardSecure()) {//判断设备是否处于安全保护中
33 | if (listener != null)
34 | listener.onInsecurity();
35 | return;
36 | }
37 |
38 | if (!managerCompat.hasEnrolledFingerprints()) { //判断设备是否已经注册过指纹
39 | if (listener != null)
40 | listener.onEnrollFailed(); //未注册
41 | return;
42 | }
43 |
44 | if (listener != null)
45 | listener.onAuthenticationStart(); //开始指纹识别
46 |
47 | cancellationSignal = new CancellationSignal(); //必须重新实例化,否则cancel 过一次就不能再使用了
48 |
49 | managerCompat.authenticate(null, 0, cancellationSignal, new FingerprintManagerCompat.AuthenticationCallback() {
50 | // 当出现错误的时候回调此函数,比如多次尝试都失败了的时候,errString是错误信息,比如华为的提示就是:尝试次数过多,请稍后再试。
51 | @Override
52 | public void onAuthenticationError(int errMsgId, CharSequence errString) {
53 | if (listener != null)
54 | listener.onAuthenticationError(errMsgId, errString);
55 | }
56 |
57 | // 当指纹验证失败的时候会回调此函数,失败之后允许多次尝试,失败次数过多会停止响应一段时间然后再停止sensor的工作
58 | @Override
59 | public void onAuthenticationFailed() {
60 | if (listener != null)
61 | listener.onAuthenticationFailed();
62 | }
63 |
64 | @Override
65 | public void onAuthenticationHelp(int helpMsgId, CharSequence helpString) {
66 | if (listener != null)
67 | listener.onAuthenticationHelp(helpMsgId, helpString);
68 | }
69 |
70 | // 当验证的指纹成功时会回调此函数,然后不再监听指纹sensor
71 | @Override
72 | public void onAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result) {
73 | if (listener != null)
74 | listener.onAuthenticationSucceeded(result);
75 | }
76 | }, null);
77 |
78 | }
79 |
80 | public interface OnCallBackListener {
81 | void onSupportFailed();
82 |
83 | void onInsecurity();
84 |
85 | void onEnrollFailed();
86 |
87 | void onAuthenticationStart();
88 |
89 | void onAuthenticationError(int errMsgId, CharSequence errString);
90 |
91 | void onAuthenticationFailed();
92 |
93 | void onAuthenticationHelp(int helpMsgId, CharSequence helpString);
94 |
95 | void onAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result);
96 | }
97 |
98 | public static void cancel() {
99 | if (cancellationSignal != null)
100 | cancellationSignal.cancel();
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stormdzh/androidcustomview/utils/PinyinComparator.java:
--------------------------------------------------------------------------------
1 | package com.stormdzh.androidcustomview.utils;
2 |
3 |
4 | import com.stormdzh.androidcustomview.bean.UserBean;
5 |
6 | import java.util.Comparator;
7 |
8 | public class PinyinComparator implements Comparator
14 | * @author : xiaoyao
15 | * e-mail : xiaoyao@51vest.com
16 | * date : 2018/02/05
17 | * desc : recyclerview的分割线
18 | * version : 1.0
19 | *
20 | */
21 |
22 | public class DividerItemDecoration extends RecyclerView.ItemDecoration {
23 | private static final int[] ATTRS = new int[]{android.R.attr.listDivider};
24 |
25 | public static final int HORIZONTAL_LIST = LinearLayoutManager.HORIZONTAL;
26 |
27 | public static final int VERTICAL_LIST = LinearLayoutManager.VERTICAL;
28 |
29 |
30 | private Drawable mDivider;
31 |
32 | private int mOrientation;
33 |
34 | private Context context;
35 |
36 | public DividerItemDecoration(Context context, int orientation) {
37 | final TypedArray a = context.obtainStyledAttributes(ATTRS);
38 | mDivider = a.getDrawable(0);
39 | this.context = context;
40 | a.recycle();
41 | setOrientation(orientation);
42 | }
43 |
44 | public void setOrientation(int orientation) {
45 | if (orientation != HORIZONTAL_LIST && orientation != VERTICAL_LIST) {
46 | throw new IllegalArgumentException("invalid orientation");
47 | }
48 | mOrientation = orientation;
49 | }
50 |
51 | @Override
52 | public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) {
53 | super.onDraw(c, parent, state);
54 | if (mOrientation == VERTICAL_LIST) {
55 | drawVertical(c, parent);
56 | } else {
57 | drawHorizontal(c, parent);
58 | }
59 | }
60 |
61 | public void drawVertical(Canvas c, RecyclerView parent) {
62 | final int left = parent.getPaddingLeft() + dip2px(context, 0);
63 | final int right = parent.getWidth() - parent.getPaddingRight() - dip2px(context, 0);
64 |
65 | final int childCount = parent.getChildCount();
66 |
67 | for (int i = 0; i < childCount; i++) {
68 | final View child = parent.getChildAt(i);
69 | android.support.v7.widget.RecyclerView v = new android.support.v7.widget.RecyclerView(
70 | parent.getContext());
71 | final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
72 | .getLayoutParams();
73 | final int top = child.getBottom() + params.bottomMargin;
74 | final int bottom = top + mDivider.getIntrinsicHeight();
75 | mDivider.setBounds(left, top, right, bottom);
76 | mDivider.draw(c);
77 | }
78 | }
79 |
80 | public void drawHorizontal(Canvas c, RecyclerView parent) {
81 | final int top = parent.getPaddingTop();
82 | final int bottom = parent.getHeight() - parent.getPaddingBottom();
83 |
84 | final int childCount = parent.getChildCount();
85 | for (int i = 0; i < childCount; i++) {
86 | final View child = parent.getChildAt(i);
87 | final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
88 | .getLayoutParams();
89 | final int left = child.getRight() + params.rightMargin;
90 | final int right = left + mDivider.getIntrinsicHeight();
91 | mDivider.setBounds(left, top, right, bottom);
92 | mDivider.draw(c);
93 | }
94 | }
95 |
96 | @Override
97 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
98 | super.getItemOffsets(outRect, view, parent, state);
99 | if (mOrientation == VERTICAL_LIST) {
100 | outRect.set(0, 0, 0, mDivider.getIntrinsicHeight());
101 | } else {
102 | outRect.set(0, 0, mDivider.getIntrinsicWidth(), 0);
103 | }
104 | }
105 |
106 | /**
107 | * 单位转换工具类
108 | *
109 | * @param context 上下文对象
110 | * @param dipValue 值
111 | * @return 返回值
112 | */
113 | private int dip2px(Context context, float dipValue) {
114 | final float scale = context.getResources().getDisplayMetrics().density;
115 | return (int) (dipValue * scale + 0.5f);
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stormdzh/androidcustomview/widget/IndexView.java:
--------------------------------------------------------------------------------
1 | package com.stormdzh.androidcustomview.widget;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Paint;
6 | import android.util.AttributeSet;
7 | import android.view.MotionEvent;
8 | import android.view.View;
9 | import android.widget.TextView;
10 |
11 | /**
12 | * Created by allen on 2016/10/26.
13 | */
14 |
15 | public class IndexView extends View {
16 |
17 | private Context mContext;
18 | private TextView mShowTextDialog;
19 |
20 |
21 | private Paint mPaint;
22 |
23 | private int mWidth;
24 | private int mHeight;
25 |
26 | private int mCellWidth;
27 | private int mCellHeight;
28 |
29 | private int mWordSize;
30 | private int mwordColor;
31 | private int mChoose = -1;// 选中
32 |
33 |
34 | private int GRAY = 0xFFe8e8e8;
35 | private int DEFAULT_TEXT_COLOR = 0xFF999999;
36 |
37 | private static final String[] WORDS = new String[]{
38 | "↑", "☆", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K",
39 | "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W",
40 | "X", "Y", "Z", "#"
41 | };
42 |
43 | private OnTouchingLetterChangedListener mOnTouchingLetterChangedListener;
44 |
45 | public IndexView(Context context) {
46 | this(context, null);
47 | }
48 |
49 | public IndexView(Context context, AttributeSet attrs) {
50 | this(context, attrs, 0);
51 | }
52 |
53 | public IndexView(Context context, AttributeSet attrs, int defStyleAttr) {
54 | super(context, attrs, defStyleAttr);
55 | mContext = context;
56 | mWordSize = sp2px(mContext, 12);
57 | mwordColor = 0;
58 | initPaint();
59 | }
60 |
61 |
62 | public void setShowTextDialog(TextView textDialog) {
63 | this.mShowTextDialog = textDialog;
64 | }
65 |
66 | private void initPaint() {
67 | mPaint = new Paint();
68 | mPaint.setColor(DEFAULT_TEXT_COLOR);
69 | mPaint.setAntiAlias(true);
70 | mPaint.setTextSize(mWordSize);
71 | }
72 |
73 | @Override
74 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
75 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
76 | mWidth = getMeasuredWidth();
77 | mHeight = getMeasuredHeight();
78 |
79 | mCellHeight = mHeight / WORDS.length;
80 | }
81 |
82 | @Override
83 | protected void onDraw(Canvas canvas) {
84 | super.onDraw(canvas);
85 | for (int i = 0; i < WORDS.length; i++) {
86 | float xPos = mWidth / 2 - mPaint.measureText(WORDS[i]) / 2;
87 | float yPos = mCellHeight * i + mCellHeight;
88 | canvas.drawText(WORDS[i], xPos, yPos, mPaint);
89 | }
90 |
91 | }
92 |
93 | @Override
94 | public boolean onTouchEvent(MotionEvent event) {
95 | final int action = event.getAction();
96 | final float y = event.getY();// 点击y坐标
97 | final int oldChoose = mChoose;
98 | final int c = (int) (y / getHeight() * WORDS.length);// 点击y坐标所占总高度的比例*b数组的长度就等于点击b中的个数.
99 |
100 |
101 | switch (action) {
102 | case MotionEvent.ACTION_UP:
103 | setBackgroundColor(0x00000000);
104 | mChoose = -1;//
105 | invalidate();
106 | if (mShowTextDialog != null) {
107 | mShowTextDialog.setVisibility(View.INVISIBLE);
108 | }
109 | break;
110 |
111 | default:
112 | setBackgroundColor(GRAY);
113 | if (oldChoose != c) {
114 | if (c >= 0 && c < WORDS.length) {
115 | if (mOnTouchingLetterChangedListener != null) {
116 | mOnTouchingLetterChangedListener.onTouchingLetterChanged(WORDS[c]);
117 | }
118 | if (mShowTextDialog != null) {
119 | mShowTextDialog.setText(WORDS[c]);
120 | mShowTextDialog.setVisibility(View.VISIBLE);
121 | }
122 |
123 | mChoose = c;
124 | invalidate();
125 | }
126 | }
127 |
128 | break;
129 | }
130 | return true;
131 | }
132 |
133 |
134 | public void setOnTouchingLetterChangedListener(OnTouchingLetterChangedListener letterChangedListener) {
135 | mOnTouchingLetterChangedListener = letterChangedListener;
136 |
137 | }
138 |
139 | public interface OnTouchingLetterChangedListener {
140 | void onTouchingLetterChanged(String letter);
141 | }
142 |
143 | /**
144 | * 文字字体大小sp转换px
145 | *
146 | * @param context 上下文对象
147 | * @param spValue sp的值
148 | * @return 返回值
149 | */
150 | public int sp2px(Context context, float spValue) {
151 | final float scale = context.getResources().getDisplayMetrics().scaledDensity;
152 | return (int) (spValue * scale + 0.5f);
153 | }
154 | }
155 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stormdzh/androidcustomview/widget/ItemCenterRecyclerView.java:
--------------------------------------------------------------------------------
1 | package com.stormdzh.androidcustomview.widget;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.Nullable;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.util.AttributeSet;
7 | import android.util.Log;
8 | import android.view.View;
9 |
10 | /**
11 | *
12 | * @author : xiaoyao
13 | * e-mail : xiaoyao@51vest.com
14 | * date : 2018/05/07
15 | * desc :
16 | * version : 1.0
17 | *
18 | */
19 |
20 | public class ItemCenterRecyclerView extends RecyclerView {
21 |
22 |
23 | public ItemCenterRecyclerView(Context context) {
24 | super(context);
25 | }
26 |
27 | public ItemCenterRecyclerView(Context context, @Nullable AttributeSet attrs) {
28 | super(context, attrs);
29 | }
30 |
31 | public ItemCenterRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
32 | super(context, attrs, defStyle);
33 | }
34 |
35 | @Override
36 | public void onScrolled(int dx, int dy) {
37 | super.onScrolled(dx, dy);
38 |
39 | int childCount = getChildCount();
40 | Log.e("allen", childCount + "");
41 |
42 | int[] location = new int[2];
43 | for (int i = 0; i < childCount; i++) {
44 | View v = getChildAt(i);
45 | v.getLocationOnScreen(location);
46 |
47 | int recyclerViewCenterX = getLeft() + getWidth() / 2;
48 | int itemCenterX = location[0] + v.getWidth() / 2;
49 |
50 | //★两边的图片缩放比例
51 | float scale = 0.8f;
52 | //★某个item中心X坐标距recyclerView中心X坐标的偏移量
53 | int offX = Math.abs(itemCenterX - recyclerViewCenterX);
54 | //★在一个item的宽度范围内,item从1缩放至scale,那么改变了(1-scale),
55 | //从下列公式算出随着offX变化,item的变化缩放百分比
56 | float percent = offX * (1 - scale) / v.getWidth();
57 | //★取反哟
58 | float interpretateScale = 1 - percent;
59 | //这个if不走的话,得到的是多级渐变模式
60 | if (interpretateScale < scale) {
61 | interpretateScale = scale;
62 | }
63 | v.setScaleX((interpretateScale));
64 | v.setScaleY((interpretateScale));
65 | }
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stormdzh/androidcustomview/widget/SurfaceBubbleView.java:
--------------------------------------------------------------------------------
1 | package com.stormdzh.androidcustomview.widget;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Color;
6 | import android.graphics.Paint;
7 | import android.graphics.PixelFormat;
8 | import android.graphics.PorterDuff;
9 | import android.util.AttributeSet;
10 | import android.util.Log;
11 | import android.view.SurfaceHolder;
12 | import android.view.SurfaceView;
13 |
14 | /**
15 | * 使用参考:https://blog.csdn.net/qq_38261174/article/details/80057833
16 | *
17 | * @Description: 描述
18 | * @Author: dzh
19 | * @CreateDate: 2019/7/18 9:57 AM
20 | */
21 | public class SurfaceBubbleView extends SurfaceView implements SurfaceHolder.Callback {
22 |
23 | private SurfaceHolder holder;
24 | private UpdateViewThread updatethread;
25 | private boolean hasSurface;
26 | private Paint mPain;
27 |
28 | public SurfaceBubbleView(Context context) {
29 | this(context, null);
30 | }
31 |
32 | public SurfaceBubbleView(Context context, AttributeSet attrs) {
33 | this(context, attrs, 0);
34 | }
35 |
36 | public SurfaceBubbleView(Context context, AttributeSet attrs, int defStyleAttr) {
37 | super(context, attrs, defStyleAttr);
38 | init();
39 | }
40 |
41 | private void init() {
42 | holder = getHolder();
43 | holder.addCallback(this);//以自身作为callback,回调方法
44 |
45 | // 绘制透明
46 | setZOrderOnTop(true);
47 | getHolder().setFormat(PixelFormat.TRANSLUCENT);
48 |
49 | mPain = new Paint();
50 | mPain.setColor(Color.RED);
51 | }
52 |
53 | public void resume() {
54 | //创建和启动 图片更新线程
55 | if (updatethread == null) {
56 | updatethread = new UpdateViewThread();
57 | if (hasSurface == true) {
58 | updatethread.start();
59 | }
60 | }
61 | }
62 |
63 | public void pause() {
64 | //停止 图像更新线程
65 | if (updatethread != null) {
66 | updatethread.requestExitAndWait();
67 | updatethread = null;
68 | }
69 | }
70 |
71 | @Override
72 | public void surfaceCreated(SurfaceHolder surfaceHolder) {
73 | hasSurface = true;
74 | resume(); //开启线程更新
75 | }
76 |
77 | @Override
78 | public void surfaceChanged(SurfaceHolder surfaceHolder, int format, int width, int height) {
79 | if (updatethread != null) {
80 | updatethread.onWindowResize(width, height);
81 | }
82 |
83 | }
84 |
85 | @Override
86 | public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
87 | hasSurface = false;
88 | pause(); //停止线程更新
89 | }
90 |
91 |
92 | class UpdateViewThread extends Thread {
93 |
94 | //定义图像是否更新完成的标志
95 | private boolean done;
96 |
97 | public UpdateViewThread() {
98 | super();
99 | done = false;
100 |
101 | }
102 |
103 | @Override
104 | public void run() {
105 | Log.i("test", "run");
106 | SurfaceHolder surfaceholder = holder;
107 |
108 | while (!done) {
109 | Canvas canvas = surfaceholder.lockCanvas();//锁定surfaceview,准备绘制
110 | canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
111 |
112 |
113 | canvas.drawText("你好呀", 100, 100, mPain);
114 |
115 | surfaceholder.unlockCanvasAndPost(canvas);//解锁canvas,渲染绘制图像
116 | }
117 |
118 |
119 | //循环绘制,直到线程停止
120 | // while (!done) {
121 | // Canvas canvas = surfaceholder.lockCanvas();//锁定surfaceview,准备绘制
122 | // //绘制背景
123 | // canvas.drawBitmap(back, 0, 0, null);
124 | // //鱼游出屏幕外,重新初始化鱼的位置
125 | // if (fishx < 0) {
126 | // fishx = 778;
127 | // fishy = 500;
128 | // fishAngle = new Random().nextInt(60);
129 | // }
130 | // if (fishy < 0) {
131 | // fishx = 778;
132 | // fishy = 500;
133 | // fishAngle = new Random().nextInt(60);
134 | // }
135 | // //用matrix控制鱼的旋转角度和位置
136 | // matrix.reset();
137 | // matrix.setRotate(fishAngle);//下面的位置计算看图片的解释如下:
138 | // matrix.postTranslate(fishx -= fishSpeed * Math.cos(Math.toRadians(fishAngle)), fishy -= fishSpeed * Math.sin(Math.toRadians(fishAngle)));
139 | // canvas.drawBitmap(fishs[fishIndex++ % fishs.length], matrix, null);
140 | // surfaceholder.unlockCanvasAndPost(canvas);//解锁canvas,渲染绘制图像
141 | // try {
142 | // Thread.sleep(60);
143 | // } catch (Exception e) {
144 | // e.printStackTrace();
145 | // }
146 | //
147 | // }
148 | }
149 |
150 |
151 | public void requestExitAndWait() {
152 | //将绘制线程 标记为完成 ,并合并到主线程中
153 | done = true;
154 | try {
155 | join();
156 | } catch (Exception e) {
157 | e.printStackTrace();
158 | }
159 | }
160 |
161 | public void onWindowResize(int width, int height) {
162 | //处理surfaceview的大小改变事件
163 | }
164 | }
165 |
166 | }
167 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stormdzh/androidcustomview/widget/banner/adapter/BannerViewPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.stormdzh.androidcustomview.widget.banner.adapter;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.v4.view.PagerAdapter;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 |
8 | import com.stormdzh.androidcustomview.widget.banner.listener.OnPageClickListener;
9 | import com.stormdzh.androidcustomview.widget.banner.holder.BannerViewHolder;
10 | import com.stormdzh.androidcustomview.widget.banner.holder.BannerViewHolderCreator;
11 |
12 | import java.util.ArrayList;
13 | import java.util.List;
14 |
15 | /**
16 | *
17 | * @author : xiaoyao
18 | * e-mail : xiaoyao@51vest.com
19 | * date : 2018/03/02
20 | * desc :
21 | * version : 1.0
22 | *
23 | */
24 |
25 | public class BannerViewPagerAdapter
8 | * @author : xiaoyao
9 | * e-mail : xiaoyao@51vest.com
10 | * date : 2018/03/02
11 | * desc :
12 | * version : 1.0
13 | *
14 | */
15 |
16 | public interface BannerViewHolder
5 | * @author : xiaoyao
6 | * e-mail : xiaoyao@51vest.com
7 | * date : 2018/03/02
8 | * desc :
9 | * version : 1.0
10 | *
11 | */
12 |
13 | public interface BannerViewHolderCreator
5 | * @author : xiaoyao
6 | * e-mail : xiaoyao@51vest.com
7 | * date : 2018/03/09
8 | * desc :
9 | * version : 1.0
10 | *
11 | */
12 |
13 | public interface OnPageChangeListener {
14 |
15 | /**
16 | * item 选中事件
17 | *
18 | * @param position position
19 | */
20 | void onPageSelected(int position);
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stormdzh/androidcustomview/widget/banner/listener/OnPageClickListener.java:
--------------------------------------------------------------------------------
1 | package com.stormdzh.androidcustomview.widget.banner.listener;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | *
7 | * @author : xiaoyao
8 | * e-mail : xiaoyao@51vest.com
9 | * date : 2018/03/02
10 | * desc :
11 | * version : 1.0
12 | *
13 | */
14 |
15 | public interface OnPageClickListener {
16 |
17 | /**
18 | * item 点击事件
19 | *
20 | * @param view view
21 | * @param position position
22 | */
23 | void onPageClick(View view, int position);
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_gradual_assarts.xml:
--------------------------------------------------------------------------------
1 |
2 |