├── .gitignore ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── yhy │ │ └── widget │ │ └── demo │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── hybrid │ │ │ └── hybrid.js │ │ ├── img-url.txt │ │ └── index.html │ ├── java │ │ └── com │ │ │ └── yhy │ │ │ └── widget │ │ │ └── demo │ │ │ ├── App.java │ │ │ ├── DemoAppGlideModule.java │ │ │ ├── MainActivity.java │ │ │ ├── activity │ │ │ ├── AdvActivity.java │ │ │ ├── CheckBoxActivity.java │ │ │ ├── CheckedRLActivity.java │ │ │ ├── CheckedTVActivity.java │ │ │ ├── ClearEditTextActivity.java │ │ │ ├── ConstraintImageActivity.java │ │ │ ├── ETVActivity.java │ │ │ ├── FlowLayoutActivity.java │ │ │ ├── GradientTextViewActivity.java │ │ │ ├── InputDialogActivity.java │ │ │ ├── LineTextViewActivity.java │ │ │ ├── PickViewActivity.java │ │ │ ├── PreviewImageActivity.java │ │ │ ├── RIVActivity.java │ │ │ ├── RvActivity.java │ │ │ ├── SettingsActivity.java │ │ │ ├── SliderActivity.java │ │ │ ├── SquareIVActivity.java │ │ │ ├── StatusDialogActivity.java │ │ │ ├── StepActivity.java │ │ │ ├── SwitchButtonActivity.java │ │ │ ├── TagFlowActivity.java │ │ │ ├── TitleActivity.java │ │ │ ├── WebHybridActivity.java │ │ │ └── base │ │ │ │ └── BaseActivity.java │ │ │ ├── adapter │ │ │ └── RvTestAdapter.java │ │ │ ├── entity │ │ │ ├── ImgUrls.java │ │ │ ├── TestEntity.java │ │ │ └── TestStep.java │ │ │ ├── status │ │ │ ├── DefActivity.java │ │ │ ├── HelperActivity.java │ │ │ ├── LayoutActivity.java │ │ │ └── StatusActivity.java │ │ │ └── utils │ │ │ ├── ImgUtils.java │ │ │ └── ToastUtils.java │ └── res │ │ ├── anim │ │ └── anim_alpha_image_load.xml │ │ ├── drawable │ │ ├── bg_checked_ctv_selector.xml │ │ ├── cursor_bg_shape.xml │ │ └── ic_delete.xml │ │ ├── layout │ │ ├── activity_adv.xml │ │ ├── activity_check_box.xml │ │ ├── activity_checked_relative_layout.xml │ │ ├── activity_checked_textview.xml │ │ ├── activity_clear_edit_text.xml │ │ ├── activity_constraint_image_view.xml │ │ ├── activity_etv.xml │ │ ├── activity_flow_layout.xml │ │ ├── activity_gradient_text_view.xml │ │ ├── activity_input_dialog.xml │ │ ├── activity_line_text_view.xml │ │ ├── activity_main.xml │ │ ├── activity_pick_view.xml │ │ ├── activity_preview_image.xml │ │ ├── activity_riv.xml │ │ ├── activity_rv.xml │ │ ├── activity_settings.xml │ │ ├── activity_slider.xml │ │ ├── activity_square_imageview.xml │ │ ├── activity_status.xml │ │ ├── activity_status_def.xml │ │ ├── activity_status_dialog.xml │ │ ├── activity_status_helper.xml │ │ ├── activity_status_layout.xml │ │ ├── activity_step_view_vertical.xml │ │ ├── activity_switch_button.xml │ │ ├── activity_tag_flow.xml │ │ ├── activity_title.xml │ │ ├── activity_web_hybrid.xml │ │ ├── item_square_iv_rv.xml │ │ ├── item_step_horizontal.xml │ │ ├── item_step_vertical.xml │ │ └── item_tag_flow.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── d.jpeg │ │ ├── e.jpeg │ │ ├── ic_arrow_right.png │ │ ├── ic_avatar.jpg │ │ ├── ic_back.png │ │ ├── ic_launcher.png │ │ ├── ic_launcher_round.png │ │ ├── ic_logo.jpg │ │ ├── ic_more.png │ │ ├── ic_notice.png │ │ ├── ic_settings.png │ │ └── ic_step_finished.png │ │ ├── mipmap-xxhdpi │ │ ├── bg_main.jpg │ │ ├── ic_clear.png │ │ ├── ic_launcher.png │ │ ├── ic_launcher_round.png │ │ ├── img_pager_1.jpg │ │ ├── img_pager_2.jpg │ │ ├── img_pager_3.jpg │ │ └── img_pager_4.jpg │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── network_security_config.xml │ └── test │ └── java │ └── com │ └── yhy │ └── widget │ └── demo │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── imgs └── download_qr.png ├── jitpack.yml ├── settings.gradle └── widget ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src ├── androidTest └── java │ └── com │ └── yhy │ └── widget │ └── ExampleInstrumentedTest.java ├── main ├── AndroidManifest.xml ├── java │ └── com │ │ └── yhy │ │ └── widget │ │ ├── component │ │ ├── downloader │ │ │ ├── FilenameGenerator.java │ │ │ └── WidgetDownloader.java │ │ ├── helper │ │ │ ├── CookieHelper.java │ │ │ └── ImageViewScaleMatrixHelper.java │ │ └── provider │ │ │ └── WidgetFileProvider.java │ │ ├── core │ │ ├── adv │ │ │ ├── AdvView.java │ │ │ └── adapter │ │ │ │ ├── AdvAdapter.java │ │ │ │ ├── SimpleAdvAdapter.java │ │ │ │ └── TextAdvAdapter.java │ │ ├── checked │ │ │ ├── CheckBox.java │ │ │ └── CheckedTextView.java │ │ ├── dialog │ │ │ ├── InputDialogView.java │ │ │ └── status │ │ │ │ ├── StatusDialogManager.java │ │ │ │ ├── abs │ │ │ │ ├── AbsStatusDialog.java │ │ │ │ └── AbsUnableCancelStatusDialog.java │ │ │ │ └── dialog │ │ │ │ ├── ErrorDialog.java │ │ │ │ ├── FailedDialog.java │ │ │ │ ├── LoadingDialog.java │ │ │ │ └── SuccessDialog.java │ │ ├── exptext │ │ │ └── ExpandTextView.java │ │ ├── img │ │ │ ├── ConstraintImageView.java │ │ │ ├── SquareImageView.java │ │ │ └── round │ │ │ │ ├── CircleImageView.java │ │ │ │ ├── RoundImageView.java │ │ │ │ └── abs │ │ │ │ └── AbsRoundImageView.java │ │ ├── loading │ │ │ ├── Indicator.java │ │ │ ├── LoadingView.java │ │ │ └── indicator │ │ │ │ ├── BallBeatIndicator.java │ │ │ │ ├── BallClipRotateIndicator.java │ │ │ │ ├── BallClipRotateMultipleIndicator.java │ │ │ │ ├── BallClipRotatePulseIndicator.java │ │ │ │ ├── BallGridBeatIndicator.java │ │ │ │ ├── BallGridPulseIndicator.java │ │ │ │ ├── BallPulseIndicator.java │ │ │ │ ├── BallPulseRiseIndicator.java │ │ │ │ ├── BallPulseSyncIndicator.java │ │ │ │ ├── BallRotateIndicator.java │ │ │ │ ├── BallScaleIndicator.java │ │ │ │ ├── BallScaleMultipleIndicator.java │ │ │ │ ├── BallScaleRippleIndicator.java │ │ │ │ ├── BallScaleRippleMultipleIndicator.java │ │ │ │ ├── BallSpinFadeLoaderIndicator.java │ │ │ │ ├── BallTrianglePathIndicator.java │ │ │ │ ├── BallZigZagDeflectIndicator.java │ │ │ │ ├── BallZigZagIndicator.java │ │ │ │ ├── CubeTransitionIndicator.java │ │ │ │ ├── LineScaleIndicator.java │ │ │ │ ├── LineScalePartyIndicator.java │ │ │ │ ├── LineScalePulseOutIndicator.java │ │ │ │ ├── LineScalePulseOutRapidIndicator.java │ │ │ │ ├── LineSpinFadeLoaderIndicator.java │ │ │ │ ├── PacmanIndicator.java │ │ │ │ ├── SemiCircleSpinIndicator.java │ │ │ │ ├── SquareSpinIndicator.java │ │ │ │ └── TriangleSkewSpinIndicator.java │ │ ├── pager │ │ │ └── HackyViewPager.java │ │ ├── picker │ │ │ └── PickerView.java │ │ ├── preview │ │ │ ├── ImgPreCfg.java │ │ │ ├── ImgPreHelper.java │ │ │ ├── PreImgActivity.java │ │ │ ├── PreImgAdapter.java │ │ │ └── PreviewModel.java │ │ ├── recycler │ │ │ ├── RecyclerScrollView.java │ │ │ ├── div │ │ │ │ └── RvDivider.java │ │ │ └── layout │ │ │ │ └── WrapContentLayoutManager.java │ │ ├── settings │ │ │ └── SettingsItemView.java │ │ ├── step │ │ │ ├── StepView.java │ │ │ ├── adapter │ │ │ │ └── StepAdapter.java │ │ │ ├── entity │ │ │ │ ├── StepAble.java │ │ │ │ └── StepNode.java │ │ │ └── indicator │ │ │ │ └── StepIndicator.java │ │ ├── text │ │ │ ├── ClearEditText.java │ │ │ ├── GradientTextView.java │ │ │ └── LineTextView.java │ │ ├── title │ │ │ └── TitleBar.java │ │ ├── toggle │ │ │ └── SwitchButton.java │ │ └── web │ │ │ ├── HybridWebView.java │ │ │ ├── bridge │ │ │ └── HybridBridge.java │ │ │ ├── client │ │ │ ├── ChromeClient.java │ │ │ └── WebClient.java │ │ │ ├── helper │ │ │ └── DownHelper.java │ │ │ └── listener │ │ │ ├── OnWebEventListener.java │ │ │ ├── OnWebLoadListener.java │ │ │ ├── SimpleOnWebEventListener.java │ │ │ └── SimpleOnWebLoadListener.java │ │ ├── layout │ │ ├── checked │ │ │ ├── CheckedFrameLayout.java │ │ │ ├── CheckedLayout.java │ │ │ ├── CheckedLinearLayout.java │ │ │ └── CheckedRelativeLayout.java │ │ ├── flow │ │ │ ├── FlowLayout.java │ │ │ └── tag │ │ │ │ ├── TagContainer.java │ │ │ │ ├── TagFlowAdapter.java │ │ │ │ └── TagFlowLayout.java │ │ ├── slider │ │ │ └── SlideLayout.java │ │ └── status │ │ │ ├── StatusLayout.java │ │ │ ├── handler │ │ │ └── StaHandler.java │ │ │ ├── helper │ │ │ ├── DefLayoutHelper.java │ │ │ ├── StaLayoutHelper.java │ │ │ └── StaLayoutHelperBuilder.java │ │ │ ├── listener │ │ │ └── OnStatusRetryListener.java │ │ │ └── view │ │ │ ├── StaEmptyView.java │ │ │ ├── StaErrorView.java │ │ │ └── StaLoadingView.java │ │ └── utils │ │ └── WidgetCoreUtils.java └── res │ ├── anim │ ├── adv_in.xml │ └── adv_out.xml │ ├── drawable │ ├── bg_input_dialog_enable_selector.xml │ ├── icon_status_dialog_loading.xml │ ├── img_status_empty.xml │ ├── img_status_error.xml │ └── widget_status_dialog_shape.xml │ ├── layout │ ├── widget_activity_pre_img.xml │ ├── widget_input_dialog.xml │ ├── widget_item_pager_per_img.xml │ ├── widget_settings_item_view.xml │ ├── widget_status_dialog.xml │ ├── widget_status_empty.xml │ ├── widget_status_error.xml │ ├── widget_status_loading.xml │ ├── widget_step_view.xml │ └── widget_titb_bar.xml │ ├── mipmap-xhdpi │ ├── ic_def_download.png │ └── img_def_loading.jpg │ ├── mipmap-xxhdpi │ ├── ic_def_download.png │ ├── icon_status_dialog_error.png │ ├── icon_status_dialog_failed.png │ ├── icon_status_dialog_loading.png │ └── icon_status_dialog_success.png │ ├── values │ ├── arrays.xml │ ├── attrs.xml │ ├── colors.xml │ ├── strings.xml │ └── styles.xml │ └── xml │ ├── network_security_config.xml │ └── widget_file_provider_paths.xml └── test └── java └── com └── yhy └── widget └── ExampleUnitTest.java /.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 | .idea/ 17 | 18 | # Gradle files 19 | .gradle/ 20 | build/ 21 | 22 | # Local configuration file (sdk path, etc) 23 | local.properties 24 | 25 | # Proguard folder generated by Eclipse 26 | proguard/ 27 | 28 | # Log Files 29 | *.log 30 | 31 | # Android Studio Navigation editor temp files 32 | .navigation/ 33 | 34 | # Android Studio captures folder 35 | captures/ 36 | 37 | # Intellij 38 | *.iml 39 | .idea/ 40 | 41 | # Keystore files 42 | *.jks 43 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'org.jetbrains.kotlin.android' 4 | } 5 | 6 | java { 7 | toolchain { 8 | languageVersion = JavaLanguageVersion.of(11) 9 | } 10 | } 11 | 12 | android { 13 | namespace 'com.yhy.widget.demo' 14 | compileSdkVersion 33 15 | 16 | defaultConfig { 17 | applicationId "com.yhy.widget.demo" 18 | minSdkVersion 24 19 | targetSdkVersion 33 20 | versionCode 1 21 | versionName "1.0" 22 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 23 | 24 | // 开启多分包 25 | multiDexEnabled true 26 | } 27 | 28 | buildTypes { 29 | release { 30 | minifyEnabled false 31 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 32 | } 33 | } 34 | 35 | 36 | compileOptions { 37 | sourceCompatibility JavaVersion.VERSION_11 38 | targetCompatibility JavaVersion.VERSION_11 39 | } 40 | lint { 41 | abortOnError false 42 | checkReleaseBuilds false 43 | } 44 | 45 | // 打包apk自动生成名称 46 | android.applicationVariants.all { variant -> 47 | variant.outputs.all { output -> 48 | outputFileName = "Widget.apk" 49 | } 50 | } 51 | } 52 | 53 | dependencies { 54 | implementation 'androidx.appcompat:appcompat:1.6.1' 55 | implementation 'androidx.recyclerview:recyclerview:1.3.0' 56 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4' 57 | implementation 'com.github.bumptech.glide:glide:4.14.2' 58 | implementation 'com.squareup.picasso:picasso:2.71828' 59 | implementation 'androidx.annotation:annotation:1.6.0' 60 | implementation "androidx.multidex:multidex:2.0.1" 61 | implementation 'androidx.core:core-ktx:1.10.1' 62 | 63 | testImplementation 'junit:junit:4.13.2' 64 | 65 | implementation project(':widget') 66 | 67 | annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2' 68 | androidTestImplementation 'androidx.test.ext:junit:1.1.5' 69 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' 70 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\android-sdk-windows/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/yhy/widget/demo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo; 2 | 3 | import android.content.Context; 4 | import androidx.test.InstrumentationRegistry; 5 | import androidx.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.yhy.widget.demo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/assets/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页 6 | 21 | 22 | 88 | 89 | 90 |
点击试试
91 | 92 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/DemoAppGlideModule.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.annotation.NonNull; 6 | 7 | import com.bumptech.glide.GlideBuilder; 8 | import com.bumptech.glide.annotation.GlideModule; 9 | import com.bumptech.glide.load.DecodeFormat; 10 | import com.bumptech.glide.load.resource.gif.GifOptions; 11 | import com.bumptech.glide.module.AppGlideModule; 12 | import com.bumptech.glide.request.RequestOptions; 13 | 14 | /** 15 | * Created on 2022-10-26 11:01 16 | * 17 | * @author 颜洪毅 18 | * @version 1.0.0 19 | * @since 1.0.0 20 | */ 21 | @GlideModule 22 | public class DemoAppGlideModule extends AppGlideModule { 23 | @Override 24 | public boolean isManifestParsingEnabled() { 25 | return false; 26 | } 27 | 28 | @Override 29 | public void applyOptions(@NonNull Context context, @NonNull GlideBuilder builder) { 30 | RequestOptions options = new RequestOptions() 31 | .format(DecodeFormat.PREFER_RGB_565) 32 | .set(GifOptions.DECODE_FORMAT, DecodeFormat.DEFAULT); 33 | builder.setDefaultRequestOptions(options); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/CheckBoxActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.view.View; 4 | import android.widget.TextView; 5 | 6 | import com.yhy.widget.core.checked.CheckBox; 7 | import com.yhy.widget.demo.R; 8 | import com.yhy.widget.demo.activity.base.BaseActivity; 9 | 10 | /** 11 | * author : 颜洪毅 12 | * e-mail : yhyzgn@gmail.com 13 | * time : 2018-06-06 16:45 14 | * version: 1.0.0 15 | * desc : 16 | */ 17 | public class CheckBoxActivity extends BaseActivity { 18 | 19 | private CheckBox cbDef; 20 | private CheckBox cbTest; 21 | private CheckBox cbCancel; 22 | private TextView tvCancel; 23 | 24 | @Override 25 | protected int getLayout() { 26 | return R.layout.activity_check_box; 27 | } 28 | 29 | @Override 30 | protected void initView() { 31 | cbDef = $(R.id.cb_def); 32 | cbTest = $(R.id.cb_test); 33 | cbCancel = $(R.id.cb_cancel); 34 | tvCancel = $(R.id.tv_cancel); 35 | } 36 | 37 | @Override 38 | protected void initData() { 39 | } 40 | 41 | @Override 42 | protected void initEvent() { 43 | cbDef.setOnCheckedChangeListener(new CheckBox.OnCheckedChangeListener() { 44 | @Override 45 | public void onCheckedChanged(CheckBox checkBox, boolean isChecked) { 46 | toast("第一个是否选中:" + isChecked); 47 | } 48 | }); 49 | 50 | cbTest.setOnCheckedChangeListener(new CheckBox.OnCheckedChangeListener() { 51 | @Override 52 | public void onCheckedChanged(CheckBox checkBox, boolean isChecked) { 53 | toast("第二个是否选中:" + isChecked); 54 | } 55 | }); 56 | 57 | cbCancel.setOnCheckedChangeListener(new CheckBox.OnCheckedChangeListener() { 58 | @Override 59 | public void onCheckedChanged(CheckBox checkBox, boolean isChecked) { 60 | toast("第三个是否选中:" + isChecked); 61 | } 62 | }); 63 | 64 | tvCancel.setOnClickListener(new View.OnClickListener() { 65 | @Override 66 | public void onClick(View v) { 67 | // 切换 68 | cbCancel.toggle(); 69 | } 70 | }); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/CheckedRLActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.view.View; 4 | import android.widget.TextView; 5 | 6 | import com.yhy.widget.layout.checked.CheckedRelativeLayout; 7 | import com.yhy.widget.demo.R; 8 | import com.yhy.widget.demo.activity.base.BaseActivity; 9 | 10 | /** 11 | * author : 颜洪毅 12 | * e-mail : yhyzgn@gmail.com 13 | * time : 2017-12-08 10:04 14 | * version: 1.0.0 15 | * desc : 16 | */ 17 | public class CheckedRLActivity extends BaseActivity { 18 | 19 | private TextView tvTest; 20 | private CheckedRelativeLayout crlTest; 21 | 22 | @Override 23 | protected int getLayout() { 24 | return R.layout.activity_checked_relative_layout; 25 | } 26 | 27 | @Override 28 | protected void initView() { 29 | crlTest = $(R.id.crl_test); 30 | tvTest = $(R.id.tv_test); 31 | 32 | crlTest.setChecked(true); 33 | } 34 | 35 | @Override 36 | protected void initData() { 37 | 38 | } 39 | 40 | @Override 41 | protected void initEvent() { 42 | tvTest.setOnClickListener(new View.OnClickListener() { 43 | @Override 44 | public void onClick(View v) { 45 | toast("点击了TextView"); 46 | } 47 | }); 48 | 49 | crlTest.setOnClickListener(new View.OnClickListener() { 50 | @Override 51 | public void onClick(View v) { 52 | toast("点击"); 53 | } 54 | }); 55 | 56 | crlTest.setOnCheckedChangeListener(new CheckedRelativeLayout.OnCheckedChangeListener() { 57 | @Override 58 | public void onChanged(CheckedRelativeLayout crl, boolean isChecked) { 59 | toast("isChecked = " + isChecked); 60 | } 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/CheckedTVActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.view.View; 4 | 5 | import com.yhy.widget.core.checked.CheckedTextView; 6 | import com.yhy.widget.demo.R; 7 | import com.yhy.widget.demo.activity.base.BaseActivity; 8 | 9 | /** 10 | * author : 颜洪毅 11 | * e-mail : yhyzgn@gmail.com 12 | * time : 2017-12-07 17:44 13 | * version: 1.0.0 14 | * desc : 15 | */ 16 | public class CheckedTVActivity extends BaseActivity { 17 | 18 | private CheckedTextView ctvDef; 19 | private CheckedTextView ctvPrev; 20 | 21 | @Override 22 | protected int getLayout() { 23 | return R.layout.activity_checked_textview; 24 | } 25 | 26 | @Override 27 | protected void initView() { 28 | ctvDef = findViewById(R.id.ctv_def); 29 | ctvPrev = findViewById(R.id.ctv_prev); 30 | } 31 | 32 | @Override 33 | protected void initData() { 34 | } 35 | 36 | @Override 37 | protected void initEvent() { 38 | ctvDef.setOnClickListener(new View.OnClickListener() { 39 | @Override 40 | public void onClick(View v) { 41 | toast("我的click被阻止了"); 42 | } 43 | }); 44 | 45 | ctvDef.setOnLongClickListener(new View.OnLongClickListener() { 46 | @Override 47 | public boolean onLongClick(View v) { 48 | toast("我的longClick被阻止了"); 49 | return true; 50 | } 51 | }); 52 | 53 | ctvDef.setOnCheckedChangeListener(new CheckedTextView.OnCheckedChangeListener() { 54 | @Override 55 | public void onChanged(CheckedTextView ctv, boolean isChecked) { 56 | toast("isChecked = " + isChecked); 57 | } 58 | }); 59 | 60 | ctvPrev.setOnClickListener(new View.OnClickListener() { 61 | @Override 62 | public void onClick(View v) { 63 | toast("我的click未被阻止"); 64 | } 65 | }); 66 | 67 | ctvPrev.setOnLongClickListener(new View.OnLongClickListener() { 68 | @Override 69 | public boolean onLongClick(View v) { 70 | toast("我的longClick未被阻止"); 71 | return true; 72 | } 73 | }); 74 | 75 | ctvPrev.setOnCheckedChangeListener(new CheckedTextView.OnCheckedChangeListener() { 76 | @Override 77 | public void onChanged(CheckedTextView ctv, boolean isChecked) { 78 | toast("isChecked = " + isChecked); 79 | } 80 | }); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/ClearEditTextActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import com.yhy.widget.demo.R; 4 | import com.yhy.widget.demo.activity.base.BaseActivity; 5 | 6 | /** 7 | * Created on 2022-09-27 11:22 8 | * 9 | * @author 颜洪毅 10 | * @version 1.0.0 11 | * @since 1.0.0 12 | */ 13 | public class ClearEditTextActivity extends BaseActivity { 14 | @Override 15 | protected int getLayout() { 16 | return R.layout.activity_clear_edit_text; 17 | } 18 | 19 | @Override 20 | protected void initView() { 21 | 22 | } 23 | 24 | @Override 25 | protected void initData() { 26 | 27 | } 28 | 29 | @Override 30 | protected void initEvent() { 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/ConstraintImageActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.view.View; 4 | 5 | import com.yhy.widget.core.img.ConstraintImageView; 6 | import com.yhy.widget.demo.R; 7 | import com.yhy.widget.demo.activity.base.BaseActivity; 8 | import com.yhy.widget.demo.entity.ImgUrls; 9 | import com.yhy.widget.demo.utils.ImgUtils; 10 | 11 | /** 12 | * author : 颜洪毅 13 | * e-mail : yhyzgn@gmail.com 14 | * time : 2018-06-06 15:16 15 | * version: 1.0.0 16 | * desc : 17 | */ 18 | public class ConstraintImageActivity extends BaseActivity { 19 | 20 | private ConstraintImageView civWidth; 21 | private ConstraintImageView civHeight; 22 | private ConstraintImageView civA; 23 | private ConstraintImageView civB; 24 | private ConstraintImageView civC; 25 | private ConstraintImageView civD; 26 | private ConstraintImageView civTest; 27 | private ConstraintImageView civTestRatio; 28 | 29 | @Override 30 | protected int getLayout() { 31 | return R.layout.activity_constraint_image_view; 32 | } 33 | 34 | @Override 35 | protected void initView() { 36 | civWidth = $(R.id.civ_width); 37 | civHeight = $(R.id.civ_height); 38 | civA = $(R.id.civ_a); 39 | civB = $(R.id.civ_b); 40 | civC = $(R.id.civ_c); 41 | civD = $(R.id.civ_d); 42 | civTest = $(R.id.civ_test); 43 | civTestRatio = $(R.id.civ_test_ratio); 44 | } 45 | 46 | @Override 47 | protected void initData() { 48 | ImgUtils.load(this, civWidth, ImgUrls.getAImgUrl()); 49 | ImgUtils.load(this, civHeight, ImgUrls.getAImgUrl()); 50 | ImgUtils.load(this, civA, ImgUrls.getAImgUrl()); 51 | ImgUtils.load(this, civB, ImgUrls.getAImgUrl()); 52 | ImgUtils.load(this, civC, ImgUrls.getAImgUrl()); 53 | ImgUtils.load(this, civD, ImgUrls.getAImgUrl()); 54 | ImgUtils.load(this, civTest, ImgUrls.getAImgUrl()); 55 | ImgUtils.load(this, civTestRatio, ImgUrls.getAImgUrl()); 56 | } 57 | 58 | @Override 59 | protected void initEvent() { 60 | civWidth.setOnClickListener(new View.OnClickListener() { 61 | @Override 62 | public void onClick(View v) { 63 | civWidth.setRatio(1.5f); 64 | civHeight.setRatio("250:300"); 65 | civTest.setRatio(400, 400); 66 | } 67 | }); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/ETVActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.widget.TextView; 4 | 5 | import com.yhy.widget.core.exptext.ExpandTextView; 6 | import com.yhy.widget.demo.R; 7 | import com.yhy.widget.demo.activity.base.BaseActivity; 8 | 9 | public class ETVActivity extends BaseActivity { 10 | 11 | private ExpandTextView etvContent; 12 | 13 | @Override 14 | protected int getLayout() { 15 | return R.layout.activity_etv; 16 | } 17 | 18 | @Override 19 | protected void initView() { 20 | etvContent = findViewById(R.id.etv_content); 21 | etvContent.mapViewId(R.id.tv_content, R.id.tv_expand); 22 | } 23 | 24 | @Override 25 | protected void initData() { 26 | etvContent.setText("哈哈哈哈哈哈啊哈哈哈哈"); 27 | etvContent.setText("测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本"); 28 | } 29 | 30 | @Override 31 | protected void initEvent() { 32 | etvContent.setOnExpandStateChangeListener(new ExpandTextView.OnExpandStateChangeListener() { 33 | @Override 34 | public void onExpandStateChanged(TextView textView, boolean isExpanded) { 35 | toast(isExpanded ? "展开了" : "收起了"); 36 | } 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/FlowLayoutActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import com.yhy.widget.demo.R; 4 | import com.yhy.widget.demo.activity.base.BaseActivity; 5 | 6 | /** 7 | * author : 颜洪毅 8 | * e-mail : yhyzgn@gmail.com 9 | * time : 2017-12-08 16:51 10 | * version: 1.0.0 11 | * desc : 12 | */ 13 | public class FlowLayoutActivity extends BaseActivity { 14 | @Override 15 | protected int getLayout() { 16 | return R.layout.activity_flow_layout; 17 | } 18 | 19 | @Override 20 | protected void initView() { 21 | } 22 | 23 | @Override 24 | protected void initData() { 25 | } 26 | 27 | @Override 28 | protected void initEvent() { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/GradientTextViewActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import com.yhy.widget.demo.R; 4 | import com.yhy.widget.demo.activity.base.BaseActivity; 5 | 6 | /** 7 | * author : 颜洪毅 8 | * e-mail : yhyzgn@gmail.com 9 | * time : 2018-06-06 16:45 10 | * version: 1.0.0 11 | * desc : 12 | */ 13 | public class GradientTextViewActivity extends BaseActivity { 14 | @Override 15 | protected int getLayout() { 16 | return R.layout.activity_gradient_text_view; 17 | } 18 | 19 | @Override 20 | protected void initView() { 21 | 22 | } 23 | 24 | @Override 25 | protected void initData() { 26 | 27 | } 28 | 29 | @Override 30 | protected void initEvent() { 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/LineTextViewActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import com.yhy.widget.demo.R; 4 | import com.yhy.widget.demo.activity.base.BaseActivity; 5 | 6 | /** 7 | * author : 颜洪毅 8 | * e-mail : yhyzgn@gmail.com 9 | * time : 2018-06-06 16:45 10 | * version: 1.0.0 11 | * desc : 12 | */ 13 | public class LineTextViewActivity extends BaseActivity { 14 | @Override 15 | protected int getLayout() { 16 | return R.layout.activity_line_text_view; 17 | } 18 | 19 | @Override 20 | protected void initView() { 21 | } 22 | 23 | @Override 24 | protected void initData() { 25 | } 26 | 27 | @Override 28 | protected void initEvent() { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/PickViewActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import com.yhy.widget.core.picker.PickerView; 4 | import com.yhy.widget.demo.R; 5 | import com.yhy.widget.demo.activity.base.BaseActivity; 6 | import com.yhy.widget.demo.entity.TestEntity; 7 | 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | /** 12 | * author : 颜洪毅 13 | * e-mail : yhyzgn@gmail.com 14 | * time : 2017-09-08 19:58 15 | * version: 1.0.0 16 | * desc : 17 | */ 18 | public class PickViewActivity extends BaseActivity { 19 | 20 | private PickerView pvTest; 21 | 22 | @Override 23 | protected int getLayout() { 24 | return R.layout.activity_pick_view; 25 | } 26 | 27 | @Override 28 | protected void initView() { 29 | pvTest = findViewById(R.id.pv_test); 30 | } 31 | 32 | @Override 33 | protected void initData() { 34 | List testList = new ArrayList<>(); 35 | for (int i = 1; i <= 40; i++) { 36 | testList.add(new TestEntity(i, "Data " + i)); 37 | } 38 | 39 | pvTest.setData(testList, new PickerView.ItemProvider() { 40 | @Override 41 | public String getItem(TestEntity data, int position) { 42 | return data.name; 43 | } 44 | }).setOnSelectListener(new PickerView.OnSelectListener() { 45 | @Override 46 | public void onSelect(TestEntity data) { 47 | toast(data.name); 48 | } 49 | }); 50 | } 51 | 52 | @Override 53 | protected void initEvent() { 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/PreviewImageActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.widget.ImageView; 4 | 5 | import com.yhy.widget.core.preview.ImgPreCfg; 6 | import com.yhy.widget.core.preview.PreImgActivity; 7 | import com.yhy.widget.core.preview.PreviewModel; 8 | import com.yhy.widget.demo.R; 9 | import com.yhy.widget.demo.activity.base.BaseActivity; 10 | import com.yhy.widget.demo.entity.ImgUrls; 11 | import com.yhy.widget.demo.utils.ImgUtils; 12 | 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | public class PreviewImageActivity extends BaseActivity { 17 | 18 | private ImageView ivA; 19 | private ImageView ivB; 20 | 21 | @Override 22 | protected int getLayout() { 23 | return R.layout.activity_preview_image; 24 | } 25 | 26 | @Override 27 | protected void initView() { 28 | ivA = findViewById(R.id.iv_a); 29 | ivB = findViewById(R.id.iv_b); 30 | } 31 | 32 | @Override 33 | protected void initData() { 34 | ImgUtils.load(this, ivB, "/storage/emulated/0/Download/103340rc8v3xuddce27y8w.jpg"); 35 | } 36 | 37 | @Override 38 | protected void initEvent() { 39 | ivA.setOnClickListener(v -> preview(ivA)); 40 | 41 | ivB.setOnClickListener(v -> { 42 | ImgPreCfg cfg = new ImgPreCfg(v, new PreviewModel().setUrl(ImgUrls.getAImgUrl()).setType(PreviewModel.TYPE_IMAGE)); 43 | // cfg.setDownloadable(false); 44 | PreImgActivity.preview(PreviewImageActivity.this, cfg); 45 | }); 46 | } 47 | 48 | private void preview(ImageView iv) { 49 | List list = new ArrayList<>(); 50 | for (int i = 0; i < 4; i++) { 51 | list.add(new PreviewModel().setName("图片" + (i + 1)).setUrl(ImgUrls.getAImgUrl()).setType(PreviewModel.TYPE_IMAGE)); 52 | } 53 | list.add(new PreviewModel().setName("GG").setUrl("http://rbv01.ku6.com/omtSn0z_PTREtneb3GRtGg.mp4").setType(PreviewModel.TYPE_VIDEO).setThumbnail(ImgUrls.getAImgUrl())); 54 | list.add(new PreviewModel().setName("图片--1234").setUrl(ImgUrls.getAImgUrl()).setType(PreviewModel.TYPE_IMAGE)); 55 | list.add(new PreviewModel().setName("SIN_TEL").setUrl("http://rbv01.ku6.com/7lut5JlEO-v6a8K3X9xBNg.mp4").setType(PreviewModel.TYPE_VIDEO).setThumbnail(ImgUrls.getAImgUrl())); 56 | list.add(new PreviewModel().setName("图片--34234").setUrl(ImgUrls.getAImgUrl()).setType(PreviewModel.TYPE_IMAGE)); 57 | list.add(new PreviewModel().setName("试试").setUrl("/storage/emulated/0/Download/视频_2022-5-1_18-56-3.mp4").setType(PreviewModel.TYPE_VIDEO).setThumbnail("/storage/emulated/0/Download/v2-2af194dc7206f39c80bbb209bafbae28_r.jpg")); 58 | ImgPreCfg cfg = new ImgPreCfg(iv, list, 8); 59 | // cfg.setDownloadable(false); 60 | // cfg.setDownloadIconId(R.mipmap.ic_def_download); 61 | PreImgActivity.preview(this, cfg); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/RIVActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.widget.ImageView; 4 | 5 | import com.yhy.widget.core.img.round.CircleImageView; 6 | import com.yhy.widget.core.img.round.RoundImageView; 7 | import com.yhy.widget.demo.R; 8 | import com.yhy.widget.demo.activity.base.BaseActivity; 9 | import com.yhy.widget.demo.entity.ImgUrls; 10 | import com.yhy.widget.demo.utils.ImgUtils; 11 | 12 | public class RIVActivity extends BaseActivity { 13 | 14 | private CircleImageView civAvatar; 15 | private RoundImageView rivA; 16 | private RoundImageView rivB; 17 | private RoundImageView rivC; 18 | private RoundImageView rivD; 19 | private RoundImageView rivTest; 20 | private ImageView ivTest; 21 | 22 | @Override 23 | protected int getLayout() { 24 | return R.layout.activity_riv; 25 | } 26 | 27 | @Override 28 | protected void initView() { 29 | civAvatar = findViewById(R.id.civ_avatar); 30 | rivA = findViewById(R.id.riv_a); 31 | rivB = findViewById(R.id.riv_b); 32 | rivC = findViewById(R.id.riv_c); 33 | rivD = findViewById(R.id.riv_d); 34 | rivTest = findViewById(R.id.riv_test); 35 | ivTest = findViewById(R.id.iv_test); 36 | } 37 | 38 | @Override 39 | protected void initData() { 40 | ImgUtils.load(this, civAvatar, ImgUrls.getAImgUrl()); 41 | ImgUtils.load(this, rivA, ImgUrls.getAImgUrl()); 42 | ImgUtils.load(this, rivB, ImgUrls.getAImgUrl()); 43 | // ImgUtils.load(this, rivC, "https://fanyi-cdn.cdn.bcebos.com/webStatic/translation/asset/wechat-icon.194f5b65.png"); 44 | ImgUtils.load(this, rivD, ImgUrls.getAImgUrl()); 45 | 46 | String testUrl = ImgUrls.getAImgUrl(); 47 | ImgUtils.load(this, rivTest, testUrl); 48 | ImgUtils.load(this, ivTest, testUrl); 49 | } 50 | 51 | @Override 52 | protected void initEvent() { 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/RvActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import androidx.recyclerview.widget.GridLayoutManager; 4 | import androidx.recyclerview.widget.LinearLayoutManager; 5 | import androidx.recyclerview.widget.RecyclerView; 6 | 7 | import com.yhy.widget.core.recycler.div.RvDivider; 8 | import com.yhy.widget.demo.R; 9 | import com.yhy.widget.demo.activity.base.BaseActivity; 10 | import com.yhy.widget.demo.adapter.RvTestAdapter; 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | public class RvActivity extends BaseActivity { 16 | private final List TEST_STR_LIST = new ArrayList<>(); 17 | private RecyclerView rvContent; 18 | private RvDivider mDivider; 19 | 20 | @Override 21 | protected int getLayout() { 22 | return R.layout.activity_rv; 23 | } 24 | 25 | @Override 26 | protected void initView() { 27 | rvContent = findViewById(R.id.rv_content); 28 | } 29 | 30 | @Override 31 | protected void initData() { 32 | TEST_STR_LIST.add("Test 1"); 33 | TEST_STR_LIST.add("Test 2"); 34 | TEST_STR_LIST.add("Test 3"); 35 | TEST_STR_LIST.add("Test 4"); 36 | TEST_STR_LIST.add("Test 5"); 37 | TEST_STR_LIST.add("Test 6"); 38 | TEST_STR_LIST.add("Test 7"); 39 | 40 | mDivider = new RvDivider.Builder(this) 41 | .widthDp(30) 42 | .color(getResources().getColor(R.color.colorPrimary)) 43 | .type(RvDivider.DividerType.TYPE_WITH_START_END) 44 | .build(); 45 | 46 | // horizontal(); 47 | 48 | // vertical(); 49 | 50 | gridview(); 51 | } 52 | 53 | @Override 54 | protected void initEvent() { 55 | 56 | } 57 | 58 | private void gridview() { 59 | rvContent.setLayoutManager(new GridLayoutManager(this, 4)); 60 | 61 | rvContent.setAdapter(new RvTestAdapter(this, TEST_STR_LIST)); 62 | rvContent.addItemDecoration(mDivider); 63 | } 64 | 65 | private void vertical() { 66 | rvContent.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)); 67 | 68 | rvContent.setAdapter(new RvTestAdapter(this, TEST_STR_LIST)); 69 | rvContent.addItemDecoration(mDivider); 70 | } 71 | 72 | private void horizontal() { 73 | rvContent.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)); 74 | 75 | rvContent.setAdapter(new RvTestAdapter(this, TEST_STR_LIST)); 76 | rvContent.addItemDecoration(mDivider); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/SettingsActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.os.Bundle; 4 | import android.widget.Toast; 5 | 6 | import com.yhy.widget.core.settings.SettingsItemView; 7 | import com.yhy.widget.core.toggle.SwitchButton; 8 | import com.yhy.widget.demo.R; 9 | import com.yhy.widget.demo.activity.base.BaseActivity; 10 | 11 | public class SettingsActivity extends BaseActivity { 12 | 13 | private SettingsItemView sivSwitch; 14 | 15 | @Override 16 | protected int getLayout() { 17 | return R.layout.activity_settings; 18 | } 19 | 20 | @Override 21 | protected void initView() { 22 | sivSwitch = (SettingsItemView) findViewById(R.id.siv_switch); 23 | } 24 | 25 | @Override 26 | protected void initData() { 27 | 28 | } 29 | 30 | @Override 31 | protected void initEvent() { 32 | sivSwitch.setOnSwitchStateChangeListener(new SettingsItemView.OnSwitchStateChangeListener() { 33 | @Override 34 | public void onStateChanged(SettingsItemView siv, SwitchButton sb, boolean isOn) { 35 | toast(siv.getName() + " :: isOn = " + isOn); 36 | } 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/StatusDialogActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.os.Handler; 4 | import android.view.View; 5 | import android.widget.TextView; 6 | 7 | import com.yhy.widget.core.dialog.status.StatusDialogManager; 8 | import com.yhy.widget.demo.R; 9 | import com.yhy.widget.demo.activity.base.BaseActivity; 10 | 11 | /** 12 | * author : 颜洪毅 13 | * e-mail : yhyzgn@gmail.com 14 | * time : 2018-06-06 17:53 15 | * version: 1.0.0 16 | * desc : 17 | */ 18 | public class StatusDialogActivity extends BaseActivity { 19 | 20 | private TextView tvLoading; 21 | private TextView tvSuccess; 22 | private TextView tvFailed; 23 | private TextView tvError; 24 | 25 | private StatusDialogManager mManager; 26 | 27 | @Override 28 | protected int getLayout() { 29 | return R.layout.activity_status_dialog; 30 | } 31 | 32 | @Override 33 | protected void initView() { 34 | tvLoading = $(R.id.tv_loading); 35 | tvSuccess = $(R.id.tv_success); 36 | tvFailed = $(R.id.tv_failed); 37 | tvError = $(R.id.tv_error); 38 | 39 | mManager = StatusDialogManager 40 | .with(this) 41 | .loadingText("正在加载...") 42 | .successText("成功啦") 43 | .failedText("失败咯") 44 | .errorText("出错啦") 45 | .enableLoadingCancel(true) 46 | .duration(3000) 47 | .create(); 48 | } 49 | 50 | @Override 51 | protected void initData() { 52 | } 53 | 54 | @Override 55 | protected void initEvent() { 56 | tvLoading.setOnClickListener(new View.OnClickListener() { 57 | @Override 58 | public void onClick(View v) { 59 | mManager.loading(); 60 | new Handler().postDelayed(new Runnable() { 61 | @Override 62 | public void run() { 63 | mManager.dismiss(); 64 | } 65 | }, 10000); 66 | } 67 | }); 68 | 69 | tvSuccess.setOnClickListener(new View.OnClickListener() { 70 | @Override 71 | public void onClick(View v) { 72 | mManager.success(); 73 | } 74 | }); 75 | 76 | tvFailed.setOnClickListener(new View.OnClickListener() { 77 | @Override 78 | public void onClick(View v) { 79 | mManager.failed(); 80 | } 81 | }); 82 | 83 | tvError.setOnClickListener(new View.OnClickListener() { 84 | @Override 85 | public void onClick(View v) { 86 | mManager.error(); 87 | } 88 | }); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/SwitchButtonActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import com.yhy.widget.core.toggle.SwitchButton; 4 | import com.yhy.widget.demo.R; 5 | import com.yhy.widget.demo.activity.base.BaseActivity; 6 | 7 | public class SwitchButtonActivity extends BaseActivity { 8 | 9 | private SwitchButton switchButton; 10 | 11 | @Override 12 | protected int getLayout() { 13 | return R.layout.activity_switch_button; 14 | } 15 | 16 | @Override 17 | protected void initView() { 18 | switchButton = (SwitchButton) findViewById(R.id.switch_button); 19 | 20 | switchButton.onOrOff(true); 21 | switchButton.isOn(); 22 | switchButton.toggle(); //switch state 23 | switchButton.toggle(false);//switch without animation 24 | switchButton.setShadowEffect(true);//disable shadow effect 25 | switchButton.setEnabled(true);//disable button 26 | switchButton.setEnableEffect(false);//disable the switch animation 27 | } 28 | 29 | @Override 30 | protected void initData() { 31 | 32 | } 33 | 34 | @Override 35 | protected void initEvent() { 36 | switchButton.setOnStateChangeListener(new SwitchButton.OnStateChangeListener() { 37 | @Override 38 | public void onCheckedChanged(SwitchButton view, boolean isOn) { 39 | toast("isOn = " + isOn); 40 | } 41 | }); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/WebHybridActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity; 2 | 3 | import android.app.AlertDialog; 4 | import android.webkit.JavascriptInterface; 5 | import android.webkit.JsResult; 6 | import android.widget.Button; 7 | import android.widget.Toast; 8 | 9 | import com.yhy.widget.core.web.HybridWebView; 10 | import com.yhy.widget.core.web.bridge.HybridBridge; 11 | import com.yhy.widget.core.web.listener.SimpleOnWebEventListener; 12 | import com.yhy.widget.demo.R; 13 | import com.yhy.widget.demo.activity.base.BaseActivity; 14 | 15 | /** 16 | * author : 颜洪毅 17 | * e-mail : yhyzgn@gmail.com 18 | * time : 2018-05-25 15:26 19 | * version: 1.0.0 20 | * desc : 21 | */ 22 | public class WebHybridActivity extends BaseActivity { 23 | 24 | private HybridWebView hwvContent; 25 | private Button btnTest; 26 | 27 | @Override 28 | protected int getLayout() { 29 | return R.layout.activity_web_hybrid; 30 | } 31 | 32 | @Override 33 | protected void initView() { 34 | hwvContent = $(R.id.hwv_content); 35 | btnTest = $(R.id.btn_test); 36 | } 37 | 38 | @Override 39 | protected void initData() { 40 | // 注册交互桥梁 41 | hwvContent.register(new TestBridge()); 42 | // 加载页面 43 | hwvContent.loadUrl("file:///android_asset/index.html"); 44 | } 45 | 46 | @Override 47 | protected void initEvent() { 48 | hwvContent.setOnWebEventListener(new SimpleOnWebEventListener() { 49 | @Override 50 | public boolean onJsAlert(HybridWebView view, String url, String message, final JsResult result) { 51 | AlertDialog.Builder builder = new AlertDialog.Builder(WebHybridActivity.this); 52 | builder 53 | .setTitle("标题") 54 | .setMessage(message) 55 | .setPositiveButton("确定", (dialog, which) -> result.confirm()) 56 | .show(); 57 | //返回true表示不再往下传递弹窗事件,即不再使用原本WebView的弹窗,否则会弹出两次弹窗 58 | return true; 59 | } 60 | }); 61 | 62 | btnTest.setOnClickListener(v -> { 63 | // 调用js中的test函数 64 | // hwvContent.js("test", "小姐姐"); 65 | hwvContent.js("noArg"); 66 | }); 67 | } 68 | 69 | /** 70 | * 交互桥梁,必须是HybridBridge的子类 71 | */ 72 | public class TestBridge extends HybridBridge { 73 | 74 | @JavascriptInterface 75 | public String test(String json) { 76 | Toast.makeText(WebHybridActivity.this, json, Toast.LENGTH_LONG).show(); 77 | return "Android接收到数据啦"; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/activity/base/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.activity.base; 2 | 3 | import android.os.Bundle; 4 | import androidx.annotation.Nullable; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import android.view.View; 7 | import android.widget.Toast; 8 | 9 | /** 10 | * author : 颜洪毅 11 | * e-mail : yhyzgn@gmail.com 12 | * time : 2017-12-08 10:06 13 | * version: 1.0.0 14 | * desc : 15 | */ 16 | public abstract class BaseActivity extends AppCompatActivity { 17 | 18 | @Override 19 | protected void onCreate(@Nullable Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(getLayout()); 22 | initView(); 23 | initData(); 24 | initEvent(); 25 | } 26 | 27 | protected abstract int getLayout(); 28 | 29 | protected abstract void initView(); 30 | 31 | protected abstract void initData(); 32 | 33 | protected abstract void initEvent(); 34 | 35 | public T $(int id) { 36 | return findViewById(id); 37 | } 38 | 39 | public void toast(CharSequence text) { 40 | Toast.makeText(this, text, Toast.LENGTH_SHORT).show(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/adapter/RvTestAdapter.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.adapter; 2 | 3 | import android.content.Context; 4 | import android.graphics.Color; 5 | import androidx.recyclerview.widget.RecyclerView; 6 | import android.view.Gravity; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.TextView; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * Created by HongYi Yan on 2017/4/12 13:39. 15 | */ 16 | public class RvTestAdapter extends RecyclerView.Adapter { 17 | private Context mCtx; 18 | private List mDataList; 19 | private OnItemClickListener mItemClickListener; 20 | 21 | public RvTestAdapter(Context ctx, List dataList) { 22 | mCtx = ctx; 23 | mDataList = dataList; 24 | } 25 | 26 | @Override 27 | public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int position) { 28 | return new ViewHolder(new TextView(mCtx)); 29 | } 30 | 31 | @Override 32 | public void onBindViewHolder(final ViewHolder viewHolder, int position) { 33 | viewHolder.mTv.setText(mDataList.get(position)); 34 | viewHolder.itemView.setOnClickListener(new View.OnClickListener() { 35 | @Override 36 | public void onClick(View v) { 37 | if (null != mItemClickListener) { 38 | mItemClickListener.onItemClick(v, RvTestAdapter.this, viewHolder.getAdapterPosition()); 39 | } 40 | } 41 | }); 42 | } 43 | 44 | @Override 45 | public int getItemCount() { 46 | return null != mDataList ? mDataList.size() : 0; 47 | } 48 | 49 | public void setOnItemClickListener(OnItemClickListener listener) { 50 | mItemClickListener = listener; 51 | } 52 | 53 | public class ViewHolder extends RecyclerView.ViewHolder { 54 | public TextView mTv; 55 | private RecyclerView.LayoutParams mParams = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); 56 | 57 | public ViewHolder(View itemView) { 58 | super(itemView); 59 | mTv = (TextView) itemView; 60 | mParams.topMargin = 12; 61 | mParams.bottomMargin = 12; 62 | mTv.setLayoutParams(mParams); 63 | mTv.setTextSize(16); 64 | mTv.setBackgroundColor(Color.WHITE); 65 | mTv.setGravity(Gravity.CENTER); 66 | mTv.setPadding(24, 24, 24, 24); 67 | } 68 | } 69 | 70 | public interface OnItemClickListener { 71 | void onItemClick(View view, RecyclerView.Adapter adapter, int position); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/entity/ImgUrls.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.entity; 2 | 3 | import android.content.Context; 4 | 5 | import java.io.BufferedReader; 6 | import java.io.InputStream; 7 | import java.io.InputStreamReader; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | import java.util.Random; 11 | import java.util.stream.Collectors; 12 | 13 | /** 14 | * author : 颜洪毅 15 | * e-mail : yhyzgn@gmail.com 16 | * time : 2018-01-08 13:14 17 | * version: 1.0.0 18 | * desc : 19 | */ 20 | public class ImgUrls { 21 | private static final Random RAND = new Random(System.currentTimeMillis()); 22 | private static final List IMG_URL_LIST = new ArrayList<>(); 23 | 24 | public static void init(Context context) { 25 | try { 26 | InputStream is = context.getAssets().open("img-url.txt"); 27 | BufferedReader reader = new BufferedReader(new InputStreamReader(is)); 28 | List tempList = reader.lines().collect(Collectors.toList()); 29 | if (!tempList.isEmpty()) { 30 | IMG_URL_LIST.addAll(tempList); 31 | } 32 | } catch (Exception e) { 33 | e.printStackTrace(); 34 | } 35 | } 36 | 37 | public static String getAImgUrl() { 38 | if (IMG_URL_LIST.size() == 0) { 39 | throw new IllegalStateException("请先初始化 ImgUrls 类"); 40 | } 41 | int index = RAND.nextInt(IMG_URL_LIST.size()); 42 | return IMG_URL_LIST.get(index); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/entity/TestEntity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.entity; 2 | 3 | /** 4 | * author : 颜洪毅 5 | * e-mail : yhyzgn@gmail.com 6 | * time : 2017-09-08 20:01 7 | * version: 1.0.0 8 | * desc : 9 | */ 10 | public class TestEntity { 11 | public int id; 12 | public String name; 13 | 14 | public TestEntity(int id, String name) { 15 | this.id = id; 16 | this.name = name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/entity/TestStep.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.entity; 2 | 3 | import com.yhy.widget.core.step.entity.StepAble; 4 | 5 | /** 6 | * author : 颜洪毅 7 | * e-mail : yhyzgn@gmail.com 8 | * time : 2018-04-14 13:24 9 | * version: 1.0.0 10 | * desc : 11 | */ 12 | public class TestStep implements StepAble { 13 | 14 | public String text; 15 | public Status status; 16 | 17 | public TestStep(String text) { 18 | this(text, Status.COMPLETE); 19 | } 20 | 21 | public TestStep(String text, Status status) { 22 | this.text = text; 23 | this.status = status; 24 | } 25 | 26 | @Override 27 | public Status getStatus() { 28 | return status; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/status/DefActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.status; 2 | 3 | import android.os.Bundle; 4 | import android.os.SystemClock; 5 | import androidx.annotation.Nullable; 6 | import androidx.appcompat.app.AppCompatActivity; 7 | import android.view.View; 8 | import android.widget.Toast; 9 | 10 | import com.yhy.widget.layout.status.StatusLayout; 11 | import com.yhy.widget.layout.status.listener.OnStatusRetryListener; 12 | import com.yhy.widget.demo.R; 13 | 14 | /** 15 | * author : 颜洪毅 16 | * e-mail : yhyzgn@gmail.com 17 | * time : 2017-10-13 15:19 18 | * version: 1.0.0 19 | * desc : 20 | */ 21 | public class DefActivity extends AppCompatActivity { 22 | 23 | @Override 24 | protected void onCreate(@Nullable Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | setContentView(R.layout.activity_status_def); 27 | 28 | final StatusLayout slContent = (StatusLayout) findViewById(R.id.sl_content); 29 | 30 | findViewById(R.id.btn_loading).setOnClickListener(new View.OnClickListener() { 31 | @Override 32 | public void onClick(View view) { 33 | slContent.showLoading(); 34 | } 35 | }); 36 | 37 | findViewById(R.id.btn_success).setOnClickListener(new View.OnClickListener() { 38 | @Override 39 | public void onClick(View view) { 40 | slContent.showSuccess(); 41 | } 42 | }); 43 | 44 | findViewById(R.id.btn_error).setOnClickListener(new View.OnClickListener() { 45 | @Override 46 | public void onClick(View view) { 47 | slContent.showError(); 48 | } 49 | }); 50 | 51 | findViewById(R.id.btn_empty).setOnClickListener(new View.OnClickListener() { 52 | @Override 53 | public void onClick(View view) { 54 | slContent.showEmpty(); 55 | } 56 | }); 57 | 58 | slContent.setOnStatusRetryListener(new OnStatusRetryListener() { 59 | @Override 60 | public void onRetry() { 61 | Toast.makeText(DefActivity.this, "重试加载...", Toast.LENGTH_SHORT).show(); 62 | new Thread() { 63 | @Override 64 | public void run() { 65 | SystemClock.sleep(1000); 66 | slContent.showSuccess(); 67 | } 68 | }.start(); 69 | } 70 | }); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/status/LayoutActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.status; 2 | 3 | import android.os.Bundle; 4 | import android.os.SystemClock; 5 | import androidx.annotation.Nullable; 6 | import androidx.appcompat.app.AppCompatActivity; 7 | import android.view.View; 8 | import android.widget.Toast; 9 | 10 | import com.yhy.widget.layout.status.StatusLayout; 11 | import com.yhy.widget.layout.status.listener.OnStatusRetryListener; 12 | import com.yhy.widget.demo.R; 13 | 14 | /** 15 | * author : 颜洪毅 16 | * e-mail : yhyzgn@gmail.com 17 | * time : 2017-10-13 15:19 18 | * version: 1.0.0 19 | * desc : 20 | */ 21 | public class LayoutActivity extends AppCompatActivity { 22 | 23 | @Override 24 | protected void onCreate(@Nullable Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | setContentView(R.layout.activity_status_layout); 27 | 28 | final StatusLayout slContent = (StatusLayout) findViewById(R.id.sl_content); 29 | 30 | findViewById(R.id.btn_loading).setOnClickListener(new View.OnClickListener() { 31 | @Override 32 | public void onClick(View view) { 33 | slContent.showLoading(); 34 | } 35 | }); 36 | 37 | findViewById(R.id.btn_success).setOnClickListener(new View.OnClickListener() { 38 | @Override 39 | public void onClick(View view) { 40 | slContent.showSuccess(); 41 | } 42 | }); 43 | 44 | findViewById(R.id.btn_error).setOnClickListener(new View.OnClickListener() { 45 | @Override 46 | public void onClick(View view) { 47 | slContent.showError(); 48 | } 49 | }); 50 | 51 | findViewById(R.id.btn_empty).setOnClickListener(new View.OnClickListener() { 52 | @Override 53 | public void onClick(View view) { 54 | slContent.showEmpty(); 55 | } 56 | }); 57 | 58 | slContent.setOnStatusRetryListener(new OnStatusRetryListener() { 59 | @Override 60 | public void onRetry() { 61 | Toast.makeText(LayoutActivity.this, "重试加载...", Toast.LENGTH_SHORT).show(); 62 | new Thread() { 63 | @Override 64 | public void run() { 65 | SystemClock.sleep(1000); 66 | slContent.showSuccess(); 67 | } 68 | }.start(); 69 | } 70 | }); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/status/StatusActivity.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.status; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import androidx.annotation.Nullable; 6 | import androidx.appcompat.app.AppCompatActivity; 7 | import android.view.View; 8 | 9 | import com.yhy.widget.demo.R; 10 | 11 | /** 12 | * author : 颜洪毅 13 | * e-mail : yhyzgn@gmail.com 14 | * time : 2017-10-13 15:14 15 | * version: 1.0.0 16 | * desc : 17 | */ 18 | public class StatusActivity extends AppCompatActivity { 19 | 20 | @Override 21 | protected void onCreate(@Nullable Bundle savedInstanceState) { 22 | super.onCreate(savedInstanceState); 23 | setContentView(R.layout.activity_status); 24 | 25 | findViewById(R.id.btn_layout).setOnClickListener(new View.OnClickListener() { 26 | @Override 27 | public void onClick(View view) { 28 | startActivity(new Intent(StatusActivity.this, LayoutActivity.class)); 29 | } 30 | }); 31 | 32 | findViewById(R.id.btn_helper).setOnClickListener(new View.OnClickListener() { 33 | @Override 34 | public void onClick(View view) { 35 | startActivity(new Intent(StatusActivity.this, HelperActivity.class)); 36 | } 37 | }); 38 | 39 | findViewById(R.id.btn_def).setOnClickListener(new View.OnClickListener() { 40 | @Override 41 | public void onClick(View view) { 42 | startActivity(new Intent(StatusActivity.this, DefActivity.class)); 43 | } 44 | }); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/utils/ImgUtils.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.utils; 2 | 3 | import android.content.Context; 4 | import android.widget.ImageView; 5 | 6 | /** 7 | * Created by HongYi Yan on 2017/4/6 16:48. 8 | */ 9 | public class ImgUtils { 10 | 11 | private static ImgLoader mLoader; 12 | 13 | private ImgUtils() { 14 | throw new RuntimeException("Can not instantiate ImgUtils."); 15 | } 16 | 17 | public static void init(ImgLoader loader) { 18 | mLoader = loader; 19 | } 20 | 21 | public static void load(Context ctx, ImageView iv, T model) { 22 | if (null != mLoader) { 23 | mLoader.load(ctx, iv, model); 24 | } 25 | } 26 | 27 | /** 28 | * 图片加载器 29 | */ 30 | @FunctionalInterface 31 | public interface ImgLoader { 32 | void load(Context ctx, ImageView iv, T model); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/yhy/widget/demo/utils/ToastUtils.java: -------------------------------------------------------------------------------- 1 | package com.yhy.widget.demo.utils; 2 | 3 | import android.content.Context; 4 | import android.widget.Toast; 5 | 6 | /** 7 | * Toast工具类 8 | */ 9 | public class ToastUtils { 10 | private static Context ctx; 11 | 12 | private ToastUtils() { 13 | throw new UnsupportedOperationException("Can not create instance for class ToastUtils."); 14 | } 15 | 16 | /** 17 | * 初始化,在Application中 18 | * 19 | * @param ctx 上下文对象 20 | */ 21 | public static void init(Context ctx) { 22 | ToastUtils.ctx = ctx; 23 | } 24 | 25 | /** 26 | * 短时间显示 27 | * 28 | * @param text 提示的内容 29 | */ 30 | public static void shortT(CharSequence text) { 31 | toast(false, text); 32 | } 33 | 34 | /** 35 | * 长时间显示 36 | * 37 | * @param text 提示的内容 38 | */ 39 | public static void longT(CharSequence text) { 40 | toast(true, text); 41 | } 42 | 43 | /** 44 | * 短时间显示 45 | * 46 | * @param resId 提示的内容资源id 47 | */ 48 | public static void shortT(int resId) { 49 | toast(false, ctx.getResources().getString(resId)); 50 | } 51 | 52 | /** 53 | * 长时间显示 54 | * 55 | * @param resId 提示的内容资源id 56 | */ 57 | public static void longT(int resId) { 58 | toast(true, ctx.getResources().getString(resId)); 59 | } 60 | 61 | /** 62 | * toast显示 63 | * 64 | * @param longToast 是否是长提显示 65 | * @param text 显示内容 66 | */ 67 | private static void toast(boolean longToast, CharSequence text) { 68 | Toast.makeText(ctx, text, longToast ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show(); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_alpha_image_load.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_checked_ctv_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/cursor_bg_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_delete.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_adv.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_checked_relative_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 22 | 23 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_checked_textview.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | 30 | 31 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_clear_edit_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_etv.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 17 | 18 | 28 | 29 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_gradient_text_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 22 | 23 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_input_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_line_text_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 24 | 25 | 34 | 35 | 44 | 45 | 56 | 57 | 67 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_pick_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_preview_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_rv.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_slider.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 17 | 18 | 25 | 26 | 27 | 32 | 33 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_square_imageview.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 22 | 23 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_status.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |