├── .github └── FUNDING.yml ├── .gitignore ├── .idea └── vcs.xml ├── ISSUE_TEMPLATE.md ├── LICENSE ├── LICENSE_996 ├── README.md ├── README_OLD.md ├── README_V2_EN.md ├── Update_3.0.md ├── Update_3.0_EN.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ ├── avatars │ └── pics │ ├── java │ └── razerdp │ │ └── demo │ │ ├── DemoActivity.java │ │ ├── app │ │ ├── AppContext.java │ │ └── PopupDemoApp.java │ │ ├── base │ │ ├── StatusBarHelper.java │ │ ├── TestData.java │ │ ├── baseactivity │ │ │ ├── BaseActivity.java │ │ │ ├── BaseBindingActivity.java │ │ │ └── BaseFragment.java │ │ ├── baseadapter │ │ │ ├── BaseListAdapter.java │ │ │ ├── BaseListViewHolder.java │ │ │ ├── BaseMultiRecyclerViewHolder.java │ │ │ ├── BaseRecyclerViewAdapter.java │ │ │ ├── BaseRecyclerViewHolder.java │ │ │ ├── BaseSimpleRecyclerViewHolder.java │ │ │ ├── FixedViewInfo.java │ │ │ ├── HeaderViewWrapperAdapter.java │ │ │ ├── MultiRecyclerViewAdapter.java │ │ │ ├── MultiType.java │ │ │ ├── OnItemClickListener.java │ │ │ ├── OnItemLongClickListener.java │ │ │ ├── SimpleMultiType.java │ │ │ ├── SimpleRecyclerViewAdapter.java │ │ │ └── WrapperRecyclerAdapter.java │ │ ├── imageloader │ │ │ ├── GlideProgressManager.java │ │ │ ├── ImageLoaderManager.java │ │ │ ├── Options.java │ │ │ ├── ProgressImageViewTarget.java │ │ │ ├── RoundedCornersTransformation.java │ │ │ ├── SvgDecoder.java │ │ │ ├── SvgDrawableTranscoder.java │ │ │ ├── SvgModule.java │ │ │ └── SvgSoftwareLayerSetter.java │ │ ├── interfaces │ │ │ ├── ClearMemoryObject.java │ │ │ ├── ExtSimpleCallback.java │ │ │ ├── MultiClickListener.java │ │ │ ├── OnClickListenerWrapper.java │ │ │ ├── SimpleCallback.java │ │ │ └── SimpleReturnCallback.java │ │ └── livedata │ │ │ ├── DPLiveData.java │ │ │ └── LiveDataObserverWrapper.java │ │ ├── event │ │ └── LiveDataBus.java │ │ ├── model │ │ ├── DemoCommonUsageInfo.java │ │ ├── DemoCommonUsageTitle.java │ │ ├── DemoMainItem.java │ │ ├── DependenceInfo.java │ │ ├── api │ │ │ └── ApiInfo.java │ │ ├── common │ │ │ ├── CommonAnchorMatchInfo.java │ │ │ ├── CommonAnimateInfo.java │ │ │ ├── CommonAnyPosInfo.java │ │ │ ├── CommonArrowInfo.java │ │ │ ├── CommonAutoMirrorActivityInfo.java │ │ │ ├── CommonBackgroundAlignInfo.java │ │ │ ├── CommonBackgroundInfo.java │ │ │ ├── CommonBarControllerInfo.java │ │ │ ├── CommonBlurInfo.java │ │ │ ├── CommonBottomSheetDialogInfo.java │ │ │ ├── CommonControllerInfo.java │ │ │ ├── CommonDialogActivityInfo.java │ │ │ ├── CommonFriendCircleInfo.java │ │ │ ├── CommonFullScreenActivityInfo.java │ │ │ ├── CommonGestureNavInfo.java │ │ │ ├── CommonInputInfo.java │ │ │ ├── CommonPriorityInfo.java │ │ │ ├── CommonRTLInfo.java │ │ │ ├── CommonSlideInfo.java │ │ │ ├── CommonUpdateInfo.java │ │ │ ├── ScreenRotateActivityInfo.java │ │ │ └── WidthAndHeightLimitInfo.java │ │ ├── friendcircle │ │ │ └── FriendCircleInfo.java │ │ ├── issue │ │ │ └── IssueInfo.java │ │ └── lifecycle │ │ │ ├── ShowInServiceInfo.java │ │ │ └── ShowOnCreateInfo.java │ │ ├── popup │ │ ├── DemoPopup.java │ │ ├── MyTestActivity.java │ │ ├── PopupAnimate.java │ │ ├── PopupArrow.java │ │ ├── PopupDesc.java │ │ ├── PopupFriendCircle.java │ │ ├── PopupInput.java │ │ ├── PopupShowOnCreate.java │ │ ├── PopupSlide.java │ │ ├── PopupSlideSmall.java │ │ ├── PopupSource.java │ │ ├── PopupUpdateTest.java │ │ ├── PopupWidthHeightLimit.java │ │ ├── common │ │ │ ├── PopupOptionsPickerBuilder.java │ │ │ ├── PopupOptionsPickerView.java │ │ │ └── SimpleSelectorPopup.java │ │ ├── issue │ │ │ ├── PopupIssue210.java │ │ │ ├── PopupIssue224.java │ │ │ ├── PopupIssue230.java │ │ │ ├── PopupIssue236.java │ │ │ └── PopupIssue238.java │ │ └── options │ │ │ ├── BaseOptionPopup.java │ │ │ ├── PopupAlignBackgroundOption.java │ │ │ ├── PopupAnchorMatchOption.java │ │ │ ├── PopupAnimateOption.java │ │ │ ├── PopupAnyPosOption.java │ │ │ ├── PopupArrowOption.java │ │ │ ├── PopupBackgroundOption.java │ │ │ ├── PopupBarControllerOption.java │ │ │ ├── PopupBlurDemoOption.java │ │ │ ├── PopupCircleOption.java │ │ │ ├── PopupControlOption.java │ │ │ ├── PopupInputOption.java │ │ │ ├── PopupPriorityOption.java │ │ │ ├── PopupSelectDismissAnimate.java │ │ │ ├── PopupSelectShowAnimate.java │ │ │ └── PopupSlideOption.java │ │ ├── services │ │ ├── DelayDemoService.java │ │ └── DemoService.java │ │ ├── ui │ │ ├── ActivityLauncher.java │ │ ├── ApiListActivity.java │ │ ├── AutoMirrorActivity.java │ │ ├── CommonUsageActivity.java │ │ ├── GuideActivity.java │ │ ├── ScreenRotateActivity.java │ │ ├── SizeLimitActivity.java │ │ ├── UpdateLogActivity.java │ │ ├── WebActivity.java │ │ ├── apidemo │ │ │ ├── ApiDemoActivity.java │ │ │ ├── ApiDemoFragment.java │ │ │ └── fragments │ │ │ │ ├── BackPressEnableApiFragment.java │ │ │ │ ├── ConstructorApiFragment.java │ │ │ │ ├── FadeEnableApiFragment.java │ │ │ │ └── OverStatusbarApiFragment.java │ │ ├── dialog │ │ │ └── DialogActivity.java │ │ ├── friendcircle │ │ │ ├── FriendCircleActivity.java │ │ │ └── FriendCircleViewHolder.java │ │ ├── fullscreen │ │ │ └── FullScreenActivity.java │ │ ├── issuestest │ │ │ ├── Issue210TestActivity.java │ │ │ ├── Issue224TestActivity.java │ │ │ ├── Issue226TestActivity.java │ │ │ ├── Issue230TestActivity.java │ │ │ ├── Issue236TestActivity.java │ │ │ ├── Issue238TestActivity.java │ │ │ ├── Issue242TestActivity.java │ │ │ ├── Issue277TestActivity.java │ │ │ ├── Issue358TestActivity.java │ │ │ ├── Issue369TestActivity.java │ │ │ ├── Issue474TestActivity.java │ │ │ └── home │ │ │ │ ├── IssueHelper.java │ │ │ │ └── IssueHomeActivity.java │ │ ├── lifecycle │ │ │ └── ShowOnCreateActivity.java │ │ ├── photobrowser │ │ │ ├── IPhotoBrowserExitViewProvider.java │ │ │ ├── IPhotoBrowserProvider.java │ │ │ ├── PhotoBrowserActivity.java │ │ │ ├── PhotoBrowserImpl.java │ │ │ └── PhotoBrowserProcessor.java │ │ ├── rtl │ │ │ └── RTLActivity.java │ │ ├── transition │ │ │ ├── ImageViewTransition.java │ │ │ ├── ImageViewerTransition.java │ │ │ └── SubsamplingScaleImageViewSharedTransition.java │ │ └── updatetest │ │ │ └── UpdateTestActivity.java │ │ ├── utils │ │ ├── ActivityUtil.java │ │ ├── AppUtil.java │ │ ├── ColorUtil.java │ │ ├── DescBuilder.java │ │ ├── DimensUtils.java │ │ ├── FileUtil.java │ │ ├── FillViewUtil.java │ │ ├── ImageUtil.java │ │ ├── LifeCycleHolder.java │ │ ├── NumberCompareUtil.java │ │ ├── NumberFormatUtil.java │ │ ├── NumberUtils.java │ │ ├── OSUtil.java │ │ ├── OnClickListenerWrapper.java │ │ ├── RandomUtil.java │ │ ├── RomUtils.java │ │ ├── SelectorUtil.java │ │ ├── SimplePool.java │ │ ├── SpanUtil.java │ │ ├── StringUtil.java │ │ ├── ToastUtils.java │ │ ├── ToolUtil.java │ │ ├── TransitionUtil.java │ │ ├── UIHelper.java │ │ ├── UnSafeUtil.java │ │ ├── UriUtil.java │ │ ├── VersionUtil.java │ │ ├── ViewUtil.java │ │ ├── WeakHandler.java │ │ ├── gson │ │ │ ├── DoubleDefaultAdapter.java │ │ │ ├── GsonUtil.java │ │ │ ├── IntegerDefaultAdapter.java │ │ │ └── LongDefaultAdapter.java │ │ ├── joor │ │ │ ├── Reflect.java │ │ │ └── ReflectException.java │ │ └── rx │ │ │ ├── DefaultLogThrowableConsumer.java │ │ │ ├── RxCall.java │ │ │ ├── RxCallImpl.java │ │ │ ├── RxHelper.java │ │ │ └── RxTaskCall.java │ │ └── widget │ │ ├── CircleProgressView.java │ │ ├── DPImageView.java │ │ ├── DPRecyclerView.java │ │ ├── DPTextView.java │ │ ├── FlowLayout.java │ │ ├── LimitSizeFrameLayout.java │ │ ├── SquareFrameLayout.java │ │ ├── SquareLayout.java │ │ ├── StatusBarViewPlaceHolder.java │ │ ├── SystemBarTintManager.java │ │ ├── TitleBarView.java │ │ ├── Type.java │ │ ├── bigimageviewer │ │ ├── loader │ │ │ └── glide │ │ │ │ └── ImageDownloadTarget.java │ │ └── view │ │ │ ├── ImageLoadCallback.java │ │ │ ├── ImageSaveCallback.java │ │ │ ├── ImageViewer.java │ │ │ └── ImageViewerLoader.java │ │ ├── decoration │ │ ├── GridItemDecoration.java │ │ ├── LinearItemDecoration.java │ │ ├── PinnedHeaderDecoration.java │ │ └── SpaceOption.java │ │ ├── dialog │ │ ├── BaseDialog.java │ │ ├── DialogClickListener.java │ │ └── LoadingDialog.java │ │ ├── recyclerviewbox │ │ ├── RecyclerViewBox.java │ │ └── layoutmanager │ │ │ └── NineGridLayoutManager.java │ │ ├── span │ │ ├── ClickSpan.java │ │ ├── ClickableSpanEx.java │ │ ├── CustomImageSpan.java │ │ └── SpannableStringBuilderCompat.java │ │ └── viewpager │ │ ├── BaseCachedViewPagerAdapter.java │ │ ├── HackyViewPager.java │ │ ├── IndicatorContainer.java │ │ ├── IndicatorView.java │ │ └── ViewpagerIndicator.java │ └── res │ ├── anim │ ├── search_layout_animation.xml │ ├── search_layout_animation_detail.xml │ ├── slide_left_in.xml │ ├── slide_left_out.xml │ ├── slide_right_in.xml │ └── slide_right_out.xml │ ├── drawable-v21 │ ├── common_selector.xml │ ├── common_selector_dark.xml │ └── common_selector_white.xml │ ├── drawable-xhdpi │ ├── alipay.png │ ├── bg_bubble.9.png │ ├── bg_game_live_tag.9.png │ ├── bg_popup_guide.9.png │ ├── bg_round_white_8dp.xml │ ├── bg_shadow_0dp.9.png │ ├── bg_shadow_2dp.9.png │ ├── bg_shadow_3dp.9.png │ ├── bg_shadow_4dp.9.png │ ├── bg_shadow_5dp.9.png │ ├── bg_shadow_6dp.9.png │ ├── bg_shadow_7dp.9.png │ ├── bg_shadow_8dp.9.png │ ├── bg_titlebar.png │ ├── bg_top_round_white_8dp.xml │ ├── ic_arrow_right.png │ ├── ic_arrow_weibo_popup.png │ ├── ic_back.png │ ├── ic_comment.png │ ├── ic_comment_show.png │ ├── ic_dialog.png │ ├── ic_error.9.png │ ├── ic_error_gray.9.png │ ├── ic_fixed.png │ ├── ic_like.png │ ├── ic_loading_1.png │ ├── ic_loading_2.png │ ├── ic_loading_3.png │ ├── ic_loading_4.png │ ├── ic_loading_5.png │ ├── ic_loading_6.png │ ├── ic_loading_7.png │ ├── ic_loading_8.png │ ├── ic_popup_arrow.png │ ├── ic_setting_white.png │ ├── ic_tips.png │ ├── ic_wait.png │ ├── icon_add.png │ ├── icon_back.png │ ├── logo.png │ ├── popup_bg_drawable.jpg │ └── qrcode.png │ ├── drawable │ ├── bg_comment_input.xml │ ├── bg_comment_popup.xml │ ├── bg_dialog.xml │ ├── bg_loading_dialog.xml │ ├── bg_selector_blue.xml │ ├── bg_stroke.xml │ ├── bg_update_progress.xml │ ├── common_selector.xml │ ├── common_selector_dark.xml │ ├── common_selector_white.xml │ ├── divider.xml │ ├── drawable_loading.xml │ ├── ic_update_app_bg.png │ ├── item_selector.xml │ ├── selector_menu_popup.xml │ ├── selector_popup_animate.xml │ ├── selector_popup_animate_text.xml │ └── shape_circle.xml │ ├── layout │ ├── activity_api_demo.xml │ ├── activity_api_list.xml │ ├── activity_common_usage.xml │ ├── activity_demo.xml │ ├── activity_dialog_demo.xml │ ├── activity_friend_circle.xml │ ├── activity_full_screen.xml │ ├── activity_guide.xml │ ├── activity_image_browser.xml │ ├── activity_issue.xml │ ├── activity_issue_210.xml │ ├── activity_issue_224.xml │ ├── activity_issue_226.xml │ ├── activity_issue_230.xml │ ├── activity_issue_236.xml │ ├── activity_issue_238.xml │ ├── activity_issue_242.xml │ ├── activity_issue_277.xml │ ├── activity_issue_358.xml │ ├── activity_issue_369.xml │ ├── activity_issue_474.xml │ ├── activity_mirror.xml │ ├── activity_my_test.xml │ ├── activity_rotate.xml │ ├── activity_rtl_demo.xml │ ├── activity_showoncreate.xml │ ├── activity_size_limit.xml │ ├── activity_update_log.xml │ ├── activity_update_test.xml │ ├── activity_web.xml │ ├── api_demo_backpress_enable.xml │ ├── api_demo_constructor.xml │ ├── api_demo_fade_enable.xml │ ├── api_demo_over_stausbar.xml │ ├── dialog_api_constructor.xml │ ├── dialog_fragment_api_constructor.xml │ ├── dialog_loading.xml │ ├── item_api_list.xml │ ├── item_bigimageview_progress.xml │ ├── item_common_usage.xml │ ├── item_common_usage_title.xml │ ├── item_friend_circle.xml │ ├── item_guide_denpendence.xml │ ├── item_image_browser.xml │ ├── item_issue.xml │ ├── item_issue_358.xml │ ├── item_issue_pic.xml │ ├── item_main_demo.xml │ ├── item_main_demo_header.xml │ ├── item_main_demo_version.xml │ ├── item_ninegrid_image_single_view.xml │ ├── item_ninegrid_image_view.xml │ ├── item_popup_230.xml │ ├── item_popup_animate.xml │ ├── item_popup_issue_224.xml │ ├── item_slide_option.xml │ ├── popup_animate.xml │ ├── popup_arrow.xml │ ├── popup_demo.xml │ ├── popup_description.xml │ ├── popup_friend_circle_comment.xml │ ├── popup_input.xml │ ├── popup_issue_210.xml │ ├── popup_issue_224.xml │ ├── popup_issue_230.xml │ ├── popup_issue_236.xml │ ├── popup_issue_238.xml │ ├── popup_issue_238_with_edittext.xml │ ├── popup_issue_277.xml │ ├── popup_issue_358.xml │ ├── popup_match.xml │ ├── popup_my_test.xml │ ├── popup_option_animate.xml │ ├── popup_option_anypos.xml │ ├── popup_option_arrow.xml │ ├── popup_option_background.xml │ ├── popup_option_background_align.xml │ ├── popup_option_blur.xml │ ├── popup_option_circle.xml │ ├── popup_option_control.xml │ ├── popup_option_control_bar.xml │ ├── popup_option_input.xml │ ├── popup_option_priority.xml │ ├── popup_option_slide.xml │ ├── popup_select_animate.xml │ ├── popup_show_on_create.xml │ ├── popup_slide.xml │ ├── popup_slide_small.xml │ ├── popup_source.xml │ ├── popup_text_selector.xml │ ├── popup_update_test.xml │ ├── popup_width_height_limit.xml │ ├── popup_wj.xml │ ├── view_bottom_sheet.xml │ ├── view_dialog.xml │ └── widget_title_bar_view.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ ├── transition │ ├── imageviewer.xml │ ├── photo.xml │ └── photo_large.xml │ ├── values-v21 │ ├── attrs_transition.xml │ └── styles.xml │ ├── values │ ├── attrs.xml │ ├── attrs_imageviewer.xml │ ├── attrs_titlebar_view.xml │ ├── colors.xml │ ├── dimens.xml │ ├── ids.xml │ ├── strings.xml │ ├── strings_api.xml │ └── styles.xml │ └── xml │ └── file_paths_public_popup.xml ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── img ├── 1.png ├── 2.png ├── TIM截图20170920164421.png ├── alipay.png ├── download.png ├── etc.png ├── logo.png └── qrcode.png ├── lib ├── .gitignore ├── build.gradle ├── pom.xml ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── razerdp │ │ └── library │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── razerdp │ │ ├── basepopup │ │ ├── BasePopupEvent.java │ │ ├── BasePopupFlag.java │ │ ├── BasePopupHelper.java │ │ ├── BasePopupInitializer.java │ │ ├── BasePopupSDK.java │ │ ├── BasePopupUnsafe.java │ │ ├── BasePopupWindow.java │ │ ├── ClearMemoryObject.java │ │ ├── FirstOpenActivityLiveData.java │ │ ├── PopupBackgroundView.java │ │ ├── PopupDecorViewProxy.java │ │ ├── PopupMaskLayout.java │ │ ├── PopupWindowProxy.java │ │ ├── QuickPopupBuilder.java │ │ ├── QuickPopupConfig.java │ │ └── WindowManagerProxy.java │ │ ├── blur │ │ ├── BlurHelper.java │ │ ├── BlurImageView.java │ │ ├── FastBlur.java │ │ ├── PopupBlurOption.java │ │ └── thread │ │ │ └── ThreadPoolManager.java │ │ ├── util │ │ ├── KeyboardUtils.java │ │ ├── PopupUiUtils.java │ │ ├── PopupUtils.java │ │ ├── animation │ │ │ ├── AlphaConfig.java │ │ │ ├── AnimationApi.java │ │ │ ├── AnimationHelper.java │ │ │ ├── BaseAnimationConfig.java │ │ │ ├── Direction.java │ │ │ ├── FloatPropertyCompat.java │ │ │ ├── RotationConfig.java │ │ │ ├── ScaleConfig.java │ │ │ └── TranslationConfig.java │ │ └── log │ │ │ ├── LogPrinterParser.java │ │ │ └── PopupLog.java │ │ └── widget │ │ ├── OnQuickPopupClickListenerWrapper.java │ │ └── QuickPopup.java │ └── res │ ├── values-en │ └── strings.xml │ └── values │ ├── ids.xml │ └── strings.xml ├── pom.xml ├── scripts └── upload.gradle └── settings.gradle /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github:razerdp 4 | patreon: # Replace with a single Patreon username 5 | open_collective: WeiChao Feng 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | custom: 9 | -------------------------------------------------------------------------------- /.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 38 | 39 | # Keystore files 40 | *.jks 41 | 42 | # External native build folder generated in Android Studio 2.2 and later 43 | .externalNativeBuild 44 | 45 | # Google Services (e.g. APIs or Firebase) 46 | google-services.json 47 | 48 | # Freeline 49 | freeline.py 50 | freeline/ 51 | freeline_project_description.json -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### 提issue前请去[**WIKI#常见问题**](https://www.yuque.com/razerdp/basepopup/dgf6ry)查询相关问题,避免重复提问 2 | ### Please go to [**WIKI#FAQ**](https://www.yuque.com/razerdp/basepopup/dgf6ry) for relevant questions before commit your issue to avoid repetitive questions. 3 | 4 |
5 | 6 | ### 提issue前请务必参考以下格式填写,否则该问题会被直接关闭。 7 | ### Please be sure to follow the format below before submitting the issue, otherwise the question will be actively closed! 8 | 9 | - 系统版本(必须)/ System version (required): 10 | - 库版本(必须)/ Library version (required): 11 | - 问题代码/截图(可选)/ Problem code or screenshot (optional): 12 | - 报错信息(可选)/ Error reporting information (optional): 13 | 14 | --- 15 | 16 | > 问题描述/重现步骤请写在这里 17 | > Please write the description here. 18 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /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 developer\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView inject 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 | # Glide 20 | -keep public class * implements com.bumptech.glide.module.GlideModule 21 | -keep public class * extends com.bumptech.glide.module.AppGlideModule 22 | -keep public enum com.bumptech.glide.load.ImageHeaderParser$** { 23 | **[] $VALUES; 24 | public *; 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseactivity/BaseBindingActivity.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseactivity; 2 | 3 | import androidx.viewbinding.ViewBinding; 4 | 5 | /** 6 | * Created by 大灯泡 on 2021/8/3. 7 | */ 8 | public abstract class BaseBindingActivity extends BaseActivity { 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/BaseListViewHolder.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/4/10. 7 | */ 8 | public interface BaseListViewHolder { 9 | void onInFlate(View rootView); 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/BaseMultiRecyclerViewHolder.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | import androidx.annotation.NonNull; 4 | import android.view.View; 5 | 6 | 7 | /** 8 | * Created by 大灯泡 on 2019/4/10. 9 | */ 10 | public abstract class BaseMultiRecyclerViewHolder extends BaseRecyclerViewHolder { 11 | 12 | 13 | public BaseMultiRecyclerViewHolder(@NonNull View itemView) { 14 | super(itemView); 15 | } 16 | 17 | public abstract int inflateLayoutResourceId(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/BaseRecyclerViewHolder.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | import android.content.Context; 4 | import androidx.annotation.IdRes; 5 | import androidx.annotation.NonNull; 6 | import androidx.recyclerview.widget.RecyclerView; 7 | import android.view.View; 8 | 9 | /** 10 | * Created by 大灯泡 on 2017/4/18. 11 | *

