├── .gitignore
├── LICENSE
├── README.md
├── annotation
├── .gitignore
├── build.gradle
└── src
│ └── main
│ └── java
│ └── com
│ └── hyh
│ └── annotation
│ ├── Builder.java
│ └── InjectFragment.java
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── sky
│ │ └── hyh
│ │ └── customviewsamples
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ ├── HYQiHei-55S.ttf
│ │ ├── HYTangMeiRenJ-2.ttf
│ │ └── camera_addtext_font_jimu.ttf
│ ├── java
│ │ └── com
│ │ │ └── sky
│ │ │ └── hyh
│ │ │ └── customviewsamples
│ │ │ ├── MainActivity.java
│ │ │ ├── NestedChild.java
│ │ │ ├── NestedChildHelper.java
│ │ │ ├── NestedParent.java
│ │ │ ├── User.java
│ │ │ ├── adapter
│ │ │ └── ContactListAdapter.java
│ │ │ ├── constant
│ │ │ └── FlexTypeValue.java
│ │ │ ├── customview
│ │ │ ├── ArcGraphicView.java
│ │ │ ├── BaseSplitGridView.java
│ │ │ ├── ColorMatrixView.java
│ │ │ ├── ConLimitedLinesEditText.java
│ │ │ ├── CustomEmojiPanel.java
│ │ │ ├── DivideEqualLayout.java
│ │ │ ├── DyLimitedLinesEditText.java
│ │ │ ├── DynamicRoundTextView.java
│ │ │ ├── HappyNewYear2019.java
│ │ │ ├── HollowTextView.java
│ │ │ ├── HollowTextViewV2.java
│ │ │ ├── RoundMaskView.java
│ │ │ ├── SpanLineEditText.java
│ │ │ ├── StrokeTextView.java
│ │ │ ├── StrokeTextViewSimple.java
│ │ │ ├── automaitcEditText
│ │ │ │ ├── AutoEditText.java
│ │ │ │ ├── AutoProcessor.java
│ │ │ │ ├── LayoutHelper.java
│ │ │ │ └── TextSizeAdjustHelper.java
│ │ │ ├── coordinatelayout
│ │ │ │ ├── AppBarLayoutBehavior.java
│ │ │ │ ├── BaseAppBarLayout.java
│ │ │ │ ├── CoordinatePagerAdapter.java
│ │ │ │ ├── CustomCoordinateLayout.java
│ │ │ │ ├── CustomCoordinateLayout2.java
│ │ │ │ ├── CustomRecyclerView.java
│ │ │ │ ├── MyAppBarLayout.java
│ │ │ │ ├── NestedParentView.java
│ │ │ │ ├── RecyclerPagerItem.java
│ │ │ │ ├── RootLayout.java
│ │ │ │ ├── TabLayoutContainer.java
│ │ │ │ └── WhlBehavior.java
│ │ │ ├── customviewpager
│ │ │ │ ├── CustomViewPager.java
│ │ │ │ ├── GraduleTitleViewpager.java
│ │ │ │ ├── GraduleTitleViewpagerV2.java
│ │ │ │ ├── HorizontalTitleBar.java
│ │ │ │ ├── IndicatorLineUtil.java
│ │ │ │ ├── PagerItemView.java
│ │ │ │ ├── ScrollTabView.java
│ │ │ │ └── ViewPagerAdapter.java
│ │ │ ├── maskguide
│ │ │ │ ├── CircleAnimView.java
│ │ │ │ ├── GestureAnimGuideView.java
│ │ │ │ └── MaskGuideView.java
│ │ │ ├── ratinggridbar
│ │ │ │ └── RatingGridView.java
│ │ │ └── wrappedContainer
│ │ │ │ ├── ContainerView.java
│ │ │ │ ├── CustomDrawable.java
│ │ │ │ ├── WrappedContainer.java
│ │ │ │ └── WrappedContainer2.java
│ │ │ ├── danmu
│ │ │ ├── BarrageDispatch.java
│ │ │ ├── BarrageView.java
│ │ │ ├── BarrageViewFactory.java
│ │ │ └── BarrageWay.java
│ │ │ ├── entity
│ │ │ ├── CatAdapter.java
│ │ │ ├── CatViewHolder.java
│ │ │ ├── FlexAdapter.java
│ │ │ ├── FlexModel.java
│ │ │ ├── FlexViewHolder.java
│ │ │ ├── MobileContactObserver.java
│ │ │ ├── MobileContactSingleton.java
│ │ │ └── PhoneInfo.java
│ │ │ ├── fans
│ │ │ └── FpSpan.java
│ │ │ ├── fragment
│ │ │ └── impl
│ │ │ │ ├── AutomaticEditTextFragment.java
│ │ │ │ ├── ClipChildrenFragment.java
│ │ │ │ ├── ColorMatrixFragment.java
│ │ │ │ ├── ConLimitedEditTextFragment.java
│ │ │ │ ├── ContactFragment.java
│ │ │ │ ├── CoordinatorLayoutFragment.java
│ │ │ │ ├── CustomEmojiPanelFragment.java
│ │ │ │ ├── DanMuFragment.java
│ │ │ │ ├── DyLimitedEditTextFragment.java
│ │ │ │ ├── DynamicProxyFragment.java
│ │ │ │ ├── DynamicRoundTextViewFragment.java
│ │ │ │ ├── FlexBoxLayoutManagerFragment.java
│ │ │ │ ├── FpFragment.java
│ │ │ │ ├── GraduleTitleViewPagerFragment.java
│ │ │ │ ├── HappyNewYear2019Fragment.java
│ │ │ │ ├── HollowTextViewFragment.java
│ │ │ │ ├── InputFragment.java
│ │ │ │ ├── ItemAnimFragment.java
│ │ │ │ ├── MaskGuideViewFragment.java
│ │ │ │ ├── ProgressFragment.java
│ │ │ │ ├── RatingGridViewFragment.java
│ │ │ │ ├── RoundMaskViewFragment.java
│ │ │ │ ├── ShineTextFragment.java
│ │ │ │ ├── SpanFragment.java
│ │ │ │ ├── SpanLineEditTextFragment.java
│ │ │ │ ├── StrokeTextViewFragment.java
│ │ │ │ ├── SwayableLayoutFragment.java
│ │ │ │ └── WrappedContainerFragment.java
│ │ │ ├── practices
│ │ │ └── CustomLifeCircle.java
│ │ │ ├── proxy
│ │ │ ├── CachedProxy.java
│ │ │ ├── ConsumeProxy.java
│ │ │ ├── RealSubject.java
│ │ │ ├── Subject.java
│ │ │ └── ViewClickProxy.java
│ │ │ ├── recyclerviewdemo
│ │ │ ├── ItemAnimatorAdapter.java
│ │ │ └── itemanim
│ │ │ │ ├── BaseItemAnimator.java
│ │ │ │ ├── FadeItemAnimator.java
│ │ │ │ ├── RotateItemAnimator.java
│ │ │ │ ├── ScaleItemAnimator.java
│ │ │ │ └── SlideItemAnimator.java
│ │ │ ├── span
│ │ │ ├── CustomTextSpan.java
│ │ │ ├── TypeConfig.java
│ │ │ └── spandata
│ │ │ │ ├── BaseSpanData.java
│ │ │ │ └── CustomSpanData.java
│ │ │ └── utils
│ │ │ ├── ContactUtil.java
│ │ │ ├── LongClickHelper.java
│ │ │ └── SwayTwoLayoutAnimHolder.java
│ └── res
│ │ ├── drawable-v24
│ │ ├── ic_launcher_foreground.xml
│ │ └── p2.png
│ │ ├── drawable-xhdpi
│ │ ├── lighting_1.png
│ │ ├── lighting_10.png
│ │ ├── lighting_11.png
│ │ ├── lighting_12.png
│ │ ├── lighting_13.png
│ │ ├── lighting_14.png
│ │ ├── lighting_15.png
│ │ ├── lighting_16.png
│ │ ├── lighting_17.png
│ │ ├── lighting_18.png
│ │ ├── lighting_19.png
│ │ ├── lighting_2.png
│ │ ├── lighting_20.png
│ │ ├── lighting_21.png
│ │ ├── lighting_22.png
│ │ ├── lighting_23.png
│ │ ├── lighting_24.png
│ │ ├── lighting_25.png
│ │ ├── lighting_26.png
│ │ ├── lighting_27.png
│ │ ├── lighting_28.png
│ │ ├── lighting_29.png
│ │ ├── lighting_3.png
│ │ ├── lighting_30.png
│ │ ├── lighting_31.png
│ │ ├── lighting_32.png
│ │ ├── lighting_33.png
│ │ ├── lighting_34.png
│ │ ├── lighting_35.png
│ │ ├── lighting_36.png
│ │ ├── lighting_37.png
│ │ ├── lighting_38.png
│ │ ├── lighting_39.png
│ │ ├── lighting_4.png
│ │ ├── lighting_40.png
│ │ ├── lighting_41.png
│ │ ├── lighting_42.png
│ │ ├── lighting_43.png
│ │ ├── lighting_44.png
│ │ ├── lighting_45.png
│ │ ├── lighting_46.png
│ │ ├── lighting_47.png
│ │ ├── lighting_48.png
│ │ ├── lighting_49.png
│ │ ├── lighting_5.png
│ │ ├── lighting_50.png
│ │ ├── lighting_51.png
│ │ ├── lighting_52.png
│ │ ├── lighting_53.png
│ │ ├── lighting_54.png
│ │ ├── lighting_55.png
│ │ ├── lighting_56.png
│ │ ├── lighting_57.png
│ │ ├── lighting_58.png
│ │ ├── lighting_59.png
│ │ ├── lighting_6.png
│ │ ├── lighting_60.png
│ │ ├── lighting_61.png
│ │ ├── lighting_62.png
│ │ ├── lighting_63.png
│ │ ├── lighting_64.png
│ │ ├── lighting_65.png
│ │ ├── lighting_66.png
│ │ ├── lighting_67.png
│ │ ├── lighting_68.png
│ │ ├── lighting_69.png
│ │ ├── lighting_7.png
│ │ ├── lighting_70.png
│ │ ├── lighting_71.png
│ │ ├── lighting_72.png
│ │ ├── lighting_73.png
│ │ ├── lighting_74.png
│ │ ├── lighting_75.png
│ │ ├── lighting_76.png
│ │ ├── lighting_77.png
│ │ ├── lighting_8.png
│ │ └── lighting_9.png
│ │ ├── drawable-xxhdpi
│ │ ├── fx_ic_star_grey.png
│ │ ├── fx_ic_star_light.png
│ │ └── fx_pub_img_pointer.png
│ │ ├── drawable
│ │ ├── bg_1.png
│ │ ├── bg_warm.jpg
│ │ ├── btn_more.png
│ │ ├── cat_1.jpg
│ │ ├── cat_10.jpg
│ │ ├── cat_11.jpg
│ │ ├── cat_12.jpg
│ │ ├── cat_13.jpg
│ │ ├── cat_14.jpg
│ │ ├── cat_15.jpg
│ │ ├── cat_16.jpg
│ │ ├── cat_17.jpg
│ │ ├── cat_18.jpg
│ │ ├── cat_19.jpg
│ │ ├── cat_2.jpg
│ │ ├── cat_3.jpg
│ │ ├── cat_4.jpg
│ │ ├── cat_5.jpg
│ │ ├── cat_6.jpg
│ │ ├── cat_7.jpg
│ │ ├── cat_8.jpg
│ │ ├── cat_9.jpg
│ │ ├── dynamic_round_bg_selector.xml
│ │ ├── flower.jpg
│ │ ├── ic_launcher_background.xml
│ │ ├── image_1.png
│ │ ├── input_edittext_bg_selector.xml
│ │ ├── p1.png
│ │ ├── progress1.png
│ │ ├── progressbar_bg1.xml
│ │ ├── progressbar_bg2.xml
│ │ ├── round_bg.xml
│ │ └── stroke_circle_bg.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── adapter_item_animator.xml
│ │ ├── container_coordinate_layout.xml
│ │ ├── container_coordinate_layout_2.xml
│ │ ├── container_nested_parent_layout.xml
│ │ ├── container_tab_layout.xml
│ │ ├── fragment_automatic_edittext.xml
│ │ ├── fragment_clipchildren.xml
│ │ ├── fragment_colormatrix.xml
│ │ ├── fragment_con_limited_edittext.xml
│ │ ├── fragment_contact.xml
│ │ ├── fragment_coordinatorlayout.xml
│ │ ├── fragment_custom_emoji_panel.xml
│ │ ├── fragment_danmu.xml
│ │ ├── fragment_dy_limited_edittext.xml
│ │ ├── fragment_dynamic_proxy.xml
│ │ ├── fragment_dynamic_round_textview.xml
│ │ ├── fragment_f.xml
│ │ ├── fragment_flexboxlayout_manager.xml
│ │ ├── fragment_gesture_anim_guide_view.xml
│ │ ├── fragment_gradule_title_view_pager.xml
│ │ ├── fragment_happy_new_2019.xml
│ │ ├── fragment_hollow_textview.xml
│ │ ├── fragment_input.xml
│ │ ├── fragment_item_animator.xml
│ │ ├── fragment_maskguideview.xml
│ │ ├── fragment_progress.xml
│ │ ├── fragment_rating_grid_view.xml
│ │ ├── fragment_round_mask_view.xml
│ │ ├── fragment_shine_text.xml
│ │ ├── fragment_span.xml
│ │ ├── fragment_spanline_edittext.xml
│ │ ├── fragment_stroke_text_view.xml
│ │ ├── fragment_swayable_layout.xml
│ │ ├── fragment_wrapped_container.xml
│ │ ├── gradule_title_view_pager_layout.xml
│ │ ├── gradule_title_view_pager_layout_v2.xml
│ │ ├── item_contact.xml
│ │ ├── item_danmu.xml
│ │ ├── layout_appbarlayout_container.xml
│ │ ├── layout_recycler_pager_item.xml
│ │ ├── stag_item_tail.xml
│ │ ├── staggerd_layout_1.xml
│ │ ├── staggerd_layout_2.xml
│ │ ├── staggerd_layout_3.xml
│ │ └── viewholder_cat.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.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
│ │ └── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── sky
│ └── hyh
│ └── customviewsamples
│ └── ExampleUnitTest.java
├── base_lib
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── hyh
│ │ └── base_lib
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── hyh
│ │ │ └── base_lib
│ │ │ ├── BaseFragment.java
│ │ │ ├── BaseFragmentFactory.java
│ │ │ ├── MyApplication.java
│ │ │ ├── adapter
│ │ │ ├── BaseViewHolder.java
│ │ │ └── DataListAdapter.java
│ │ │ ├── annotation
│ │ │ └── FindViewByIdAno.java
│ │ │ └── utils
│ │ │ ├── ColorUtils.java
│ │ │ ├── InjectUtil.java
│ │ │ ├── RectUtil.java
│ │ │ ├── SizeUtils.java
│ │ │ └── TransformUtils.java
│ └── res
│ │ ├── layout
│ │ └── item_layout.xml
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── hyh
│ └── base_lib
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── img-folder
├── ConLimitedLinesEditText.gif
├── DynamicRoundTextView.gif
├── HappyNewYear2019-1.gif
├── HappyNewYear2019-2.gif
├── HappyNewYear2019-3.gif
├── LimitedEditText2.gif
├── QQ图片20181207231008.gif
├── Screenshot_20180918-234447_customview-samples.jpg
├── auto.gif
├── cordinator.gif
├── graduletitleviewpager.gif
├── hollowview2.jpg
├── limitedEditText1.gif
├── mask.gif
├── maskview.jpg
├── strokeTextView.jpg
├── videotogif_2018.09.18_23.49.53.gif
└── videotogif_2018.09.24_01.06.20.gif
├── ioc_compile
├── .gitignore
├── build.gradle
└── src
│ └── main
│ └── java
│ └── com
│ └── hyh
│ └── ioc_compile
│ └── processor
│ ├── BuilderProcessor.java
│ ├── Helper.java
│ └── InjectProcessor.java
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio Navigation editor temp files
30 | .navigation/
31 |
32 | # Android Studio captures folder
33 | captures/
34 |
35 | # IntelliJ
36 | *.iml
37 | .idea/workspace.xml
38 | .idea/tasks.xml
39 | .idea/gradle.xml
40 | .idea/assetWizardSettings.xml
41 | .idea/dictionaries
42 | .idea/libraries
43 | .idea/caches
44 |
45 | # Keystore files
46 | # Uncomment the following line if you do not want to check your keystore files in.
47 | #*.jks
48 |
49 | # External native build folder generated in Android Studio 2.2 and later
50 | .externalNativeBuild
51 |
52 | # Google Services (e.g. APIs or Firebase)
53 | google-services.json
54 |
55 | # Freeline
56 | freeline.py
57 | freeline/
58 | freeline_project_description.json
59 |
60 | # fastlane
61 | fastlane/report.xml
62 | fastlane/Preview.html
63 | fastlane/screenshots
64 | fastlane/test_output
65 | fastlane/readme.md
66 |
67 | .idea/
68 | target/
69 |
--------------------------------------------------------------------------------
/annotation/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/annotation/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java-library'
2 |
3 | dependencies {
4 | implementation fileTree(dir: 'libs', include: ['*.jar'])
5 | }
6 |
7 | sourceCompatibility = "7"
8 | targetCompatibility = "7"
9 |
--------------------------------------------------------------------------------
/annotation/src/main/java/com/hyh/annotation/Builder.java:
--------------------------------------------------------------------------------
1 | package com.hyh.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Target(ElementType.TYPE)
9 | @Retention(RetentionPolicy.SOURCE)
10 | public @interface Builder {
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/annotation/src/main/java/com/hyh/annotation/InjectFragment.java:
--------------------------------------------------------------------------------
1 | package com.hyh.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Target(ElementType.TYPE)
9 | @Retention(RetentionPolicy.CLASS)
10 | public @interface InjectFragment {
11 | }
12 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion rootProject.ext.vcompileSdkVersion
5 | defaultConfig {
6 | applicationId "com.lmy.hyh.customviewdemo"
7 | minSdkVersion rootProject.ext.vminSdkVersion
8 | targetSdkVersion rootProject.ext.vtargetSdkVersion
9 | versionCode rootProject.ext.versionCode
10 | versionName rootProject.ext.versionName
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 |
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 |
21 | compileOptions {
22 | sourceCompatibility JavaVersion.VERSION_1_8
23 | targetCompatibility JavaVersion.VERSION_1_8
24 | }
25 | }
26 |
27 | dependencies {
28 | implementation fileTree(include: ['*.jar'], dir: 'libs')
29 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
30 | testImplementation 'junit:junit:4.12'
31 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
32 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
33 | implementation 'com.facebook.rebound:rebound:0.3.8'
34 | implementation 'com.googlecode.libphonenumber:libphonenumber:8.2.0'
35 | implementation 'com.android.support:design:26.0.0'
36 | implementation 'com.google.android:flexbox:1.0.0'
37 | api project(path: ':base_lib')
38 | implementation project(':annotation')
39 | annotationProcessor project(':ioc_compile')
40 | }
41 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/sky/hyh/customviewsamples/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples;
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 | * Instrumented 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() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.lmy.hyh.customviewdemo", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/assets/HYQiHei-55S.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/assets/HYQiHei-55S.ttf
--------------------------------------------------------------------------------
/app/src/main/assets/HYTangMeiRenJ-2.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/assets/HYTangMeiRenJ-2.ttf
--------------------------------------------------------------------------------
/app/src/main/assets/camera_addtext_font_jimu.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/assets/camera_addtext_font_jimu.ttf
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/User.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples;
2 |
3 | import com.hyh.annotation.Builder;
4 |
5 | /**
6 | * Created by zhuhean on 02/11/2017.
7 | */
8 |
9 | @Builder
10 | public class User {
11 |
12 | String firstName;
13 | String lastName;
14 | String nickName;
15 | int age;
16 |
17 | public String getFirstName() {
18 | return firstName;
19 | }
20 |
21 | public String getLastName() {
22 | return lastName;
23 | }
24 |
25 | public String getNickName() {
26 | return nickName;
27 | }
28 |
29 | public int getAge() {
30 | return age;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/constant/FlexTypeValue.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.constant;
2 |
3 | /**
4 | * created by hyh on 2019/4/3
5 | */
6 | public class FlexTypeValue {
7 | public static final int ITEM_TYPE_1 = 0;
8 | public static final int ITEM_TYPE_2 = 1;
9 | public static final int ITEM_TYPE_3 = 2;
10 | public static final int ITEM_TYPE_4 = 3;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/customview/ConLimitedLinesEditText.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.customview;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.AppCompatEditText;
5 | import android.text.Editable;
6 | import android.text.TextWatcher;
7 | import android.util.AttributeSet;
8 |
9 | /**
10 | * 可以限制最大输入行数的EditText,文本宽度固定
11 | * 当输入的文字大于最大行数时会自动截断多余的文字,
12 | * 截断过程不会触发视图重绘,用户无感知,达到完美体验
13 | */
14 | public class ConLimitedLinesEditText extends AppCompatEditText {
15 | public static final int MAX_INPUT_LINES = 3;
16 |
17 | public ConLimitedLinesEditText(Context context) {
18 | this(context,null);
19 | }
20 |
21 | public ConLimitedLinesEditText(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | initViews();
24 | initListeners();
25 | }
26 |
27 | private void initViews() {
28 | requestFocus();
29 | }
30 |
31 | private void initListeners() {
32 | addTextChangedListener(new TextWatcher() {
33 | @Override
34 | public void beforeTextChanged(CharSequence s, int start, int count, int after) {
35 |
36 | }
37 |
38 | @Override
39 | public void onTextChanged(CharSequence s, int start, int before, int count) {
40 | int lineCount = getLineCount();
41 | if (lineCount > MAX_INPUT_LINES) {
42 | //发现输入的内容大于最大行数,则删除多余的内容
43 | deleteExtra();
44 | }
45 | }
46 |
47 | @Override
48 | public void afterTextChanged(Editable s) {
49 |
50 | }
51 | });
52 | }
53 |
54 | private void deleteExtra() {
55 | String str = getText().toString();
56 | str = str.substring(0, str.length() - 1);
57 | setText(str);
58 | setSelection(getText().length());
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/customview/DivideEqualLayout.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.customview;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.Nullable;
5 | import android.util.AttributeSet;
6 | import android.util.Log;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.FrameLayout;
10 |
11 | /**
12 | * created by curdyhuang on 2021/11/22
13 | * 平分子视图
14 | */
15 | public class DivideEqualLayout extends FrameLayout {
16 |
17 | public DivideEqualLayout(Context context) {
18 | this(context,null);
19 | }
20 |
21 | public DivideEqualLayout(Context context, @Nullable AttributeSet attrs) {
22 | super(context, attrs);
23 | }
24 |
25 | @Override
26 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
27 | Log.d("hyh","DivideEqualLayout: onSizeChanged: ");
28 | if (oldw!=w||oldh!=h){
29 | //不加post的话setLayoutParams没有效果
30 | post(new Runnable() {
31 | @Override
32 | public void run() {
33 | divideLayout(w,h);
34 | }
35 | });
36 | }
37 | }
38 |
39 | private void divideLayout(int width, int height){
40 | Log.d("hyh","DivideEqualLayout: divideLayout: width="+width+" ,height="+height);
41 | int count = getChildCount();
42 | int childW = (int) (width*1f/count);
43 | for (int i=0;i mDataList;
16 |
17 | public ViewPagerAdapter(Context context, List dataList){
18 | mContext=context;
19 | mDataList = dataList;
20 | }
21 |
22 | @Override
23 | public int getCount() {
24 | if(mDataList == null){
25 | return 0;
26 | }
27 | return mDataList.size();
28 | }
29 |
30 | @Override
31 | public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
32 | return view==o;
33 | }
34 |
35 | @NonNull
36 | @Override
37 | public View instantiateItem(@NonNull ViewGroup container, int position) {
38 | PagerItemView pagerItemView = new PagerItemView(mContext);
39 | String color = mDataList.get(position);
40 | pagerItemView.setBackgroundColor(Color.parseColor(color));
41 | container.addView(pagerItemView,new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
42 | ViewGroup.LayoutParams.MATCH_PARENT));
43 | return pagerItemView;
44 | }
45 |
46 | @Override
47 | public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
48 | PagerItemView itemView = (PagerItemView) object;
49 | container.removeView(itemView);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/customview/wrappedContainer/ContainerView.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.customview.wrappedContainer;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.support.annotation.Nullable;
6 | import android.util.AttributeSet;
7 | import android.view.View;
8 | import com.hyh.base_lib.utils.SizeUtils;
9 | import java.util.ArrayList;
10 | import java.util.List;
11 |
12 | /**
13 | * Created by hyh on 2019/3/18 14:30
14 | * E-Mail Address:fjnuhyh122@gmail.com
15 | */
16 | public class ContainerView extends View {
17 | private List mDrawableList;
18 |
19 | public ContainerView(Context context) {
20 | this(context,null);
21 | }
22 |
23 | public ContainerView(Context context, @Nullable AttributeSet attrs) {
24 | super(context, attrs);
25 | init();
26 | }
27 |
28 | private void init(){
29 | mDrawableList = new ArrayList<>();
30 | }
31 |
32 | @Override
33 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
34 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
35 | }
36 |
37 | @Override
38 | protected void onDraw(Canvas canvas) {
39 | for(CustomDrawable customDrawable: mDrawableList){
40 | customDrawable.draw(canvas);
41 | }
42 | }
43 |
44 | public List getDrawableList() {
45 | return mDrawableList;
46 | }
47 |
48 | public void setCurTouchDrawable(CustomDrawable curTouchDrawable) {
49 | mDrawableList.remove(curTouchDrawable);
50 | mDrawableList.add(curTouchDrawable);
51 | }
52 |
53 | public void addDrawable(){
54 | CustomDrawable customDrawable = new CustomDrawable(getContext());
55 | customDrawable.setX(SizeUtils.dp2px(200));
56 | customDrawable.setY(SizeUtils.dp2px(200));
57 | mDrawableList.add(customDrawable);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/customview/wrappedContainer/CustomDrawable.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.customview.wrappedContainer;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.graphics.Canvas;
7 | import android.graphics.ColorFilter;
8 | import android.graphics.Paint;
9 | import android.graphics.PixelFormat;
10 | import android.graphics.Rect;
11 | import android.graphics.drawable.Drawable;
12 | import android.support.annotation.NonNull;
13 | import android.support.annotation.Nullable;
14 | import com.sky.hyh.customviewsamples.R;
15 |
16 | /**
17 | * Created by hyh on 2019/3/18 14:59
18 | * E-Mail Address:fjnuhyh122@gmail.com
19 | */
20 | public class CustomDrawable extends Drawable {
21 | private int mX;
22 | private int mY;
23 | private final Rect mDstRect = new Rect();
24 | private Paint mPaint;
25 | private Bitmap mBitmap;
26 | private Context mContext;
27 |
28 | public CustomDrawable(Context context) {
29 | mContext = context;
30 | mBitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.p1);
31 | mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
32 | }
33 |
34 | @Override
35 | public void draw(@NonNull Canvas canvas) {
36 | updateDstRect();
37 | canvas.drawBitmap(mBitmap, null, mDstRect, mPaint);
38 | }
39 |
40 | @Override
41 | public void setAlpha(int alpha) {
42 |
43 | }
44 |
45 | @Override
46 | public void setColorFilter(@Nullable ColorFilter colorFilter) {
47 |
48 | }
49 |
50 | @Override
51 | public int getOpacity() {
52 | return PixelFormat.TRANSLUCENT;
53 | }
54 |
55 | public int getX() {
56 | return mX;
57 | }
58 |
59 | public void setX(int x) {
60 | mX = x;
61 | setBounds(mX,mY,mX+getIntrinsicWidth(),mY+getIntrinsicHeight());
62 | }
63 |
64 | public int getY() {
65 | return mY;
66 | }
67 |
68 | public void setY(int y) {
69 | mY = y;
70 | setBounds(mX,mY,mX+getIntrinsicWidth(),mY+getIntrinsicHeight());
71 | }
72 |
73 | @Override
74 | public int getIntrinsicWidth() {
75 | return mBitmap.getWidth();
76 | }
77 |
78 | @Override
79 | public int getIntrinsicHeight() {
80 | return mBitmap.getHeight();
81 | }
82 |
83 | private void updateDstRect(){
84 | copyBounds(mDstRect);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/danmu/BarrageDispatch.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.danmu;
2 |
3 | import android.content.Context;
4 | import android.view.ViewGroup;
5 | import android.widget.FrameLayout;
6 |
7 | import com.sky.hyh.customviewsamples.R;
8 |
9 | import java.util.ArrayList;
10 | import java.util.List;
11 |
12 | /**
13 | * 弹幕分发器,用于控制弹幕该发往哪个弹道
14 | */
15 | public class BarrageDispatch {
16 | private int mIndex = -1;
17 | private List mBarrageWayList = new ArrayList<>();
18 | private BarrageViewFactory mFactory;//弹幕工厂
19 |
20 | public BarrageDispatch(Context context) {
21 | mFactory = new BarrageViewFactory(context);
22 | }
23 |
24 | /**
25 | * 添加弹道
26 | */
27 | public void addBarrageWay(ViewGroup group){
28 | mBarrageWayList.add(new BarrageWay(group,mFactory));
29 | }
30 |
31 | /**
32 | * 弹幕分发
33 | */
34 | public void dispatch(BarrageWay.BarrageItem item){
35 | if(item == null||mBarrageWayList.size()<=0){
36 | return;
37 | }
38 | mIndex++;
39 | int size = mBarrageWayList.size();
40 | BarrageWay way = mBarrageWayList.get(mIndex%size);
41 | way.addBarrage(item);
42 | }
43 |
44 | public void clear(){
45 | for (BarrageWay way: mBarrageWayList){
46 | way.clear();
47 | }
48 | mFactory.clear();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/danmu/BarrageView.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.danmu;
2 |
3 | import android.content.Context;
4 | import android.text.TextUtils;
5 | import android.util.AttributeSet;
6 | import android.widget.ImageView;
7 | import android.widget.RelativeLayout;
8 | import android.widget.TextView;
9 |
10 | import com.hyh.base_lib.utils.SizeUtils;
11 | import com.sky.hyh.customviewsamples.R;
12 |
13 | /**
14 | * created by curdyhuang on 2020/11/24
15 | * 弹幕控件
16 | */
17 | public class BarrageView extends RelativeLayout {
18 | public static final int RES_ID = R.layout.item_danmu;
19 | private ImageView mIvHead;
20 | private TextView mTvContent;
21 |
22 | public BarrageView(Context context) {
23 | this(context,null);
24 | }
25 |
26 | public BarrageView(Context context, AttributeSet attrs) {
27 | super(context, attrs);
28 | }
29 |
30 | @Override
31 | protected void onFinishInflate() {
32 | super.onFinishInflate();
33 | initViews();
34 | }
35 |
36 | private void initViews(){
37 | mIvHead = findViewById(R.id.iv_head);
38 | mTvContent = findViewById(R.id.tv_content);
39 | }
40 |
41 | public void setData(BarrageWay.BarrageItem item){
42 | if(item == null){
43 | return;
44 | }
45 | int dp35 = SizeUtils.dp2px(35);
46 | int dp8 = SizeUtils.dp2px(8);
47 | mTvContent.setText(item.getContent());
48 | if(TextUtils.isEmpty(item.getIcon())){
49 | mIvHead.setVisibility(GONE);
50 | mTvContent.setPadding(dp8,getPaddingTop(),dp8,getPaddingBottom());
51 | }else{
52 | mIvHead.setVisibility(VISIBLE);
53 | mTvContent.setPadding(dp35,getPaddingTop(),dp8,getPaddingBottom());
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/entity/CatAdapter.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.entity;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 |
9 | import com.sky.hyh.customviewsamples.R;
10 |
11 | import java.util.ArrayList;
12 | import java.util.List;
13 |
14 | /**
15 | * created by hyh on 2019/4/3
16 | */
17 | public class CatAdapter extends RecyclerView.Adapter {
18 | private List mDataList = new ArrayList<>();
19 | // private int[] CAT_IMAGE_IDS = new int[]{
20 | // R.drawable.cat_1,
21 | // R.drawable.cat_2,
22 | // R.drawable.cat_3,
23 | // R.drawable.cat_4,
24 | // R.drawable.cat_5,
25 | // R.drawable.cat_6,
26 | // R.drawable.cat_7,
27 | // R.drawable.cat_8,
28 | // R.drawable.cat_9,
29 | // R.drawable.cat_10,
30 | // R.drawable.cat_11,
31 | // R.drawable.cat_12,
32 | // R.drawable.cat_13,
33 | // R.drawable.cat_14,
34 | // R.drawable.cat_15,
35 | // R.drawable.cat_16,
36 | // R.drawable.cat_17,
37 | // R.drawable.cat_18,
38 | // R.drawable.cat_19
39 | // };
40 |
41 |
42 | public CatAdapter(List mDataList) {
43 | this.mDataList = mDataList;
44 | }
45 |
46 | public CatAdapter() {
47 | }
48 |
49 | @NonNull
50 | @Override
51 | public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
52 | View view = LayoutInflater.from(viewGroup.getContext())
53 | .inflate(R.layout.viewholder_cat, viewGroup, false);
54 | return new CatViewHolder(view);
55 | }
56 |
57 | @Override
58 | public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int i) {
59 | ((CatViewHolder)viewHolder).setData(mDataList.get(i));
60 | }
61 |
62 | @Override
63 | public int getItemCount() {
64 | return mDataList.size();
65 | }
66 |
67 | public void setDataList(List mDataList) {
68 | this.mDataList = mDataList;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/entity/CatViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.entity;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 |
9 | import com.google.android.flexbox.FlexboxLayoutManager;
10 | import com.sky.hyh.customviewsamples.R;
11 |
12 | /**
13 | * created by hyh on 2019/4/3
14 | */
15 | public class CatViewHolder extends RecyclerView.ViewHolder {
16 | private ImageView mIvImg;
17 |
18 | public CatViewHolder(@NonNull View itemView) {
19 | super(itemView);
20 | mIvImg = (ImageView) itemView;
21 | mIvImg = itemView.findViewById(R.id.imageview);
22 | }
23 |
24 | public void setData(int drawableId){
25 | mIvImg.setImageResource(drawableId);
26 | ViewGroup.LayoutParams layoutParams = mIvImg.getLayoutParams();
27 | if(layoutParams instanceof FlexboxLayoutManager.LayoutParams){
28 | ((FlexboxLayoutManager.LayoutParams) layoutParams).setFlexGrow(1);
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/entity/FlexModel.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.entity;
2 |
3 | /**
4 | * created by hyh on 2019/4/3
5 | */
6 | public class FlexModel {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/entity/FlexViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.entity;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 |
7 | /**
8 | * created by hyh on 2019/4/3
9 | */
10 | public class FlexViewHolder extends RecyclerView.ViewHolder {
11 |
12 | public FlexViewHolder(@NonNull View itemView) {
13 | super(itemView);
14 | }
15 |
16 | public void setData(FlexModel flexModel,int itemType){
17 |
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/entity/MobileContactObserver.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.entity;
2 |
3 | import android.database.ContentObserver;
4 | import android.os.Handler;
5 | import android.util.Log;
6 | import java.util.List;
7 |
8 | /**
9 | * Created by hyh on 2019/1/3 17:14
10 | * E-Mail Address:fjnuhyh122@gmail.com
11 | */
12 | public class MobileContactObserver extends ContentObserver {
13 | /**
14 | * Creates a content observer.
15 | *
16 | * @param handler The handler to run {@link #onChange} on, or null if none.
17 | */
18 | public MobileContactObserver(Handler handler) {
19 | super(handler);
20 | }
21 |
22 | @Override
23 | public void onChange(boolean selfChange) {
24 | //通讯录改变,获取改变的数据
25 | List phoneInfoList = MobileContactSingleton.getInstance().getMobileContactIncremental();
26 | for(PhoneInfo phoneInfo: phoneInfoList){
27 | Log.d("hyh", "MobileContactObserver: onChange: phoneInfo="+phoneInfo.toString());
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/entity/PhoneInfo.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.entity;
2 |
3 | /**
4 | * Created by hyh on 2019/1/2 16:31
5 | * E-Mail Address:fjnuhyh122@gmail.com
6 | */
7 | public class PhoneInfo {
8 | private String mContactId;
9 | /**
10 | * 联系人版本,联系人信息更改版本也会改变,根据该字段来判断联系人信息是否更新
11 | */
12 | private String mVersion;
13 | private String mName;
14 | private String mPhoneNum;
15 | public boolean mChanged;
16 |
17 | public PhoneInfo(String version, String phoneNum) {
18 | mVersion = version;
19 | mPhoneNum = phoneNum;
20 | }
21 |
22 | public PhoneInfo(String contactId, String version, String name, String phoneNum) {
23 | mContactId = contactId;
24 | mVersion = version;
25 | mName = name;
26 | mPhoneNum = phoneNum;
27 | }
28 |
29 | public String getName() {
30 | return mName;
31 | }
32 |
33 | public void setName(String name) {
34 | mName = name;
35 | }
36 |
37 | public String getPhoneNum() {
38 | return mPhoneNum;
39 | }
40 |
41 | public void setPhoneNum(String phoneNum) {
42 | mPhoneNum = phoneNum;
43 | }
44 |
45 | public String getContactId() {
46 | return mContactId;
47 | }
48 |
49 | public void setContactId(String contactId) {
50 | mContactId = contactId;
51 | }
52 |
53 | public String getVersion() {
54 | return mVersion;
55 | }
56 |
57 | public void setVersion(String version) {
58 | mVersion = version;
59 | }
60 |
61 | @Override
62 | public String toString() {
63 | return "PhoneInfo{" +
64 | "mContactId='" + mContactId + '\'' +
65 | ", mVersion='" + mVersion + '\'' +
66 | ", mName='" + mName + '\'' +
67 | ", mPhoneNum='" + mPhoneNum + '\'' +
68 | ", mChanged=" + mChanged +
69 | '}';
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/AutomaticEditTextFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.view.View;
4 |
5 | import com.hyh.annotation.InjectFragment;
6 | import com.hyh.base_lib.annotation.FindViewByIdAno;
7 | import com.hyh.base_lib.BaseFragment;
8 | import com.sky.hyh.customviewsamples.R;
9 | import com.sky.hyh.customviewsamples.customview.automaitcEditText.AutoEditText;
10 |
11 | /**
12 | * Created by hyh on 2019/2/26 15:49
13 | * E-Mail Address:fjnuhyh122@gmail.com
14 | */
15 | @InjectFragment()
16 | public class AutomaticEditTextFragment extends BaseFragment {
17 | @FindViewByIdAno(R.id.aet_input)
18 | private AutoEditText mAutomaticEditText;
19 |
20 | @Override
21 | protected int getResId() {
22 | return R.layout.fragment_automatic_edittext;
23 | }
24 |
25 | @Override
26 | protected void initViews(View rootView) {
27 | mAutomaticEditText.requestFocus();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/ClipChildrenFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.view.View;
4 |
5 | import com.hyh.base_lib.BaseFragment;
6 | import com.sky.hyh.customviewsamples.R;
7 |
8 | /**
9 | * 1.android:clipChildren必须设置在祖父布局上,也就是要想让某个view在该view的父布局外显示,那么clipChildren需要在该view的父布局的父布局设置,也就是他的祖父布局上。
10 | * 2.android:clipChildren只有在祖父布局为其父布局有留下足够的显示空间才能生效。比如某个view的父布局高度是50dp,他的祖父布局高度也是50dp,那么设置android:clipChildren属性后
11 | * 也是没办法让该veiw在父布局之外显示的,因为其父布局之外已经没有其他空间了。
12 | */
13 | public class ClipChildrenFragment extends BaseFragment {
14 | @Override
15 | protected int getResId() {
16 | return R.layout.fragment_clipchildren;
17 | }
18 |
19 | @Override
20 | protected void initViews(View rootView) {
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/ConLimitedEditTextFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.view.View;
4 |
5 | import com.hyh.annotation.InjectFragment;
6 | import com.hyh.base_lib.BaseFragment;
7 | import com.sky.hyh.customviewsamples.R;
8 | @InjectFragment()
9 | public class ConLimitedEditTextFragment extends BaseFragment {
10 | @Override
11 | protected int getResId() {
12 | return R.layout.fragment_con_limited_edittext;
13 | }
14 |
15 | @Override
16 | protected void initViews(View rootView) {
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/CoordinatorLayoutFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.view.View;
4 | import android.widget.Button;
5 |
6 | import com.hyh.annotation.InjectFragment;
7 | import com.hyh.base_lib.BaseFragment;
8 | import com.sky.hyh.customviewsamples.R;
9 | import com.sky.hyh.customviewsamples.customview.coordinatelayout.RootLayout;
10 |
11 | /**
12 | * created by hyh on 2019/4/4
13 | */
14 | @InjectFragment()
15 | public class CoordinatorLayoutFragment extends BaseFragment {
16 | private RootLayout mRootLayout;
17 | private Button mBtnSwitch;
18 |
19 | @Override
20 | protected int getResId() {
21 | return R.layout.fragment_coordinatorlayout;
22 | }
23 |
24 | @Override
25 | protected void initViews(View rootView) {
26 | mRootLayout = rootView.findViewById(R.id.root);
27 | mBtnSwitch = findViewById(R.id.btn_switch);
28 | mBtnSwitch.setOnClickListener(new View.OnClickListener() {
29 | @Override
30 | public void onClick(View v) {
31 | mRootLayout.updateView(!mRootLayout.isHaveList());
32 | }
33 | });
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/CustomEmojiPanelFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.util.Log;
7 | import android.view.View;
8 |
9 | import com.hyh.annotation.InjectFragment;
10 | import com.hyh.base_lib.BaseFragment;
11 | import com.sky.hyh.customviewsamples.R;
12 | @InjectFragment()
13 | public class CustomEmojiPanelFragment extends BaseFragment {
14 | public static final int RES_ID = R.layout.fragment_custom_emoji_panel;
15 | @Override
16 | public void onAttach(Context context) {
17 | super.onAttach(context);
18 | Log.d("hyh", "CustomEmojiPanelFragment: onAttach");
19 | }
20 |
21 | @Override
22 | public void onCreate(@Nullable Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | Log.d("hyh", "CustomEmojiPanelFragment: onCreate");
25 | }
26 |
27 | @Override
28 | protected int getResId() {
29 | return RES_ID;
30 | }
31 |
32 | @Override
33 | protected void initViews(View rootView) {
34 |
35 | }
36 |
37 | @Override
38 | public void onActivityCreated(@Nullable Bundle savedInstanceState) {
39 | super.onActivityCreated(savedInstanceState);
40 | Log.d("hyh", "CustomEmojiPanelFragment: onActivityCreated ");
41 | }
42 |
43 | @Override
44 | public void onStart() {
45 | super.onStart();
46 | Log.d("hyh", "CustomEmojiPanelFragment: onStart ");
47 | }
48 |
49 | @Override
50 | public void onResume() {
51 | super.onResume();
52 | Log.d("hyh", "CustomEmojiPanelFragment: onResume ");
53 | }
54 |
55 | @Override
56 | public void onPause() {
57 | super.onPause();
58 | Log.d("hyh", "CustomEmojiPanelFragment: onPause ");
59 | }
60 |
61 | @Override
62 | public void onStop() {
63 | super.onStop();
64 | Log.d("hyh", "CustomEmojiPanelFragment: onStop ");
65 | }
66 |
67 | @Override
68 | public void onDestroyView() {
69 | super.onDestroyView();
70 | Log.d("hyh", "CustomEmojiPanelFragment: onDestroyView ");
71 | }
72 |
73 | @Override
74 | public void onDestroy() {
75 | super.onDestroy();
76 | Log.d("hyh", "CustomEmojiPanelFragment: onDestroy ");
77 | }
78 |
79 | @Override
80 | public void onDetach() {
81 | super.onDetach();
82 | Log.d("hyh", "CustomEmojiPanelFragment: onDetach ");
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/DanMuFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.view.View;
4 | import android.widget.FrameLayout;
5 |
6 | import com.hyh.annotation.InjectFragment;
7 | import com.hyh.base_lib.BaseFragment;
8 | import com.sky.hyh.customviewsamples.R;
9 | import com.sky.hyh.customviewsamples.danmu.BarrageDispatch;
10 | import com.sky.hyh.customviewsamples.danmu.BarrageWay;
11 |
12 | @InjectFragment()
13 | public class DanMuFragment extends BaseFragment {
14 | BarrageDispatch mDispatch;
15 |
16 | @Override
17 | protected int getResId() {
18 | return R.layout.fragment_danmu;
19 | }
20 |
21 | @Override
22 | protected void initViews(View rootView) {
23 | FrameLayout way1 = rootView.findViewById(R.id.fl_barrage_way_1);
24 | FrameLayout way2 = rootView.findViewById(R.id.fl_barrage_way_2);
25 | FrameLayout way3 = rootView.findViewById(R.id.fl_barrage_way_3);
26 |
27 | mDispatch = new BarrageDispatch(getContext());
28 | mDispatch.addBarrageWay(way1);
29 | mDispatch.addBarrageWay(way2);
30 | mDispatch.addBarrageWay(way3);
31 |
32 | rootView.findViewById(R.id.btn_add_danmu1).setOnClickListener(new View.OnClickListener() {
33 | @Override
34 | public void onClick(View v) {
35 | BarrageWay.BarrageItem item = new BarrageWay.BarrageItem("小姐姐哈哈哈thyth是而VR我VG如果热个反而服务","");
36 | mDispatch.dispatch(item);
37 | }
38 | });
39 |
40 | rootView.findViewById(R.id.btn_add_danmu2).setOnClickListener(new View.OnClickListener() {
41 | @Override
42 | public void onClick(View v) {
43 | BarrageWay.BarrageItem item = new BarrageWay.BarrageItem("小姐姐哈哈哈","1111");
44 | mDispatch.dispatch(item);
45 | }
46 | });
47 | }
48 |
49 | @Override
50 | public void onDestroy() {
51 | super.onDestroy();
52 | mDispatch.clear();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/DyLimitedEditTextFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.view.View;
4 |
5 | import com.hyh.annotation.InjectFragment;
6 | import com.hyh.base_lib.BaseFragment;
7 | import com.sky.hyh.customviewsamples.R;
8 | @InjectFragment()
9 | public class DyLimitedEditTextFragment extends BaseFragment {
10 | @Override
11 | protected int getResId() {
12 | return R.layout.fragment_dy_limited_edittext;
13 | }
14 |
15 | @Override
16 | protected void initViews(View rootView) {
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/DynamicProxyFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.util.Log;
4 | import android.view.View;
5 | import android.widget.TextView;
6 |
7 | import com.hyh.base_lib.BaseFragment;
8 | import com.hyh.base_lib.annotation.FindViewByIdAno;
9 | import com.sky.hyh.customviewsamples.R;
10 | import com.sky.hyh.customviewsamples.proxy.CachedProxy;
11 | import com.sky.hyh.customviewsamples.proxy.ConsumeProxy;
12 | import com.sky.hyh.customviewsamples.proxy.RealSubject;
13 | import com.sky.hyh.customviewsamples.proxy.Subject;
14 | import com.sky.hyh.customviewsamples.proxy.ViewClickProxy;
15 |
16 | public class DynamicProxyFragment extends BaseFragment{
17 | @FindViewByIdAno(R.id.proxy_a)
18 | private TextView mTvProxyA;
19 | @FindViewByIdAno(R.id.proxy_b)
20 | private TextView mTvProxyB;
21 | private View.OnClickListener mClickListener = new View.OnClickListener() {
22 | @Override
23 | public void onClick(View v) {
24 | //缓存代理
25 | CachedProxy proxy = new CachedProxy();
26 | Subject subject = (Subject) proxy.bind(new RealSubject());
27 | Log.e("Shawn", subject.operationA());
28 | Log.e("Shawn", subject.operationB());
29 | Log.e("Shawn", subject.operationC());
30 |
31 | //计算耗时代理
32 | ConsumeProxy consumeProxy = new ConsumeProxy();
33 | subject = (Subject) consumeProxy.bind(new RealSubject());
34 | Log.e("Shawn", subject.operationA());
35 | Log.e("Shawn", subject.operationB());
36 | Log.e("Shawn", subject.operationC());
37 | }
38 | };
39 |
40 | @Override
41 | protected int getResId() {
42 | return R.layout.fragment_dynamic_proxy;
43 | }
44 |
45 | @Override
46 | protected void initViews(View rootView) {
47 | //点击事件代理
48 | ViewClickProxy viewClickProxy = new ViewClickProxy();
49 | View.OnClickListener clickListener = (View.OnClickListener) viewClickProxy.bind(mClickListener);
50 |
51 | mTvProxyA.setOnClickListener(clickListener);
52 | mTvProxyB.setOnClickListener(clickListener);
53 |
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/DynamicRoundTextViewFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.view.View;
4 | import android.widget.TextView;
5 |
6 | import com.hyh.annotation.InjectFragment;
7 | import com.hyh.base_lib.BaseFragment;
8 | import com.hyh.base_lib.annotation.FindViewByIdAno;
9 | import com.sky.hyh.customviewsamples.R;
10 | import com.sky.hyh.customviewsamples.customview.DynamicRoundTextView;
11 | @InjectFragment()
12 | public class DynamicRoundTextViewFragment extends BaseFragment implements View.OnClickListener{
13 | @FindViewByIdAno(R.id.drt_round)
14 | DynamicRoundTextView mDynamicRoundTextView;
15 |
16 | @Override
17 | protected int getResId() {
18 | return R.layout.fragment_dynamic_round_textview;
19 | }
20 |
21 | @Override
22 | protected void initViews(View rootView) {
23 | TextView tvSpread = rootView.findViewById(R.id.tv_click_spread);
24 | tvSpread.setOnClickListener(this);
25 | TextView tvClose = rootView.findViewById(R.id.tv_click_close);
26 | tvClose.setOnClickListener(this);
27 | TextView tvAppear = rootView.findViewById(R.id.tv_click_appear);
28 | tvAppear.setOnClickListener(this);
29 |
30 | mDynamicRoundTextView.setUnReadCount(1);
31 | mDynamicRoundTextView.setTips("1条新提示");
32 | }
33 |
34 | @Override
35 | public void onClick(View v) {
36 | switch (v.getId()){
37 | case R.id.tv_click_spread:
38 | mDynamicRoundTextView.spread();
39 | break;
40 | case R.id.tv_click_close:
41 | mDynamicRoundTextView.close();
42 | break;
43 | case R.id.tv_click_appear:
44 | mDynamicRoundTextView.appear(null);
45 | break;
46 |
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/FlexBoxLayoutManagerFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.support.v7.widget.StaggeredGridLayoutManager;
5 | import android.view.View;
6 |
7 | import com.hyh.annotation.InjectFragment;
8 | import com.hyh.base_lib.BaseFragment;
9 | import com.hyh.base_lib.annotation.FindViewByIdAno;
10 | import com.sky.hyh.customviewsamples.R;
11 | import com.sky.hyh.customviewsamples.entity.FlexAdapter;
12 | import com.sky.hyh.customviewsamples.entity.FlexModel;
13 |
14 | import java.util.ArrayList;
15 | import java.util.List;
16 |
17 | /**
18 | * created by hyh on 2019/4/3
19 | */
20 | @InjectFragment()
21 | public class FlexBoxLayoutManagerFragment extends BaseFragment {
22 | @FindViewByIdAno(R.id.rv_list)
23 | private RecyclerView mRvList;
24 |
25 | @Override
26 | protected int getResId() {
27 | return R.layout.fragment_flexboxlayout_manager;
28 | }
29 |
30 | @Override
31 | protected void initViews(View rootView) {
32 | StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.VERTICAL);
33 | mRvList.setLayoutManager(layoutManager);
34 | mRvList.setHasFixedSize(true);
35 | List dataList = new ArrayList<>();
36 | dataList.add(new FlexModel());
37 | dataList.add(new FlexModel());
38 | dataList.add(new FlexModel());
39 | dataList.add(new FlexModel());
40 | dataList.add(new FlexModel());
41 | dataList.add(new FlexModel());
42 | dataList.add(new FlexModel());
43 | dataList.add(new FlexModel());
44 | dataList.add(new FlexModel());
45 | dataList.add(new FlexModel());
46 | dataList.add(new FlexModel());
47 | dataList.add(new FlexModel());
48 | dataList.add(new FlexModel());
49 | dataList.add(new FlexModel());
50 | //dataList.add(new FlexModel());
51 | mRvList.setAdapter(new FlexAdapter(dataList));
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/fragment/impl/GraduleTitleViewPagerFragment.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.fragment.impl;
2 |
3 | import android.view.View;
4 |
5 | import com.hyh.annotation.InjectFragment;
6 | import com.hyh.base_lib.BaseFragment;
7 | import com.hyh.base_lib.annotation.FindViewByIdAno;
8 | import com.sky.hyh.customviewsamples.R;
9 | import com.sky.hyh.customviewsamples.customview.customviewpager.GraduleTitleViewpagerV2;
10 | import com.sky.hyh.customviewsamples.customview.customviewpager.ViewPagerAdapter;
11 |
12 | import java.util.ArrayList;
13 | import java.util.List;
14 | @InjectFragment()
15 | public class GraduleTitleViewPagerFragment extends BaseFragment {
16 | @FindViewByIdAno(R.id.gtv_view_pager)
17 | private GraduleTitleViewpagerV2 mGraduleTitleViewpager;
18 |
19 | @Override
20 | protected int getResId() {
21 | return R.layout.fragment_gradule_title_view_pager;
22 | }
23 |
24 | @Override
25 | protected void initViews(View rootView) {
26 | //准备数据源
27 | List datas=new ArrayList<>();
28 | datas.add("#990000");
29 | datas.add("#271309");
30 | datas.add("#213456");
31 | datas.add("#016716");
32 | datas.add("#170456");
33 | datas.add("#ff11ff");
34 | datas.add("#016755");
35 | datas.add("#170111");
36 | datas.add("#3001ff");
37 |
38 | String[] titleContents = new String[datas.size()];
39 | for(int i=0;i{
21 | private final Context mContext;
22 | private List mData=new ArrayList<>();
23 |
24 | public ItemAnimatorAdapter(Context context,List data){
25 | this.mContext=context;
26 | this.mData=data;
27 | }
28 |
29 | @Override
30 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
31 | return new MyViewHolder(LayoutInflater.from(mContext).inflate(R.layout.adapter_item_animator,parent,false));
32 | }
33 |
34 | @Override
35 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
36 | ((MyViewHolder)holder).tv.setText(position+":"+mData.get(position));
37 | }
38 |
39 | @Override
40 | public int getItemCount() {
41 | return mData.size();
42 | }
43 |
44 | class MyViewHolder extends RecyclerView.ViewHolder{
45 | public TextView tv;
46 | public MyViewHolder(View itemView) {
47 | super(itemView);
48 | tv= (TextView) itemView.findViewById(R.id.tv);
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/recyclerviewdemo/itemanim/SlideItemAnimator.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.recyclerviewdemo.itemanim;
2 |
3 | import android.support.v4.view.ViewCompat;
4 | import android.support.v4.view.ViewPropertyAnimatorCompat;
5 | import android.support.v7.widget.RecyclerView;
6 |
7 | import com.sky.hyh.customviewsamples.recyclerviewdemo.itemanim.BaseItemAnimator;
8 |
9 | /**
10 | * Created by ivy on 2017/3/21.
11 | * Description:
12 | */
13 |
14 | public class SlideItemAnimator extends BaseItemAnimator {
15 |
16 | @Override
17 | public void setRemoveAnimation(RecyclerView.ViewHolder holder, ViewPropertyAnimatorCompat animator) {
18 | animator.translationX(-holder.itemView.getWidth());
19 | }
20 |
21 | @Override
22 | public void removeAnimationEnd(RecyclerView.ViewHolder holder) {
23 | ViewCompat.setTranslationX(holder.itemView,0);
24 | }
25 |
26 | @Override
27 | public void addAnimationInit(RecyclerView.ViewHolder holder) {
28 | ViewCompat.setTranslationX(holder.itemView,-holder.itemView.getWidth());
29 | }
30 |
31 | @Override
32 | public void setAddAnimation(RecyclerView.ViewHolder holder, ViewPropertyAnimatorCompat animator) {
33 | animator.translationX(0);
34 | }
35 |
36 | @Override
37 | public void addAnimationCancel(RecyclerView.ViewHolder holder) {
38 | ViewCompat.setTranslationX(holder.itemView,0);
39 | }
40 |
41 | @Override
42 | public void setOldChangeAnimation(RecyclerView.ViewHolder holder, ViewPropertyAnimatorCompat animator) {
43 | animator.translationX(-holder.itemView.getWidth());
44 | }
45 |
46 | @Override
47 | public void oldChangeAnimationEnd(RecyclerView.ViewHolder holder) {
48 | ViewCompat.setTranslationX(holder.itemView,0);
49 | }
50 |
51 | @Override
52 | public void newChangeAnimationInit(RecyclerView.ViewHolder holder) {
53 | ViewCompat.setTranslationX(holder.itemView,holder.itemView.getWidth());
54 | }
55 |
56 | @Override
57 | public void setNewChangeAnimation(RecyclerView.ViewHolder holder, ViewPropertyAnimatorCompat animator) {
58 | animator.translationX(0);
59 | }
60 |
61 | @Override
62 | public void newChangeAnimationEnd(RecyclerView.ViewHolder holder) {
63 | ViewCompat.setTranslationX(holder.itemView,0);
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/span/TypeConfig.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.span;
2 |
3 | import android.support.annotation.IntDef;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 |
7 | /**
8 | * Created by hyh on 2019/3/6 22:18
9 | * E-Mail Address:fjnuhyh122@gmail.com
10 | */
11 | public class TypeConfig {
12 | public static final int UNIT_SP = 0;
13 | public static final int UNIT_PX = 1;
14 | @IntDef({UNIT_SP,UNIT_PX})
15 | @Retention(RetentionPolicy.SOURCE)
16 | public @interface Unit{};
17 |
18 | public static final int TYPE_CUSTOM_TEXT_SPAN = 0;//自定义文本span -> CustomTextSpan
19 | public static final int TYPE_ABS_SIZE_SPAN = 1;//固定字体大小span -> AbsoluteSizeSpan
20 | @IntDef({TYPE_CUSTOM_TEXT_SPAN,TYPE_ABS_SIZE_SPAN})
21 | @Retention(RetentionPolicy.SOURCE)
22 | public @interface SpanType{};
23 |
24 | public static final int ALIGN_BOTTOM = 0;
25 | public static final int ALIGN_CENTER = 1;
26 | public static final int ALIGN_TOP = 2;
27 | @IntDef({ALIGN_BOTTOM,ALIGN_CENTER,ALIGN_TOP})
28 | @Retention(RetentionPolicy.SOURCE)
29 | public @interface AlignType{};
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/sky/hyh/customviewsamples/span/spandata/BaseSpanData.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples.span.spandata;
2 |
3 | import android.text.style.CharacterStyle;
4 |
5 | /**
6 | * Created by hyh on 2018/12/18 16:17
7 | * E-Mail Address:fjnuhyh122@gmail.com
8 | */
9 | public abstract class BaseSpanData {
10 | public abstract CharacterStyle onCreateSpan();
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/p2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-v24/p2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_10.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_11.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_12.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_13.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_14.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_15.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_16.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_17.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_18.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_19.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_20.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_21.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_22.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_23.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_24.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_25.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_26.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_27.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_28.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_29.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_30.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_31.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_31.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_32.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_33.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_33.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_34.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_34.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_35.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_36.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_37.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_37.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_38.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_39.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_39.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_40.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_41.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_41.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_42.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_43.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_43.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_44.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_44.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_45.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_45.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_46.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_46.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_47.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_47.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_48.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_49.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_49.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_50.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_51.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_51.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_52.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_52.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_53.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_53.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_54.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_54.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_55.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_55.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_56.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_56.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_57.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_58.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_59.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_59.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_60.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_61.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_61.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_62.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_62.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_63.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_63.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_64.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_65.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_65.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_66.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_66.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_67.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_67.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_68.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_68.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_69.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_69.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_7.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_70.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_71.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_71.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_72.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_73.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_73.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_74.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_74.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_75.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_76.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_77.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_77.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_8.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/lighting_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xhdpi/lighting_9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/fx_ic_star_grey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xxhdpi/fx_ic_star_grey.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/fx_ic_star_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xxhdpi/fx_ic_star_light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/fx_pub_img_pointer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable-xxhdpi/fx_pub_img_pointer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/bg_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_warm.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/bg_warm.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/btn_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/btn_more.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_10.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_11.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_12.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_13.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_13.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_14.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_14.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_15.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_15.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_16.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_16.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_17.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_17.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_18.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_18.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_19.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_19.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_3.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_5.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_6.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_7.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_8.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cat_9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/cat_9.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/dynamic_round_bg_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/flower.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/flower.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/image_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/image_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/input_edittext_bg_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/p1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/p1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progress1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/drawable/progress1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progressbar_bg1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/progressbar_bg2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/stroke_circle_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
19 |
20 |
21 |
22 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/adapter_item_animator.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/container_coordinate_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
10 |
11 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/container_coordinate_layout_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/container_tab_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_automatic_edittext.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_colormatrix.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
17 |
18 |
22 |
23 |
29 |
30 |
34 |
35 |
41 |
42 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_con_limited_edittext.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_contact.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_coordinatorlayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
15 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_custom_emoji_panel.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_danmu.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
20 |
21 |
27 |
28 |
37 |
38 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_dy_limited_edittext.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_dynamic_proxy.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
14 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_dynamic_round_textview.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
24 |
25 |
31 |
38 |
45 |
46 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_f.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
22 |
23 |
29 |
30 |
36 |
37 |
43 |
44 |
50 |
51 |
52 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_flexboxlayout_manager.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_gesture_anim_guide_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
16 |
22 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_gradule_title_view_pager.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_happy_new_2019.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_hollow_textview.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_input.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_item_animator.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
16 |
22 |
28 |
34 |
35 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_maskguideview.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
18 |
27 |
28 |
29 |
30 |
40 |
41 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_rating_grid_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_round_mask_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_shine_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_span.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
19 |
20 |
27 |
28 |
36 |
37 |
44 |
45 |
53 |
54 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_spanline_edittext.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_stroke_text_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
19 |
20 |
29 |
30 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_wrapped_container.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/gradule_title_view_pager_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
17 |
18 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/gradule_title_view_pager_layout_v2.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
19 |
20 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_contact.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
23 |
24 |
31 |
32 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_danmu.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
21 |
22 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_appbarlayout_container.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
12 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_recycler_pager_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/stag_item_tail.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/staggerd_layout_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/staggerd_layout_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/staggerd_layout_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/viewholder_cat.xml:
--------------------------------------------------------------------------------
1 |
16 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | - fade
14 | - slide
15 | - rotate
16 | - scale
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 | #00cadd
7 | #ffffff
8 | #00ffffff
9 | #000000
10 | #FF0000
11 | #99000000
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 10dp
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | customview-samples
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
16 |
17 |
18 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/test/java/com/sky/hyh/customviewsamples/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.sky.hyh.customviewsamples;
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() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/base_lib/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/base_lib/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion rootProject.ext.vcompileSdkVersion
5 | defaultConfig {
6 | minSdkVersion rootProject.ext.vminSdkVersion
7 | targetSdkVersion rootProject.ext.vtargetSdkVersion
8 | versionCode rootProject.ext.versionCode
9 | versionName rootProject.ext.versionName
10 |
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 |
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 |
21 | }
22 |
23 | dependencies {
24 | implementation fileTree(dir: 'libs', include: ['*.jar'])
25 |
26 | api rootProject.ext.vSupport_appcompat_v7
27 | api rootProject.ext.vSupport_recyclerview_v7
28 | testImplementation 'junit:junit:4.12'
29 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
30 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
31 | implementation project(':annotation')
32 | }
33 |
--------------------------------------------------------------------------------
/base_lib/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 |
--------------------------------------------------------------------------------
/base_lib/src/androidTest/java/com/hyh/base_lib/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib;
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 | * Instrumented 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() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.hyh.base_lib.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/base_lib/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/BaseFragment.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.IdRes;
5 | import android.support.annotation.NonNull;
6 | import android.support.annotation.Nullable;
7 | import android.support.v4.app.Fragment;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 |
12 | import com.hyh.base_lib.utils.InjectUtil;
13 |
14 | public abstract class BaseFragment extends Fragment {
15 | private OnDestroyCallBack mOnDestroyCallBack;
16 | protected View mRootView;
17 |
18 | @Nullable
19 | @Override
20 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
21 | mRootView = inflater.inflate(getResId(), null);
22 | InjectUtil.injectView(this);
23 | initViews(mRootView);
24 | return mRootView;
25 | }
26 |
27 | protected abstract int getResId();
28 |
29 | protected abstract void initViews(View rootView);
30 |
31 | @Override
32 | public void onDestroy() {
33 | super.onDestroy();
34 | if (mOnDestroyCallBack != null) {
35 | mOnDestroyCallBack.onDestroy();
36 | }
37 | }
38 |
39 | public void setOnDestroyCallBack(OnDestroyCallBack onDestroyCallBack) {
40 | mOnDestroyCallBack = onDestroyCallBack;
41 | }
42 |
43 | public interface OnDestroyCallBack {
44 | void onDestroy();
45 | }
46 |
47 | public T findViewById(@IdRes int id) {
48 | return mRootView.findViewById(id);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/BaseFragmentFactory.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib;
2 |
3 | public abstract class BaseFragmentFactory {
4 | public abstract BaseFragment createFragment();
5 | }
6 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/MyApplication.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib;
2 |
3 | import android.app.Application;
4 |
5 | /**
6 | * Created by hyh on 2018/12/14 16:26
7 | * E-Mail Address:fjnuhyh122@gmail.com
8 | */
9 | public class MyApplication extends Application {
10 | private static MyApplication mApplication;
11 |
12 | public static Application getApplication(){
13 | return mApplication;
14 | }
15 |
16 | @Override
17 | public void onCreate() {
18 | super.onCreate();
19 | mApplication = this;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/adapter/BaseViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib.adapter;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 |
6 | /**
7 | * RecyclerView.ViewHolder的模板基类
8 | */
9 | public abstract class BaseViewHolder extends RecyclerView.ViewHolder {
10 | protected View mItemView;
11 |
12 | public BaseViewHolder(View itemView) {
13 | super(itemView);
14 | mItemView = itemView;
15 | initViews();
16 | initListener();
17 | }
18 |
19 | abstract protected void initViews();
20 | abstract protected void initListener();
21 | }
22 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/annotation/FindViewByIdAno.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Target(ElementType.FIELD)
9 | @Retention(RetentionPolicy.RUNTIME)
10 | public @interface FindViewByIdAno {
11 | /**
12 | * 保存视图控件的id
13 | * @return
14 | */
15 | int value();
16 | }
17 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/utils/ColorUtils.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib.utils;
2 |
3 | public class ColorUtils {
4 | public static final int A_MASK = 0xff000000;
5 | public static final int R_MASK = 0x00ff0000;
6 | public static final int G_MASK = 0x0000ff00;
7 | public static final int B_MASK = 0x000000ff;
8 |
9 | public static final int A_SHIFT= 24;
10 | public static final int R_SHIFT= 16;
11 | public static final int G_SHIFT = 8;
12 |
13 | public static int getA(int color){
14 | return (color & A_MASK) >> A_SHIFT;
15 | }
16 |
17 | public static int getR(int color){
18 | return (color & R_MASK) >> R_SHIFT;
19 | }
20 |
21 | public static int getG(int color){
22 | return (color & G_MASK) >> G_SHIFT;
23 | }
24 |
25 | public static int getB(int color){
26 | return color & B_MASK;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/utils/InjectUtil.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib.utils;
2 |
3 | import com.hyh.base_lib.annotation.FindViewByIdAno;
4 |
5 | import java.lang.reflect.Field;
6 | import java.lang.reflect.InvocationTargetException;
7 |
8 |
9 | public class InjectUtil {
10 |
11 | public static void injectView(Object activityOrFragment) {
12 | Class> activityOrFragmentClass = activityOrFragment.getClass();
13 | if (activityOrFragmentClass != null) {
14 | Field[] declaredFields = activityOrFragmentClass.getDeclaredFields();
15 | if (declaredFields != null) {
16 | for (Field field : declaredFields) {
17 | FindViewByIdAno findViewByIdAno = field.getAnnotation(FindViewByIdAno.class);
18 | if (findViewByIdAno != null) {
19 | int id = findViewByIdAno.value();
20 | Object fieldObj = null;
21 | try {
22 | fieldObj = activityOrFragmentClass.getMethod("findViewById", int.class)
23 | .invoke(activityOrFragment, id);
24 | field.setAccessible(true);
25 | field.set(activityOrFragment, fieldObj);
26 | } catch (IllegalAccessException e) {
27 | e.printStackTrace();
28 | } catch (InvocationTargetException e) {
29 | e.printStackTrace();
30 | } catch (NoSuchMethodException e) {
31 | e.printStackTrace();
32 | }
33 | }
34 | }
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/utils/RectUtil.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib.utils;
2 |
3 | import android.graphics.Rect;
4 |
5 | public class RectUtil {
6 | /***
7 | * 判断某点是否在矩形区域
8 | * @param x
9 | * @param y
10 | * @param targetRect
11 | * @return
12 | */
13 | public static boolean isOverLay(Rect targetRect,int x,int y){
14 | return targetRect.contains(x, y);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/utils/SizeUtils.java:
--------------------------------------------------------------------------------
1 |
2 | package com.hyh.base_lib.utils;
3 |
4 | import com.hyh.base_lib.MyApplication;
5 |
6 | public class SizeUtils {
7 |
8 | public static int dp2px(float dpValue) {
9 | final float scale = MyApplication.getApplication().getResources().getDisplayMetrics().density;
10 | return (int) (dpValue * scale + 0.5f);
11 | }
12 |
13 | public static int px2dip(float pxValue) {
14 | final float scale = MyApplication.getApplication().getResources().getDisplayMetrics().density;
15 | return (int) (pxValue / scale + 0.5f);
16 | }
17 |
18 | public static int sp2px(final float spValue) {
19 | final float fontScale =MyApplication.getApplication().getResources().getDisplayMetrics().scaledDensity;
20 | return (int) (spValue * fontScale + 0.5f);
21 | }
22 |
23 | public static int px2sp(final float pxValue) {
24 | final float fontScale = MyApplication.getApplication().getResources().getDisplayMetrics().scaledDensity;
25 | return (int) (pxValue / fontScale + 0.5f);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/base_lib/src/main/java/com/hyh/base_lib/utils/TransformUtils.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib.utils;
2 |
3 | import java.util.Random;
4 |
5 | public class TransformUtils {
6 | /**
7 | * 获取指定区间的随机数(整数)
8 | * @param start
9 | * @param end
10 | * @return
11 | */
12 | public static int getRangeRandomInt(int start, int end) {
13 | if (start >= end) {
14 | return 1;
15 | }
16 | Random random = new Random();
17 | int result = random.nextInt(end - start) + start + 1;
18 | return result;
19 | }
20 |
21 | /**
22 | * 获取指定区间的随机数(可以是小数)
23 | * @param start
24 | * @param end
25 | * @return
26 | */
27 | public static double getRangeRandomDouble(int start, int end) {
28 | if (start >= end) {
29 | return 0;
30 | }
31 | Random random = new Random();
32 | int result = random.nextInt(end - start) + start;
33 | double resultDouble = random.nextDouble()+result;
34 | return resultDouble;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/base_lib/src/main/res/layout/item_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/base_lib/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | base_lib
3 |
4 |
--------------------------------------------------------------------------------
/base_lib/src/test/java/com/hyh/base_lib/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.hyh.base_lib;
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() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.3.2'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 | }
22 | }
23 |
24 | task clean(type: Delete) {
25 | delete rootProject.buildDir
26 | }
27 |
28 | ext {
29 | vcompileSdkVersion = 26
30 | versionCode = 1
31 | versionName = "1.0"
32 | vtargetSdkVersion = 26
33 | vminSdkVersion = 16
34 | vSupport_appcompat_v7 = "com.android.support:appcompat-v7:26.0.0"
35 | vSupport_recyclerview_v7 = "com.android.support:recyclerview-v7:26.0.0"
36 | }
37 |
--------------------------------------------------------------------------------
/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=-Xmx2048m
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
14 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Mar 30 14:26:31 CST 2019
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.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/img-folder/ConLimitedLinesEditText.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/ConLimitedLinesEditText.gif
--------------------------------------------------------------------------------
/img-folder/DynamicRoundTextView.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/DynamicRoundTextView.gif
--------------------------------------------------------------------------------
/img-folder/HappyNewYear2019-1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/HappyNewYear2019-1.gif
--------------------------------------------------------------------------------
/img-folder/HappyNewYear2019-2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/HappyNewYear2019-2.gif
--------------------------------------------------------------------------------
/img-folder/HappyNewYear2019-3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/HappyNewYear2019-3.gif
--------------------------------------------------------------------------------
/img-folder/LimitedEditText2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/LimitedEditText2.gif
--------------------------------------------------------------------------------
/img-folder/QQ图片20181207231008.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/QQ图片20181207231008.gif
--------------------------------------------------------------------------------
/img-folder/Screenshot_20180918-234447_customview-samples.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/Screenshot_20180918-234447_customview-samples.jpg
--------------------------------------------------------------------------------
/img-folder/auto.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/auto.gif
--------------------------------------------------------------------------------
/img-folder/cordinator.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/cordinator.gif
--------------------------------------------------------------------------------
/img-folder/graduletitleviewpager.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/graduletitleviewpager.gif
--------------------------------------------------------------------------------
/img-folder/hollowview2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/hollowview2.jpg
--------------------------------------------------------------------------------
/img-folder/limitedEditText1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/limitedEditText1.gif
--------------------------------------------------------------------------------
/img-folder/mask.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/mask.gif
--------------------------------------------------------------------------------
/img-folder/maskview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/maskview.jpg
--------------------------------------------------------------------------------
/img-folder/strokeTextView.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/strokeTextView.jpg
--------------------------------------------------------------------------------
/img-folder/videotogif_2018.09.18_23.49.53.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/videotogif_2018.09.18_23.49.53.gif
--------------------------------------------------------------------------------
/img-folder/videotogif_2018.09.24_01.06.20.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hyhdy/customview-samples/9eff527d6a78bd96e7330308e6eb90310b93a0ab/img-folder/videotogif_2018.09.24_01.06.20.gif
--------------------------------------------------------------------------------
/ioc_compile/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/ioc_compile/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java-library'
2 |
3 | dependencies {
4 | implementation fileTree(include: ['*.jar'], dir: 'libs')
5 | //帮助自动生成注解处理器配置文件
6 | implementation 'com.google.auto.service:auto-service:1.0-rc5'
7 | //帮助生成.java文件
8 | implementation 'com.squareup:javapoet:1.11.1'
9 | implementation project(':annotation')
10 | }
11 |
12 | sourceCompatibility = "7"
13 | targetCompatibility = "7"
14 |
--------------------------------------------------------------------------------
/ioc_compile/src/main/java/com/hyh/ioc_compile/processor/Helper.java:
--------------------------------------------------------------------------------
1 | package com.hyh.ioc_compile.processor;
2 |
3 | /**
4 | * Created by zhuhean on 02/11/2017.
5 | */
6 |
7 | final class Helper {
8 |
9 | private Helper() {
10 | }
11 |
12 | static String toCamelCase(String s) {
13 | if (s == null || s.length() < 1) return s;
14 | char firstChar = s.charAt(0);
15 | char newFirst = Character.toLowerCase(firstChar);
16 | return s.replace(firstChar, newFirst);
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':base_lib', ':ioc_compile', ':annotation'
2 |
--------------------------------------------------------------------------------