12 | * rvholder基类 13 | */ 14 | 15 | public abstract class BaseRecyclerViewHolder extends RecyclerView.ViewHolder { 16 | private boolean isRecycled = false; 17 | protected T data; 18 | 19 | public BaseRecyclerViewHolder(@NonNull View itemView) { 20 | super(itemView); 21 | } 22 | 23 | final void bindData(T data, int position) { 24 | isRecycled = false; 25 | this.data = data; 26 | onBindData(data, position); 27 | } 28 | 29 | public abstract void onBindData(T data, int position); 30 | 31 | public final V findViewById(@IdRes int id) { 32 | return itemView.findViewById(id); 33 | } 34 | 35 | void recycle() { 36 | isRecycled = true; 37 | onRecycled(); 38 | } 39 | 40 | protected void onRecycled() { 41 | 42 | } 43 | 44 | public T getData() { 45 | return data; 46 | } 47 | 48 | public Context getContext() { 49 | return itemView.getContext(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/BaseSimpleRecyclerViewHolder.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | import androidx.annotation.NonNull; 4 | import android.view.View; 5 | 6 | 7 | /** 8 | * Created by 大灯泡 on 2019/7/30. 9 | * 懒人必备viewholder 10 | */ 11 | public abstract class BaseSimpleRecyclerViewHolder extends BaseRecyclerViewHolder { 12 | 13 | 14 | public BaseSimpleRecyclerViewHolder(@NonNull View itemView) { 15 | super(itemView); 16 | } 17 | 18 | public abstract int inflateLayoutResourceId(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/FixedViewInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/4/29. 7 | *

8 | * 用于recyclerview的header和footer的view fix info 9 | */ 10 | 11 | public class FixedViewInfo { 12 | 13 | /** 14 | * 不完美解决方法:添加一个header,则从-2开始减1 15 | * header:-2~-98 16 | */ 17 | public static final int ITEM_VIEW_TYPE_HEADER_START = -2; 18 | /** 19 | * 不完美解决方法:添加一个header,则从-99开始减1 20 | * footer:-99~-无穷 21 | */ 22 | public static final int ITEM_VIEW_TYPE_FOOTER_START = -99; 23 | 24 | 25 | /** 26 | * The view to add to the list 27 | */ 28 | public final View view; 29 | /** 30 | * 因为onCreateViewHolder不包含位置信息,所以itemViewType需要包含位置信息 31 | *

32 | * 位置信息方法:将位置添加到高位 33 | */ 34 | public final int itemViewType; 35 | 36 | public int width; 37 | 38 | public int height; 39 | 40 | public FixedViewInfo(View view, int itemViewType) { 41 | this.view = view; 42 | this.itemViewType = itemViewType; 43 | } 44 | 45 | public int getWidth() { 46 | return width; 47 | } 48 | 49 | public FixedViewInfo setWidth(int width) { 50 | this.width = width; 51 | return this; 52 | } 53 | 54 | public int getHeight() { 55 | return height; 56 | } 57 | 58 | public FixedViewInfo setHeight(int height) { 59 | this.height = height; 60 | return this; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/MultiType.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | /** 4 | * Created by 大灯泡 on 2019/4/10. 5 | *

6 | * multitype 7 | */ 8 | public interface MultiType { 9 | 10 | int getItemType(); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/OnItemClickListener.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/4/10. 7 | */ 8 | 9 | public interface OnItemClickListener { 10 | 11 | void onItemClick(View v, int position, T data); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/OnItemLongClickListener.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/4/10. 7 | */ 8 | 9 | public interface OnItemLongClickListener { 10 | 11 | boolean onItemLongClick(View v, int position, T data); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/SimpleMultiType.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/4/10. 7 | */ 8 | public class SimpleMultiType implements Serializable, MultiType { 9 | int type; 10 | 11 | public SimpleMultiType() { 12 | } 13 | 14 | public SimpleMultiType(int type) { 15 | this.type = type; 16 | } 17 | 18 | public void setType(int type) { 19 | this.type = type; 20 | } 21 | 22 | @Override 23 | public int getItemType() { 24 | return type; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/baseadapter/WrapperRecyclerAdapter.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.baseadapter; 2 | 3 | 4 | import androidx.recyclerview.widget.RecyclerView; 5 | 6 | /** 7 | * Created by 大灯泡 on 2019/4/29. 8 | */ 9 | 10 | public interface WrapperRecyclerAdapter { 11 | 12 | RecyclerView.Adapter getWrappedAdapter(); 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/imageloader/SvgDecoder.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.imageloader; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.annotation.Nullable; 5 | 6 | import com.bumptech.glide.load.ResourceDecoder; 7 | import com.bumptech.glide.load.engine.Resource; 8 | import com.bumptech.glide.load.resource.SimpleResource; 9 | import com.caverock.androidsvg.SVG; 10 | import com.caverock.androidsvg.SVGParseException; 11 | 12 | import java.io.IOException; 13 | import java.io.InputStream; 14 | 15 | /** 16 | * Created by 大灯泡 on 2019/9/20 17 | *

18 | * Description: 19 | */ 20 | public class SvgDecoder implements ResourceDecoder { 21 | 22 | @Override 23 | public boolean handles(@NonNull InputStream source, @NonNull com.bumptech.glide.load.Options options) throws IOException { 24 | return true; 25 | } 26 | 27 | @Nullable 28 | @Override 29 | public Resource decode(@NonNull InputStream source, int width, int height, @NonNull com.bumptech.glide.load.Options options) throws IOException { 30 | try { 31 | SVG svg = SVG.getFromInputStream(source); 32 | return new SimpleResource<>(svg); 33 | } catch (SVGParseException ex) { 34 | throw new IOException("Cannot load SVG from stream", ex); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/imageloader/SvgDrawableTranscoder.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.imageloader; 2 | 3 | import android.graphics.Picture; 4 | import android.graphics.drawable.PictureDrawable; 5 | 6 | import androidx.annotation.NonNull; 7 | import androidx.annotation.Nullable; 8 | 9 | import com.bumptech.glide.load.engine.Resource; 10 | import com.bumptech.glide.load.resource.SimpleResource; 11 | import com.bumptech.glide.load.resource.transcode.ResourceTranscoder; 12 | import com.caverock.androidsvg.SVG; 13 | 14 | /** 15 | * Created by 大灯泡 on 2019/9/20 16 | *

17 | * Description: 18 | */ 19 | public class SvgDrawableTranscoder implements ResourceTranscoder { 20 | 21 | @Nullable 22 | @Override 23 | public Resource transcode(@NonNull Resource toTranscode, @NonNull com.bumptech.glide.load.Options options) { 24 | SVG svg = toTranscode.get(); 25 | Picture picture = svg.renderToPicture(); 26 | PictureDrawable drawable = new PictureDrawable(picture); 27 | return new SimpleResource<>(drawable); 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/imageloader/SvgSoftwareLayerSetter.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.imageloader; 2 | 3 | import android.graphics.drawable.PictureDrawable; 4 | import android.widget.ImageView; 5 | 6 | import com.bumptech.glide.load.DataSource; 7 | import com.bumptech.glide.load.engine.GlideException; 8 | import com.bumptech.glide.request.RequestListener; 9 | import com.bumptech.glide.request.target.ImageViewTarget; 10 | import com.bumptech.glide.request.target.Target; 11 | 12 | /** 13 | * Created by 大灯泡 on 2019/9/20 14 | *

15 | * Description: 16 | */ 17 | public class SvgSoftwareLayerSetter implements RequestListener { 18 | 19 | @Override 20 | public boolean onLoadFailed( 21 | GlideException e, Object model, Target target, boolean isFirstResource) { 22 | ImageView view = ((ImageViewTarget) target).getView(); 23 | view.setLayerType(ImageView.LAYER_TYPE_NONE, null); 24 | return false; 25 | } 26 | 27 | @Override 28 | public boolean onResourceReady( 29 | PictureDrawable resource, 30 | Object model, 31 | Target target, 32 | DataSource dataSource, 33 | boolean isFirstResource) { 34 | ImageView view = ((ImageViewTarget) target).getView(); 35 | view.setLayerType(ImageView.LAYER_TYPE_SOFTWARE, null); 36 | return false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/interfaces/ClearMemoryObject.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.interfaces; 2 | 3 | public interface ClearMemoryObject { 4 | 5 | void clearMemory(); 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/interfaces/ExtSimpleCallback.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.interfaces; 2 | 3 | /** 4 | * Created by 大灯泡 on 2019/4/8. 5 | * 升级版simpleCallback 6 | */ 7 | public abstract class ExtSimpleCallback implements SimpleCallback { 8 | 9 | public void onStart() { 10 | } 11 | 12 | public void onError(int code, String errorMessage) { 13 | } 14 | 15 | public void onFinish() { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/interfaces/MultiClickListener.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.interfaces; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.utils.WeakHandler; 6 | 7 | 8 | /** 9 | * Created by 大灯泡 on 2019/4/9. 10 | *

11 | * 单双击事件监听 12 | */ 13 | public abstract class MultiClickListener implements View.OnClickListener { 14 | private static final int DelayedTime = 250; 15 | private boolean isDouble = false; 16 | private WeakHandler handler = new WeakHandler(); 17 | 18 | private final Runnable runnable = new Runnable() { 19 | @Override 20 | public void run() { 21 | isDouble = false; 22 | handler.removeCallbacks(this); 23 | onSingleClick(); 24 | } 25 | }; 26 | 27 | @Override 28 | public final void onClick(View v) { 29 | if (isDouble) { 30 | isDouble = false; 31 | handler.removeCallbacks(runnable); 32 | onDoubleClick(); 33 | } else { 34 | isDouble = true; 35 | handler.postDelayed(runnable, DelayedTime); 36 | } 37 | } 38 | 39 | public abstract void onSingleClick(); 40 | 41 | public abstract void onDoubleClick(); 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/interfaces/OnClickListenerWrapper.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.interfaces; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/4/9. 7 | */ 8 | public abstract class OnClickListenerWrapper implements View.OnClickListener { 9 | T data; 10 | 11 | public T getData() { 12 | return data; 13 | } 14 | 15 | public OnClickListenerWrapper setData(T data) { 16 | this.data = data; 17 | return this; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/interfaces/SimpleCallback.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.interfaces; 2 | 3 | import androidx.annotation.Keep; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/4/9. 7 | */ 8 | @Keep 9 | public interface SimpleCallback { 10 | void onCall(T data); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/interfaces/SimpleReturnCallback.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.interfaces; 2 | 3 | /** 4 | * Created by 大灯泡 on 2019/4/9. 5 | */ 6 | public interface SimpleReturnCallback { 7 | boolean onCall(T data); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/livedata/DPLiveData.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.livedata; 2 | 3 | 4 | import androidx.annotation.NonNull; 5 | import androidx.lifecycle.LifecycleOwner; 6 | import androidx.lifecycle.MutableLiveData; 7 | import androidx.lifecycle.Observer; 8 | import razerdp.demo.utils.ToolUtil; 9 | 10 | /** 11 | * Created by 大灯泡 on 2019/4/9. 12 | */ 13 | @SuppressWarnings("ALL") 14 | public class DPLiveData extends MutableLiveData { 15 | private static final String TAG = "DPLiveData"; 16 | private int mVersion = -1; 17 | 18 | public void send(T value) { 19 | if (ToolUtil.isMainThread()) { 20 | setValue(value); 21 | } else { 22 | postValue(value); 23 | } 24 | } 25 | 26 | @Override 27 | public void setValue(T value) { 28 | mVersion++; 29 | super.setValue(value); 30 | } 31 | 32 | @Override 33 | public void postValue(T value) { 34 | mVersion++; 35 | super.postValue(value); 36 | } 37 | 38 | int getVersion() { 39 | return mVersion; 40 | } 41 | 42 | @Override 43 | public void observe(@NonNull LifecycleOwner owner, @NonNull Observer observer) { 44 | super.observe(owner, new LiveDataObserverWrapper(observer, this)); 45 | } 46 | 47 | public void observeSticky(@NonNull LifecycleOwner owner, @NonNull Observer observer) { 48 | super.observe(owner, observer); 49 | } 50 | 51 | @Override 52 | public void observeForever(@NonNull Observer observer) { 53 | super.observeForever(new LiveDataObserverWrapper(observer, this)); 54 | } 55 | 56 | 57 | public void observeForeverSticky(@NonNull Observer observer) { 58 | super.observeForever(observer); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/base/livedata/LiveDataObserverWrapper.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.base.livedata; 2 | 3 | import androidx.annotation.Nullable; 4 | import androidx.lifecycle.Observer; 5 | 6 | /** 7 | * Created by 大灯泡 on 2019/4/9. 8 | */ 9 | class LiveDataObserverWrapper implements Observer { 10 | private int lastVersion; 11 | private Observer mTarget; 12 | private DPLiveData mLiveData; 13 | 14 | LiveDataObserverWrapper(Observer target, DPLiveData liveData) { 15 | mTarget = target; 16 | mLiveData = liveData; 17 | lastVersion = mLiveData.getVersion(); 18 | } 19 | 20 | @Override 21 | public void onChanged(@Nullable T t) { 22 | if (lastVersion >= mLiveData.getVersion()) { 23 | return; 24 | } 25 | lastVersion = mLiveData.getVersion(); 26 | mTarget.onChanged(t); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/event/LiveDataBus.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.event; 2 | 3 | import android.content.Intent; 4 | import android.util.Pair; 5 | 6 | import razerdp.demo.base.livedata.DPLiveData; 7 | 8 | /** 9 | * Created by 大灯泡 on 2019/8/13 10 | *

11 | * Description:事件总线~livedata 12 | */ 13 | public enum LiveDataBus { 14 | INSTANCE; 15 | 16 | private DPLiveData> activityReenterLiveData; 17 | 18 | 19 | public DPLiveData> getActivityReenterLiveData() { 20 | if (activityReenterLiveData == null) { 21 | activityReenterLiveData = new DPLiveData<>(); 22 | } 23 | return activityReenterLiveData; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/DemoCommonUsageInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.base.baseadapter.MultiType; 6 | import razerdp.demo.popup.PopupSource; 7 | 8 | /** 9 | * Created by 大灯泡 on 2019/9/20 10 | *

11 | * Description: 12 | */ 13 | public abstract class DemoCommonUsageInfo implements MultiType { 14 | public String title; 15 | public String desc; 16 | public String option; 17 | public boolean sourceVisible = true; 18 | protected PopupSource source; 19 | 20 | protected String name; 21 | protected String javaUrl; 22 | protected String resUrl; 23 | 24 | public DemoCommonUsageInfo() { 25 | } 26 | 27 | 28 | @Override 29 | public int getItemType() { 30 | return 1; 31 | } 32 | 33 | public abstract void toShow(View v); 34 | 35 | public abstract void toOption(View v); 36 | 37 | public void toSource(View v) { 38 | if (source == null) { 39 | source = new PopupSource(v.getContext(), name, javaUrl, resUrl); 40 | } 41 | source.showPopupWindow(); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/DemoCommonUsageTitle.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model; 2 | 3 | import razerdp.demo.base.baseadapter.MultiType; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/9/20 7 | *

8 | * Description: 9 | */ 10 | public class DemoCommonUsageTitle implements MultiType { 11 | public String title; 12 | 13 | public DemoCommonUsageTitle(String title) { 14 | this.title = title; 15 | } 16 | 17 | @Override 18 | public int getItemType() { 19 | return 0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/DemoMainItem.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model; 2 | 3 | import razerdp.demo.base.baseactivity.BaseActivity; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/9/20 7 | *

8 | * Description: 9 | */ 10 | public class DemoMainItem { 11 | 12 | public Class toClass; 13 | public String title; 14 | public String desc; 15 | public String tag; 16 | 17 | public DemoMainItem(Class toClass, String title, String desc, String tag) { 18 | this.toClass = toClass; 19 | this.title = title; 20 | this.desc = desc; 21 | this.tag = tag; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/DependenceInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model; 2 | 3 | /** 4 | * Created by 大灯泡 on 2019/9/20 5 | *

6 | * Description: 7 | */ 8 | public class DependenceInfo { 9 | public String versionIcon; 10 | public String desc; 11 | public String importText; 12 | 13 | public DependenceInfo(String versionIcon, String desc, String importText) { 14 | this.versionIcon = versionIcon; 15 | this.desc = desc; 16 | this.importText = importText; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/api/ApiInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.api; 2 | 3 | import java.io.Serializable; 4 | 5 | import razerdp.demo.ui.apidemo.ApiDemoFragment; 6 | import razerdp.demo.utils.StringUtil; 7 | 8 | /** 9 | * Created by 大灯泡 on 2020/4/4. 10 | */ 11 | public class ApiInfo implements Serializable { 12 | private CharSequence api; 13 | private Class fragmentClass; 14 | private String titleText; 15 | 16 | public ApiInfo(CharSequence api, Class fragmentClass) { 17 | this(api, fragmentClass, null); 18 | } 19 | 20 | public ApiInfo(CharSequence api, Class fragmentClass, String titleText) { 21 | this.api = api; 22 | this.fragmentClass = fragmentClass; 23 | this.titleText = titleText; 24 | } 25 | 26 | public CharSequence getApi() { 27 | return api; 28 | } 29 | 30 | public Class getFragmentClass() { 31 | return fragmentClass; 32 | } 33 | 34 | public String getTitleText() { 35 | if (StringUtil.noEmpty(titleText)) { 36 | return titleText; 37 | } 38 | return String.valueOf(api); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonAnimateInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | import android.view.animation.Animation; 5 | 6 | import razerdp.demo.model.DemoCommonUsageInfo; 7 | import razerdp.demo.popup.PopupAnimate; 8 | import razerdp.demo.popup.options.PopupAnimateOption; 9 | 10 | /** 11 | * Created by 大灯泡 on 2019/9/20 12 | *

13 | * Description: 14 | */ 15 | public class CommonAnimateInfo extends DemoCommonUsageInfo { 16 | 17 | public Animation showAnimation; 18 | public Animation dismissAnimation; 19 | public boolean blur; 20 | public boolean clip; 21 | 22 | PopupAnimateOption popupAnimateOption; 23 | PopupAnimate popupAnimate; 24 | 25 | public CommonAnimateInfo() { 26 | title = "动画展示"; 27 | name = "PopupAnimate"; 28 | javaUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/java/razerdp/demo/popup/PopupAnimate.java"; 29 | resUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/res/layout/popup_animate.xml"; 30 | } 31 | 32 | @Override 33 | public void toShow(View v) { 34 | if (popupAnimate == null) { 35 | popupAnimate = new PopupAnimate(v.getContext()); 36 | } 37 | popupAnimate.setShowAnimation(showAnimation) 38 | .setDismissAnimation(dismissAnimation) 39 | .setBlurBackgroundEnable(blur) 40 | .setClipChildren(clip); 41 | popupAnimate.showPopupWindow(); 42 | 43 | } 44 | 45 | @Override 46 | public void toOption(View v) { 47 | if (popupAnimateOption == null) { 48 | popupAnimateOption = new PopupAnimateOption(v.getContext()); 49 | popupAnimateOption.setInfo(this); 50 | } 51 | popupAnimateOption.showPopupWindow(v); 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonArrowInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.Gravity; 4 | import android.view.View; 5 | 6 | import razerdp.basepopup.BasePopupWindow; 7 | import razerdp.demo.model.DemoCommonUsageInfo; 8 | import razerdp.demo.popup.PopupArrow; 9 | import razerdp.demo.popup.options.PopupArrowOption; 10 | 11 | /** 12 | * Created by 大灯泡 on 2020/5/6. 13 | */ 14 | public class CommonArrowInfo extends DemoCommonUsageInfo { 15 | public int gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL; 16 | public boolean blur; 17 | public BasePopupWindow.GravityMode gravityMode = BasePopupWindow.GravityMode.RELATIVE_TO_ANCHOR; 18 | 19 | PopupArrow mPopupArrow; 20 | PopupArrowOption mPopupArrowOption; 21 | 22 | public CommonArrowInfo() { 23 | title = "带箭头的Popup"; 24 | name="PopupArrow"; 25 | javaUrl="https://github.com/razerdp/BasePopup/blob/master/app/src/main/java/razerdp/demo/popup/PopupArrow.java"; 26 | resUrl="https://github.com/razerdp/BasePopup/blob/master/app/src/main/res/layout/popup_arrow.xml"; 27 | } 28 | 29 | @Override 30 | public void toShow(View v) { 31 | if (mPopupArrow == null) { 32 | mPopupArrow = new PopupArrow(v.getContext()); 33 | } 34 | mPopupArrow.setBlurBackgroundEnable(blur); 35 | mPopupArrow.setPopupGravity(gravityMode, gravity); 36 | mPopupArrow.showPopupWindow(v); 37 | } 38 | 39 | @Override 40 | public void toOption(View v) { 41 | if (mPopupArrowOption == null) { 42 | mPopupArrowOption = new PopupArrowOption(v.getContext()); 43 | mPopupArrowOption.setInfo(this); 44 | } 45 | mPopupArrowOption.showPopupWindow(v); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonAutoMirrorActivityInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.ui.ActivityLauncher; 7 | import razerdp.demo.ui.AutoMirrorActivity; 8 | import razerdp.demo.utils.UIHelper; 9 | 10 | /** 11 | * Created by 大灯泡 on 2021/06/18 12 | *

13 | * Description:自动镜像 14 | */ 15 | public class CommonAutoMirrorActivityInfo extends DemoCommonUsageInfo { 16 | 17 | public CommonAutoMirrorActivityInfo() { 18 | title = "自动镜像定位"; 19 | sourceVisible = false; 20 | } 21 | 22 | @Override 23 | public void toShow(View v) { 24 | ActivityLauncher.start(v.getContext(), AutoMirrorActivity.class); 25 | } 26 | 27 | @Override 28 | public void toOption(View v) { 29 | UIHelper.toast("这里啥都没有哦"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonBackgroundInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.graphics.drawable.Drawable; 4 | import android.view.Gravity; 5 | import android.view.View; 6 | 7 | import razerdp.demo.model.DemoCommonUsageInfo; 8 | import razerdp.demo.popup.DemoPopup; 9 | import razerdp.demo.popup.options.PopupBackgroundOption; 10 | 11 | /** 12 | * Created by 大灯泡 on 2019/9/20. 13 | */ 14 | public class CommonBackgroundInfo extends DemoCommonUsageInfo { 15 | public Drawable background; 16 | public boolean blur; 17 | 18 | DemoPopup mDemoPopup; 19 | PopupBackgroundOption mPopupBackgroundOption; 20 | 21 | public CommonBackgroundInfo() { 22 | title = "背景控制"; 23 | name = "DemoPopup"; 24 | javaUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/java/razerdp/demo/popup/DemoPopup.java"; 25 | resUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/res/layout/popup_demo.xml"; 26 | } 27 | 28 | @Override 29 | public void toShow(View v) { 30 | if (mDemoPopup == null) { 31 | mDemoPopup = new DemoPopup(v.getContext()).setText("背景控制"); 32 | } 33 | mDemoPopup.setBlurBackgroundEnable(blur) 34 | .setBackground(background) 35 | .setPopupGravity(Gravity.CENTER) 36 | .showPopupWindow(); 37 | 38 | } 39 | 40 | @Override 41 | public void toOption(View v) { 42 | if (mPopupBackgroundOption == null) { 43 | mPopupBackgroundOption = new PopupBackgroundOption(v.getContext()); 44 | mPopupBackgroundOption.setInfo(this); 45 | } 46 | mPopupBackgroundOption.showPopupWindow(); 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonDialogActivityInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.ui.ActivityLauncher; 7 | import razerdp.demo.ui.dialog.DialogActivity; 8 | import razerdp.demo.utils.UIHelper; 9 | 10 | /** 11 | * Created by 大灯泡 on 2020/08/17 12 | *

13 | * Description:dialog activity 14 | */ 15 | public class CommonDialogActivityInfo extends DemoCommonUsageInfo { 16 | 17 | public CommonDialogActivityInfo() { 18 | title = "Dialog Activity"; 19 | sourceVisible = false; 20 | } 21 | 22 | @Override 23 | public void toShow(View v) { 24 | ActivityLauncher.start(v.getContext(), DialogActivity.class); 25 | } 26 | 27 | @Override 28 | public void toOption(View v) { 29 | UIHelper.toast("这里啥都没有哦"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonFriendCircleInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.ui.ActivityLauncher; 7 | import razerdp.demo.ui.friendcircle.FriendCircleActivity; 8 | import razerdp.demo.utils.UIHelper; 9 | 10 | /** 11 | * Created by 大灯泡 on 2019/9/24 12 | *

13 | * Description:朋友圈 14 | */ 15 | public class CommonFriendCircleInfo extends DemoCommonUsageInfo { 16 | 17 | public CommonFriendCircleInfo() { 18 | title = "朋友圈评论"; 19 | name="PopupFriendCircle"; 20 | javaUrl="https://github.com/razerdp/BasePopup/blob/master/app/src/main/java/razerdp/demo/popup/PopupFriendCircle.java"; 21 | resUrl="https://github.com/razerdp/BasePopup/blob/master/app/src/main/res/layout/popup_friend_circle_comment.xml"; 22 | } 23 | 24 | @Override 25 | public void toShow(View v) { 26 | ActivityLauncher.start(v.getContext(), FriendCircleActivity.class); 27 | } 28 | 29 | @Override 30 | public void toOption(View v) { 31 | UIHelper.toast("请到朋友圈页面设置哦"); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonFullScreenActivityInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.ui.ActivityLauncher; 7 | import razerdp.demo.ui.fullscreen.FullScreenActivity; 8 | import razerdp.demo.utils.UIHelper; 9 | 10 | /** 11 | * Created by 大灯泡 on 2020/05/17 12 | *

13 | * Description:全屏 14 | */ 15 | public class CommonFullScreenActivityInfo extends DemoCommonUsageInfo { 16 | 17 | public CommonFullScreenActivityInfo() { 18 | title = "全屏Activity"; 19 | sourceVisible = false; 20 | } 21 | 22 | @Override 23 | public void toShow(View v) { 24 | ActivityLauncher.start(v.getContext(), FullScreenActivity.class); 25 | } 26 | 27 | @Override 28 | public void toOption(View v) { 29 | UIHelper.toast("这里啥都没有哦"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonGestureNavInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.popup.PopupDesc; 7 | import razerdp.demo.utils.RomUtils; 8 | 9 | /** 10 | * Created by 大灯泡 on 2019/9/27 11 | *

12 | * Description:兼容性测试 - 手势导航栏 13 | */ 14 | public class CommonGestureNavInfo extends DemoCommonUsageInfo { 15 | PopupDesc popupDesc; 16 | 17 | public CommonGestureNavInfo() { 18 | title = "各种手势导航栏测试\n" + "系统:" + RomUtils.getRomInfo().getName(); 19 | name = "PopupDesc"; 20 | javaUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/java/razerdp/demo/popup/PopupDesc.java"; 21 | resUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/res/layout/popup_description.xml"; 22 | 23 | } 24 | 25 | @Override 26 | public void toShow(View v) { 27 | if (popupDesc == null) { 28 | popupDesc = new PopupDesc(v.getContext()); 29 | popupDesc.setTitle("手势导航栏测试"); 30 | popupDesc.setDesc("主要测试手势导航栏情况下背景蒙层能否铺满"); 31 | } 32 | popupDesc.showPopupWindow(); 33 | } 34 | 35 | @Override 36 | public void toOption(View v) { 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonRTLInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.ui.ActivityLauncher; 7 | import razerdp.demo.ui.rtl.RTLActivity; 8 | import razerdp.demo.utils.UIHelper; 9 | 10 | /** 11 | * Created by 大灯泡 on 2020/7/11. 12 | */ 13 | public class CommonRTLInfo extends DemoCommonUsageInfo { 14 | public CommonRTLInfo() { 15 | title = "RTL布局"; 16 | sourceVisible = false; 17 | } 18 | 19 | @Override 20 | public void toShow(View v) { 21 | ActivityLauncher.start(v.getContext(), RTLActivity.class); 22 | } 23 | 24 | @Override 25 | public void toOption(View v) { 26 | UIHelper.toast("这里啥都没有哦"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/CommonUpdateInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.ui.ActivityLauncher; 7 | import razerdp.demo.ui.updatetest.UpdateTestActivity; 8 | import razerdp.demo.utils.UIHelper; 9 | 10 | /** 11 | * Created by 大灯泡 on 2020/12/29. 12 | */ 13 | public class CommonUpdateInfo extends DemoCommonUsageInfo { 14 | public CommonUpdateInfo() { 15 | title = "Update()方法测试"; 16 | name = "PopupUpdateTest"; 17 | javaUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/java/razerdp/demo/popup/PopupUpdateTest.java"; 18 | resUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/res/layout/popup_update_test.xml"; 19 | } 20 | 21 | @Override 22 | public void toShow(View v) { 23 | ActivityLauncher.start(v.getContext(), UpdateTestActivity.class); 24 | } 25 | 26 | @Override 27 | public void toOption(View v) { 28 | UIHelper.toast("这里啥都没有哦"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/ScreenRotateActivityInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.ui.ActivityLauncher; 7 | import razerdp.demo.ui.ScreenRotateActivity; 8 | import razerdp.demo.utils.UIHelper; 9 | 10 | /** 11 | * Created by 大灯泡 on 2020/05/17 12 | *

13 | * Description:屏幕旋转 14 | */ 15 | public class ScreenRotateActivityInfo extends DemoCommonUsageInfo { 16 | 17 | public ScreenRotateActivityInfo() { 18 | title = "屏幕旋转"; 19 | sourceVisible = false; 20 | } 21 | 22 | @Override 23 | public void toShow(View v) { 24 | ActivityLauncher.start(v.getContext(), ScreenRotateActivity.class); 25 | } 26 | 27 | @Override 28 | public void toOption(View v) { 29 | UIHelper.toast("这里啥都没有哦"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/common/WidthAndHeightLimitInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.common; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.ui.ActivityLauncher; 7 | import razerdp.demo.ui.SizeLimitActivity; 8 | import razerdp.demo.utils.UIHelper; 9 | 10 | /** 11 | * Created by 大灯泡 on 2021/8/6. 12 | */ 13 | public class WidthAndHeightLimitInfo extends DemoCommonUsageInfo { 14 | public WidthAndHeightLimitInfo() { 15 | title = "测试宽高限制"; 16 | name = "PopupWidthHeightLimit"; 17 | javaUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/java/razerdp/demo/popup/PopupWidthHeightLimit.java"; 18 | resUrl = "https://github.com/razerdp/BasePopup/blob/master/app/src/main/res/layout/popup_width_height_limit.xml"; 19 | } 20 | 21 | @Override 22 | public void toShow(View v) { 23 | ActivityLauncher.start(v.getContext(), SizeLimitActivity.class); 24 | } 25 | 26 | 27 | @Override 28 | public void toOption(View v) { 29 | UIHelper.toast("这里啥都没有哦"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/friendcircle/FriendCircleInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.friendcircle; 2 | 3 | import android.util.Pair; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by 大灯泡 on 2019/9/24 9 | *

10 | * Description: 11 | */ 12 | public class FriendCircleInfo { 13 | public String name; 14 | public String avatar; 15 | public String content; 16 | public List> pics; 17 | public boolean started; 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/issue/IssueInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.issue; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | import razerdp.demo.base.baseactivity.BaseActivity; 9 | 10 | /** 11 | * Created by 大灯泡 on 2019/9/22. 12 | */ 13 | public class IssueInfo { 14 | public String issue; 15 | public String title; 16 | public String desc; 17 | public String url; 18 | public List pics; 19 | public Class activityClass; 20 | public boolean finished; 21 | 22 | public IssueInfo() { 23 | pics = new ArrayList<>(); 24 | } 25 | 26 | public IssueInfo setIssue(String issue) { 27 | this.issue = issue; 28 | url = "https://github.com/razerdp/BasePopup/issues/" + issue; 29 | return this; 30 | } 31 | 32 | public IssueInfo setTitle(String title) { 33 | this.title = title; 34 | return this; 35 | } 36 | 37 | public IssueInfo setDesc(String desc) { 38 | this.desc = desc; 39 | return this; 40 | } 41 | 42 | public IssueInfo setUrl(String url) { 43 | this.url = url; 44 | return this; 45 | } 46 | 47 | public IssueInfo appendPic(String pic) { 48 | this.pics.add(pic); 49 | return this; 50 | } 51 | 52 | public IssueInfo setActivityClass(Class activityClass) { 53 | this.activityClass = activityClass; 54 | return this; 55 | } 56 | 57 | public IssueInfo setFixed(boolean finished) { 58 | this.finished = finished; 59 | return this; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/lifecycle/ShowInServiceInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.lifecycle; 2 | 3 | import android.content.Intent; 4 | import android.view.View; 5 | 6 | import razerdp.demo.model.DemoCommonUsageInfo; 7 | import razerdp.demo.services.DemoService; 8 | 9 | /** 10 | * Created by 大灯泡 on 2020/2/3. 11 | */ 12 | public class ShowInServiceInfo extends DemoCommonUsageInfo { 13 | public ShowInServiceInfo() { 14 | title = "在service(或非activity)中弹窗"; 15 | } 16 | 17 | @Override 18 | public void toShow(View v) { 19 | Intent intent = new Intent(v.getContext(), DemoService.class); 20 | v.getContext().startService(intent); 21 | } 22 | 23 | @Override 24 | public void toOption(View v) { 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/model/lifecycle/ShowOnCreateInfo.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.model.lifecycle; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.demo.model.DemoCommonUsageInfo; 6 | import razerdp.demo.ui.ActivityLauncher; 7 | import razerdp.demo.ui.lifecycle.ShowOnCreateActivity; 8 | 9 | /** 10 | * Created by 大灯泡 on 2020/2/3. 11 | */ 12 | public class ShowOnCreateInfo extends DemoCommonUsageInfo { 13 | public ShowOnCreateInfo() { 14 | title = "在activity#onCreate中弹窗"; 15 | } 16 | 17 | @Override 18 | public void toShow(View v) { 19 | ActivityLauncher.start(v.getContext(), ShowOnCreateActivity.class); 20 | } 21 | 22 | @Override 23 | public void toOption(View v) { 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/PopupAnimate.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | import razerdp.basepopup.BasePopupWindow; 7 | import razerdp.basepopup.R; 8 | 9 | /** 10 | * Created by 大灯泡 on 2019/9/20 11 | *

12 | * Description: 13 | */ 14 | public class PopupAnimate extends BasePopupWindow { 15 | public PopupAnimate(Context context) { 16 | super(context); 17 | setContentView(R.layout.popup_animate); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/PopupInput.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.animation.Animation; 6 | 7 | import razerdp.basepopup.BasePopupWindow; 8 | import razerdp.basepopup.R; 9 | import razerdp.basepopup.databinding.PopupInputBinding; 10 | import razerdp.demo.model.common.CommonInputInfo; 11 | import razerdp.demo.utils.UIHelper; 12 | import razerdp.util.animation.AnimationHelper; 13 | import razerdp.util.animation.TranslationConfig; 14 | 15 | /** 16 | * Created by 大灯泡 on 2019/9/22. 17 | * 18 | * @see CommonInputInfo 19 | */ 20 | public class PopupInput extends BasePopupWindow { 21 | PopupInputBinding mBinding; 22 | 23 | public PopupInput(Context context) { 24 | super(context); 25 | setContentView(R.layout.popup_input); 26 | mBinding.tvSend.setOnClickListener(v -> { 27 | UIHelper.toast(mBinding.edInput.getText().toString()); 28 | dismiss(); 29 | }); 30 | } 31 | 32 | @Override 33 | public void onViewCreated(View contentView) { 34 | mBinding = PopupInputBinding.bind(contentView); 35 | } 36 | 37 | 38 | @Override 39 | protected Animation onCreateShowAnimation() { 40 | return AnimationHelper.asAnimation() 41 | .withTranslation(TranslationConfig.FROM_BOTTOM) 42 | .toShow(); 43 | } 44 | 45 | 46 | @Override 47 | protected Animation onCreateDismissAnimation() { 48 | return AnimationHelper.asAnimation() 49 | .withTranslation(TranslationConfig.TO_BOTTOM) 50 | .toDismiss(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/PopupShowOnCreate.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.animation.Animation; 6 | 7 | import razerdp.basepopup.BasePopupWindow; 8 | import razerdp.basepopup.R; 9 | import razerdp.util.animation.AnimationHelper; 10 | import razerdp.util.animation.ScaleConfig; 11 | 12 | /** 13 | * Created by 大灯泡 on 2020/2/3. 14 | */ 15 | public class PopupShowOnCreate extends BasePopupWindow { 16 | private onErrorPrintListener mOnErrorPrintListener; 17 | 18 | public PopupShowOnCreate(Context context) { 19 | super(context); 20 | setContentView(R.layout.popup_show_on_create); 21 | } 22 | 23 | @Override 24 | protected Animation onCreateShowAnimation() { 25 | return AnimationHelper.asAnimation() 26 | .withScale(ScaleConfig.CENTER) 27 | .toShow(); 28 | } 29 | 30 | @Override 31 | protected Animation onCreateDismissAnimation() { 32 | return AnimationHelper.asAnimation() 33 | .withScale(ScaleConfig.CENTER) 34 | .toDismiss(); 35 | } 36 | 37 | 38 | @Override 39 | protected void onLogInternal(String msg) { 40 | super.onLogInternal(msg); 41 | if (mOnErrorPrintListener != null) { 42 | mOnErrorPrintListener.onPrintError(msg); 43 | } 44 | } 45 | 46 | public PopupShowOnCreate setOnErrorPrintListener(onErrorPrintListener onErrorPrintListener) { 47 | mOnErrorPrintListener = onErrorPrintListener; 48 | return this; 49 | } 50 | 51 | public interface onErrorPrintListener { 52 | void onPrintError(String msg); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/PopupSlide.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.widget.TextView; 6 | 7 | import razerdp.basepopup.BasePopupWindow; 8 | import razerdp.basepopup.R; 9 | import razerdp.basepopup.databinding.PopupSlideBinding; 10 | import razerdp.demo.utils.UIHelper; 11 | 12 | /** 13 | * Created by 大灯泡 on 2019/9/20 14 | *

15 | * Description:{@link razerdp.demo.model.common.CommonSlideInfo} 16 | */ 17 | public class PopupSlide extends BasePopupWindow { 18 | PopupSlideBinding mBinding; 19 | 20 | public PopupSlide(Context context) { 21 | super(context); 22 | setContentView(R.layout.popup_slide); 23 | setViewClickListener(this::click, mBinding.tvItem1, mBinding.tvItem2, mBinding.tvItem3); 24 | } 25 | 26 | @Override 27 | public void onViewCreated(View contentView) { 28 | mBinding = PopupSlideBinding.bind(contentView); 29 | } 30 | 31 | void click(View v) { 32 | UIHelper.toast(((TextView) v).getText().toString()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/PopupSlideSmall.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.widget.TextView; 6 | 7 | import razerdp.basepopup.BasePopupWindow; 8 | import razerdp.basepopup.R; 9 | import razerdp.basepopup.databinding.PopupSlideSmallBinding; 10 | import razerdp.demo.model.common.CommonSlideInfo; 11 | import razerdp.demo.utils.UIHelper; 12 | 13 | /** 14 | * Created by 大灯泡 on 2019/9/20 15 | *

16 | * Description:{@link CommonSlideInfo} 17 | */ 18 | public class PopupSlideSmall extends BasePopupWindow { 19 | PopupSlideSmallBinding mBinding; 20 | 21 | public PopupSlideSmall(Context context) { 22 | super(context); 23 | setContentView(R.layout.popup_slide_small); 24 | setViewClickListener(this::click, mBinding.tvItem1, mBinding.tvItem2, mBinding.tvItem3); 25 | } 26 | 27 | @Override 28 | public void onViewCreated(View contentView) { 29 | mBinding = PopupSlideSmallBinding.bind(contentView); 30 | } 31 | 32 | 33 | void click(View v) { 34 | UIHelper.toast(((TextView) v).getText().toString()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/common/PopupOptionsPickerView.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup.common; 2 | 3 | import android.view.View; 4 | 5 | import com.bigkoo.pickerview.configure.PickerOptions; 6 | import com.bigkoo.pickerview.view.OptionsPickerView; 7 | 8 | /** 9 | * Created by 大灯泡 on 2019/8/14 10 | *

11 | * Description:用于popup的picker,主要是防止select之后立刻dismiss导致消失的问题 12 | */ 13 | public class PopupOptionsPickerView extends OptionsPickerView { 14 | public PopupOptionsPickerView(PickerOptions pickerOptions) { 15 | super(pickerOptions); 16 | } 17 | 18 | @Override 19 | public void onClick(View v) { 20 | String tag = (String) v.getTag(); 21 | if (tag.equals("submit")) { 22 | returnData(); 23 | } else if (tag.equals("cancel")) { 24 | if (mPickerOptions.cancelListener != null) { 25 | mPickerOptions.cancelListener.onClick(v); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/issue/PopupIssue210.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup.issue; 2 | 3 | import android.content.Context; 4 | import android.view.Gravity; 5 | import android.view.View; 6 | import android.view.animation.Animation; 7 | 8 | import razerdp.basepopup.BasePopupWindow; 9 | import razerdp.basepopup.R; 10 | import razerdp.basepopup.databinding.PopupIssue210Binding; 11 | import razerdp.util.animation.AnimationHelper; 12 | import razerdp.util.animation.TranslationConfig; 13 | 14 | /** 15 | * Created by 大灯泡 on 2019/9/22. 16 | */ 17 | public class PopupIssue210 extends BasePopupWindow { 18 | PopupIssue210Binding mBinding; 19 | 20 | public PopupIssue210(Context context) { 21 | super(context); 22 | setContentView(R.layout.popup_issue_210); 23 | setPopupGravity(Gravity.BOTTOM); 24 | mBinding.tvGo.setOnClickListener(v -> dismiss()); 25 | } 26 | 27 | @Override 28 | public void onViewCreated(View contentView) { 29 | mBinding = PopupIssue210Binding.bind(contentView); 30 | } 31 | 32 | 33 | @Override 34 | protected Animation onCreateShowAnimation() { 35 | return AnimationHelper.asAnimation() 36 | .withTranslation(TranslationConfig.FROM_TOP) 37 | .toShow(); 38 | } 39 | 40 | 41 | @Override 42 | protected Animation onCreateDismissAnimation() { 43 | return AnimationHelper.asAnimation() 44 | .withTranslation(TranslationConfig.TO_TOP) 45 | .toDismiss(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/issue/PopupIssue236.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup.issue; 2 | 3 | import android.content.Context; 4 | import android.view.Gravity; 5 | import android.view.View; 6 | import android.view.animation.Animation; 7 | 8 | import razerdp.basepopup.BasePopupWindow; 9 | import razerdp.basepopup.R; 10 | import razerdp.basepopup.databinding.PopupIssue236Binding; 11 | import razerdp.util.animation.AnimationHelper; 12 | import razerdp.util.animation.TranslationConfig; 13 | 14 | /** 15 | * Created by 大灯泡 on 2020/02/11. 16 | */ 17 | public class PopupIssue236 extends BasePopupWindow { 18 | PopupIssue236Binding mBinding; 19 | 20 | public PopupIssue236(Context context) { 21 | super(context); 22 | setContentView(R.layout.popup_issue_236); 23 | setPopupGravity(Gravity.BOTTOM); 24 | mBinding.tvGo.setOnClickListener(v -> dismiss()); 25 | } 26 | 27 | @Override 28 | public void onViewCreated(View contentView) { 29 | mBinding = PopupIssue236Binding.bind(contentView); 30 | } 31 | 32 | @Override 33 | protected Animation onCreateShowAnimation() { 34 | return AnimationHelper.asAnimation() 35 | .withTranslation(TranslationConfig.FROM_TOP) 36 | .toShow(); 37 | } 38 | 39 | 40 | @Override 41 | protected Animation onCreateDismissAnimation() { 42 | return AnimationHelper.asAnimation() 43 | .withTranslation(TranslationConfig.TO_TOP) 44 | .toDismiss(); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/options/BaseOptionPopup.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup.options; 2 | 3 | import android.content.Context; 4 | import android.view.Gravity; 5 | import android.view.animation.Animation; 6 | 7 | import razerdp.basepopup.BasePopupWindow; 8 | import razerdp.demo.model.DemoCommonUsageInfo; 9 | import razerdp.util.animation.AnimationHelper; 10 | import razerdp.util.animation.TranslationConfig; 11 | 12 | /** 13 | * Created by 大灯泡 on 2019/9/20. 14 | */ 15 | public abstract class BaseOptionPopup extends BasePopupWindow { 16 | protected T mInfo; 17 | 18 | public BaseOptionPopup(Context context) { 19 | super(context); 20 | setPopupGravity(Gravity.BOTTOM); 21 | } 22 | 23 | @Override 24 | protected Animation onCreateShowAnimation() { 25 | return AnimationHelper.asAnimation() 26 | .withTranslation(TranslationConfig.FROM_TOP) 27 | .toShow(); 28 | } 29 | 30 | 31 | @Override 32 | protected Animation onCreateDismissAnimation() { 33 | return AnimationHelper.asAnimation() 34 | .withTranslation(TranslationConfig.TO_TOP) 35 | .toDismiss(); 36 | } 37 | 38 | public BaseOptionPopup setInfo(T info) { 39 | mInfo = info; 40 | return this; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/options/PopupAnyPosOption.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup.options; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | import androidx.annotation.NonNull; 7 | import razerdp.basepopup.R; 8 | import razerdp.basepopup.databinding.PopupOptionAnyposBinding; 9 | import razerdp.demo.model.common.CommonAnyPosInfo; 10 | 11 | /** 12 | * Created by 大灯泡 on 2019/9/20. 13 | * 14 | * @see CommonAnyPosInfo 15 | */ 16 | public class PopupAnyPosOption extends BaseOptionPopup { 17 | PopupOptionAnyposBinding mBinding; 18 | 19 | public PopupAnyPosOption(Context context) { 20 | super(context); 21 | setContentView(R.layout.popup_option_anypos); 22 | mBinding.tvGo.setOnClickListener(v -> ok()); 23 | } 24 | 25 | @Override 26 | public void onViewCreated(@NonNull View contentView) { 27 | mBinding = PopupOptionAnyposBinding.bind(contentView); 28 | } 29 | 30 | void ok() { 31 | mInfo.outSideTouchable = mBinding.checkOutsideTouch.isChecked(); 32 | mInfo.blur = mBinding.checkBlur.isChecked(); 33 | dismiss(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/popup/options/PopupCircleOption.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.popup.options; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.animation.Animation; 6 | 7 | import androidx.annotation.NonNull; 8 | import razerdp.basepopup.R; 9 | import razerdp.basepopup.databinding.PopupOptionCircleBinding; 10 | import razerdp.demo.popup.PopupFriendCircle; 11 | import razerdp.util.animation.AnimationHelper; 12 | import razerdp.util.animation.TranslationConfig; 13 | 14 | /** 15 | * Created by 大灯泡 on 2019/9/22. 16 | */ 17 | public class PopupCircleOption extends BaseOptionPopup { 18 | PopupOptionCircleBinding mBinding; 19 | 20 | public PopupCircleOption(Context context) { 21 | super(context); 22 | setContentView(R.layout.popup_option_circle); 23 | mBinding.tvGo.setOnClickListener(v -> ok()); 24 | } 25 | 26 | @Override 27 | public void onViewCreated(@NonNull View contentView) { 28 | mBinding = PopupOptionCircleBinding.bind(contentView); 29 | } 30 | 31 | @Override 32 | protected Animation onCreateShowAnimation() { 33 | return AnimationHelper.asAnimation() 34 | .withTranslation(TranslationConfig.FROM_BOTTOM) 35 | .toShow(); 36 | } 37 | 38 | 39 | @Override 40 | protected Animation onCreateDismissAnimation() { 41 | return AnimationHelper.asAnimation() 42 | .withTranslation(TranslationConfig.TO_BOTTOM) 43 | .toDismiss(); 44 | } 45 | 46 | void ok() { 47 | PopupFriendCircle.blur = mBinding.checkBlur.isChecked(); 48 | PopupFriendCircle.outSideTouch = mBinding.checkOutsidetouch.isChecked(); 49 | PopupFriendCircle.link = mBinding.checkLink.isChecked(); 50 | dismiss(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/services/DemoService.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.services; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | import android.view.Gravity; 7 | 8 | import razerdp.demo.popup.DemoPopup; 9 | import razerdp.util.animation.AlphaConfig; 10 | import razerdp.util.animation.AnimationHelper; 11 | 12 | /** 13 | * Created by 大灯泡 on 2019/5/16 14 | *

15 | * Description: 16 | */ 17 | public class DemoService extends Service { 18 | private static final String TAG = "DemoService"; 19 | DemoPopup demoPopup; 20 | 21 | 22 | @Override 23 | public int onStartCommand(Intent intent, int flags, int startId) { 24 | if (demoPopup == null) { 25 | demoPopup = new DemoPopup(getApplicationContext()); 26 | demoPopup.setPopupGravity(Gravity.CENTER) 27 | .setBlurBackgroundEnable(true) 28 | .setShowAnimation(AnimationHelper.asAnimation() 29 | .withAlpha(AlphaConfig.IN) 30 | .toShow()) 31 | .setDismissAnimation(AnimationHelper.asAnimation() 32 | .withAlpha(AlphaConfig.OUT) 33 | .toDismiss()); 34 | demoPopup.setText("在Service弹出Popup,创建该Popup的context:" + getApplicationContext()); 35 | } 36 | demoPopup.showPopupWindow(); 37 | return super.onStartCommand(intent, flags, startId); 38 | } 39 | 40 | @Override 41 | public IBinder onBind(Intent intent) { 42 | return null; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/ui/ScreenRotateActivity.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.ui; 2 | 3 | import android.content.Intent; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.widget.TextView; 7 | 8 | import androidx.viewbinding.ViewBinding; 9 | import razerdp.basepopup.databinding.ActivityRotateBinding; 10 | import razerdp.demo.base.baseactivity.BaseActivity; 11 | import razerdp.demo.base.baseactivity.BaseBindingActivity; 12 | import razerdp.demo.model.common.CommonSlideInfo; 13 | import razerdp.demo.utils.DescBuilder; 14 | 15 | /** 16 | * Created by 大灯泡 on 2021/5/10 17 | *

18 | * Description: 19 | */ 20 | public class ScreenRotateActivity extends BaseBindingActivity { 21 | public static final String DESC = DescBuilder.get() 22 | .append("测试屏幕旋转") 23 | .build(); 24 | CommonSlideInfo info; 25 | 26 | @Override 27 | protected void onHandleIntent(Intent intent) { 28 | 29 | } 30 | 31 | @Override 32 | public ActivityRotateBinding onCreateViewBinding(LayoutInflater layoutInflater) { 33 | return ActivityRotateBinding.inflate(layoutInflater); 34 | } 35 | 36 | @Override 37 | protected void onInitView(View decorView) { 38 | info = new CommonSlideInfo(); 39 | mBinding.tvShow.setOnClickListener(v -> info.toShow(v)); 40 | mBinding.tvSetting.setOnClickListener(v -> info.toOption(v)); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/ui/apidemo/ApiDemoFragment.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.ui.apidemo; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.viewbinding.ViewBinding; 5 | import razerdp.demo.base.baseactivity.BaseFragment; 6 | 7 | /** 8 | * Created by 大灯泡 on 2020/4/4. 9 | */ 10 | public abstract class ApiDemoFragment extends BaseFragment { 11 | 12 | protected void onInitSettingPopup(@NonNull ApiDemoActivity.SimpleSelectorPopupConfig config) { 13 | 14 | } 15 | 16 | protected void onSettingPopupSelected(String selected, int index) { 17 | 18 | } 19 | 20 | protected void onSettingClick() { 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/ui/apidemo/fragments/BackPressEnableApiFragment.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.ui.apidemo.fragments; 2 | 3 | import android.view.LayoutInflater; 4 | import android.view.View; 5 | 6 | import androidx.annotation.NonNull; 7 | import androidx.viewbinding.ViewBinding; 8 | import razerdp.basepopup.databinding.ApiDemoBackpressEnableBinding; 9 | import razerdp.demo.popup.DemoPopup; 10 | import razerdp.demo.ui.apidemo.ApiDemoActivity; 11 | import razerdp.demo.ui.apidemo.ApiDemoFragment; 12 | 13 | /** 14 | * Created by 大灯泡 on 2020/4/4. 15 | * backpressenable 16 | */ 17 | public class BackPressEnableApiFragment extends ApiDemoFragment { 18 | DemoPopup mDemoPopup; 19 | boolean backPressEnable = true; 20 | 21 | @Override 22 | public ApiDemoBackpressEnableBinding onCreateViewBinding(LayoutInflater layoutInflater) { 23 | return ApiDemoBackpressEnableBinding.inflate(layoutInflater); 24 | } 25 | 26 | @Override 27 | protected void onInitViews(View mRootView) { 28 | mViewBinding.tvTest.setOnClickListener(v -> show()); 29 | } 30 | 31 | @Override 32 | protected void onInitSettingPopup(@NonNull ApiDemoActivity.SimpleSelectorPopupConfig config) { 33 | config.setTitle("是否允许返回键Dismiss") 34 | .append("true") 35 | .append("false"); 36 | } 37 | 38 | @Override 39 | protected void onSettingPopupSelected(String selected, int index) { 40 | backPressEnable = index == 0; 41 | } 42 | 43 | 44 | void show() { 45 | if (mDemoPopup == null) { 46 | mDemoPopup = new DemoPopup(this); 47 | } 48 | mDemoPopup.setBackPressEnable(backPressEnable) 49 | .showPopupWindow(); 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/ui/apidemo/fragments/FadeEnableApiFragment.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.ui.apidemo.fragments; 2 | 3 | import android.view.LayoutInflater; 4 | import android.view.View; 5 | 6 | import androidx.annotation.NonNull; 7 | import androidx.viewbinding.ViewBinding; 8 | import razerdp.basepopup.databinding.ApiDemoFadeEnableBinding; 9 | import razerdp.demo.popup.DemoPopup; 10 | import razerdp.demo.ui.apidemo.ApiDemoActivity; 11 | import razerdp.demo.ui.apidemo.ApiDemoFragment; 12 | 13 | /** 14 | * Created by 大灯泡 on 2020/4/4. 15 | * fadeenable 16 | */ 17 | public class FadeEnableApiFragment extends ApiDemoFragment { 18 | DemoPopup mDemoPopup; 19 | boolean fadeEnable = true; 20 | 21 | @Override 22 | public ApiDemoFadeEnableBinding onCreateViewBinding(LayoutInflater layoutInflater) { 23 | return ApiDemoFadeEnableBinding.inflate(layoutInflater); 24 | } 25 | 26 | @Override 27 | protected void onInitViews(View mRootView) { 28 | mViewBinding.tvTest.setOnClickListener(v -> this.show()); 29 | } 30 | 31 | @Override 32 | protected void onInitSettingPopup(@NonNull ApiDemoActivity.SimpleSelectorPopupConfig config) { 33 | config.setTitle("淡入淡出功能") 34 | .append("开启淡入淡出") 35 | .append("关闭淡入淡出"); 36 | } 37 | 38 | @Override 39 | protected void onSettingPopupSelected(String selected, int index) { 40 | fadeEnable = index == 0; 41 | } 42 | 43 | 44 | void show() { 45 | if (mDemoPopup == null) { 46 | mDemoPopup = new DemoPopup(this); 47 | } 48 | mDemoPopup.setPopupFadeEnable(fadeEnable) 49 | .showPopupWindow(); 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/ui/issuestest/Issue210TestActivity.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.ui.issuestest; 2 | 3 | import android.content.Intent; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.widget.TextView; 7 | 8 | import androidx.appcompat.widget.AppCompatCheckBox; 9 | import androidx.viewbinding.ViewBinding; 10 | import razerdp.basepopup.databinding.ActivityIssue210Binding; 11 | import razerdp.demo.base.baseactivity.BaseActivity; 12 | import razerdp.demo.base.baseactivity.BaseBindingActivity; 13 | import razerdp.demo.popup.issue.PopupIssue210; 14 | 15 | /** 16 | * Created by 大灯泡 on 2019/9/22. 17 | *

18 | * 针对Issue:https://github.com/razerdp/BasePopup/issues/210 19 | */ 20 | public class Issue210TestActivity extends BaseBindingActivity { 21 | PopupIssue210 mPopupIssue210; 22 | 23 | @Override 24 | protected void onHandleIntent(Intent intent) { 25 | 26 | } 27 | 28 | @Override 29 | public ActivityIssue210Binding onCreateViewBinding(LayoutInflater layoutInflater) { 30 | return ActivityIssue210Binding.inflate(layoutInflater); 31 | } 32 | 33 | @Override 34 | protected void onInitView(View decorView) { 35 | mBinding.tvBar.setOnClickListener(v -> show(v)); 36 | 37 | } 38 | 39 | void show(View v) { 40 | if (mPopupIssue210 == null) { 41 | mPopupIssue210 = new PopupIssue210(this); 42 | } 43 | mPopupIssue210.setOutSideTouchable(mBinding.checkOutsideTouch.isChecked()); 44 | mPopupIssue210.showPopupWindow(v); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/ui/issuestest/Issue230TestActivity.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.ui.issuestest; 2 | 3 | import android.content.Intent; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | 7 | import androidx.viewbinding.ViewBinding; 8 | import razerdp.basepopup.databinding.ActivityIssue230Binding; 9 | import razerdp.demo.base.baseactivity.BaseActivity; 10 | import razerdp.demo.base.baseactivity.BaseBindingActivity; 11 | import razerdp.demo.popup.issue.PopupIssue230; 12 | import razerdp.demo.widget.DPTextView; 13 | 14 | /** 15 | * Created by 大灯泡 on 2019/10/8. 16 | *

17 | * https://github.com/razerdp/BasePopup/issues/230 18 | */ 19 | public class Issue230TestActivity extends BaseBindingActivity { 20 | 21 | @Override 22 | protected void onHandleIntent(Intent intent) { 23 | 24 | } 25 | 26 | @Override 27 | public ActivityIssue230Binding onCreateViewBinding(LayoutInflater layoutInflater) { 28 | return ActivityIssue230Binding.inflate(layoutInflater); 29 | } 30 | 31 | @Override 32 | protected void onInitView(View decorView) { 33 | mBinding.tvShow.setOnClickListener(v -> show()); 34 | 35 | } 36 | 37 | void show() { 38 | new PopupIssue230(this).showPopupWindow(); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/ui/photobrowser/IPhotoBrowserExitViewProvider.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.ui.photobrowser; 2 | 3 | import android.widget.ImageView; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/8/22 7 | *

8 | * Description: 9 | */ 10 | public interface IPhotoBrowserExitViewProvider { 11 | ImageView onGetTransitionExitView(ImageView from, int exitPosition); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/ui/photobrowser/IPhotoBrowserProvider.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.ui.photobrowser; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/8/22 7 | *

8 | * Description: 9 | */ 10 | public interface IPhotoBrowserProvider extends Serializable { 11 | 12 | String getPhoto(); 13 | 14 | String getThumb(); 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/ui/photobrowser/PhotoBrowserImpl.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.ui.photobrowser; 2 | 3 | import androidx.annotation.Nullable; 4 | 5 | import java.util.ArrayList; 6 | import java.util.Collections; 7 | import java.util.List; 8 | 9 | import razerdp.demo.utils.ToolUtil; 10 | 11 | /** 12 | * Created by 大灯泡 on 2019/8/22 13 | *

14 | * Description: 15 | */ 16 | public class PhotoBrowserImpl implements IPhotoBrowserProvider { 17 | private String url; 18 | private String thumb; 19 | 20 | public PhotoBrowserImpl(String url) { 21 | this(url, null); 22 | } 23 | 24 | public PhotoBrowserImpl(String url, String thumb) { 25 | this.url = url; 26 | this.thumb = thumb; 27 | } 28 | 29 | @Override 30 | public String getPhoto() { 31 | return url; 32 | } 33 | 34 | @Override 35 | public String getThumb() { 36 | return thumb; 37 | } 38 | 39 | 40 | public static List fromList(List urls, @Nullable List thumbs) { 41 | if (ToolUtil.isEmpty(urls)) { 42 | return Collections.emptyList(); 43 | } 44 | List result = new ArrayList<>(urls.size()); 45 | for (String url : urls) { 46 | result.add(new PhotoBrowserImpl(url)); 47 | } 48 | if (thumbs != null && thumbs.size() > 0) { 49 | for (int i = 0; i < result.size(); i++) { 50 | if (ToolUtil.indexIn(thumbs, i)) { 51 | PhotoBrowserImpl ret = (PhotoBrowserImpl) result.get(i); 52 | ret.thumb = thumbs.get(i); 53 | } 54 | } 55 | } 56 | return result; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/DescBuilder.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | /** 7 | * Created by 大灯泡 on 2019/9/20 8 | *

9 | * Description: 10 | */ 11 | public class DescBuilder { 12 | private static final String SEP = "• "; 13 | private List datas; 14 | 15 | private DescBuilder() { 16 | datas = new ArrayList<>(); 17 | } 18 | 19 | public static DescBuilder get() { 20 | return new DescBuilder(); 21 | } 22 | 23 | public DescBuilder append(String desc) { 24 | datas.add(desc); 25 | return this; 26 | } 27 | 28 | public String build() { 29 | StringBuilder builder = new StringBuilder(); 30 | for (int i = 0; i < datas.size(); i++) { 31 | builder.append(SEP) 32 | .append(datas.get(i)); 33 | if (i < datas.size() - 1) { 34 | builder.append('\n'); 35 | } 36 | } 37 | return builder.toString(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/DimensUtils.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * Created by 大灯泡 on 2016/1/16. 7 | */ 8 | public class DimensUtils { 9 | /** 10 | * dip转px 11 | */ 12 | public static int dipToPx(Context context, float dip) { 13 | return (int) (dip * context.getResources().getDisplayMetrics().density + 0.5f); 14 | } 15 | 16 | /** 17 | * px转dip 18 | */ 19 | public static int pxToDip(Context context, float pxValue) { 20 | final float scale = context.getResources().getDisplayMetrics().density; 21 | return (int) (pxValue / scale + 0.5f); 22 | } 23 | 24 | /** 25 | * 将sp值转换为px值 26 | */ 27 | public static int sp2px(Context context, float spValue) { 28 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; 29 | return (int) (spValue * fontScale + 0.5f); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/NumberFormatUtil.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils; 2 | 3 | import java.math.RoundingMode; 4 | import java.text.DecimalFormat; 5 | 6 | /** 7 | * Created by 大灯泡 on 2019/4/24. 8 | */ 9 | public class NumberFormatUtil { 10 | 11 | /** 12 | * etc. 120,000,000,000 13 | */ 14 | public static DecimalFormat format0 = new DecimalFormat(",###"); 15 | /** 16 | * etc. 120000000000.15 17 | */ 18 | public static DecimalFormat format2 = new DecimalFormat("#.##"); 19 | 20 | static { 21 | //不允许四舍五入 22 | format2.setRoundingMode(RoundingMode.FLOOR); 23 | } 24 | 25 | public static String format2(double num) { 26 | return format2.format(num); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/OnClickListenerWrapper.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by 大灯泡 on 2018/11/20. 7 | */ 8 | public abstract class OnClickListenerWrapper implements View.OnClickListener { 9 | T data; 10 | 11 | public T getData() { 12 | return data; 13 | } 14 | 15 | public OnClickListenerWrapper setData(T data) { 16 | this.data = data; 17 | return this; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/ToastUtils.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils; 2 | 3 | import android.content.Context; 4 | import android.widget.Toast; 5 | 6 | /** 7 | * Created by 大灯泡 on 2016/1/15. 8 | */ 9 | public class ToastUtils { 10 | 11 | public static void ToastMessage(Context context, String msg) { 12 | Toast.makeText(context,msg,Toast.LENGTH_SHORT).show(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/VersionUtil.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils; 2 | 3 | import android.content.Context; 4 | import android.content.pm.PackageInfo; 5 | import android.content.pm.PackageManager; 6 | 7 | import razerdp.demo.app.AppContext; 8 | 9 | 10 | public class VersionUtil { 11 | 12 | public static String getAppVersionName() { 13 | try { 14 | String versionName = ""; 15 | Context context = AppContext.getAppContext(); 16 | PackageManager packageManager = context.getPackageManager(); 17 | String packageName = context.getPackageName(); 18 | PackageInfo packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_CONFIGURATIONS); 19 | versionName = packageInfo.versionName; 20 | return versionName; 21 | } catch (Exception e) { 22 | e.printStackTrace(); 23 | return ""; 24 | } 25 | } 26 | 27 | public static int getAppVersionCode() { 28 | try { 29 | Context context = AppContext.getAppContext(); 30 | PackageManager packageManager = context.getPackageManager(); 31 | String packageName = context.getPackageName(); 32 | int versionCode = 0; 33 | PackageInfo packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_CONFIGURATIONS); 34 | versionCode = packageInfo.versionCode; 35 | return versionCode; 36 | } catch (Exception e) { 37 | e.printStackTrace(); 38 | return 0; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/gson/DoubleDefaultAdapter.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils.gson; 2 | 3 | import com.google.gson.JsonDeserializationContext; 4 | import com.google.gson.JsonDeserializer; 5 | import com.google.gson.JsonElement; 6 | import com.google.gson.JsonParseException; 7 | import com.google.gson.JsonPrimitive; 8 | import com.google.gson.JsonSerializationContext; 9 | import com.google.gson.JsonSerializer; 10 | import com.google.gson.JsonSyntaxException; 11 | 12 | import java.lang.reflect.Type; 13 | 14 | public class DoubleDefaultAdapter implements JsonSerializer, JsonDeserializer { 15 | @Override 16 | public Double deserialize(JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { 17 | try { 18 | if (json.getAsString().equals("") || json.getAsString().equals("null")) {//定义为double类型,如果后台返回""或者null,则返回0.00 19 | return 0.0; 20 | } 21 | } catch (Exception ignore) { 22 | } 23 | try { 24 | return json.getAsDouble(); 25 | } catch (NumberFormatException e) { 26 | throw new JsonSyntaxException(e); 27 | } 28 | } 29 | 30 | @Override 31 | public JsonElement serialize(Double aDouble, Type type, JsonSerializationContext jsonSerializationContext) { 32 | return new JsonPrimitive(aDouble); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/gson/IntegerDefaultAdapter.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils.gson; 2 | 3 | import com.google.gson.JsonDeserializationContext; 4 | import com.google.gson.JsonDeserializer; 5 | import com.google.gson.JsonElement; 6 | import com.google.gson.JsonParseException; 7 | import com.google.gson.JsonPrimitive; 8 | import com.google.gson.JsonSerializationContext; 9 | import com.google.gson.JsonSerializer; 10 | import com.google.gson.JsonSyntaxException; 11 | 12 | import java.lang.reflect.Type; 13 | 14 | 15 | public class IntegerDefaultAdapter implements JsonSerializer, JsonDeserializer { 16 | @Override 17 | public Integer deserialize(JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { 18 | try { 19 | //定义为int类型,如果后台返回""或者null,则返回0 20 | if (json.getAsString().equals("") || json.getAsString().equals("null")) { 21 | return 0; 22 | } 23 | } catch (Exception ignore) { 24 | } 25 | try { 26 | return json.getAsInt(); 27 | } catch (NumberFormatException e) { 28 | throw new JsonSyntaxException(e); 29 | } 30 | } 31 | 32 | @Override 33 | public JsonElement serialize(Integer integer, Type type, JsonSerializationContext jsonSerializationContext) { 34 | return new JsonPrimitive(integer); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/gson/LongDefaultAdapter.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils.gson; 2 | 3 | import com.google.gson.JsonDeserializationContext; 4 | import com.google.gson.JsonDeserializer; 5 | import com.google.gson.JsonElement; 6 | import com.google.gson.JsonParseException; 7 | import com.google.gson.JsonPrimitive; 8 | import com.google.gson.JsonSerializationContext; 9 | import com.google.gson.JsonSerializer; 10 | import com.google.gson.JsonSyntaxException; 11 | 12 | import java.lang.reflect.Type; 13 | 14 | public class LongDefaultAdapter implements JsonSerializer, JsonDeserializer { 15 | @Override 16 | public Long deserialize(JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { 17 | try { 18 | //定义为long类型,如果后台返回""或者null,则返回0 19 | if (json.getAsString().equals("") || json.getAsString().equals("null")) { 20 | return 0L; 21 | } 22 | } catch (Exception ignore) { 23 | } 24 | try { 25 | return json.getAsLong(); 26 | } catch (NumberFormatException e) { 27 | throw new JsonSyntaxException(e); 28 | } 29 | } 30 | 31 | @Override 32 | public JsonElement serialize(Long aLong, Type type, JsonSerializationContext jsonSerializationContext) { 33 | return new JsonPrimitive(aLong); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/rx/DefaultLogThrowableConsumer.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils.rx; 2 | 3 | 4 | import io.reactivex.functions.Consumer; 5 | import razerdp.util.log.PopupLog; 6 | 7 | /** 8 | * Created by 大灯泡 on 2019/4/9. 9 | * 默认打印日志的错误consumer 10 | */ 11 | public final class DefaultLogThrowableConsumer implements Consumer { 12 | private String TAG = this.getClass().getSimpleName(); 13 | 14 | public DefaultLogThrowableConsumer() { 15 | } 16 | 17 | public DefaultLogThrowableConsumer(String TAG) { 18 | this.TAG = TAG; 19 | } 20 | 21 | @Override 22 | public void accept(Throwable throwable) throws Exception { 23 | PopupLog.e(TAG, throwable); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/rx/RxCall.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils.rx; 2 | 3 | /** 4 | * Created by 大灯泡 on 2018/5/24. 5 | */ 6 | public interface RxCall { 7 | 8 | void onCall(T data); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/rx/RxCallImpl.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils.rx; 2 | 3 | /** 4 | * Created by 大灯泡 on 2018/5/24. 5 | */ 6 | public abstract class RxCallImpl implements RxCall { 7 | T data; 8 | 9 | public RxCallImpl() { 10 | } 11 | 12 | public RxCallImpl(T data) { 13 | this.data = data; 14 | } 15 | 16 | public T getData() { 17 | return data; 18 | } 19 | 20 | public RxCallImpl setData(T data) { 21 | this.data = data; 22 | return this; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/utils/rx/RxTaskCall.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.utils.rx; 2 | 3 | /** 4 | * Created by 大灯泡 on 2019/4/10 5 | *

6 | * Description: 7 | */ 8 | public abstract class RxTaskCall { 9 | 10 | public abstract T doInBackground(); 11 | 12 | public abstract void onResult(T result); 13 | 14 | public void onError(Throwable e){ 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/widget/SquareLayout.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.widget; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.Context; 5 | import android.util.AttributeSet; 6 | import android.widget.LinearLayout; 7 | 8 | 9 | /** 10 | * 正方形控件 11 | */ 12 | public class SquareLayout extends LinearLayout { 13 | 14 | public SquareLayout(Context context) { 15 | this(context, null); 16 | } 17 | 18 | public SquareLayout(Context context, AttributeSet attrs) { 19 | this(context, attrs, 0); 20 | } 21 | 22 | @TargetApi(11) 23 | public SquareLayout(Context context, AttributeSet attrs, int defStyle) { 24 | super(context, attrs, defStyle); 25 | } 26 | 27 | @Override 28 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 29 | if (getOrientation() == HORIZONTAL) { 30 | super.onMeasure(widthMeasureSpec, widthMeasureSpec); 31 | } else { 32 | super.onMeasure(heightMeasureSpec, heightMeasureSpec); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/widget/Type.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.widget; 2 | 3 | /** 4 | * Created by 大灯泡 on 2018/3/30. 5 | */ 6 | public interface Type { 7 | int OVAL = 1; 8 | int RECTANGE = 2; 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/widget/bigimageviewer/view/ImageLoadCallback.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.widget.bigimageviewer.view; 2 | 3 | /** 4 | * Created by 大灯泡 on 2021/4/28 5 | *

6 | * Description: 7 | */ 8 | public interface ImageLoadCallback { 9 | void onShowThumbnail(); 10 | 11 | void onStart(); 12 | 13 | void onSuccess(); 14 | 15 | void onError(); 16 | 17 | void onFinish(); 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/widget/bigimageviewer/view/ImageSaveCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2018 Piasy 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | package razerdp.demo.widget.bigimageviewer.view; 26 | 27 | /** 28 | * Created by Piasy{github.com/Piasy} on 10/11/2016. 29 | */ 30 | 31 | public interface ImageSaveCallback { 32 | void onSuccess(String uri); 33 | 34 | void onFail(Throwable t); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/widget/dialog/DialogClickListener.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.widget.dialog; 2 | 3 | /** 4 | * Created by 大灯泡 on 2019/4/22. 5 | * 6 | * dialog两个button点击事件 7 | */ 8 | public interface DialogClickListener { 9 | 10 | /** 11 | * @return true for dismiss 12 | */ 13 | boolean onPositiveClicked(); 14 | 15 | /** 16 | * @return true for dismiss 17 | */ 18 | boolean onNegativeClicked(); 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/widget/span/ClickSpan.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.widget.span; 2 | 3 | import android.view.View; 4 | 5 | import razerdp.basepopup.R; 6 | import razerdp.demo.utils.UIHelper; 7 | 8 | 9 | /** 10 | * Created by 大灯泡 on 2019/4/9. 11 | */ 12 | public class ClickSpan extends ClickableSpanEx { 13 | 14 | private View.OnClickListener mOnClickListener; 15 | 16 | public ClickSpan(View.OnClickListener onClickListener) { 17 | super(-1, UIHelper.getColor(R.color.press_color), false); 18 | mOnClickListener = onClickListener; 19 | } 20 | 21 | @Override 22 | public void onClick(View widget) { 23 | if (mOnClickListener != null) { 24 | mOnClickListener.onClick(widget); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/widget/span/SpannableStringBuilderCompat.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.widget.span; 2 | 3 | import android.text.SpannableStringBuilder; 4 | 5 | /** 6 | * Created by 大灯泡 on 2019/4/9. 7 | */ 8 | public class SpannableStringBuilderCompat extends SpannableStringBuilder { 9 | public SpannableStringBuilderCompat() { 10 | super(""); 11 | } 12 | 13 | public SpannableStringBuilderCompat(CharSequence text) { 14 | super(text, 0, text.length()); 15 | } 16 | 17 | public SpannableStringBuilderCompat(CharSequence text, int start, int end) { 18 | super(text, start, end); 19 | } 20 | 21 | public SpannableStringBuilderCompat append(CharSequence text) { 22 | if (text == null) return this; 23 | int length = length(); 24 | return (SpannableStringBuilderCompat) replace(length, length, text, 0, text.length()); 25 | } 26 | 27 | /** 该方法在原API里面只支持API21或者以上,这里抽取出来以适应低版本 */ 28 | public SpannableStringBuilderCompat append(CharSequence text, Object what, int flags) { 29 | if (text == null) return this; 30 | int start = length(); 31 | append(text); 32 | setSpan(what, start, length(), flags); 33 | return this; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/widget/viewpager/HackyViewPager.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.widget.viewpager; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.MotionEvent; 6 | 7 | import androidx.annotation.NonNull; 8 | import androidx.annotation.Nullable; 9 | import androidx.viewpager.widget.ViewPager; 10 | 11 | /** 12 | * Created by 大灯泡 on 2019/9/22. 13 | */ 14 | public class HackyViewPager extends ViewPager { 15 | 16 | 17 | public HackyViewPager(@NonNull Context context) { 18 | super(context); 19 | } 20 | 21 | public HackyViewPager(@NonNull Context context, @Nullable AttributeSet attrs) { 22 | super(context, attrs); 23 | } 24 | 25 | @Override 26 | public boolean onInterceptTouchEvent(MotionEvent ev) { 27 | try { 28 | return super.onInterceptTouchEvent(ev); 29 | } catch (IllegalArgumentException e) { 30 | //uncomment if you really want to see these errors 31 | //e.printStackTrace(); 32 | return false; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/razerdp/demo/widget/viewpager/ViewpagerIndicator.java: -------------------------------------------------------------------------------- 1 | package razerdp.demo.widget.viewpager; 2 | 3 | /** 4 | * Created by 大灯泡 on 2019/4/24 5 | *

6 | * Description:Banner指示器 7 | */ 8 | public interface ViewpagerIndicator { 9 | 10 | void onDataSizeChange(int dataSize); 11 | 12 | void onPageScrolled(int position, float positionOffset, int positionOffsetPixels); 13 | 14 | void onPageSelected(int position); 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/anim/search_layout_animation.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/search_layout_animation_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_left_in.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_left_out.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_right_in.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_right_out.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/common_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/common_selector_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/common_selector_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/alipay.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_bubble.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_bubble.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_game_live_tag.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_game_live_tag.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_popup_guide.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_popup_guide.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_round_white_8dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_shadow_0dp.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_shadow_0dp.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_shadow_2dp.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_shadow_2dp.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_shadow_3dp.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_shadow_3dp.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_shadow_4dp.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_shadow_4dp.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_shadow_5dp.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_shadow_5dp.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_shadow_6dp.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_shadow_6dp.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_shadow_7dp.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_shadow_7dp.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_shadow_8dp.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_shadow_8dp.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_titlebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/bg_titlebar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_top_round_white_8dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_arrow_right.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_arrow_weibo_popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_arrow_weibo_popup.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_comment.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_comment_show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_comment_show.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_dialog.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_error.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_error.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_error_gray.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_error_gray.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_fixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_fixed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_like.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_loading_1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_loading_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_loading_3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_loading_4.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_loading_5.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_loading_6.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_loading_7.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_loading_8.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_popup_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_popup_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_setting_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_setting_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_tips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_tips.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_wait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/ic_wait.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/icon_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/icon_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/popup_bg_drawable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/popup_bg_drawable.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable-xhdpi/qrcode.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_comment_input.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_comment_popup.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_loading_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_selector_blue.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_stroke.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_update_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/common_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/common_selector_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/common_selector_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/drawable_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 10 | 13 | 16 | 19 | 22 | 25 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_update_app_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razerdp/BasePopup/79589872cbe7ea266370609d572aecfca351d91b/app/src/main/res/drawable/ic_update_app_bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_menu_popup.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_popup_animate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_popup_animate_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_api_demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_api_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 25 | 26 | 27 | 28 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_common_usage.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 16 | 17 | 23 | 24 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_friend_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_full_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_image_browser.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 13 | 14 | 18 | 19 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_issue.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_issue_210.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 24 | 25 | 28 | 29 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_issue_230.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 22 | 23 | 24 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_issue_236.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 22 | 23 | 24 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_issue_242.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 22 | 23 | 24 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_issue_358.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 23 | 24 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_issue_474.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 23 | 24 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_my_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_update_log.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_update_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_web.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_api_constructor.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 19 | 20 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_fragment_api_constructor.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 19 | 20 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_api_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 20 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_bigimageview_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_common_usage_title.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 19 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_guide_denpendence.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 23 | 24 | 25 | 30 | 31 | 32 | 35 | 36 | 46 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_image_browser.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_issue_pic.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_main_demo_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_ninegrid_image_single_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_ninegrid_image_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_popup_230.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 20 | 21 |