Showing preview only (4,327K chars total). Download the full file or copy to clipboard to get everything.
Repository: Tencent/QMUI_Android
Branch: master
Commit: 026e7d486677
Files: 758
Total size: 4.0 MB
Directory structure:
gitextract_k1p2gcqq/
├── .github/
│ └── ISSUE_TEMPLATE.md
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE.TXT
├── README.md
├── arch/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── qmui/
│ │ └── arch/
│ │ └── ExampleInstrumentedTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── qmuiteam/
│ │ │ └── qmui/
│ │ │ └── arch/
│ │ │ ├── InnerBaseActivity.java
│ │ │ ├── QMUIActivity.java
│ │ │ ├── QMUIFragment.java
│ │ │ ├── QMUIFragmentActivity.java
│ │ │ ├── QMUIFragmentContainerProvider.java
│ │ │ ├── QMUIFragmentPagerAdapter.java
│ │ │ ├── QMUILatestVisit.java
│ │ │ ├── QMUINavFragment.java
│ │ │ ├── QMUISwipeBackActivityManager.java
│ │ │ ├── SwipeBackLayout.java
│ │ │ ├── SwipeBackgroundView.java
│ │ │ ├── Utils.java
│ │ │ ├── annotation/
│ │ │ │ └── DefaultFirstFragment.java
│ │ │ ├── effect/
│ │ │ │ ├── Effect.java
│ │ │ │ ├── FragmentResultEffect.java
│ │ │ │ ├── MapEffect.java
│ │ │ │ ├── QMUIFragmentEffectHandler.java
│ │ │ │ ├── QMUIFragmentEffectRegistration.java
│ │ │ │ ├── QMUIFragmentEffectRegistry.java
│ │ │ │ ├── QMUIFragmentMapEffectHandler.java
│ │ │ │ └── QMUIFragmentResultEffectHandler.java
│ │ │ ├── record/
│ │ │ │ ├── DefaultLatestVisitStorage.java
│ │ │ │ ├── LatestVisitArgumentCollector.java
│ │ │ │ ├── QMUILatestVisitStorage.java
│ │ │ │ ├── RecordArgumentEditor.java
│ │ │ │ ├── RecordArgumentEditorImpl.java
│ │ │ │ └── RecordIdClassMap.java
│ │ │ └── scheme/
│ │ │ ├── ActivitySchemeItem.kt
│ │ │ ├── FragmentSchemeItem.kt
│ │ │ ├── QMUISchemeBuilder.kt
│ │ │ ├── QMUISchemeFragmentFactory.kt
│ │ │ ├── QMUISchemeHandler.kt
│ │ │ ├── QMUISchemeHandlerInterceptor.kt
│ │ │ ├── QMUISchemeIntentFactory.kt
│ │ │ ├── QMUISchemeMatcher.kt
│ │ │ ├── QMUIUnknownSchemeHandler.kt
│ │ │ ├── SchemeHandleContext.kt
│ │ │ ├── SchemeInfo.kt
│ │ │ ├── SchemeItem.kt
│ │ │ ├── SchemeMap.kt
│ │ │ ├── SchemeRefreshable.kt
│ │ │ └── SchemeValue.kt
│ │ └── res/
│ │ ├── anim/
│ │ │ ├── decelerate_factor_interpolator.xml
│ │ │ ├── decelerate_low_factor_interpolator.xml
│ │ │ ├── scale_enter.xml
│ │ │ ├── scale_exit.xml
│ │ │ ├── slide_in_left.xml
│ │ │ ├── slide_in_right.xml
│ │ │ ├── slide_out_left.xml
│ │ │ ├── slide_out_right.xml
│ │ │ ├── slide_still.xml
│ │ │ ├── swipe_back_enter.xml
│ │ │ ├── swipe_back_exit.xml
│ │ │ └── swipe_back_exit_still.xml
│ │ ├── animator/
│ │ │ ├── scale_enter.xml
│ │ │ ├── scale_exit.xml
│ │ │ ├── slide_in_left.xml
│ │ │ ├── slide_in_right.xml
│ │ │ ├── slide_out_left.xml
│ │ │ ├── slide_out_right.xml
│ │ │ └── slide_still.xml
│ │ └── values/
│ │ ├── attrs.xml
│ │ ├── ids.xml
│ │ ├── qmui_integers.xml
│ │ ├── strings.xml
│ │ └── style.xml
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmui/
│ └── arch/
│ └── ExampleUnitTest.java
├── arch-annotation/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmui/
│ └── arch/
│ └── annotation/
│ ├── ActivityScheme.java
│ ├── FragmentContainerParam.java
│ ├── FragmentScheme.java
│ └── LatestVisitRecord.java
├── arch-compiler/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmui/
│ └── arch/
│ ├── BaseProcessor.java
│ ├── LatestVisitProcessor.java
│ └── SchemeProcessor.java
├── build.gradle.kts
├── compiler/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmuidemo/
│ └── compiler/
│ └── WidgetProcessor.java
├── compose/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── compose/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── qmuiteam/
│ │ │ └── compose/
│ │ │ └── modal/
│ │ │ ├── ModalImpl.kt
│ │ │ ├── QMUIBottomSheet.kt
│ │ │ ├── QMUIDialog.kt
│ │ │ ├── QMUIModal.kt
│ │ │ └── QMUIToast.kt
│ │ └── res/
│ │ └── values/
│ │ └── ids.xml
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── compose/
│ └── ExampleUnitTest.kt
├── compose-core/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── compose/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── qmuiteam/
│ │ │ └── compose/
│ │ │ └── core/
│ │ │ ├── ex/
│ │ │ │ └── DrawScopeEx.kt
│ │ │ ├── helper/
│ │ │ │ ├── Dimen.kt
│ │ │ │ ├── Global.kt
│ │ │ │ ├── Log.kt
│ │ │ │ └── LogTag.kt
│ │ │ ├── provider/
│ │ │ │ └── WindowInsets.kt
│ │ │ └── ui/
│ │ │ ├── DefaultConfig.kt
│ │ │ ├── PressWithAlphaBox.kt
│ │ │ ├── QMUIIcon.kt
│ │ │ ├── QMUIItem.kt
│ │ │ └── QMUITopBar.kt
│ │ └── res/
│ │ ├── drawable/
│ │ │ ├── ic_qmui_checkbox_checked.xml
│ │ │ ├── ic_qmui_checkbox_normal.xml
│ │ │ ├── ic_qmui_checkbox_partial.xml
│ │ │ ├── ic_qmui_chevron.xml
│ │ │ ├── ic_qmui_mark.xml
│ │ │ └── ic_qmui_topbar_back.xml
│ │ └── values/
│ │ └── qmui_ids.xml
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── compose/
│ └── ExampleUnitTest.kt
├── deploy.sh
├── editor/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── editor/
│ ├── EditorBehavior.kt
│ ├── QMUIEditor.kt
│ ├── Range.kt
│ ├── TextFieldValueEx.kt
│ └── WordEdit.kt
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── lib/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmuidemo/
│ └── lib/
│ ├── Group.java
│ └── annotation/
│ └── Widget.java
├── photo/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── qmuiteam/
│ │ │ └── photo/
│ │ │ ├── activity/
│ │ │ │ ├── QMUIPhotoClipActivity.kt
│ │ │ │ ├── QMUIPhotoPickerActivity.kt
│ │ │ │ └── QMUIPhotoViewerActivity.kt
│ │ │ ├── compose/
│ │ │ │ ├── BitmapRegion.kt
│ │ │ │ ├── GesturePhoto.kt
│ │ │ │ ├── Loading.kt
│ │ │ │ ├── PhotoClipper.kt
│ │ │ │ ├── PhotoConfig.kt
│ │ │ │ ├── Thumbnail.kt
│ │ │ │ └── picker/
│ │ │ │ ├── Buckets.kt
│ │ │ │ ├── Common.kt
│ │ │ │ ├── Config.kt
│ │ │ │ ├── Edit.kt
│ │ │ │ ├── Grid.kt
│ │ │ │ ├── PaintEdit.kt
│ │ │ │ ├── Preview.kt
│ │ │ │ ├── TextEdit.kt
│ │ │ │ └── TopBarItem.kt
│ │ │ ├── data/
│ │ │ │ ├── QMUIBitmapRegion.kt
│ │ │ │ ├── QMUIMediaDataProvider.kt
│ │ │ │ ├── QMUIPhotoTransitionDelivery.kt
│ │ │ │ └── QMUIPhotoTransitionInfo.kt
│ │ │ ├── util/
│ │ │ │ ├── BitmapEx.kt
│ │ │ │ ├── QMUIPhotoHelper.kt
│ │ │ │ └── ViewEx.kt
│ │ │ └── vm/
│ │ │ └── QMUIPhotoPickerViewModel.kt
│ │ └── res/
│ │ └── anim/
│ │ ├── scale_enter.xml
│ │ └── scale_exit.xml
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── ExampleUnitTest.kt
├── photo-coil/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── photo/
│ │ └── coil/
│ │ ├── QMUICoilImageDecoderFactory.kt
│ │ ├── QMUICoilPhoto.kt
│ │ └── QMUIMediaCoilPhotoProviderFactory.kt
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── ExampleUnitTest.kt
├── photo-glide/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── photo/
│ │ └── glide/
│ │ ├── QMUIGlideModule.kt
│ │ ├── QMUIGlidePhoto.kt
│ │ └── QMUIMediaGlidePhotoProviderFactory.kt
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── ExampleUnitTest.kt
├── plugin/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── settings.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── plugin/
│ ├── Dep.kt
│ ├── QMUIDepPlugin.kt
│ └── QMUIPublish.kt
├── qmui/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── assets/
│ │ └── QMUIWebviewBridge.js
│ ├── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── qmui/
│ │ ├── Beta.java
│ │ ├── QMUIConfig.java
│ │ ├── QMUIInterpolatorStaticHolder.java
│ │ ├── QMUILog.java
│ │ ├── alpha/
│ │ │ ├── QMUIAlphaButton.java
│ │ │ ├── QMUIAlphaConstraintLayout.java
│ │ │ ├── QMUIAlphaFrameLayout.java
│ │ │ ├── QMUIAlphaImageButton.java
│ │ │ ├── QMUIAlphaLinearLayout.java
│ │ │ ├── QMUIAlphaRelativeLayout.java
│ │ │ ├── QMUIAlphaTextView.java
│ │ │ ├── QMUIAlphaViewHelper.java
│ │ │ └── QMUIAlphaViewInf.java
│ │ ├── exposure/
│ │ │ ├── Exposure.kt
│ │ │ ├── ExposureChecker.kt
│ │ │ ├── ExposureContainer.kt
│ │ │ ├── ExposureEffect.kt
│ │ │ └── ExposureEx.kt
│ │ ├── kotlin/
│ │ │ ├── DimenKt.kt
│ │ │ ├── LayoutParamKt.kt
│ │ │ └── ViewKt.kt
│ │ ├── layout/
│ │ │ ├── IQMUILayout.java
│ │ │ ├── QMUIButton.java
│ │ │ ├── QMUIConstraintLayout.java
│ │ │ ├── QMUIFrameLayout.java
│ │ │ ├── QMUILayoutHelper.java
│ │ │ ├── QMUILinearLayout.java
│ │ │ ├── QMUIPriorityLinearLayout.java
│ │ │ └── QMUIRelativeLayout.java
│ │ ├── link/
│ │ │ ├── ITouchableSpan.java
│ │ │ ├── QMUILinkTouchDecorHelper.java
│ │ │ ├── QMUILinkTouchMovementMethod.java
│ │ │ ├── QMUILinkify.java
│ │ │ └── QMUIScrollingMovementMethod.java
│ │ ├── nestedScroll/
│ │ │ ├── IQMUIContinuousNestedBottomView.java
│ │ │ ├── IQMUIContinuousNestedScrollCommon.java
│ │ │ ├── IQMUIContinuousNestedTopView.java
│ │ │ ├── QMUIContinuousNestedBottomAreaBehavior.java
│ │ │ ├── QMUIContinuousNestedBottomDelegateLayout.java
│ │ │ ├── QMUIContinuousNestedBottomRecyclerView.java
│ │ │ ├── QMUIContinuousNestedScrollLayout.java
│ │ │ ├── QMUIContinuousNestedTopAreaBehavior.java
│ │ │ ├── QMUIContinuousNestedTopDelegateLayout.java
│ │ │ ├── QMUIContinuousNestedTopLinearLayout.java
│ │ │ ├── QMUIContinuousNestedTopRecyclerView.java
│ │ │ ├── QMUIContinuousNestedTopWebView.java
│ │ │ ├── QMUIDraggableScrollBar.java
│ │ │ └── QMUIViewOffsetBehavior.java
│ │ ├── qqface/
│ │ │ ├── IQMUIQQFaceManager.java
│ │ │ ├── QMUINoQQFaceManager.java
│ │ │ ├── QMUIQQFaceCompiler.java
│ │ │ ├── QMUIQQFaceView.java
│ │ │ └── QQFace.java
│ │ ├── recyclerView/
│ │ │ ├── QMUIRVDraggableScrollBar.java
│ │ │ ├── QMUIRVItemSwipeAction.java
│ │ │ ├── QMUISwipeAction.java
│ │ │ └── QMUISwipeViewHolder.java
│ │ ├── skin/
│ │ │ ├── IQMUISkinApplyListener.java
│ │ │ ├── IQMUISkinDispatchInterceptor.java
│ │ │ ├── IQMUISkinHandlerDecoration.java
│ │ │ ├── IQMUISkinHandlerSpan.java
│ │ │ ├── IQMUISkinHandlerView.java
│ │ │ ├── QMUISkinHelper.java
│ │ │ ├── QMUISkinLayoutInflaterFactory.java
│ │ │ ├── QMUISkinManager.java
│ │ │ ├── QMUISkinValueBuilder.java
│ │ │ ├── SkinWriter.java
│ │ │ ├── annotation/
│ │ │ │ ├── QMUISkinChangeNotAdapted.java
│ │ │ │ └── QMUISkinListenWithHierarchyChange.java
│ │ │ ├── defaultAttr/
│ │ │ │ ├── IQMUISkinDefaultAttrProvider.java
│ │ │ │ └── QMUISkinSimpleDefaultAttrProvider.java
│ │ │ └── handler/
│ │ │ ├── IQMUISkinRuleHandler.java
│ │ │ ├── QMUISkinRuleAlphaHandler.java
│ │ │ ├── QMUISkinRuleBackgroundHandler.java
│ │ │ ├── QMUISkinRuleBgTintColorHandler.java
│ │ │ ├── QMUISkinRuleBorderHandler.java
│ │ │ ├── QMUISkinRuleColorHandler.java
│ │ │ ├── QMUISkinRuleColorStateListHandler.java
│ │ │ ├── QMUISkinRuleDrawableHandler.java
│ │ │ ├── QMUISkinRuleFloatHandler.java
│ │ │ ├── QMUISkinRuleHintColorHandler.java
│ │ │ ├── QMUISkinRuleMoreBgColorHandler.java
│ │ │ ├── QMUISkinRuleMoreTextColorHandler.java
│ │ │ ├── QMUISkinRuleProgressColorHandler.java
│ │ │ ├── QMUISkinRuleSeparatorHandler.java
│ │ │ ├── QMUISkinRuleSrcHandler.java
│ │ │ ├── QMUISkinRuleTextColorHandler.java
│ │ │ ├── QMUISkinRuleTextCompoundSrcHandler.java
│ │ │ ├── QMUISkinRuleTextCompoundTintColorHandler.java
│ │ │ ├── QMUISkinRuleTintColorHandler.java
│ │ │ └── QMUISkinRuleUnderlineHandler.java
│ │ ├── span/
│ │ │ ├── QMUIAlignMiddleImageSpan.java
│ │ │ ├── QMUIBlockSpaceSpan.java
│ │ │ ├── QMUICustomTypefaceSpan.java
│ │ │ ├── QMUIMarginImageSpan.java
│ │ │ ├── QMUIOnSpanClickListener.java
│ │ │ ├── QMUITextSizeSpan.java
│ │ │ └── QMUITouchableSpan.java
│ │ ├── util/
│ │ │ ├── OnceReadValue.java
│ │ │ ├── QMUIActivityLifecycleCallbacks.java
│ │ │ ├── QMUICollapsingTextHelper.java
│ │ │ ├── QMUIColorHelper.java
│ │ │ ├── QMUIDeviceHelper.java
│ │ │ ├── QMUIDirection.java
│ │ │ ├── QMUIDisplayHelper.java
│ │ │ ├── QMUIDrawableHelper.java
│ │ │ ├── QMUIKeyboardHelper.java
│ │ │ ├── QMUILangHelper.java
│ │ │ ├── QMUINotchHelper.java
│ │ │ ├── QMUIPackageHelper.java
│ │ │ ├── QMUIReflectHelper.java
│ │ │ ├── QMUIResHelper.java
│ │ │ ├── QMUISpanHelper.java
│ │ │ ├── QMUIStatusBarHelper.java
│ │ │ ├── QMUIToastHelper.java
│ │ │ ├── QMUIViewHelper.java
│ │ │ ├── QMUIViewOffsetHelper.java
│ │ │ ├── QMUIWindowHelper.java
│ │ │ └── QMUIWindowInsetHelper.java
│ │ └── widget/
│ │ ├── IBlankTouchDetector.java
│ │ ├── IWindowInsetKeyboardConsumer.java
│ │ ├── QMUIAnimationListView.java
│ │ ├── QMUIAppBarLayout.java
│ │ ├── QMUICollapsingTopBarLayout.java
│ │ ├── QMUIEmptyView.java
│ │ ├── QMUIFloatLayout.java
│ │ ├── QMUIFontFitTextView.java
│ │ ├── QMUIItemViewsAdapter.java
│ │ ├── QMUILoadingView.java
│ │ ├── QMUINotchConsumeLayout.java
│ │ ├── QMUIObservableScrollView.java
│ │ ├── QMUIPagerAdapter.java
│ │ ├── QMUIProgressBar.java
│ │ ├── QMUIRadiusImageView.java
│ │ ├── QMUIRadiusImageView2.java
│ │ ├── QMUISeekBar.java
│ │ ├── QMUISlider.java
│ │ ├── QMUITopBar.java
│ │ ├── QMUITopBarLayout.java
│ │ ├── QMUIVerticalTextView.java
│ │ ├── QMUIViewPager.java
│ │ ├── QMUIWindowInsetLayout.java
│ │ ├── QMUIWindowInsetLayout2.java
│ │ ├── QMUIWrapContentListView.java
│ │ ├── QMUIWrapContentScrollView.java
│ │ ├── dialog/
│ │ │ ├── QMUIBaseDialog.java
│ │ │ ├── QMUIBottomSheet.java
│ │ │ ├── QMUIBottomSheetBaseBuilder.java
│ │ │ ├── QMUIBottomSheetBehavior.java
│ │ │ ├── QMUIBottomSheetGridItemModel.java
│ │ │ ├── QMUIBottomSheetGridItemView.java
│ │ │ ├── QMUIBottomSheetGridLineLayout.java
│ │ │ ├── QMUIBottomSheetListAdapter.java
│ │ │ ├── QMUIBottomSheetListItemDecoration.java
│ │ │ ├── QMUIBottomSheetListItemModel.java
│ │ │ ├── QMUIBottomSheetListItemView.java
│ │ │ ├── QMUIBottomSheetRootLayout.java
│ │ │ ├── QMUIDialog.java
│ │ │ ├── QMUIDialogAction.java
│ │ │ ├── QMUIDialogBlockBuilder.java
│ │ │ ├── QMUIDialogBuilder.java
│ │ │ ├── QMUIDialogMenuItemView.java
│ │ │ ├── QMUIDialogRootLayout.java
│ │ │ ├── QMUIDialogView.java
│ │ │ ├── QMUITipDialog.java
│ │ │ └── QMUITipDialogView.java
│ │ ├── grouplist/
│ │ │ ├── QMUICommonListItemView.java
│ │ │ ├── QMUIGroupListSectionHeaderFooterView.java
│ │ │ └── QMUIGroupListView.java
│ │ ├── popup/
│ │ │ ├── QMUIBasePopup.java
│ │ │ ├── QMUIFullScreenPopup.java
│ │ │ ├── QMUINormalPopup.java
│ │ │ ├── QMUIPopup.java
│ │ │ ├── QMUIPopups.java
│ │ │ └── QMUIQuickAction.java
│ │ ├── pullLayout/
│ │ │ ├── QMUIAlwaysFollowOffsetCalculator.java
│ │ │ ├── QMUICenterOffsetCalculator.java
│ │ │ ├── QMUIFixToTargetOffsetCalculator.java
│ │ │ ├── QMUIPullLayout.java
│ │ │ ├── QMUIPullLoadMoreView.java
│ │ │ └── QMUIPullRefreshView.java
│ │ ├── pullRefreshLayout/
│ │ │ ├── QMUICenterGravityRefreshOffsetCalculator.java
│ │ │ ├── QMUIDefaultRefreshOffsetCalculator.java
│ │ │ ├── QMUIFollowRefreshOffsetCalculator.java
│ │ │ └── QMUIPullRefreshLayout.java
│ │ ├── roundwidget/
│ │ │ ├── QMUIRoundButton.java
│ │ │ ├── QMUIRoundButtonDrawable.java
│ │ │ ├── QMUIRoundFrameLayout.java
│ │ │ ├── QMUIRoundLinearLayout.java
│ │ │ └── QMUIRoundRelativeLayout.java
│ │ ├── section/
│ │ │ ├── QMUIDefaultStickySectionAdapter.java
│ │ │ ├── QMUISection.java
│ │ │ ├── QMUISectionDiffCallback.java
│ │ │ ├── QMUIStickySectionAdapter.java
│ │ │ ├── QMUIStickySectionItemDecoration.java
│ │ │ └── QMUIStickySectionLayout.java
│ │ ├── tab/
│ │ │ ├── QMUIBasicTabSegment.java
│ │ │ ├── QMUITab.java
│ │ │ ├── QMUITabAdapter.java
│ │ │ ├── QMUITabBuilder.java
│ │ │ ├── QMUITabIcon.java
│ │ │ ├── QMUITabIndicator.java
│ │ │ ├── QMUITabSegment.java
│ │ │ ├── QMUITabSegment2.java
│ │ │ └── QMUITabView.java
│ │ ├── textview/
│ │ │ ├── ISpanTouchFix.java
│ │ │ ├── QMUILinkTextView.java
│ │ │ └── QMUISpanTouchFixTextView.java
│ │ └── webview/
│ │ ├── QMUIBridgeWebViewClient.java
│ │ ├── QMUIWebView.java
│ │ ├── QMUIWebViewBridgeHandler.java
│ │ ├── QMUIWebViewClient.java
│ │ └── QMUIWebViewContainer.java
│ └── res/
│ ├── anim/
│ │ ├── decelerate_factor_interpolator.xml
│ │ ├── decelerate_low_factor_interpolator.xml
│ │ ├── grow_from_bottom.xml
│ │ ├── grow_from_bottomleft_to_topright.xml
│ │ ├── grow_from_bottomright_to_topleft.xml
│ │ ├── grow_from_top.xml
│ │ ├── grow_from_topleft_to_bottomright.xml
│ │ ├── grow_from_topright_to_bottomleft.xml
│ │ ├── scale_in_center.xml
│ │ ├── scale_out_center.xml
│ │ ├── shrink_from_bottom.xml
│ │ ├── shrink_from_bottomleft_to_topright.xml
│ │ ├── shrink_from_bottomright_to_topleft.xml
│ │ ├── shrink_from_top.xml
│ │ ├── shrink_from_topleft_to_bottomright.xml
│ │ └── shrink_from_topright_to_bottomleft.xml
│ ├── color/
│ │ ├── qmui_btn_blue_bg.xml
│ │ ├── qmui_btn_blue_border.xml
│ │ ├── qmui_btn_blue_text.xml
│ │ ├── qmui_s_link_color.xml
│ │ ├── qmui_s_list_item_text_color.xml
│ │ ├── qmui_s_switch_text_color.xml
│ │ ├── qmui_s_transparent.xml
│ │ └── qmui_topbar_text_color.xml
│ ├── drawable/
│ │ ├── qmui_divider_bottom_bitmap.xml
│ │ ├── qmui_divider_top_bitmap.xml
│ │ ├── qmui_icon_popup_close.xml
│ │ ├── qmui_icon_popup_close_with_bg.xml
│ │ ├── qmui_icon_pull_down.xml
│ │ ├── qmui_icon_quick_action_more_arrow_left.xml
│ │ ├── qmui_icon_quick_action_more_arrow_right.xml
│ │ ├── qmui_icon_topbar_back.xml
│ │ ├── qmui_s_checkbox.xml
│ │ ├── qmui_s_icon_switch.xml
│ │ ├── qmui_s_list_item_bg_1.xml
│ │ ├── qmui_s_list_item_bg_2.xml
│ │ ├── qmui_s_switch_thumb.xml
│ │ ├── qmui_s_switch_track.xml
│ │ ├── qmui_switch_thumb.xml
│ │ ├── qmui_switch_thumb_checked.xml
│ │ ├── qmui_switch_track.xml
│ │ ├── qmui_switch_track_checked.xml
│ │ └── qmui_tips_point.xml
│ ├── drawable-v21/
│ │ └── qmui_s_list_item_bg_2.xml
│ ├── layout/
│ │ ├── qmui_bottom_sheet_dialog.xml
│ │ ├── qmui_common_list_item.xml
│ │ ├── qmui_empty_view.xml
│ │ └── qmui_group_list_section_layout.xml
│ ├── values/
│ │ ├── config_colors.xml
│ │ ├── qmui_attrs.xml
│ │ ├── qmui_attrs_alpha.xml
│ │ ├── qmui_attrs_base.xml
│ │ ├── qmui_attrs_custom.xml
│ │ ├── qmui_attrs_layout.xml
│ │ ├── qmui_attrs_round.xml
│ │ ├── qmui_colors.xml
│ │ ├── qmui_dimens.xml
│ │ ├── qmui_ids.xml
│ │ ├── qmui_strings.xml
│ │ ├── qmui_style_appearance.xml
│ │ ├── qmui_style_widget.xml
│ │ └── qmui_themes.xml
│ └── values-v21/
│ └── qmui_themes.xml
├── qmuidemo/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── lint.xml
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── assets/
│ │ └── demo.html
│ ├── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── qmuidemo/
│ │ ├── QDApplication.kt
│ │ ├── QDMainActivity.java
│ │ ├── QDQQFaceManager.java
│ │ ├── activity/
│ │ │ ├── ArchTestActivity.java
│ │ │ ├── LauncherActivity.kt
│ │ │ ├── QDPhotoPickerActivity.kt
│ │ │ ├── TestArchInViewPagerActivity.java
│ │ │ └── TranslucentActivity.java
│ │ ├── adaptor/
│ │ │ ├── QDRecyclerViewAdapter.java
│ │ │ └── QDSimpleAdapter.java
│ │ ├── base/
│ │ │ ├── BaseActivity.java
│ │ │ ├── BaseFragment.java
│ │ │ ├── BaseFragmentActivity.java
│ │ │ ├── BaseRecyclerAdapter.java
│ │ │ ├── ComposeBaseFragment.kt
│ │ │ └── RecyclerViewHolder.java
│ │ ├── decorator/
│ │ │ ├── DividerItemDecoration.java
│ │ │ └── GridDividerItemDecoration.java
│ │ ├── fragment/
│ │ │ ├── QDAboutFragment.kt
│ │ │ ├── QDDialogFragment.kt
│ │ │ ├── QDWebExplorerFragment.java
│ │ │ ├── components/
│ │ │ │ ├── QDBottomSheetFragment.java
│ │ │ │ ├── QDButtonFragment.kt
│ │ │ │ ├── QDCollapsingTopBarLayoutFragment.java
│ │ │ │ ├── QDEmptyViewFragment.java
│ │ │ │ ├── QDFloatLayoutFragment.java
│ │ │ │ ├── QDGroupListViewFragment.kt
│ │ │ │ ├── QDLayoutFragment.java
│ │ │ │ ├── QDLinkTextViewFragment.java
│ │ │ │ ├── QDPopupFragment.java
│ │ │ │ ├── QDPriorityLinearLayoutFragment.java
│ │ │ │ ├── QDProgressBarFragment.java
│ │ │ │ ├── QDPullRefreshFragment.kt
│ │ │ │ ├── QDRadiusImageView2ScaleTypeFragment.java
│ │ │ │ ├── QDRadiusImageView2UsageFragment.java
│ │ │ │ ├── QDRadiusImageViewFragment.java
│ │ │ │ ├── QDRadiusImageViewScaleTypeFragment.java
│ │ │ │ ├── QDRadiusImageViewUsageFragment.java
│ │ │ │ ├── QDRecyclerViewDraggableScrollBarFragment.java
│ │ │ │ ├── QDSliderFragment.java
│ │ │ │ ├── QDSpanTouchFixTextViewFragment.java
│ │ │ │ ├── QDTabSegment2FixModeFragment.java
│ │ │ │ ├── QDTabSegment2ScrollableModeFragment.java
│ │ │ │ ├── QDTabSegmentFixModeFragment.java
│ │ │ │ ├── QDTabSegmentFragment.java
│ │ │ │ ├── QDTabSegmentScrollableModeFragment.java
│ │ │ │ ├── QDTabSegmentSpaceWeightFragment.java
│ │ │ │ ├── QDTipDialogFragment.java
│ │ │ │ ├── QDVerticalTextViewFragment.java
│ │ │ │ ├── SliderSchemeMatcher.java
│ │ │ │ ├── pullLayout/
│ │ │ │ │ ├── QDPullFragment.java
│ │ │ │ │ ├── QDPullHorizontalTestFragment.java
│ │ │ │ │ ├── QDPullRefreshAndLoadMoreTestFragment.java
│ │ │ │ │ └── QDPullVerticalTestFragment.java
│ │ │ │ ├── qqface/
│ │ │ │ │ ├── QDQQFaceFragment.java
│ │ │ │ │ ├── QDQQFacePerformanceTestFragment.java
│ │ │ │ │ ├── QDQQFaceTestData.java
│ │ │ │ │ ├── QDQQFaceUsageFragment.kt
│ │ │ │ │ ├── emojicon/
│ │ │ │ │ │ ├── EmojiCache.java
│ │ │ │ │ │ ├── EmojiconHandler.java
│ │ │ │ │ │ ├── EmojiconSpan.java
│ │ │ │ │ │ ├── EmojiconTextView.java
│ │ │ │ │ │ └── emoji/
│ │ │ │ │ │ ├── Emojicon.java
│ │ │ │ │ │ ├── Nature.java
│ │ │ │ │ │ ├── Objects.java
│ │ │ │ │ │ ├── People.java
│ │ │ │ │ │ ├── Places.java
│ │ │ │ │ │ └── Symbols.java
│ │ │ │ │ └── pageView/
│ │ │ │ │ ├── QDEmojiconPagerView.java
│ │ │ │ │ ├── QDQQFaceBasePagerView.java
│ │ │ │ │ └── QDQQFacePagerView.java
│ │ │ │ ├── section/
│ │ │ │ │ ├── QDBaseSectionLayoutFragment.java
│ │ │ │ │ ├── QDGridSectionAdapter.java
│ │ │ │ │ ├── QDGridSectionLayoutFragment.java
│ │ │ │ │ ├── QDListSectionAdapter.java
│ │ │ │ │ ├── QDListSectionLayoutFragment.java
│ │ │ │ │ ├── QDListWithDecorationSectionAdapter.java
│ │ │ │ │ ├── QDListWithDecorationSectionLayoutFragment.java
│ │ │ │ │ └── QDSectionLayoutFragment.java
│ │ │ │ ├── swipeAction/
│ │ │ │ │ ├── QDRVSwipeActionFragment.java
│ │ │ │ │ ├── QDRVSwipeDeleteWithNoActionFragment.java
│ │ │ │ │ ├── QDRVSwipeMutiActionFragment.java
│ │ │ │ │ ├── QDRVSwipeMutiActionOnlyIconFragment.java
│ │ │ │ │ ├── QDRVSwipeMutiActionWithIconFragment.java
│ │ │ │ │ ├── QDRVSwipeSingleDeleteActionFragment.java
│ │ │ │ │ └── QDRVSwipeUpDeleteFragment.java
│ │ │ │ └── viewpager/
│ │ │ │ ├── CardTransformer.java
│ │ │ │ ├── QDFitSystemWindowViewPagerFragment.java
│ │ │ │ ├── QDLoopViewPagerFragment.java
│ │ │ │ └── QDViewPagerFragment.java
│ │ │ ├── home/
│ │ │ │ ├── HomeComponentsController.java
│ │ │ │ ├── HomeController.java
│ │ │ │ ├── HomeFragment.java
│ │ │ │ ├── HomeLabController.java
│ │ │ │ └── HomeUtilController.java
│ │ │ ├── lab/
│ │ │ │ ├── QDAnimationListViewFragment.java
│ │ │ │ ├── QDArchNavFragment.java
│ │ │ │ ├── QDArchSurfaceTestFragment.java
│ │ │ │ ├── QDArchTestFragment.java
│ │ │ │ ├── QDArchWebViewTestFragment.java
│ │ │ │ ├── QDComposeTipFragment.kt
│ │ │ │ ├── QDContinuousBottomView.java
│ │ │ │ ├── QDContinuousNestedScroll1Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll2Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll3Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll4Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll5Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll6Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll7Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll8Fragment.java
│ │ │ │ ├── QDContinuousNestedScrollBaseFragment.java
│ │ │ │ ├── QDContinuousNestedScrollFragment.java
│ │ │ │ ├── QDEditorFragment.kt
│ │ │ │ ├── QDEmojiInputFragment.kt
│ │ │ │ ├── QDPhotoClipFragment.kt
│ │ │ │ ├── QDPhotoFragment.kt
│ │ │ │ ├── QDSchemeFragment.java
│ │ │ │ ├── QDSnapHelperFragment.java
│ │ │ │ ├── QDSwipeDeleteListViewFragment.java
│ │ │ │ ├── QDWebViewBridgeFragment.java
│ │ │ │ ├── QDWebViewFixFragment.java
│ │ │ │ └── QDWebViewFragment.java
│ │ │ └── util/
│ │ │ ├── QDColorHelperFragment.java
│ │ │ ├── QDDeviceHelperFragment.java
│ │ │ ├── QDDrawableHelperFragment.java
│ │ │ ├── QDNotchHelperFragment.java
│ │ │ ├── QDSpanFragment.java
│ │ │ ├── QDStatusBarHelperFragment.java
│ │ │ ├── QDViewHelperAnimationFadeFragment.java
│ │ │ ├── QDViewHelperAnimationSlideFragment.java
│ │ │ ├── QDViewHelperBackgroundAnimationBlinkFragment.java
│ │ │ ├── QDViewHelperBackgroundAnimationFullFragment.java
│ │ │ └── QDViewHelperFragment.java
│ │ ├── manager/
│ │ │ ├── QDAppGlideModule.kt
│ │ │ ├── QDDataManager.java
│ │ │ ├── QDPreferenceManager.java
│ │ │ ├── QDSchemeManager.kt
│ │ │ ├── QDSkinManager.java
│ │ │ ├── QDUpgradeManager.java
│ │ │ ├── UpgradeTask.java
│ │ │ └── UpgradeTipTask.java
│ │ ├── model/
│ │ │ ├── CustomEffect.java
│ │ │ ├── QDItemDescription.java
│ │ │ ├── SectionHeader.java
│ │ │ └── SectionItem.java
│ │ └── view/
│ │ ├── QDLoadingItemView.java
│ │ ├── QDSectionHeaderView.java
│ │ ├── QDShadowAdjustLayout.java
│ │ └── QDWebView.java
│ └── res/
│ ├── color/
│ │ ├── s_app_color_blue_2.xml
│ │ ├── s_app_color_blue_3.xml
│ │ ├── s_app_color_blue_to_red.xml
│ │ ├── s_app_color_gray.xml
│ │ ├── s_app_color_gray_dark.xml
│ │ ├── s_btn_blue.xml
│ │ ├── s_btn_gray.xml
│ │ └── s_topbar_btn_color.xml
│ ├── drawable/
│ │ ├── icon_popup_close_dark.xml
│ │ ├── icon_popup_close_with_bg_dark.xml
│ │ ├── icon_quick_action_copy.xml
│ │ ├── icon_quick_action_delete_line.xml
│ │ ├── icon_quick_action_dict.xml
│ │ ├── icon_quick_action_line.xml
│ │ ├── icon_quick_action_share.xml
│ │ ├── launcher_bg.xml
│ │ ├── pager_layout_item_bg.xml
│ │ ├── s_app_touch_fix_area_bg.xml
│ │ ├── s_list_item_bg_dark_1.xml
│ │ ├── s_list_item_bg_dark_2.xml
│ │ ├── tab_panel_bg.xml
│ │ └── web_explorer_progress.xml
│ ├── drawable-night/
│ │ └── launcher_bg.xml
│ ├── layout/
│ │ ├── activity_arch_test.xml
│ │ ├── activity_translucent.xml
│ │ ├── drawablehelper_createfromview.xml
│ │ ├── fragment_about.xml
│ │ ├── fragment_animation_listview.xml
│ │ ├── fragment_arch_test.xml
│ │ ├── fragment_button.xml
│ │ ├── fragment_collapsing_topbar_layout.xml
│ │ ├── fragment_colorhelper.xml
│ │ ├── fragment_continuous_nested_scroll.xml
│ │ ├── fragment_drawablehelper.xml
│ │ ├── fragment_emptyview.xml
│ │ ├── fragment_floatlayout.xml
│ │ ├── fragment_fsw_viewpager.xml
│ │ ├── fragment_grouplistview.xml
│ │ ├── fragment_home.xml
│ │ ├── fragment_layout.xml
│ │ ├── fragment_link_texview_layout.xml
│ │ ├── fragment_listview.xml
│ │ ├── fragment_loop_viewpager.xml
│ │ ├── fragment_notch.xml
│ │ ├── fragment_pagerlayoutmanager.xml
│ │ ├── fragment_popup.xml
│ │ ├── fragment_priority_linear_layout.xml
│ │ ├── fragment_progressbar.xml
│ │ ├── fragment_pull_horizontal_test_layout.xml
│ │ ├── fragment_pull_refresh_and_load_more_test_layout.xml
│ │ ├── fragment_pull_refresh_listview.xml
│ │ ├── fragment_pull_vertical_test_layout.xml
│ │ ├── fragment_qqface_layout.xml
│ │ ├── fragment_radius_imageview.xml
│ │ ├── fragment_radius_imageview2.xml
│ │ ├── fragment_radius_imageview2_scale_type.xml
│ │ ├── fragment_radius_imageview_scale_type.xml
│ │ ├── fragment_scheme.xml
│ │ ├── fragment_section_layout.xml
│ │ ├── fragment_slider.xml
│ │ ├── fragment_spanhelper.xml
│ │ ├── fragment_surface_test.xml
│ │ ├── fragment_swipe_delete_listview.xml
│ │ ├── fragment_tab_viewpager2_layout.xml
│ │ ├── fragment_tab_viewpager_layout.xml
│ │ ├── fragment_touch_span_fix_layout.xml
│ │ ├── fragment_verticaltextview.xml
│ │ ├── fragment_viewhelper_animation_show_and_hide.xml
│ │ ├── fragment_viewhelper_background_animation.xml
│ │ ├── fragment_webview_explorer.xml
│ │ ├── home_item_layout.xml
│ │ ├── home_layout.xml
│ │ ├── recycler_linear_layout_simple_item.xml
│ │ ├── recycler_view_item.xml
│ │ ├── simple_list_item.xml
│ │ ├── simple_list_item_1.xml
│ │ └── tipdialog_custom.xml
│ ├── values/
│ │ ├── attr.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── ids.xml
│ │ ├── strings.xml
│ │ ├── styles.xml
│ │ └── theme.xml
│ └── xml/
│ └── network_security_config.xml
├── settings.gradle.kts
└── type/
├── .gitignore
├── build.gradle.kts
└── src/
└── main/
├── AndroidManifest.xml
└── java/
└── com/
└── qmuiteam/
└── qmui/
└── type/
├── EnvironmentUpdater.kt
├── Line.kt
├── LineIndentHandler.kt
├── LineLayout.kt
├── TypeEnvironment.kt
├── TypeModel.kt
├── element/
│ ├── BreakWordLineElement.kt
│ ├── DrawableElement.kt
│ ├── Element.kt
│ ├── EmojiElement.kt
│ ├── IgnoreEffectElement.kt
│ ├── NextParagraphElement.kt
│ └── TextElement.kt
├── emoji/
│ ├── EmojiModel.kt
│ └── EmojiSpan.kt
├── parser/
│ ├── EmojiResourceProvider.kt
│ ├── EmojiTextParser.kt
│ ├── ParserHelper.kt
│ ├── PlainTextParser.kt
│ └── TextParser.kt
└── view/
├── BaseTypeView.kt
├── EmojiEditText.kt
├── LineTypeView.kt
└── MarqueeTypeView.kt
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
### 运行环境 ###
- [x] 设备型号:如:`Nexus 6`
- [x] 设备系统版本:如 `Android 5.0`
- [x] Gradle 版本:如 `2.3.0`
- [x] QMUI Android 版本:`1.x.x`
### 具体问题描述 ###
#### 问题截图 ####
#### Layout Inspector 文件([如何获取](https://github.com/QMUI/QMUI_Android/wiki/%E6%8F%90%E4%BE%9B-Layout-Inspector-%E6%96%87%E4%BB%B6)) ####
#### 异常日志(堆栈) ####
================================================
FILE: .gitignore
================================================
/*.bin
*.iml
.DS_Store
/.gradle
/.gradletasknamecache
/.idea
/bin
/build
/local.properties
/captures
/gradle/deploy.properties
================================================
FILE: CONTRIBUTING.md
================================================
[腾讯开源激励计划](https://opensource.tencent.com/contribution) 鼓励开发者的参与和贡献,期待你的加入。我们欢迎[report Issues](https://github.com/Tencent/QMUI_Android/issues) 或者 [pull requests](https://github.com/Tencent/QMUI_Android/pulls)。 在贡献代码之前请阅读以下指引。
## 问题管理
我们用 Github Issues 去跟踪 public bugs 和 feature requests。
### 使用 Issues
1. 新建 issues 前,请查找已存在或者相类似的 issue,从而保证不存在冗余。
2. 新建 issues 时,请根据我们提供的 issue 模板,尽可能提供详细的描述、截屏或者短视频来辅助我们定位问题。
### Pull Requests
我们欢迎大家为 QMUI_Android 贡献代码,在完成一个 pull request 之前请确认:
1. 从 `master` fork 你自己的分支。
2. 在修改了代码之后请修改对应的文档和注释。
3. 在新建的文件中请加入 licence 和 copy right 声明。
4. 确保一致的代码风格。
5. 做充分的测试。
================================================
FILE: LICENSE.TXT
================================================
Tencent is pleased to support the open source community by making QMUI_Android available.
Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
If you have downloaded a copy of the QMUI_Android binary from Tencent, please note that the QMUI_Android binary is licensed under the MIT License.
If you have downloaded a copy of the QMUI_Android source code from Tencent, please note that QMUI_Android source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of QMUI_Android into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within QMUI_Android.
A copy of the MIT License is included in this file.
Other dependencies and licenses:
Open Source Software Licensed Under the Apache License, Version 2.0:
----------------------------------------------------------------------------------------
1. JavaPoet 1.7.0
Copyright 2015 Square, Inc.
2. LeakCanary 1.5.4
Copyright 2015 Square, Inc.
3. Butterknife 8.8.1
Copyright 2013 Jake Wharton
Terms of the Apache License, Version 2.0:
---------------------------------------------------
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
License shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
Legal Entity shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, control means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
You (or Your) shall mean an individual or Legal Entity exercising permissions granted by this License.
Source form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
Object form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
Work shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
Derivative Works shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
Contribution shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, submitted means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as Not a Contribution.
Contributor shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
b) You must cause any modified files to carry prominent notices stating that You changed the files; and
c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
d) If the Work includes a NOTICE text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Terms of the MIT License:
--------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
<p align="center">
<img src="https://cloud.githubusercontent.com/assets/1190261/26751376/63f96538-486a-11e7-81cf-5bc83a945207.png" width="220" height="220" alt="Banner" />
</p>
# QMUI_Android
QMUI Android 的设计目的是用于辅助快速搭建一个具备基本设计还原效果的 Android 项目,同时利用自身提供的丰富控件及兼容处理,让开发者能专注于业务需求而无需耗费精力在基础代码的设计上。不管是新项目的创建,或是已有项目的维护,均可使开发效率和项目质量得到大幅度提升。
[](https://github.com/QMUI "QMUI Team")
[](http://opensource.org/licenses/MIT "Feel free to contribute.")
## 功能特性
### 全局 UI 配置
只需要修改一份配置表就可以调整 App 的全局样式,包括组件颜色、导航栏、对话框、列表等。一处修改,全局生效。
### 丰富的 UI 控件
提供丰富常用的 UI 控件,例如 BottomSheet、Tab、圆角 ImageView、下拉刷新等,使用方便灵活,并且支持自定义控件的样式。
### 高效的工具方法
提供高效的工具方法,包括设备信息、屏幕信息、键盘管理、状态栏管理等,可以解决各种常见场景并大幅度提升开发效率。
## 支持 Android 版本
QMUI Android 支持 API Level 21+。
## 使用方法
可以在工程中的 qmuidemo 项目中查看各组件的使用。
## 隐私与安全
1. 框架会调用 android.os.Build 下的字段读取 brand、model 等信息,用于区分不同的设备。
2. 框架会尝试读取系统设置获取是否是全面屏手势
================================================
FILE: arch/.gitignore
================================================
/*.bin
/*.iml
/.DS_Store
/.gradletasknamecache
/.idea
/bin
/build
/local.properties
/deploy.properties
================================================
FILE: arch/build.gradle.kts
================================================
import com.qmuiteam.plugin.Dep
plugins {
id("com.android.library")
kotlin("android")
`maven-publish`
signing
id("qmui-publish")
}
version = Dep.QMUI.archVer
android {
compileSdk = Dep.compileSdk
defaultConfig {
minSdk = Dep.minSdk
targetSdk = Dep.targetSdk
}
buildTypes {
getByName("release"){
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = Dep.javaVersion
targetCompatibility = Dep.javaVersion
}
kotlinOptions {
jvmTarget = Dep.kotlinJvmTarget
}
}
dependencies {
api(Dep.AndroidX.appcompat)
api(Dep.AndroidX.fragment)
api(project(":arch-annotation"))
compileOnly(project(":qmui"))
}
================================================
FILE: arch/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
================================================
FILE: arch/src/androidTest/java/com/qmuiteam/qmui/arch/ExampleInstrumentedTest.java
================================================
package com.qmuiteam.qmui.arch;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.qmuiteam.qmui.arch.test", appContext.getPackageName());
}
}
================================================
FILE: arch/src/main/AndroidManifest.xml
================================================
<manifest package="com.qmuiteam.qmui.arch"/>
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/InnerBaseActivity.java
================================================
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qmuiteam.qmui.arch;
import android.annotation.SuppressLint;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.LayoutInflaterCompat;
import androidx.lifecycle.Lifecycle;
import com.qmuiteam.qmui.QMUIConfig;
import com.qmuiteam.qmui.arch.annotation.LatestVisitRecord;
import com.qmuiteam.qmui.arch.record.LatestVisitArgumentCollector;
import com.qmuiteam.qmui.arch.record.RecordArgumentEditor;
import com.qmuiteam.qmui.arch.scheme.QMUISchemeHandler;
import com.qmuiteam.qmui.skin.QMUISkinLayoutInflaterFactory;
import com.qmuiteam.qmui.skin.QMUISkinManager;
import java.util.concurrent.atomic.AtomicInteger;
//Fix the bug: Only fullscreen activities can request orientation in Android version 26, 27
class InnerBaseActivity extends AppCompatActivity implements LatestVisitArgumentCollector {
private static int NO_REQUESTED_ORIENTATION_SET = -100;
private static final AtomicInteger sNextRc = new AtomicInteger(1);
private static int sLatestVisitActivityUUid = -1;
private boolean mConvertToTranslucentCauseOrientationChanged = false;
private int mPendingRequestedOrientation = NO_REQUESTED_ORIENTATION_SET;
private QMUISkinManager mSkinManager;
private final int mUUid = sNextRc.getAndIncrement();
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
if (useQMUISkinLayoutInflaterFactory()) {
LayoutInflater layoutInflater = LayoutInflater.from(this);
LayoutInflaterCompat.setFactory2(layoutInflater,
new QMUISkinLayoutInflaterFactory(this, layoutInflater));
}
super.onCreate(savedInstanceState);
}
void convertToTranslucentCauseOrientationChanged() {
Utils.convertActivityToTranslucent(this);
mConvertToTranslucentCauseOrientationChanged = true;
}
@Override
public void setRequestedOrientation(int requestedOrientation) {
if (mConvertToTranslucentCauseOrientationChanged && (Build.VERSION.SDK_INT == Build.VERSION_CODES.O
|| Build.VERSION.SDK_INT == Build.VERSION_CODES.O_MR1)) {
Log.i("InnerBaseActivity", "setRequestedOrientation when activity is translucent");
mPendingRequestedOrientation = requestedOrientation;
} else {
super.setRequestedOrientation(requestedOrientation);
}
}
@SuppressLint("WrongConstant")
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (mConvertToTranslucentCauseOrientationChanged) {
mConvertToTranslucentCauseOrientationChanged = false;
Utils.convertActivityFromTranslucent(this);
if (mPendingRequestedOrientation != NO_REQUESTED_ORIENTATION_SET) {
super.setRequestedOrientation(mPendingRequestedOrientation);
mPendingRequestedOrientation = NO_REQUESTED_ORIENTATION_SET;
}
}
}
public QMUISkinManager getSkinManager() {
return mSkinManager;
}
@Override
protected void onStart() {
super.onStart();
if (mSkinManager != null) {
mSkinManager.register(this);
}
}
@Override
protected void onStop() {
super.onStop();
if (mSkinManager != null) {
mSkinManager.unRegister(this);
}
}
@Override
protected void onResume() {
checkLatestVisitRecord();
super.onResume();
}
public final void onLatestVisitArgumentChanged() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.INITIALIZED)
&& sLatestVisitActivityUUid == mUUid) {
checkLatestVisitRecord();
}
}
protected boolean shouldPerformLatestVisitRecord() {
return true;
}
private void checkLatestVisitRecord() {
Class<? extends InnerBaseActivity> cls = getClass();
sLatestVisitActivityUUid = mUUid;
if (!shouldPerformLatestVisitRecord()) {
QMUILatestVisit.getInstance(this).clearActivityLatestVisitRecord();
return;
}
LatestVisitRecord latestVisitRecord = cls.getAnnotation(LatestVisitRecord.class);
if(latestVisitRecord == null || (latestVisitRecord.onlyForDebug() && !QMUIConfig.DEBUG)){
QMUILatestVisit.getInstance(this).clearActivityLatestVisitRecord();
return;
}
QMUILatestVisit.getInstance(this).performLatestVisitRecord(this);
}
@Override
public void onCollectLatestVisitArgument(RecordArgumentEditor editor) {
}
public void setSkinManager(@Nullable QMUISkinManager skinManager) {
if (mSkinManager != null) {
mSkinManager.unRegister(this);
}
mSkinManager = skinManager;
if (skinManager != null) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
skinManager.register(this);
}
}
}
public final boolean isStartedByScheme() {
return getIntent().getBooleanExtra(QMUISchemeHandler.ARG_FROM_SCHEME, false);
}
protected boolean useQMUISkinLayoutInflaterFactory() {
return true;
}
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIActivity.java
================================================
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qmuiteam.qmui.arch;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.WindowInsetsCompat;
import com.qmuiteam.qmui.QMUILog;
import com.qmuiteam.qmui.arch.scheme.ActivitySchemeRefreshable;
import com.qmuiteam.qmui.util.QMUIDisplayHelper;
import com.qmuiteam.qmui.util.QMUIStatusBarHelper;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_BOTTOM_TO_TOP;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_LEFT_TO_RIGHT;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_NONE;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_RIGHT_TO_LEFT;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_TOP_TO_BOTTOM;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.EDGE_BOTTOM;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.EDGE_LEFT;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.EDGE_RIGHT;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.EDGE_TOP;
public class QMUIActivity extends InnerBaseActivity implements ActivitySchemeRefreshable {
private static final String TAG = "QMUIActivity";
private SwipeBackLayout.ListenerRemover mListenerRemover;
private SwipeBackgroundView mSwipeBackgroundView;
private boolean mIsInSwipeBack = false;
private SwipeBackLayout.SwipeListener mSwipeListener = new SwipeBackLayout.SwipeListener() {
@Override
public void onScrollStateChange(int state, float scrollPercent) {
Log.i(TAG, "SwipeListener:onScrollStateChange: state = " + state + " ;scrollPercent = " + scrollPercent);
mIsInSwipeBack = state != SwipeBackLayout.STATE_IDLE;
if (state == SwipeBackLayout.STATE_IDLE) {
if (mSwipeBackgroundView != null) {
if (scrollPercent <= 0.0F) {
mSwipeBackgroundView.unBind();
mSwipeBackgroundView = null;
} else if (scrollPercent >= 1.0F) {
// unBind mSwipeBackgroundView until onDestroy
finish();
int exitAnim = mSwipeBackgroundView.hasChildWindow() ?
R.anim.swipe_back_exit_still : R.anim.swipe_back_exit;
overridePendingTransition(R.anim.swipe_back_enter, exitAnim);
}
}
}
}
@Override
public void onScroll(int dragDirection, int movingEdge, float scrollPercent) {
if (mSwipeBackgroundView != null) {
scrollPercent = Math.max(0f, Math.min(1f, scrollPercent));
int targetOffset = (int) (Math.abs(backViewInitOffset(
QMUIActivity.this, dragDirection, movingEdge)) * (1 - scrollPercent));
SwipeBackLayout.translateInSwipeBack(mSwipeBackgroundView, movingEdge, targetOffset);
}
}
@Override
public void onSwipeBackBegin(int dragDirection, int moveEdge) {
Log.i(TAG, "SwipeListener:onSwipeBackBegin: moveEdge = " + moveEdge);
onDragStart();
ViewGroup decorView = (ViewGroup) getWindow().getDecorView();
if (decorView != null) {
Activity prevActivity = QMUISwipeBackActivityManager.getInstance()
.getPenultimateActivity(QMUIActivity.this);
if(prevActivity == null){
return;
}
if (decorView.getChildAt(0) instanceof SwipeBackgroundView) {
mSwipeBackgroundView = (SwipeBackgroundView) decorView.getChildAt(0);
} else {
mSwipeBackgroundView = new SwipeBackgroundView(QMUIActivity.this, forceDisableHardwareAcceleratedForSwipeBackground());
decorView.addView(mSwipeBackgroundView, 0, new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
}
mSwipeBackgroundView.bind(prevActivity,
QMUIActivity.this, restoreSubWindowWhenDragBack());
SwipeBackLayout.translateInSwipeBack(mSwipeBackgroundView, moveEdge,
Math.abs(backViewInitOffset(decorView.getContext(), dragDirection, moveEdge)));
}
}
@Override
public void onScrollOverThreshold() {
Log.i(TAG, "SwipeListener:onEdgeTouch:onScrollOverThreshold");
}
};
private SwipeBackLayout.Callback mSwipeCallback = new SwipeBackLayout.Callback() {
@Override
public int getDragDirection(SwipeBackLayout swipeBackLayout,
SwipeBackLayout.ViewMoveAction moveAction,
float downX, float downY, float dx, float dy, float touchSlop) {
if(!QMUISwipeBackActivityManager.getInstance().canSwipeBack(QMUIActivity.this)){
return SwipeBackLayout.DRAG_DIRECTION_NONE;
}
if(getIntent().getIntExtra(QMUIFragmentActivity.QMUI_MUTI_START_INDEX, 0) > 0){
return SwipeBackLayout.DRAG_DIRECTION_NONE;
}
return QMUIActivity.this.getDragDirection(swipeBackLayout,moveAction,downX, downY, dx, dy, touchSlop);
}
@Override
public void reportFrequentlyRequestLayout(int count, long duration) {
QMUIActivity.this.reportFrequentlyRequestLayout(count, duration);
}
};
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
performTranslucent();
}
protected void performTranslucent(){
QMUIStatusBarHelper.translucent(this);
}
@Override
public void setContentView(View view) {
super.setContentView(newSwipeBackLayout(view));
}
@Override
public void setContentView(int layoutResID) {
SwipeBackLayout swipeBackLayout = SwipeBackLayout.wrap(this, layoutResID, dragViewMoveAction(), mSwipeCallback);
swipeBackLayout.setOnInsetsHandler(new SwipeBackLayout.OnInsetsHandler() {
@Override
public int getInsetsType() {
return getRootViewInsetsType();
}
});
mListenerRemover = swipeBackLayout.addSwipeListener(mSwipeListener);
super.setContentView(swipeBackLayout);
}
@Override
public void setContentView(View view, ViewGroup.LayoutParams params) {
super.setContentView(newSwipeBackLayout(view), params);
}
private View newSwipeBackLayout(View view) {
final SwipeBackLayout swipeBackLayout = SwipeBackLayout.wrap(view, dragViewMoveAction(), mSwipeCallback);
swipeBackLayout.setOnInsetsHandler(new SwipeBackLayout.OnInsetsHandler() {
@Override
public int getInsetsType() {
return getRootViewInsetsType();
}
});
mListenerRemover = swipeBackLayout.addSwipeListener(mSwipeListener);
return swipeBackLayout;
}
@Override
protected void onDestroy() {
super.onDestroy();
if (mListenerRemover != null) {
mListenerRemover.remove();
}
if (mSwipeBackgroundView != null) {
mSwipeBackgroundView.unBind();
mSwipeBackgroundView = null;
}
}
/**
* final this method, if need override this method, use doOnBackPressed as an alternative
*/
@Override
public final void onBackPressed() {
if (!mIsInSwipeBack) {
doOnBackPressed();
}
}
protected void doOnBackPressed() {
super.onBackPressed();
}
protected void reportFrequentlyRequestLayout(int count, long duration){
QMUILog.w(TAG, "requestLayout is too frequent(requestLayout " + count + "times within " + duration + "ms");
}
public boolean isInSwipeBack() {
return mIsInSwipeBack;
}
protected boolean forceDisableHardwareAcceleratedForSwipeBackground(){
return false;
}
/**
* disable or enable drag back
*
* @return if true open dragBack, otherwise close dragBack
* @deprecated Use {@link #getDragDirection(SwipeBackLayout, SwipeBackLayout.ViewMoveAction, float, float, float, float, float)}
*/
@Deprecated
protected boolean canDragBack() {
return true;
}
/**
* disable or enable drag back
*
* @return if true open dragBack, otherwise close dragBack
* @deprecated Use {@link #getDragDirection(SwipeBackLayout, SwipeBackLayout.ViewMoveAction, float, float, float, float, float)}
*/
@Deprecated
protected boolean canDragBack(Context context, int dragDirection, int moveEdge) {
return canDragBack();
}
/**
* @return the init offset for backView for Parallax scrolling
* @deprecated Use {@link #backViewInitOffset(Context, int, int)}
*/
@Deprecated
protected int backViewInitOffset() {
return 0;
}
protected int backViewInitOffset(Context context, int dragDirection, int moveEdge) {
return backViewInitOffset();
}
protected int getDragDirection(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull SwipeBackLayout.ViewMoveAction viewMoveAction,
float downX, float downY, float dx, float dy, float slopTouch){
int targetDirection = dragBackDirection();
if(!canDragBack(swipeBackLayout.getContext(), targetDirection, viewMoveAction.getEdge(targetDirection))){
return DRAG_DIRECTION_NONE;
}
int edgeSize = QMUIDisplayHelper.dp2px(swipeBackLayout.getContext(), 20);
if (targetDirection == DRAG_DIRECTION_LEFT_TO_RIGHT) {
if(downX < edgeSize && dx >= slopTouch){
return targetDirection;
}
} else if (targetDirection == DRAG_DIRECTION_RIGHT_TO_LEFT) {
if(downX > swipeBackLayout.getWidth() - edgeSize && -dx >= slopTouch){
return targetDirection;
}
} else if (targetDirection == DRAG_DIRECTION_TOP_TO_BOTTOM) {
if(downY < edgeSize && dy >= slopTouch){
return targetDirection;
}
} else if (targetDirection == DRAG_DIRECTION_BOTTOM_TO_TOP) {
if(downY > swipeBackLayout.getHeight() - edgeSize && -dy >= slopTouch){
return targetDirection;
}
}
return DRAG_DIRECTION_NONE;
}
/**
* called when drag back started.
*/
protected void onDragStart() {
}
/**
* @return
* @deprecated Use {@link #dragBackDirection()}
*/
@Deprecated
protected int dragBackEdge() {
return EDGE_LEFT;
}
protected int dragBackDirection() {
int oldEdge = dragBackEdge();
if (oldEdge == EDGE_RIGHT) {
return SwipeBackLayout.DRAG_DIRECTION_RIGHT_TO_LEFT;
} else if (oldEdge == EDGE_TOP) {
return SwipeBackLayout.DRAG_DIRECTION_TOP_TO_BOTTOM;
} else if (oldEdge == EDGE_BOTTOM) {
return SwipeBackLayout.DRAG_DIRECTION_BOTTOM_TO_TOP;
}
return SwipeBackLayout.DRAG_DIRECTION_LEFT_TO_RIGHT;
}
protected SwipeBackLayout.ViewMoveAction dragViewMoveAction() {
return SwipeBackLayout.MOVE_VIEW_AUTO;
}
/**
* restore sub window(e.g dialog) when drag back to previous activity
*
* @return
*/
protected boolean restoreSubWindowWhenDragBack() {
return true;
}
/**
* When finishing last activity, let activity have a chance to start a new Activity
*
* @return Intent to start a new Activity
*/
public Intent onLastActivityFinish() {
return null;
}
@WindowInsetsCompat.Type.InsetsType
public int getRootViewInsetsType() {
return WindowInsetsCompat.Type.ime();
}
@Override
public void finish() {
if (isTaskRoot()) {
Intent intent = onLastActivityFinish();
if (intent != null) {
startActivity(intent);
}
}
super.finish();
}
@Override
public void refreshFromScheme(@Nullable Intent intent) {
}
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragment.java
================================================
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qmuiteam.qmui.arch;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_BOTTOM_TO_TOP;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_LEFT_TO_RIGHT;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_NONE;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_RIGHT_TO_LEFT;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.DRAG_DIRECTION_TOP_TO_BOTTOM;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.EDGE_BOTTOM;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.EDGE_LEFT;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.EDGE_RIGHT;
import static com.qmuiteam.qmui.arch.SwipeBackLayout.EDGE_TOP;
import android.animation.Animator;
import android.animation.AnimatorInflater;
import android.animation.AnimatorListenerAdapter;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.widget.FrameLayout;
import androidx.activity.OnBackPressedCallback;
import androidx.activity.OnBackPressedDispatcher;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.arch.core.util.Function;
import androidx.core.view.WindowInsetsCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentContainerView;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MediatorLiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStoreOwner;
import com.qmuiteam.qmui.QMUIConfig;
import com.qmuiteam.qmui.QMUILog;
import com.qmuiteam.qmui.arch.annotation.LatestVisitRecord;
import com.qmuiteam.qmui.arch.effect.Effect;
import com.qmuiteam.qmui.arch.effect.FragmentResultEffect;
import com.qmuiteam.qmui.arch.effect.QMUIFragmentEffectHandler;
import com.qmuiteam.qmui.arch.effect.QMUIFragmentEffectRegistration;
import com.qmuiteam.qmui.arch.effect.QMUIFragmentEffectRegistry;
import com.qmuiteam.qmui.arch.effect.QMUIFragmentResultEffectHandler;
import com.qmuiteam.qmui.arch.record.LatestVisitArgumentCollector;
import com.qmuiteam.qmui.arch.record.RecordArgumentEditor;
import com.qmuiteam.qmui.arch.scheme.FragmentSchemeRefreshable;
import com.qmuiteam.qmui.arch.scheme.QMUISchemeHandler;
import com.qmuiteam.qmui.util.QMUIDisplayHelper;
import com.qmuiteam.qmui.util.QMUIKeyboardHelper;
import com.qmuiteam.qmui.widget.QMUITopBar;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
/**
* With the use of {@link QMUIFragmentActivity}, {@link QMUIFragment} brings more features,
* such as swipe back, transition config, and so on.
* <p>
* Created by cgspine on 15/9/14.
*/
public abstract class QMUIFragment extends Fragment implements
LatestVisitArgumentCollector,
FragmentSchemeRefreshable{
static final String SWIPE_BACK_VIEW = "swipe_back_view";
private static final String TAG = QMUIFragment.class.getSimpleName();
private static final String QMUI_DISABLE_SWIPE_BACK_KEY = "qmui_disable_swipe_back";
public static final TransitionConfig SLIDE_TRANSITION_CONFIG = new TransitionConfig(
R.animator.slide_in_right, R.animator.slide_out_left,
R.animator.slide_in_left, R.animator.slide_out_right,
R.anim.slide_in_left, R.anim.slide_out_right
);
public static final TransitionConfig SCALE_TRANSITION_CONFIG = new TransitionConfig(
R.animator.scale_enter, R.animator.slide_still,
R.animator.slide_still, R.animator.scale_exit,
R.anim.slide_still, R.anim.scale_exit
);
public static final int RESULT_CANCELED = Activity.RESULT_CANCELED;
public static final int RESULT_OK = Activity.RESULT_OK;
public static final int RESULT_FIRST_USER = Activity.RESULT_FIRST_USER;
public static final int ANIMATION_ENTER_STATUS_NOT_START = -1;
public static final int ANIMATION_ENTER_STATUS_STARTED = 0;
public static final int ANIMATION_ENTER_STATUS_END = 1;
private static boolean sPopBackWhenSwipeFinished = false;
private static final int NO_REQUEST_CODE = 0;
private static final AtomicInteger sNextRc = new AtomicInteger(1);
private static int sLatestVisitFragmentUUid = -1;
private int mSourceRequestCode = NO_REQUEST_CODE;
private final int mUUid = sNextRc.getAndIncrement();
private int mTargetFragmentUUid = -1;
private int mTargetRequestCode = NO_REQUEST_CODE;
private View mBaseView;
private View mCacheRootView;
private SwipeBackLayout mCacheSwipeBackView;
private boolean isCreateForSwipeBack = false;
private SwipeBackLayout.ListenerRemover mListenerRemover;
private SwipeBackgroundView mSwipeBackgroundView;
private boolean mIsInSwipeBack = false;
private boolean mFinishActivityIfOnBackPressed = false;
boolean mDisableSwipeBackByMutiStarted = false;
private int mEnterAnimationStatus = ANIMATION_ENTER_STATUS_NOT_START;
private MutableLiveData<Boolean> isInEnterAnimationLiveData = new MutableLiveData<>(false);
private boolean mCalled = true;
private ArrayList<Runnable> mDelayRenderRunnableList;
private ArrayList<Runnable> mPostResumeRunnableList;
private Runnable mCheckPostResumeRunnable = new Runnable() {
@Override
public void run() {
if (isResumed() && mPostResumeRunnableList != null) {
ArrayList<Runnable> list = mPostResumeRunnableList;
if (!list.isEmpty()) {
for (Runnable runnable : list) {
runnable.run();
}
}
mPostResumeRunnableList = null;
}
}
};
private QMUIFragmentEffectRegistry mFragmentEffectRegistry;
private OnBackPressedDispatcher mOnBackPressedDispatcher;
private OnBackPressedCallback mOnBackPressedCallback = new OnBackPressedCallback(true) {
@Override
public void handleOnBackPressed() {
if (sPopBackWhenSwipeFinished) {
// must use normal back procedure when swipe finished.
onNormalBackPressed();
return;
}
QMUIFragment.this.onBackPressed();
}
};
public QMUIFragment() {
super();
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
mOnBackPressedDispatcher = requireActivity().getOnBackPressedDispatcher();
mOnBackPressedDispatcher.addCallback(this, mOnBackPressedCallback);
registerEffect(this, new QMUIFragmentResultEffectHandler() {
@Override
public boolean shouldHandleEffect(@NonNull FragmentResultEffect effect) {
return effect.getRequestCode() == mSourceRequestCode && effect.getRequestFragmentUUid() == mUUid;
}
@Override
public void handleEffect(@NonNull FragmentResultEffect effect) {
onFragmentResult(effect.getRequestCode(), effect.getResultCode(), effect.getIntent());
mSourceRequestCode = NO_REQUEST_CODE;
}
@Override
public void handleEffect(@NonNull List<FragmentResultEffect> effects) {
// only handle the latest
handleEffect(effects.get(effects.size() - 1));
}
});
}
public final QMUIFragmentActivity getBaseFragmentActivity() {
return (QMUIFragmentActivity) getActivity();
}
public boolean isAttachedToActivity() {
return !isRemoving() && mBaseView != null;
}
@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(QMUI_DISABLE_SWIPE_BACK_KEY, mDisableSwipeBackByMutiStarted);
}
@Override
public void onDestroyView() {
super.onDestroyView();
if (mListenerRemover != null) {
mListenerRemover.remove();
mListenerRemover = null;
}
if(getParentFragment() == null && mCacheRootView != null && mCacheRootView.getParent() instanceof ViewGroup){
((ViewGroup) mCacheRootView.getParent()).removeView(mCacheRootView);
}
mBaseView = null;
mEnterAnimationStatus = ANIMATION_ENTER_STATUS_NOT_START;
}
@Override
public void onResume() {
if(mEnterAnimationStatus != ANIMATION_ENTER_STATUS_END){
mEnterAnimationStatus = ANIMATION_ENTER_STATUS_END;
notifyDelayRenderRunnableList();
}
checkLatestVisitRecord();
checkForRequestForHandlePopBack();
super.onResume();
if (mBaseView != null && mPostResumeRunnableList != null && !mPostResumeRunnableList.isEmpty()) {
mBaseView.post(mCheckPostResumeRunnable);
}
}
protected void checkForRequestForHandlePopBack(){
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(false);
if(provider != null){
provider.requestForHandlePopBack(false);
}
}
protected boolean shouldCheckLatestVisitRecord(){
return getParentFragment() == null || (getParentFragment() instanceof QMUINavFragment);
}
protected boolean shouldPerformLatestVisitRecord() {
return true;
}
private void checkLatestVisitRecord() {
if(!shouldCheckLatestVisitRecord()){
return;
}
Activity activity = getActivity();
if (!(activity instanceof QMUIFragmentActivity)) {
return;
}
if (this instanceof QMUINavFragment) {
return;
}
sLatestVisitFragmentUUid = mUUid;
if (!shouldPerformLatestVisitRecord()) {
QMUILatestVisit.getInstance(getContext()).clearFragmentLatestVisitRecord();
return;
}
Class<? extends QMUIFragment> cls = getClass();
LatestVisitRecord latestVisitRecord = cls.getAnnotation(LatestVisitRecord.class);
if (latestVisitRecord == null || (latestVisitRecord.onlyForDebug() && !QMUIConfig.DEBUG)) {
QMUILatestVisit.getInstance(getContext()).clearFragmentLatestVisitRecord();
return;
}
if (!activity.getClass().isAnnotationPresent(LatestVisitRecord.class)) {
throw new RuntimeException(String.format("Can not perform LatestVisitRecord, " +
"%s must be annotated by LatestVisitRecord", activity.getClass().getSimpleName()));
}
QMUILatestVisit.getInstance(getContext()).performLatestVisitRecord(this);
}
public final void onLatestVisitArgumentChanged() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.INITIALIZED) && sLatestVisitFragmentUUid == mUUid) {
checkLatestVisitRecord();
}
}
@Override
public void onCollectLatestVisitArgument(RecordArgumentEditor editor) {
}
@Nullable
public <T extends Effect> QMUIFragmentEffectRegistration registerEffect(
@NonNull final LifecycleOwner lifecycleOwner,
@NonNull final QMUIFragmentEffectHandler<T> effectHandler) {
FragmentActivity activity = getActivity();
if (activity == null) {
throw new RuntimeException("Fragment(" + getClass().getSimpleName() + ") not attached to Activity.");
}
ensureFragmentEffectRegistry();
return mFragmentEffectRegistry.register(lifecycleOwner, effectHandler);
}
public <T extends Effect> void notifyEffect(T effect) {
FragmentActivity activity = getActivity();
if (activity == null) {
QMUILog.d(TAG, "Fragment(" + getClass().getSimpleName() + ") not attached to Activity.");
return;
}
ensureFragmentEffectRegistry();
mFragmentEffectRegistry.notifyEffect(effect);
}
private void ensureFragmentEffectRegistry() {
if (mFragmentEffectRegistry == null) {
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(false);
ViewModelStoreOwner viewModelStoreOwner = provider != null ? provider.getContainerViewModelStoreOwner() : requireActivity();
mFragmentEffectRegistry = new ViewModelProvider(viewModelStoreOwner).get(QMUIFragmentEffectRegistry.class);
}
}
@Nullable
protected QMUIFragmentContainerProvider findFragmentContainerProvider(boolean includeSelf) {
Fragment current = includeSelf ? this : getParentFragment();
while (current != null) {
if (current instanceof QMUIFragmentContainerProvider) {
return (QMUIFragmentContainerProvider) current;
} else {
current = current.getParentFragment();
}
}
Activity activity = getActivity();
if (activity instanceof QMUIFragmentContainerProvider) {
return (QMUIFragmentContainerProvider) activity;
}
return null;
}
public int startFragmentAndDestroyCurrent(QMUIFragment fragment) {
return startFragmentAndDestroyCurrent(fragment, true);
}
/**
* start a new fragment and then destroy current fragment.
* assume there is a fragment stack(A->B->C), and you use this method to start a new
* fragment D and destroy fragment C. Now you are in fragment D, if you want call
* {@link #popBackStack()} to back to B, what the animation should be? Sometimes we hope run
* animation generated by transition B->C, but sometimes we hope run animation generated by
* transition C->D. this why second parameter exists.
*
* @param fragment new fragment to start
* @param useNewTransitionConfigWhenPop if true, use animation generated by transition C->D,
* else, use animation generated by transition B->C
*/
public int startFragmentAndDestroyCurrent(QMUIFragment fragment,
boolean useNewTransitionConfigWhenPop) {
if (!checkStateLoss("startFragmentAndDestroyCurrent")) {
return -1;
}
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(true);
if (provider == null) {
if (QMUIConfig.DEBUG) {
throw new RuntimeException("Can not find the fragment container provider.");
} else {
Log.d(TAG, "Can not find the fragment container provider.");
return -1;
}
}
if(provider.getContainerFragmentManager().isDestroyed()){
return -1;
}
QMUIFragment.TransitionConfig transitionConfig = fragment.onFetchTransitionConfig();
String tagName = fragment.getClass().getSimpleName();
FragmentManager fragmentManager = provider.getContainerFragmentManager();
FragmentTransaction transaction = fragmentManager.beginTransaction()
.setCustomAnimations(
transitionConfig.enter, transitionConfig.exit,
transitionConfig.popenter, transitionConfig.popout)
.setPrimaryNavigationFragment(null)
.replace(provider.getContextViewId(), fragment, tagName);
int index = transaction.commit();
Utils.modifyOpForStartFragmentAndDestroyCurrent(fragmentManager, fragment, useNewTransitionConfigWhenPop, transitionConfig);
return index;
}
/**
* start a new fragment and add to BackStack
* @param fragment the fragment to start
* @return Returns the identifier of this transaction's back stack entry,
* if {@link FragmentTransaction#addToBackStack(String)} had been called. Otherwise, returns
* a negative number.
*/
public int startFragment(QMUIFragment fragment) {
if (!checkStateLoss("startFragment")) {
return -1;
}
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(true);
if (provider == null) {
if (QMUIConfig.DEBUG) {
throw new RuntimeException("Can not find the fragment container provider.");
} else {
Log.d(TAG, "Can not find the fragment container provider.");
return -1;
}
}
return startFragment(fragment, provider);
}
public int startFragment(QMUIFragment... fragments){
if (!checkStateLoss("startFragment")) {
return -1;
}
if(fragments.length == 0){
return -1;
}
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(true);
if (provider == null) {
if (QMUIConfig.DEBUG) {
throw new RuntimeException("Can not find the fragment container provider.");
} else {
Log.d(TAG, "Can not find the fragment container provider.");
return -1;
}
}
if(provider.getContainerFragmentManager().isDestroyed()){
return -1;
}
if(fragments.length == 1){
return startFragment(fragments[0], provider);
}
ArrayList<FragmentTransaction> transactions = new ArrayList<>();
TransitionConfig lastTransitionConfig = fragments[fragments.length - 1].onFetchTransitionConfig();
boolean disableSwipeBack = false;
for (QMUIFragment fragment : fragments) {
FragmentTransaction transaction = provider.getContainerFragmentManager()
.beginTransaction()
.setPrimaryNavigationFragment(null);
TransitionConfig transitionConfig = fragment.onFetchTransitionConfig();
if(disableSwipeBack){
fragment.mDisableSwipeBackByMutiStarted = true;
}
disableSwipeBack = true;
String tagName = fragment.getClass().getSimpleName();
transaction.setCustomAnimations(transitionConfig.enter, lastTransitionConfig.exit, transitionConfig.popenter, transitionConfig.popout);
transaction.replace(provider.getContextViewId(), fragment, tagName);
transaction.addToBackStack(tagName);
transactions.add(transaction);
transaction.setReorderingAllowed(true);
}
for(FragmentTransaction transaction: transactions){
transaction.commit();
}
return 0;
}
/**
* simulate the behavior of startActivityForResult/onActivityResult:
* 1. Jump fragment1 to fragment2 via startActivityForResult(fragment2, requestCode)
* 2. Pass data from fragment2 to fragment1 via setFragmentResult(RESULT_OK, data)
* 3. Get data in fragment1 through onFragmentResult(requestCode, resultCode, data)
*
* @deprecated use {@link #registerEffect} for a replacement
*
* @param fragment target fragment
* @param requestCode request code
*/
@Deprecated
public int startFragmentForResult(QMUIFragment fragment, int requestCode) {
if (!checkStateLoss("startFragmentForResult")) {
return -1;
}
if (requestCode == NO_REQUEST_CODE) {
throw new RuntimeException("requestCode can not be " + NO_REQUEST_CODE);
}
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(true);
if (provider == null) {
if (QMUIConfig.DEBUG) {
throw new RuntimeException("Can not find the fragment container provider.");
} else {
Log.d(TAG, "Can not find the fragment container provider.");
return -1;
}
}
mSourceRequestCode = requestCode;
fragment.mTargetFragmentUUid = mUUid;
fragment.mTargetRequestCode = requestCode;
return startFragment(fragment, provider);
}
private int startFragment(QMUIFragment fragment, QMUIFragmentContainerProvider provider) {
if(provider.getContainerFragmentManager().isDestroyed()){
return -1;
}
QMUIFragment.TransitionConfig transitionConfig = fragment.onFetchTransitionConfig();
String tagName = fragment.getClass().getSimpleName();
return provider.getContainerFragmentManager()
.beginTransaction()
.setPrimaryNavigationFragment(null)
.setCustomAnimations(transitionConfig.enter, transitionConfig.exit, transitionConfig.popenter, transitionConfig.popout)
.replace(provider.getContextViewId(), fragment, tagName)
.addToBackStack(tagName)
.commit();
}
/**
*
* @param resultCode
* @param data
*
* @deprecated use {@link #notifyEffect} for a replacement
*/
@Deprecated
public void setFragmentResult(int resultCode, Intent data) {
if (mTargetRequestCode == NO_REQUEST_CODE) {
return;
}
notifyEffect(new FragmentResultEffect(mTargetFragmentUUid, resultCode, mTargetRequestCode, data));
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(savedInstanceState != null){
mDisableSwipeBackByMutiStarted = savedInstanceState.getBoolean(QMUI_DISABLE_SWIPE_BACK_KEY, false);
}
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if (mBaseView.getTag(R.id.qmui_arch_reused_layout) == null) {
onViewCreated(mBaseView);
mBaseView.setTag(R.id.qmui_arch_reused_layout, true);
}
}
private SwipeBackLayout newSwipeBackLayout() {
if(mCacheSwipeBackView != null && getParentFragment() != null){
if (mCacheSwipeBackView.getParent() != null) {
((ViewGroup) mCacheSwipeBackView.getParent()).removeView(mCacheSwipeBackView);
}
if(mCacheSwipeBackView.getParent() == null){
initSwipeBackLayout(mCacheSwipeBackView);
return mCacheSwipeBackView;
}
}
View rootView = mCacheRootView;
if (rootView == null) {
rootView = onCreateView();
mCacheRootView = rootView;
} else {
if (rootView.getParent() != null) {
((ViewGroup) rootView.getParent()).removeView(rootView);
}
}
SwipeBackLayout swipeBackLayout = SwipeBackLayout.wrap(rootView,
dragViewMoveAction(),
new SwipeBackLayout.Callback() {
@Override
public int getDragDirection(SwipeBackLayout swipeBackLayout, SwipeBackLayout.ViewMoveAction viewMoveAction, float downX, float downY, float dx, float dy, float touchSlop) {
mCalled = false;
if(mDisableSwipeBackByMutiStarted){
return DRAG_DIRECTION_NONE;
}
boolean canHandle = canHandleSwipeBack();
if (canHandle && !mCalled) {
throw new RuntimeException(getClass().getSimpleName() + " did not call through to super.shouldPreventSwipeBack()");
}
if(!canHandle){
return DRAG_DIRECTION_NONE;
}
return QMUIFragment.this.getDragDirection(
swipeBackLayout, viewMoveAction, downX, downY, dx, dy, touchSlop);
}
@Override
public void reportFrequentlyRequestLayout(int count, long duration) {
QMUIFragment.this.reportFrequentlyRequestLayout(count, duration);
}
});
initSwipeBackLayout(swipeBackLayout);
if(getParentFragment() != null){
mCacheSwipeBackView = swipeBackLayout;
}
return swipeBackLayout;
}
private void initSwipeBackLayout(SwipeBackLayout swipeBackLayout){
if(mListenerRemover != null){
mListenerRemover.remove();
}
mListenerRemover = swipeBackLayout.addSwipeListener(mSwipeListener);
swipeBackLayout.setOnInsetsHandler(new SwipeBackLayout.OnInsetsHandler() {
@Override
public int getInsetsType() {
return getRootViewInsetsType();
}
});
if (isCreateForSwipeBack) {
swipeBackLayout.setTag(R.id.fragment_container_view_tag, this);
}
}
private SwipeBackLayout.SwipeListener mSwipeListener = new SwipeBackLayout.SwipeListener() {
private QMUIFragment mModifiedFragment = null;
@Override
public void onScrollStateChange(int state, float scrollPercent) {
Log.i(TAG, "SwipeListener:onScrollStateChange: state = " + state + " ;scrollPercent = " + scrollPercent);
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(false);
if (provider == null || provider.getFragmentContainerView() == null) {
return;
}
FragmentContainerView container = provider.getFragmentContainerView();
mIsInSwipeBack = state != SwipeBackLayout.STATE_IDLE;
if (state == SwipeBackLayout.STATE_IDLE) {
if (mSwipeBackgroundView != null) {
if (scrollPercent <= 0.0F) {
mSwipeBackgroundView.unBind();
mSwipeBackgroundView = null;
} else if (scrollPercent >= 1.0F) {
// unbind mSwipeBackgroundView util onDestroy
Activity activity = getActivity();
if (activity != null) {
sPopBackWhenSwipeFinished = true;
// must call before popBackStack. mSwipeBackgroundView maybe released in popBackStack
int exitAnim = mSwipeBackgroundView.hasChildWindow() ?
R.anim.swipe_back_exit_still : R.anim.swipe_back_exit;
popBackStack();
activity.overridePendingTransition(R.anim.swipe_back_enter, exitAnim);
sPopBackWhenSwipeFinished = false;
}
}
return;
}
if (scrollPercent <= 0.0F) {
handleSwipeBackCancelOrFinished(container);
} else if (scrollPercent >= 1.0F) {
handleSwipeBackCancelOrFinished(container);
FragmentManager fragmentManager = provider.getContainerFragmentManager();
Utils.findAndModifyOpInBackStackRecord(fragmentManager, -1, new Utils.OpHandler() {
@Override
public boolean handle(Object op) {
Field cmdField = Utils.getOpCmdField(op);
if (cmdField == null) {
return false;
}
try {
cmdField.setAccessible(true);
int cmd = (int) cmdField.get(op);
if (cmd == 1) {
Field popEnterAnimField = Utils.getOpPopExitAnimField(op);
if (popEnterAnimField != null) {
popEnterAnimField.setAccessible(true);
popEnterAnimField.set(op, 0);
}
} else if (cmd == 3) {
Field popExitAnimField = Utils.getOpPopEnterAnimField(op);
if (popExitAnimField != null) {
popExitAnimField.setAccessible(true);
popExitAnimField.set(op, 0);
}
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return false;
}
@Override
public boolean needReNameTag() {
return false;
}
@Override
public String newTagName() {
return null;
}
});
sPopBackWhenSwipeFinished = true;
popBackStack();
sPopBackWhenSwipeFinished = false;
}
}
}
@Override
public void onScroll(int dragDirection, int moveEdge, float scrollPercent) {
scrollPercent = Math.max(0f, Math.min(1f, scrollPercent));
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(false);
if (provider == null || provider.getFragmentContainerView() == null) {
return;
}
FragmentContainerView container = provider.getFragmentContainerView();
int targetOffset = (int) (Math.abs(
backViewInitOffset(container.getContext(), dragDirection, moveEdge)) * (1 - scrollPercent));
int childCount = container.getChildCount();
for (int i = childCount - 1; i >= 0; i--) {
View view = container.getChildAt(i);
Object tag = view.getTag(R.id.qmui_arch_swipe_layout_in_back);
if (SWIPE_BACK_VIEW.equals(tag)) {
SwipeBackLayout.translateInSwipeBack(view, moveEdge, targetOffset);
}
}
if (mSwipeBackgroundView != null) {
SwipeBackLayout.translateInSwipeBack(mSwipeBackgroundView, moveEdge, targetOffset);
}
}
@SuppressLint("PrivateApi")
@Override
public void onSwipeBackBegin(final int dragDirection, final int moveEdge) {
Log.i(TAG, "SwipeListener:onSwipeBackBegin: moveEdge = " + moveEdge);
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(false);
if (provider == null || provider.getFragmentContainerView() == null) {
return;
}
final FragmentContainerView container = provider.getFragmentContainerView();
QMUIKeyboardHelper.hideKeyboard(mBaseView);
onDragStart();
FragmentManager fragmentManager = provider.getContainerFragmentManager();
int backStackCount = fragmentManager.getBackStackEntryCount();
if (backStackCount > 1 && !mFinishActivityIfOnBackPressed) {
Utils.findAndModifyOpInBackStackRecord(fragmentManager, -1, new Utils.OpHandler() {
@Override
public boolean handle(Object op) {
Field cmdField = Utils.getOpCmdField(op);
if (cmdField == null) {
return false;
}
try {
cmdField.setAccessible(true);
int cmd = (int) cmdField.get(op);
if (cmd == 3) {
Field fragmentField = Utils.getOpFragmentField(op);
if (fragmentField != null) {
fragmentField.setAccessible(true);
Object fragmentObject = fragmentField.get(op);
if (fragmentObject instanceof QMUIFragment) {
mModifiedFragment = (QMUIFragment) fragmentObject;
mModifiedFragment.isCreateForSwipeBack = true;
View baseView = mModifiedFragment.onCreateView(LayoutInflater.from(getContext()), container, null);
mModifiedFragment.isCreateForSwipeBack = false;
if (baseView != null) {
addViewInSwipeBack(container, baseView, 0);
handleChildFragmentListWhenSwipeBackStart(mModifiedFragment, baseView);
SwipeBackLayout.translateInSwipeBack(baseView, moveEdge,
Math.abs(backViewInitOffset(baseView.getContext(), dragDirection, moveEdge)));
}
}
}
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return false;
}
@Override
public boolean needReNameTag() {
return false;
}
@Override
public String newTagName() {
return null;
}
});
} else if (getParentFragment() == null) {
Activity currentActivity = getActivity();
if (currentActivity != null) {
ViewGroup decorView = (ViewGroup) currentActivity.getWindow().getDecorView();
Activity prevActivity = QMUISwipeBackActivityManager.getInstance()
.getPenultimateActivity(currentActivity);
if(prevActivity == null){
return;
}
if (decorView.getChildAt(0) instanceof SwipeBackgroundView) {
mSwipeBackgroundView = (SwipeBackgroundView) decorView.getChildAt(0);
} else {
mSwipeBackgroundView = new SwipeBackgroundView(getContext(), forceDisableHardwareAcceleratedForSwipeBackground());
decorView.addView(mSwipeBackgroundView, 0, new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
}
mSwipeBackgroundView.bind(prevActivity, currentActivity, restoreSubWindowWhenDragBack());
SwipeBackLayout.translateInSwipeBack(mSwipeBackgroundView, moveEdge,
Math.abs(backViewInitOffset(decorView.getContext(), dragDirection, moveEdge)));
}
}
}
@Override
public void onScrollOverThreshold() {
Log.i(TAG, "SwipeListener:onEdgeTouch:onScrollOverThreshold");
}
private void addViewInSwipeBack(ViewGroup parent, View child) {
addViewInSwipeBack(parent, child, -1);
}
private void addViewInSwipeBack(ViewGroup parent, View child, int index) {
if (parent != null && child != null) {
child.setTag(R.id.qmui_arch_swipe_layout_in_back, SWIPE_BACK_VIEW);
parent.addView(child, index);
}
}
private void removeViewInSwipeBack(ViewGroup parent, Function<View, Void> onRemove) {
if (parent != null) {
int childCount = parent.getChildCount();
for (int i = childCount - 1; i >= 0; i--) {
View view = parent.getChildAt(i);
Object tag = view.getTag(R.id.qmui_arch_swipe_layout_in_back);
if (SWIPE_BACK_VIEW.equals(tag)) {
if (onRemove != null) {
onRemove.apply(view);
}
view.setTranslationY(0);
view.setTranslationX(0);
parent.removeView(view);
}
}
}
}
private void handleChildFragmentListWhenSwipeBackStart(Fragment parentFragment, View baseView) throws IllegalAccessException {
// handle issue #235
if (baseView instanceof ViewGroup) {
ViewGroup childMainContainer = (ViewGroup) baseView;
FragmentManager childFragmentManager = parentFragment.getChildFragmentManager();
List<Fragment> childFragmentList = childFragmentManager.getFragments();
int childContainerId = 0;
ViewGroup childContainer = null;
for (Fragment fragment : childFragmentList) {
if (fragment instanceof QMUIFragment) {
QMUIFragment qmuiFragment = (QMUIFragment) fragment;
Field containerIdField = null;
try {
containerIdField = Fragment.class.getDeclaredField("mContainerId");
} catch (NoSuchFieldException e) {
continue;
}
containerIdField.setAccessible(true);
int containerId = containerIdField.getInt(qmuiFragment);
if (containerId != 0) {
if (childContainerId != containerId) {
childContainerId = containerId;
childContainer = childMainContainer.findViewById(containerId);
}
if (childContainer != null) {
qmuiFragment.isCreateForSwipeBack = true;
View childView = fragment.onCreateView(
LayoutInflater.from(childContainer.getContext()), childContainer, null);
qmuiFragment.isCreateForSwipeBack = false;
addViewInSwipeBack(childContainer, childView);
handleChildFragmentListWhenSwipeBackStart(fragment, childView);
}
}
}
}
}
}
private void handleSwipeBackCancelOrFinished(ViewGroup container) {
removeViewInSwipeBack(container, new Function<View, Void>() {
@Override
public Void apply(View input) {
if (mModifiedFragment == null) {
return null;
}
if (input instanceof ViewGroup) {
ViewGroup childMainContainer = (ViewGroup) input;
FragmentManager childFragmentManager = mModifiedFragment.getChildFragmentManager();
List<Fragment> childFragmentList = childFragmentManager.getFragments();
int childContainerId = 0;
try {
for (Fragment fragment : childFragmentList) {
if (fragment instanceof QMUIFragment) {
QMUIFragment qmuiFragment = (QMUIFragment) fragment;
Field containerIdField = Fragment.class.getDeclaredField("mContainerId");
containerIdField.setAccessible(true);
int containerId = containerIdField.getInt(qmuiFragment);
if (containerId != 0 && childContainerId != containerId) {
childContainerId = containerId;
ViewGroup childContainer = childMainContainer.findViewById(containerId);
removeViewInSwipeBack(childContainer, null);
}
}
}
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
return null;
}
});
mModifiedFragment = null;
}
};
public boolean isInSwipeBack() {
return mIsInSwipeBack;
}
protected boolean forceDisableHardwareAcceleratedForSwipeBackground(){
return false;
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
SwipeBackLayout swipeBackLayout = newSwipeBackLayout();
if (!isCreateForSwipeBack) {
mBaseView = swipeBackLayout.getContentView();
swipeBackLayout.setTag(R.id.qmui_arch_swipe_layout_in_back, null);
}
swipeBackLayout.setFitsSystemWindows(false);
return swipeBackLayout;
}
private void bubbleBackPressedEvent() {
// disable this and go with FragmentManager's backPressesCallback
// because it will call execPendingActions before popBackStackImmediate
mOnBackPressedCallback.setEnabled(false);
mOnBackPressedDispatcher.onBackPressed();
mOnBackPressedCallback.setEnabled(true);
}
protected final void onNormalBackPressed() {
runSideEffectOnNormalBackPressed();
if (getParentFragment() != null) {
bubbleBackPressedEvent();
return;
}
FragmentActivity activity = requireActivity();
if (activity instanceof QMUIFragmentContainerProvider) {
QMUIFragmentContainerProvider provider = (QMUIFragmentContainerProvider) activity;
if ((provider.getContainerFragmentManager().getBackStackEntryCount() > 1 && !mFinishActivityIfOnBackPressed) || provider.getContainerFragmentManager().getPrimaryNavigationFragment() == this) {
bubbleBackPressedEvent();
} else {
QMUIFragment.TransitionConfig transitionConfig = onFetchTransitionConfig();
if (needInterceptLastFragmentFinish()) {
if(!sPopBackWhenSwipeFinished){
activity.finishAfterTransition();
}else{
activity.finish();
}
activity.overridePendingTransition(transitionConfig.popenterAnimation, transitionConfig.popoutAnimation);
return;
}
Object toExec = onLastFragmentFinish();
if (toExec != null) {
if (toExec instanceof QMUIFragment) {
QMUIFragment fragment = (QMUIFragment) toExec;
startFragmentAndDestroyCurrent(fragment, false);
} else if (toExec instanceof Intent) {
Intent intent = (Intent) toExec;
startActivity(intent);
activity.overridePendingTransition(transitionConfig.popenterAnimation, transitionConfig.popoutAnimation);
activity.finish();
} else {
onHandleSpecLastFragmentFinish(activity, transitionConfig, toExec);
}
} else {
if(!sPopBackWhenSwipeFinished){
activity.finishAfterTransition();
}else{
activity.finish();
}
activity.overridePendingTransition(transitionConfig.popenterAnimation, transitionConfig.popoutAnimation);
}
}
} else {
bubbleBackPressedEvent();
}
}
protected void runSideEffectOnNormalBackPressed() {
}
protected void onBackPressed() {
onNormalBackPressed();
}
protected void reportFrequentlyRequestLayout(int count, long duration){
QMUILog.w(TAG, "requestLayout is too frequent(requestLayout " + count + "times within " + duration + "ms");
}
protected void onHandleSpecLastFragmentFinish(FragmentActivity fragmentActivity,
QMUIFragment.TransitionConfig transitionConfig,
Object toExec) {
fragmentActivity.finish();
fragmentActivity.overridePendingTransition(transitionConfig.popenterAnimation, transitionConfig.popoutAnimation);
}
/**
* pop back
*/
protected void popBackStack() {
if (mOnBackPressedDispatcher != null) {
mOnBackPressedDispatcher.onBackPressed();
}
}
/**
* pop back to a clazz type fragment
* <p>
* Assuming there is a back stack: Home -> List -> Detail. Perform popBackStack(Home.class),
* Home is the current fragment
* <p>
* if the clazz type fragment doest not exist in back stack, this method is Equivalent
* to popBackStack()
*
* @param cls the type of target fragment
*/
protected void popBackStack(Class<? extends QMUIFragment> cls) {
if (checkPopBack()) {
getParentFragmentManager().popBackStack(cls.getSimpleName(), 0);
}
}
/**
* pop back to a non-class type Fragment
*
* @param cls the target fragment class type
*/
protected void popBackStackInclusive(Class<? extends QMUIFragment> cls) {
if (checkPopBack()) {
getParentFragmentManager().popBackStack(cls.getSimpleName(), FragmentManager.POP_BACK_STACK_INCLUSIVE);
}
}
private boolean checkPopBack() {
if (!isResumed() || mEnterAnimationStatus != ANIMATION_ENTER_STATUS_END) {
return false;
}
return checkStateLoss("popBackStack");
}
protected void popBackStackAfterResume() {
if (isResumed() && mEnterAnimationStatus == ANIMATION_ENTER_STATUS_END) {
popBackStack();
} else {
runAfterAnimation(new Runnable() {
@Override
public void run() {
if (isResumed()) {
popBackStack();
} else {
runAfterResumed(new Runnable() {
@Override
public void run() {
popBackStack();
}
});
}
}
}, true);
}
}
private boolean checkStateLoss(String logName) {
if (!isAdded()) {
return false;
}
FragmentManager fragmentManager = getParentFragmentManager();
if (fragmentManager.isStateSaved()) {
QMUILog.d(TAG, logName + " can not be invoked after onSaveInstanceState");
return false;
}
return true;
}
@Nullable
@Override
public final Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
return null;
}
@Nullable
@Override
public Animator onCreateAnimator(int transit, boolean enter, int nextAnim) {
if(enter && nextAnim != 0){
Animator animator = AnimatorInflater.loadAnimator(getContext(), nextAnim);
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
checkAndCallOnEnterAnimationStart(animation);
}
@Override
public void onAnimationEnd(Animator animation) {
checkAndCallOnEnterAnimationEnd(animation);
}
});
return animator;
}
return super.onCreateAnimator(transit, enter, nextAnim);
}
private void checkAndCallOnEnterAnimationStart(@Nullable Animator animation) {
mCalled = false;
onEnterAnimationStart(animation);
if (!mCalled) {
throw new RuntimeException(getClass().getSimpleName() + " did not call through to super.onEnterAnimationStart(Animation)");
}
}
private void checkAndCallOnEnterAnimationEnd(@Nullable Animator animation) {
mCalled = false;
onEnterAnimationEnd(animation);
if (!mCalled) {
throw new RuntimeException(getClass().getSimpleName() + " did not call through to super.onEnterAnimationEnd(Animation)");
}
}
/**
* onCreateView
*/
protected abstract View onCreateView();
/**
* Corresponding to {@link #onCreateView()}, it called only when new UI (not cached UI)
* is created by {@link #onCreateView()}.
* It may be used to bind views to fragment and dynamically create child views such as
* {@link QMUITopBar#addLeftBackImageButton()}
*
* @param rootView the view created by {@link #onCreateView()}
*/
protected void onViewCreated(@NonNull View rootView) {
}
/**
* Will be performed in onStart
*
* @param requestCode request code
* @param resultCode result code
* @param data extra data
*
* @deprecated use {@link #registerEffect} for a replacement
*/
@Deprecated
protected void onFragmentResult(int requestCode, int resultCode, Intent data) {
}
/**
* disable or enable drag back
*
* @return if true open dragBack, otherwise close dragBack
* @deprecated Use {@link #getDragDirection(SwipeBackLayout, SwipeBackLayout.ViewMoveAction, float, float, float, float, float)}
*/
@Deprecated
protected boolean canDragBack() {
return true;
}
/**
* disable or enable drag back
* @param context context
* @param dragDirection gesture direction
* @param moveEdge view move edge
* @return if true open dragBack, otherwise close dragBack
*
* @deprecated Use {@link #getDragDirection(SwipeBackLayout, SwipeBackLayout.ViewMoveAction, float, float, float, float, float)}
*/
@Deprecated
protected boolean canDragBack(Context context, int dragDirection, int moveEdge) {
return canDragBack();
}
/**
* @return the init offset for backView for Parallax scrolling
* @deprecated Use {@link #backViewInitOffset(Context, int, int)}
*/
@Deprecated
protected int backViewInitOffset() {
return 0;
}
protected int backViewInitOffset(Context context, int dragDirection, int moveEdge) {
return backViewInitOffset();
}
/**
* called when drag back started.
*/
protected void onDragStart() {
}
/**
* @return
* @deprecated Use {@link #dragBackDirection()}
*/
@Deprecated
protected int dragBackEdge() {
return EDGE_LEFT;
}
/**
*
* @return
* @deprecated Use {@link #getDragDirection(SwipeBackLayout, SwipeBackLayout.ViewMoveAction, float, float, float, float, float)}
*/
@Deprecated
protected int dragBackDirection() {
int oldEdge = dragBackEdge();
if (oldEdge == EDGE_RIGHT) {
return SwipeBackLayout.DRAG_DIRECTION_RIGHT_TO_LEFT;
} else if (oldEdge == EDGE_TOP) {
return SwipeBackLayout.DRAG_DIRECTION_TOP_TO_BOTTOM;
} else if (oldEdge == EDGE_BOTTOM) {
return SwipeBackLayout.DRAG_DIRECTION_BOTTOM_TO_TOP;
}
return SwipeBackLayout.DRAG_DIRECTION_LEFT_TO_RIGHT;
}
protected SwipeBackLayout.ViewMoveAction dragViewMoveAction() {
return SwipeBackLayout.MOVE_VIEW_AUTO;
}
protected boolean canHandleSwipeBack(){
mCalled = true;
// 1. can not swipe back if enter animation is not finished
if (mEnterAnimationStatus != ANIMATION_ENTER_STATUS_END) {
return false;
}
Activity activity = getActivity();
if(activity == null || activity.isFinishing()){
return false;
}
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(false);
if (provider == null) {
return false;
}
FragmentManager fragmentManager = provider.getContainerFragmentManager();
// 3. is not managed by QMUIFragmentContainerProvider
if (fragmentManager == null || fragmentManager != getParentFragmentManager()) {
return false;
}
// 4. should handle by child
if(provider.isChildHandlePopBackRequested()){
return false;
}
// 5. can not swipe back if the view is null
View view = getView();
if (view == null) {
return false;
}
// 6. can not swipe back if the backStack entry count is less than 2
if ((fragmentManager.getBackStackEntryCount() <= 1 || mFinishActivityIfOnBackPressed) &&
!QMUISwipeBackActivityManager.getInstance().canSwipeBack(activity)) {
return false;
}
return true;
}
public void setFinishActivityIfOnBackPressed(boolean finishActivityIfOnBackPressed) {
mFinishActivityIfOnBackPressed = finishActivityIfOnBackPressed;
}
protected int getDragDirection(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull SwipeBackLayout.ViewMoveAction viewMoveAction,
float downX, float downY, float dx, float dy, float slopTouch) {
int targetDirection = dragBackDirection();
if (!canDragBack(swipeBackLayout.getContext(), targetDirection, viewMoveAction.getEdge(targetDirection))) {
return DRAG_DIRECTION_NONE;
}
int edgeSize = QMUIDisplayHelper.dp2px(swipeBackLayout.getContext(), 20);
if (targetDirection == DRAG_DIRECTION_LEFT_TO_RIGHT) {
if (downX < edgeSize && dx >= slopTouch) {
return targetDirection;
}
} else if (targetDirection == DRAG_DIRECTION_RIGHT_TO_LEFT) {
if (downX > swipeBackLayout.getWidth() - edgeSize && -dx >= slopTouch) {
return targetDirection;
}
} else if (targetDirection == DRAG_DIRECTION_TOP_TO_BOTTOM) {
if (downY < edgeSize && dy >= slopTouch) {
return targetDirection;
}
} else if (targetDirection == DRAG_DIRECTION_BOTTOM_TO_TOP) {
if (downY > swipeBackLayout.getHeight() - edgeSize && -dy >= slopTouch) {
return targetDirection;
}
}
return DRAG_DIRECTION_NONE;
}
/**
* the action will be performed before the start of the enter animation start or after the
* enter animation is finished
*
* @param runnable the action to perform
*/
public void runAfterAnimation(Runnable runnable) {
runAfterAnimation(runnable, false);
}
/**
* When data is rendered duration the transition animation, it will cause a choppy. this method
* will promise the data is rendered before or after transition animation
*
* @param runnable the action to perform
* @param onlyEnd if true, the action is only performed after the enter animation is finished,
* otherwise it can be performed before the start of the enter animation start
* or after the enter animation is finished.
*/
public void runAfterAnimation(Runnable runnable, boolean onlyEnd) {
Utils.assertInMainThread();
boolean ok = onlyEnd ? mEnterAnimationStatus == ANIMATION_ENTER_STATUS_END :
mEnterAnimationStatus != ANIMATION_ENTER_STATUS_STARTED;
if (ok) {
runnable.run();
} else {
if (mDelayRenderRunnableList == null) {
mDelayRenderRunnableList = new ArrayList<>(4);
}
mDelayRenderRunnableList.add(runnable);
}
}
/**
* some action, such as {@link #popBackStack()}, can not't invoked duration fragment-lifecycle,
* then we can call this method to ensure these actions is invoked after resumed.
* one use case is to call {@link #popBackStackAfterResume()} in {@link #onFragmentResult(int, int, Intent)}
*
* @param runnable
*/
public void runAfterResumed(Runnable runnable) {
Utils.assertInMainThread();
if (isResumed()) {
runnable.run();
} else {
if (mPostResumeRunnableList == null) {
mPostResumeRunnableList = new ArrayList<>(4);
}
mPostResumeRunnableList.add(runnable);
}
}
/**
* may not be call.
* @param animation
*/
protected void onEnterAnimationStart(@Nullable Animator animation) {
if (mCalled) {
throw new IllegalAccessError("don't call #onEnterAnimationStart() directly");
}
mCalled = true;
mEnterAnimationStatus = ANIMATION_ENTER_STATUS_STARTED;
isInEnterAnimationLiveData.setValue(true);
}
/**
* may not be call.
* @param animation
*/
protected void onEnterAnimationEnd(@Nullable Animator animation) {
if (mCalled) {
throw new IllegalAccessError("don't call #onEnterAnimationEnd() directly");
}
mCalled = true;
mEnterAnimationStatus = ANIMATION_ENTER_STATUS_END;
isInEnterAnimationLiveData.setValue(false);
notifyDelayRenderRunnableList();
}
private void notifyDelayRenderRunnableList(){
if (mDelayRenderRunnableList != null) {
ArrayList<Runnable> list = mDelayRenderRunnableList;
mDelayRenderRunnableList = null;
if (!list.isEmpty()) {
for (Runnable runnable : list) {
runnable.run();
}
}
}
}
public LiveData<Boolean> getIsInEnterAnimationLiveData() {
return isInEnterAnimationLiveData;
}
protected <T> LiveData<T> enterAnimationAvoidTransform(final LiveData<T> origin){
return enterAnimationAvoidTransform(origin, isInEnterAnimationLiveData);
}
protected <T> LiveData<T> enterAnimationAvoidTransform(final LiveData<T> origin, LiveData<Boolean> enterAnimationLiveData){
final MediatorLiveData<T> result = new MediatorLiveData<T>();
result.addSource(enterAnimationLiveData, new Observer<Boolean>(){
boolean isAdded = false;
@Override
public void onChanged(Boolean isInEnterAnimation) {
if(isInEnterAnimation){
isAdded = false;
result.removeSource(origin);
}else {
if(!isAdded){
isAdded = true;
result.addSource(origin, new Observer<T>() {
@Override
public void onChanged(T t) {
result.setValue(t);
}
});
}
}
}
});
return result;
}
@Override
public void onDestroy() {
super.onDestroy();
if (mSwipeBackgroundView != null) {
mSwipeBackgroundView.unBind();
mSwipeBackgroundView = null;
}
// help gc, sometimes user may hold fragment instance in somewhere,
// then these objects can not be released in time.
mCacheRootView = null;
mDelayRenderRunnableList = null;
mCheckPostResumeRunnable = null;
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
return false;
}
public boolean onKeyUp(int keyCode, KeyEvent event) {
return false;
}
@WindowInsetsCompat.Type.InsetsType
public int getRootViewInsetsType() {
return getParentFragment() == null ? WindowInsetsCompat.Type.ime() : 0;
}
@Override
public void refreshFromScheme(@Nullable Bundle bundle) {
}
/**
* When finishing to pop back last fragment, let activity have a chance to do something
* like start a new fragment
*
* @return QMUIFragment to start a new fragment or Intent to start a new Activity
*/
@SuppressWarnings("SameReturnValue")
public Object onLastFragmentFinish() {
return null;
}
/**
* if intercepted, onLastFragmentFinish will not be invoked.
* @return
*/
protected boolean needInterceptLastFragmentFinish(){
Activity activity = getActivity();
return activity == null || !activity.isTaskRoot();
}
/**
* restore sub window(e.g dialog) when drag back to previous activity
*
* @return
*/
protected boolean restoreSubWindowWhenDragBack() {
return true;
}
public final boolean isStartedByScheme() {
Bundle arguments = getArguments();
return arguments != null && arguments.getBoolean(QMUISchemeHandler.ARG_FROM_SCHEME, false);
}
/**
* Fragment Transition Controller
*/
public TransitionConfig onFetchTransitionConfig() {
return SLIDE_TRANSITION_CONFIG;
}
public static final class TransitionConfig {
public final int enter;
public final int exit;
public final int popenter;
public final int popout;
public final int popenterAnimation;
public final int popoutAnimation;
public TransitionConfig(
int enter, int exit,
int popenter, int popout,
int popenterAnimation, int popoutAnimation
) {
this.enter = enter;
this.exit = exit;
this.popenter = popenter;
this.popout = popout;
// only use for pop activity if only one fragment exist.
this.popenterAnimation = popenterAnimation;
this.popoutAnimation = popoutAnimation;
}
}
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragmentActivity.java
================================================
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qmuiteam.qmui.arch;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentContainerView;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.ViewModelStoreOwner;
import com.qmuiteam.qmui.QMUILog;
import com.qmuiteam.qmui.arch.annotation.DefaultFirstFragment;
import com.qmuiteam.qmui.util.QMUIStatusBarHelper;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* the container activity for {@link QMUIFragment}.
* Created by cgspine on 15/9/14.
*/
public abstract class QMUIFragmentActivity extends InnerBaseActivity implements QMUIFragmentContainerProvider {
public static final String QMUI_INTENT_DST_FRAGMENT_NAME = "qmui_intent_dst_fragment_name";
public static final String QMUI_INTENT_FRAGMENT_ARG = "qmui_intent_fragment_arg";
public static final String QMUI_INTENT_FRAGMENT_LIST_ARG = "qmui_intent_fragment_list_arg";
public static final String QMUI_MUTI_START_INDEX = "qmui_muti_start_index";
private static final String TAG = "QMUIFragmentActivity";
private RootView mRootView;
private FragmentAutoInitResult mFragmentAutoInitResult = FragmentAutoInitResult.unHandled;
private boolean isChildHandlePopBackRequested = false;
@Override
public int getContextViewId() {
return R.id.qmui_activity_fragment_container_id;
}
@Override
public FragmentManager getContainerFragmentManager() {
return getSupportFragmentManager();
}
public RootView getRootView() {
return mRootView;
}
@Override
@SuppressWarnings("unchecked")
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
performTranslucent();
mRootView = onCreateRootView(getContextViewId());
setContentView(mRootView);
if (savedInstanceState == null) {
long start = System.currentTimeMillis();
Intent intent = getIntent();
// 1. handle muti fragments
mFragmentAutoInitResult = instantiationMutiFragment(intent);
if (mFragmentAutoInitResult == FragmentAutoInitResult.unHandled) {
try {
Class<? extends QMUIFragment> firstFragmentClass = null;
// 2. try get first fragment from fragment class name
String fragmentClassName = intent.getStringExtra(QMUI_INTENT_DST_FRAGMENT_NAME);
if (fragmentClassName != null && !fragmentClassName.isEmpty()) {
firstFragmentClass = (Class<? extends QMUIFragment>) Class.forName(fragmentClassName);
}
// 3. try get fragment from annotation @DefaultFirstFragment
if (firstFragmentClass == null) {
firstFragmentClass = getDefaultFirstFragment();
}
if (firstFragmentClass != null) {
QMUIFragment firstFragment = instantiationFragment(firstFragmentClass, intent.getBundleExtra(QMUI_INTENT_FRAGMENT_ARG));
if (firstFragment != null) {
getSupportFragmentManager()
.beginTransaction()
.add(getContextViewId(), firstFragment, firstFragment.getClass().getSimpleName())
.addToBackStack(firstFragment.getClass().getSimpleName())
.commit();
mFragmentAutoInitResult = FragmentAutoInitResult.success;
}
}
} catch (Exception e) {
QMUILog.d(TAG, "fragment auto inited: " + e.getMessage());
mFragmentAutoInitResult = FragmentAutoInitResult.failed;
}
}
Log.i(TAG, "the time it takes to inject first fragment from annotation is " + (System.currentTimeMillis() - start));
}
}
protected FragmentAutoInitResult instantiationMutiFragment(Intent intent) {
List<Bundle> fragmentBundles = intent.getParcelableArrayListExtra(QMUI_INTENT_FRAGMENT_LIST_ARG);
if (fragmentBundles != null && fragmentBundles.size() > 0) {
List<QMUIFragment> fragments = new ArrayList<>(fragmentBundles.size());
for (Bundle bundle : fragmentBundles) {
String fragmentClassName = bundle.getString(QMUI_INTENT_DST_FRAGMENT_NAME);
try {
Class<? extends QMUIFragment> cls = (Class<? extends QMUIFragment>) Class.forName(fragmentClassName);
QMUIFragment fragment = instantiationFragment(cls, bundle.getBundle(QMUI_INTENT_FRAGMENT_ARG));
if (fragment == null) {
return FragmentAutoInitResult.failed;
}
fragments.add(fragment);
} catch (ClassNotFoundException e) {
QMUILog.d(TAG, "Can not find " + fragmentClassName);
}
}
if (fragments.size() > 0) {
initMutiFragment(fragments);
return FragmentAutoInitResult.success;
}
}
return FragmentAutoInitResult.unHandled;
}
protected boolean initMutiFragment(QMUIFragment... fragments) {
List<QMUIFragment> list = new ArrayList<>(fragments.length);
Collections.addAll(list, fragments);
return initMutiFragment(list);
}
protected boolean initMutiFragment(List<QMUIFragment> fragments) {
if (fragments.size() == 0) {
return false;
}
boolean disableSwipeBack = getIntent().getIntExtra(QMUIFragmentActivity.QMUI_MUTI_START_INDEX, 0) > 0;
if (fragments.size() == 1) {
QMUIFragment fragment = fragments.get(0);
if (disableSwipeBack) {
fragment.mDisableSwipeBackByMutiStarted = true;
}
String tagName = fragment.getClass().getSimpleName();
getSupportFragmentManager()
.beginTransaction()
.add(getContextViewId(), fragment, tagName)
.addToBackStack(tagName)
.commit();
return true;
}
ArrayList<FragmentTransaction> transactions = new ArrayList<>();
FragmentManager fragmentManager = getSupportFragmentManager();
for (int i = 0; i < fragments.size(); i++) {
QMUIFragment fragment = fragments.get(i);
if (disableSwipeBack) {
fragment.mDisableSwipeBackByMutiStarted = true;
}
disableSwipeBack = true;
FragmentTransaction transaction = fragmentManager.beginTransaction();
fragment.mDisableSwipeBackByMutiStarted = true;
String tagName = fragment.getClass().getSimpleName();
if (i == 0) {
transaction.add(getContextViewId(), fragment, tagName);
} else {
QMUIFragment.TransitionConfig transitionConfig = fragment.onFetchTransitionConfig();
transaction.setCustomAnimations(0, 0, transitionConfig.popenter, transitionConfig.popout);
transaction.replace(getContextViewId(), fragment, tagName);
}
transaction.addToBackStack(tagName);
transaction.setReorderingAllowed(true);
transactions.add(transaction);
}
for (FragmentTransaction transaction : transactions) {
transaction.commit();
}
return true;
}
protected void performTranslucent() {
QMUIStatusBarHelper.translucent(this);
}
/**
* used for subclasses to see if the parent class initializes the first fragment。
* it must be called after super.onCreate in subclasses.
*
* @return true if first fragment is initialized.
*/
protected FragmentAutoInitResult isFragmentAutoInitResult() {
return mFragmentAutoInitResult;
}
protected void setFragmentAutoInitResult(FragmentAutoInitResult fragmentAutoInitResult) {
mFragmentAutoInitResult = fragmentAutoInitResult;
}
protected Class<? extends QMUIFragment> getDefaultFirstFragment() {
Class<?> cls = getClass();
while (cls != null && cls != QMUIFragmentActivity.class && QMUIFragmentActivity.class.isAssignableFrom(cls)) {
if (cls.isAnnotationPresent(DefaultFirstFragment.class)) {
DefaultFirstFragment defaultFirstFragment = cls.getAnnotation(DefaultFirstFragment.class);
if (defaultFirstFragment != null) {
return defaultFirstFragment.value();
}
}
cls = cls.getSuperclass();
}
return null;
}
protected QMUIFragment instantiationFragment(Class<? extends QMUIFragment> cls, Bundle args) {
try {
QMUIFragment fragment = cls.newInstance();
if (args != null) {
fragment.setArguments(args);
}
return fragment;
} catch (IllegalAccessException e) {
QMUILog.d(TAG, "Can not access " + cls.getName() + " for first fragment");
} catch (InstantiationException e) {
QMUILog.d(TAG, "Can not instance " + cls.getName() + " for first fragment");
}
return null;
}
@Override
public FragmentContainerView getFragmentContainerView() {
return mRootView.getFragmentContainerView();
}
@Override
public ViewModelStoreOwner getContainerViewModelStoreOwner() {
return this;
}
@Override
public void requestForHandlePopBack(boolean toHandle) {
isChildHandlePopBackRequested = toHandle;
}
@Override
public boolean isChildHandlePopBackRequested() {
return isChildHandlePopBackRequested;
}
protected RootView onCreateRootView(int fragmentContainerId) {
return new DefaultRootView(this, fragmentContainerId);
}
/**
* get the current Fragment.
*/
@Nullable
public Fragment getCurrentFragment() {
return getSupportFragmentManager().findFragmentById(getContextViewId());
}
@Nullable
private QMUIFragment getCurrentQMUIFragment() {
Fragment current = getCurrentFragment();
if (current instanceof QMUIFragment) {
return (QMUIFragment) current;
}
return null;
}
/**
* start a new fragment and then destroy current fragment.
* assume there is a fragment stack(A->B->C), and you use this method to start a new
* fragment D and destroy fragment C. Now you are in fragment D, if you want call
* {@link #popBackStack()} to back to B, what the animation should be? Sometimes we hope run
* animation generated by transition B->C, but sometimes we hope run animation generated by
* transition C->D. this why second parameter exists.
*
* @param fragment new fragment to start
* @param useNewTransitionConfigWhenPop if true, use animation generated by transition C->D,
* else, use animation generated by transition B->C
*/
public int startFragmentAndDestroyCurrent(QMUIFragment fragment, final boolean useNewTransitionConfigWhenPop) {
FragmentManager fragmentManager = getSupportFragmentManager();
if (fragmentManager.isDestroyed()) {
return -1;
}
if (fragmentManager.isStateSaved()) {
QMUILog.d(TAG, "startFragment can not be invoked after onSaveInstanceState");
return -1;
}
QMUIFragment.TransitionConfig transitionConfig = fragment.onFetchTransitionConfig();
String tagName = fragment.getClass().getSimpleName();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction()
.setCustomAnimations(transitionConfig.enter, transitionConfig.exit,
transitionConfig.popenter, transitionConfig.popout)
.setPrimaryNavigationFragment(null)
.replace(getContextViewId(), fragment, tagName);
int index = transaction.commit();
Utils.modifyOpForStartFragmentAndDestroyCurrent(fragmentManager, fragment, useNewTransitionConfigWhenPop, transitionConfig);
return index;
}
/**
*
* @param fragment target fragment to start
* @return commit id
*
*/
public int startFragment(QMUIFragment fragment) {
Log.i(TAG, "startFragment");
FragmentManager fragmentManager = getSupportFragmentManager();
if (fragmentManager.isDestroyed()) {
return -1;
}
if (fragmentManager.isStateSaved()) {
QMUILog.d(TAG, "startFragment can not be invoked after onSaveInstanceState");
return -1;
}
QMUIFragment.TransitionConfig transitionConfig = fragment.onFetchTransitionConfig();
String tagName = fragment.getClass().getSimpleName();
return fragmentManager.beginTransaction()
.setCustomAnimations(transitionConfig.enter, transitionConfig.exit, transitionConfig.popenter, transitionConfig.popout)
.replace(getContextViewId(), fragment, tagName)
.setPrimaryNavigationFragment(null)
.addToBackStack(tagName)
.commit();
}
public int startFragments(List<QMUIFragment> fragments) {
Log.i(TAG, "startFragment");
FragmentManager fragmentManager = getSupportFragmentManager();
if (fragmentManager.isDestroyed()) {
return -1;
}
if (fragmentManager.isStateSaved()) {
QMUILog.d(TAG, "startFragment can not be invoked after onSaveInstanceState");
return -1;
}
if (fragments.size() == 0) {
return -1;
}
ArrayList<FragmentTransaction> transactions = new ArrayList<>();
QMUIFragment.TransitionConfig lastTransitionConfig = fragments.get(fragments.size() - 1).onFetchTransitionConfig();
for (QMUIFragment fragment : fragments) {
FragmentTransaction transaction = fragmentManager.beginTransaction().setPrimaryNavigationFragment(null);
QMUIFragment.TransitionConfig transitionConfig = fragment.onFetchTransitionConfig();
fragment.mDisableSwipeBackByMutiStarted = true;
String tagName = fragment.getClass().getSimpleName();
transaction.setCustomAnimations(transitionConfig.enter, lastTransitionConfig.exit, transitionConfig.popenter, transitionConfig.popout);
transaction.replace(getContextViewId(), fragment, tagName);
transaction.addToBackStack(tagName);
transactions.add(transaction);
transaction.setReorderingAllowed(true);
}
for (FragmentTransaction transaction : transactions) {
transaction.commit();
}
return 0;
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
QMUIFragment fragment = getCurrentQMUIFragment();
if (fragment != null && !fragment.isInSwipeBack() && fragment.onKeyDown(keyCode, event)) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
QMUIFragment fragment = getCurrentQMUIFragment();
if (fragment != null && !fragment.isInSwipeBack() && fragment.onKeyUp(keyCode, event)) {
return true;
}
return super.onKeyUp(keyCode, event);
}
public void popBackStack() {
getOnBackPressedDispatcher().onBackPressed();
}
public static Intent intentOf(@NonNull Context context,
@NonNull Class<? extends QMUIFragmentActivity> targetActivity,
@NonNull Class<? extends QMUIFragment> firstFragment) {
return intentOf(context, targetActivity, firstFragment, null);
}
/**
* create a intent for a new QMUIFragmentActivity
*
* @param context Generally it is activity
* @param targetActivity target activity class
* @param firstFragment first fragment in target activity
* @param fragmentArgs args for first fragment
* @return
*/
public static Intent intentOf(@NonNull Context context,
@NonNull Class<? extends QMUIFragmentActivity> targetActivity,
@NonNull Class<? extends QMUIFragment> firstFragment,
@Nullable Bundle fragmentArgs) {
Intent intent = new Intent(context, targetActivity);
intent.putExtra(QMUI_INTENT_DST_FRAGMENT_NAME, firstFragment.getName());
if (fragmentArgs != null) {
intent.putExtra(QMUI_INTENT_FRAGMENT_ARG, fragmentArgs);
}
return intent;
}
public static Intent intentOf(@NonNull Context context,
@NonNull Class<? extends QMUIFragmentActivity> targetActivity,
@NonNull String firstFragmentClassName,
@Nullable Bundle fragmentArgs) {
Intent intent = new Intent(context, targetActivity);
intent.putExtra(QMUI_INTENT_DST_FRAGMENT_NAME, firstFragmentClassName);
if (fragmentArgs != null) {
intent.putExtra(QMUI_INTENT_FRAGMENT_ARG, fragmentArgs);
}
return intent;
}
public static abstract class RootView extends FrameLayout {
public RootView(Context context, int fragmentContainerId) {
super(context);
setId(R.id.qmui_activity_root_id);
}
public abstract FragmentContainerView getFragmentContainerView();
}
@Override
public void onBackPressed() {
try {
super.onBackPressed();
} catch (Exception ignore) {
// 1. Under Android O, Activity#onBackPressed doesn't check FragmentManager's save state.
// 2. IndexOutOfBoundsException caused by ViewGroup#removeView(View) in EmotionUI.
}
}
@SuppressLint("ViewConstructor")
public static class DefaultRootView extends RootView {
private FragmentContainerView mFragmentContainerView;
public DefaultRootView(Context context, int fragmentContainerId) {
super(context, fragmentContainerId);
mFragmentContainerView = new FragmentContainerView(context);
mFragmentContainerView.setId(fragmentContainerId);
addView(mFragmentContainerView, new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
}
@Override
public FragmentContainerView getFragmentContainerView() {
return mFragmentContainerView;
}
}
public enum FragmentAutoInitResult {success, failed, unHandled}
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragmentContainerProvider.java
================================================
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qmuiteam.qmui.arch;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentContainerView;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.ViewModelStoreOwner;
public interface QMUIFragmentContainerProvider {
int getContextViewId();
FragmentManager getContainerFragmentManager();
@Nullable
FragmentContainerView getFragmentContainerView();
ViewModelStoreOwner getContainerViewModelStoreOwner();
void requestForHandlePopBack(boolean toHandle);
boolean isChildHandlePopBackRequested();
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragmentPagerAdapter.java
================================================
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qmuiteam.qmui.arch;
import android.annotation.SuppressLint;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Lifecycle;
import com.qmuiteam.qmui.widget.QMUIPagerAdapter;
public abstract class QMUIFragmentPagerAdapter extends QMUIPagerAdapter {
private final FragmentManager mFragmentManager;
private FragmentTransaction mCurrentTransaction;
private Fragment mCurrentPrimaryItem = null;
public QMUIFragmentPagerAdapter(@NonNull FragmentManager fm) {
mFragmentManager = fm;
}
public abstract QMUIFragment createFragment(int position);
@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
return view == ((Fragment) object).getView();
}
@SuppressLint("CommitTransaction")
@Override
@NonNull
protected Object hydrate(@NonNull ViewGroup container, int position) {
String name = makeFragmentName(container.getId(), position);
if (mCurrentTransaction == null) {
mCurrentTransaction = mFragmentManager.beginTransaction();
}
Fragment fragment = mFragmentManager.findFragmentByTag(name);
if (fragment != null) {
return fragment;
}
return createFragment(position);
}
@SuppressLint("CommitTransaction")
@Override
protected void populate(@NonNull ViewGroup container, @NonNull Object item, int position) {
String name = makeFragmentName(container.getId(), position);
if (mCurrentTransaction == null) {
mCurrentTransaction = mFragmentManager.beginTransaction();
}
Fragment fragment = mFragmentManager.findFragmentByTag(name);
if (fragment != null) {
mCurrentTransaction.attach(fragment);
if (fragment.getView() != null && fragment.getView().getWidth() == 0) {
fragment.getView().requestLayout();
}
} else {
fragment = (Fragment) item;
mCurrentTransaction.add(container.getId(), fragment, name);
}
if (fragment != mCurrentPrimaryItem) {
fragment.setMenuVisibility(false);
mCurrentTransaction.setMaxLifecycle(fragment, Lifecycle.State.STARTED);
}
}
@SuppressLint("CommitTransaction")
@Override
protected void destroy(@NonNull ViewGroup container, int position, @NonNull Object object) {
Fragment fragment = (Fragment) object;
if (mCurrentTransaction == null) {
mCurrentTransaction = mFragmentManager.beginTransaction();
}
mCurrentTransaction.detach(fragment);
if (fragment == mCurrentPrimaryItem) {
mCurrentPrimaryItem = null;
}
}
@Override
public void startUpdate(@NonNull ViewGroup container) {
if (container.getId() == View.NO_ID) {
throw new IllegalStateException("ViewPager with adapter " + this
+ " requires a view id");
}
}
@Override
public void finishUpdate(@NonNull ViewGroup container) {
if (mCurrentTransaction != null) {
mCurrentTransaction.commitNowAllowingStateLoss();
mCurrentTransaction = null;
}
}
@Override
public void setPrimaryItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
Fragment fragment = (Fragment) object;
if (fragment != mCurrentPrimaryItem) {
if (mCurrentPrimaryItem != null) {
mCurrentPrimaryItem.setMenuVisibility(false);
if (mCurrentTransaction == null) {
mCurrentTransaction = mFragmentManager.beginTransaction();
}
mCurrentTransaction.setMaxLifecycle(mCurrentPrimaryItem, Lifecycle.State.STARTED);
}
fragment.setMenuVisibility(true);
if (mCurrentTransaction == null) {
mCurrentTransaction = mFragmentManager.beginTransaction();
}
mCurrentTransaction.setMaxLifecycle(fragment, Lifecycle.State.RESUMED);
mCurrentPrimaryItem = fragment;
}
}
private String makeFragmentName(int viewId, long id) {
return "QMUIFragmentPagerAdapter:" + viewId + ":" + id;
}
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUILatestVisit.java
================================================
package com.qmuiteam.qmui.arch;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import androidx.annotation.MainThread;
import androidx.fragment.app.Fragment;
import com.qmuiteam.qmui.QMUILog;
import com.qmuiteam.qmui.arch.record.DefaultLatestVisitStorage;
import com.qmuiteam.qmui.arch.record.QMUILatestVisitStorage;
import com.qmuiteam.qmui.arch.record.RecordArgumentEditor;
import com.qmuiteam.qmui.arch.record.RecordArgumentEditorImpl;
import com.qmuiteam.qmui.arch.record.RecordIdClassMap;
import java.util.Map;
public class QMUILatestVisit {
private static final String TAG = "QMUILatestVisit";
private static String NAV_STORE_PREFIX = "_qmui_nav";
private static String NAV_STORE_FRAGMENT_SUFFIX = ".class";
private static QMUILatestVisit sInstance;
private QMUILatestVisitStorage mStorage;
private Context mContext;
private RecordIdClassMap mRecordMap;
private RecordArgumentEditor mRecordArgumentEditor;
private RecordArgumentEditor mNavRecordArgumentEditor;
private QMUILatestVisit(Context context) {
mContext = context.getApplicationContext();
mRecordArgumentEditor = new RecordArgumentEditorImpl();
mNavRecordArgumentEditor = new RecordArgumentEditorImpl();
try {
Class<?> cls = Class.forName(RecordIdClassMap.class.getCanonicalName() + "Impl");
mRecordMap = (RecordIdClassMap) cls.newInstance();
} catch (ClassNotFoundException e) {
mRecordMap = new RecordIdClassMap() {
@Override
public Class<?> getRecordClassById(int id) {
return null;
}
@Override
public int getIdByRecordClass(Class<?> clazz) {
return QMUILatestVisitStorage.NOT_EXIST;
}
};
} catch (IllegalAccessException e) {
throw new RuntimeException("Can not access the Class RecordMetaMapImpl. " +
"Please file a issue to report this.");
} catch (InstantiationException e) {
throw new RuntimeException("Can not instance the Class RecordMetaMapImpl. " +
"Please file a issue to report this.");
}
}
@MainThread
public static QMUILatestVisit getInstance(Context context) {
if (sInstance == null) {
sInstance = new QMUILatestVisit(context);
}
return sInstance;
}
public static Intent intentOfLatestVisit(Activity activity) {
return getInstance(activity).getLatestVisitIntent(activity);
}
public void setStorage(QMUILatestVisitStorage storage) {
mStorage = storage;
}
QMUILatestVisitStorage getStorage() {
if (mStorage == null) {
mStorage = new DefaultLatestVisitStorage(mContext);
}
return mStorage;
}
@SuppressWarnings("unchecked")
private Intent getLatestVisitIntent(Context context) {
int activityId = getStorage().getActivityRecordId();
if (activityId == QMUILatestVisitStorage.NOT_EXIST) {
return null;
}
Class<?> activityCls = mRecordMap.getRecordClassById(activityId);
if (activityCls == null) {
return null;
}
Intent intent;
try {
if (QMUIFragmentActivity.class.isAssignableFrom(activityCls)) {
int fragmentId = getStorage().getFragmentRecordId();
if (fragmentId == QMUILatestVisitStorage.NOT_EXIST) {
return null;
}
Class<?> fragmentCls = mRecordMap.getRecordClassById(fragmentId);
if (fragmentCls == null) {
return null;
}
Class<? extends QMUIFragmentActivity> activity = (Class<? extends QMUIFragmentActivity>) activityCls;
Class<? extends QMUIFragment> fragment = (Class<? extends QMUIFragment>) fragmentCls;
Map<String, RecordArgumentEditor.Argument> arguments = getStorage().getFragmentArguments();
if (arguments == null || arguments.isEmpty()) {
intent = QMUIFragmentActivity.intentOf(context, activity, fragment, null);
} else {
Bundle bundle = new Bundle();
boolean hasNav = false;
for (String key : arguments.keySet()) {
if (key.startsWith(NAV_STORE_PREFIX)) {
hasNav = true;
} else {
RecordArgumentEditor.Argument argument = arguments.get(key);
if (argument != null) {
argument.putToBundle(bundle, key);
}
}
}
if (!hasNav) {
intent = QMUIFragmentActivity.intentOf(context, activity, fragment, bundle);
} else {
int navLevel = 0;
String fragmentClassName = fragment.getName();
while (true) {
String navPrefix = getNavFragmentStorePrefix(navLevel);
String navClassNameKey = navPrefix + NAV_STORE_FRAGMENT_SUFFIX;
RecordArgumentEditor.Argument navClassNameArg = arguments.get(navClassNameKey);
if (navClassNameArg == null) {
break;
}
bundle = QMUINavFragment.initArguments(fragmentClassName, bundle);
fragmentClassName = (String) navClassNameArg.getValue();
for (String key : arguments.keySet()) {
if (key.startsWith(navPrefix) && !key.equals(navClassNameKey)) {
RecordArgumentEditor.Argument arg = arguments.get(key);
if (arg != null) {
arg.putToBundle(bundle, key.substring(navPrefix.length()));
}
}
}
navLevel++;
}
intent = QMUIFragmentActivity.intentOf(context, activity, fragmentClassName, bundle);
}
}
} else {
intent = new Intent(context, activityCls);
}
getStorage().getAndWriteActivityArgumentsToIntent(intent);
return intent;
} catch (Throwable throwable) {
QMUILog.e(TAG, "getLatestVisitIntent failed.", throwable);
getStorage().clearAll();
}
return null;
}
void clearFragmentLatestVisitRecord() {
getStorage().clearFragmentStorage();
}
void clearActivityLatestVisitRecord() {
getStorage().clearActivityStorage();
}
void performLatestVisitRecord(QMUIFragment fragment) {
int id = mRecordMap.getIdByRecordClass(fragment.getClass());
if (id == QMUILatestVisitStorage.NOT_EXIST) {
return;
}
mRecordArgumentEditor.clear();
mNavRecordArgumentEditor.clear();
fragment.onCollectLatestVisitArgument(mRecordArgumentEditor);
Fragment parent = fragment.getParentFragment();
int level = 0;
while (parent instanceof QMUINavFragment) {
String navInfo = getNavFragmentStorePrefix(level);
QMUINavFragment nav = (QMUINavFragment) parent;
mNavRecordArgumentEditor.clear();
nav.onCollectLatestVisitArgument(mNavRecordArgumentEditor);
Map<String, RecordArgumentEditor.Argument> args = mNavRecordArgumentEditor.getAll();
mRecordArgumentEditor.putString(navInfo + NAV_STORE_FRAGMENT_SUFFIX, nav.getClass().getName());
for (String arg : args.keySet()) {
mRecordArgumentEditor.put(navInfo + arg, args.get(arg));
}
parent = parent.getParentFragment();
level++;
}
getStorage().saveFragmentRecordInfo(id, mRecordArgumentEditor.getAll());
mRecordArgumentEditor.clear();
mNavRecordArgumentEditor.clear();
}
void performLatestVisitRecord(InnerBaseActivity activity) {
int id = mRecordMap.getIdByRecordClass(activity.getClass());
if (id == QMUILatestVisitStorage.NOT_EXIST) {
return;
}
mRecordArgumentEditor.clear();
activity.onCollectLatestVisitArgument(mRecordArgumentEditor);
getStorage().saveActivityRecordInfo(id, mRecordArgumentEditor.getAll());
mRecordArgumentEditor.clear();
}
private String getNavFragmentStorePrefix(int level) {
return NAV_STORE_PREFIX + level + "_";
}
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUINavFragment.java
================================================
package com.qmuiteam.qmui.arch;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentContainerView;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.ViewModelStoreOwner;
import com.qmuiteam.qmui.QMUILog;
public class QMUINavFragment extends QMUIFragment implements QMUIFragmentContainerProvider {
private static final String TAG = "QMUINavFragment";
private static final String QMUI_ARGUMENT_DST_FRAGMENT = "qmui_argument_dst_fragment";
private static final String QMUI_ARGUMENT_FRAGMENT_ARG = "qmui_argument_fragment_arg";
private FragmentContainerView mContainerView;
private boolean mIsFirstFragmentAdded = false;
private boolean isChildHandlePopBackRequested = false;
public static QMUINavFragment getDefaultInstance(Class<? extends QMUIFragment> firstFragmentCls,
@Nullable Bundle firstFragmentArgument){
QMUINavFragment navFragment = new QMUINavFragment();
Bundle arg = new Bundle();
arg.putString(QMUI_ARGUMENT_DST_FRAGMENT, firstFragmentCls.getName());
arg.putBundle(QMUI_ARGUMENT_FRAGMENT_ARG, firstFragmentArgument);
navFragment.setArguments(initArguments(firstFragmentCls, firstFragmentArgument));
return navFragment;
}
public static Bundle initArguments(Class<? extends QMUIFragment> firstFragmentCls,
@Nullable Bundle firstFragmentArgument){
Bundle arg = new Bundle();
arg.putString(QMUI_ARGUMENT_DST_FRAGMENT, firstFragmentCls.getName());
arg.putBundle(QMUI_ARGUMENT_FRAGMENT_ARG, firstFragmentArgument);
return arg;
}
static Bundle initArguments(String firstFragmentClsName, @Nullable Bundle firstFragmentArgument){
Bundle arg = new Bundle();
arg.putString(QMUI_ARGUMENT_DST_FRAGMENT, firstFragmentClsName);
arg.putBundle(QMUI_ARGUMENT_FRAGMENT_ARG, firstFragmentArgument);
return arg;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState == null) {
onCreateFirstFragment();
}
}
public boolean isFirstFragmentAdded() {
return mIsFirstFragmentAdded;
}
protected void setFirstFragmentAdded(boolean firstFragmentAdded) {
mIsFirstFragmentAdded = firstFragmentAdded;
}
protected void onCreateFirstFragment(){
Bundle arguments = getArguments();
if (arguments != null) {
String dstFragmentName = arguments.getString(QMUI_ARGUMENT_DST_FRAGMENT);
QMUIFragment firstFragment = instantiationFirstFragment(dstFragmentName, arguments);
if (firstFragment != null) {
mIsFirstFragmentAdded = true;
getChildFragmentManager()
.beginTransaction()
.add(getContextViewId(), firstFragment, firstFragment.getClass().getSimpleName())
.addToBackStack(firstFragment.getClass().getSimpleName())
.commit();
}
}
}
@SuppressWarnings("unchecked")
private QMUIFragment instantiationFirstFragment(String clsName, Bundle arguments) {
try {
Class<? extends QMUIFragment> cls = (Class<? extends QMUIFragment>) Class.forName(clsName);
QMUIFragment fragment = cls.newInstance();
Bundle args = arguments.getBundle(QMUI_ARGUMENT_FRAGMENT_ARG);
if (args != null) {
fragment.setArguments(args);
}
return fragment;
} catch (IllegalAccessException e) {
QMUILog.d(TAG, "Can not access " + clsName + " for first fragment");
} catch (java.lang.InstantiationException e) {
QMUILog.d(TAG, "Can not instance " + clsName + " for first fragment");
} catch (ClassNotFoundException e) {
QMUILog.d(TAG, "Can not find " + clsName);
}
return null;
}
@Override
protected View onCreateView() {
FragmentContainerView rootView = new FragmentContainerView(getContext());
rootView.setId(getContextViewId());
return rootView;
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mContainerView = view.findViewById(getContextViewId());
if(mContainerView == null){
throw new RuntimeException("must call #configFragmentContainerView() in onCreateView()");
}
}
protected void configFragmentContainerView(FragmentContainerView fragmentContainerView){
fragmentContainerView.setId(getContextViewId());
}
@Override
public void onDestroyView() {
super.onDestroyView();
mContainerView = null;
}
@Override
public int getContextViewId() {
return R.id.qmui_activity_fragment_container_id;
}
@Override
public void requestForHandlePopBack(boolean toHandle) {
isChildHandlePopBackRequested = toHandle;
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(false);
if(provider != null){
provider.requestForHandlePopBack(toHandle || getChildFragmentManager().getBackStackEntryCount() > 1);
}
}
@Override
public boolean isChildHandlePopBackRequested() {
return isChildHandlePopBackRequested;
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
getChildFragmentManager().addOnBackStackChangedListener(new FragmentManager.OnBackStackChangedListener() {
@Override
public void onBackStackChanged() {
checkForRequestForHandlePopBack();
if(getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)){
checkForPrimaryNavigation();
}
}
});
}
private void checkForPrimaryNavigation(){
getParentFragmentManager()
.beginTransaction()
.setPrimaryNavigationFragment(getChildFragmentManager().getBackStackEntryCount() > 1 ? QMUINavFragment.this : null)
.commit();
}
@Override
protected void checkForRequestForHandlePopBack(){
boolean enoughBackStackCount = getChildFragmentManager().getBackStackEntryCount() > 1;
QMUIFragmentContainerProvider provider = findFragmentContainerProvider(false);
if(provider != null){
provider.requestForHandlePopBack(isChildHandlePopBackRequested || enoughBackStackCount);
}
}
@Override
public void onResume() {
super.onResume();
checkForPrimaryNavigation();
}
@Override
public FragmentManager getContainerFragmentManager() {
return getChildFragmentManager();
}
@Override
public ViewModelStoreOwner getContainerViewModelStoreOwner() {
return this;
}
@Nullable
@Override
public FragmentContainerView getFragmentContainerView() {
return mContainerView;
}
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUISwipeBackActivityManager.java
================================================
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qmuiteam.qmui.arch;
import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.Stack;
public class QMUISwipeBackActivityManager implements Application.ActivityLifecycleCallbacks {
private static QMUISwipeBackActivityManager sInstance;
private Stack<Activity> mActivityStack = new Stack<>();
private Activity mCurrentActivity = null;
@MainThread
public static QMUISwipeBackActivityManager getInstance() {
if (sInstance == null) {
throw new IllegalAccessError("the QMUISwipeBackActivityManager is not initialized; " +
"please call QMUISwipeBackActivityManager.init(Application) in your application.");
}
return sInstance;
}
private QMUISwipeBackActivityManager() {
}
public static void init(@NonNull Application application) {
if (sInstance == null) {
sInstance = new QMUISwipeBackActivityManager();
application.registerActivityLifecycleCallbacks(sInstance);
}
}
@Override
public void onActivityCreated(@NonNull Activity activity, Bundle savedInstanceState) {
if(mCurrentActivity == null){
mCurrentActivity = activity;
}
mActivityStack.add(activity);
}
@Override
public void onActivityDestroyed(@NonNull Activity activity) {
mActivityStack.remove(activity);
if(mActivityStack.isEmpty()){
mCurrentActivity = null;
}
}
@Override
public void onActivityStarted(@NonNull Activity activity) {
}
@Override
public void onActivityResumed(@NonNull Activity activity) {
mCurrentActivity = activity;
}
@Override
public void onActivityPaused(@NonNull Activity activity) {
}
@Override
public void onActivityStopped(@NonNull Activity activity) {
}
@Override
public void onActivitySaveInstanceState(@NonNull Activity activity, @NonNull Bundle outState) {
}
@Nullable
public Activity getCurrentActivity(){
return mCurrentActivity;
}
public int getActivityCount(){
return mActivityStack.size();
}
@Nullable
public Activity getActivityInStack(int index){
if(index < 0 || index >= mActivityStack.size()){
return null;
}
return mActivityStack.get(index);
}
/**
*
* refer to https://github.com/bingoogolapple/BGASwipeBackLayout-Android/
* @param currentActivity the last activity
* @return
*/
@Nullable
public Activity getPenultimateActivity(Activity currentActivity) {
Activity activity = null;
try {
if (mActivityStack.size() > 1) {
activity = mActivityStack.get(mActivityStack.size() - 2);
if (currentActivity.equals(activity)) {
int index = mActivityStack.indexOf(currentActivity);
if (index > 0) {
// if memory leaks or the last activity is being finished
activity = mActivityStack.get(index - 1);
} else if (mActivityStack.size() == 2) {
// if screen orientation changes, there may be an error sequence in the stack
activity = mActivityStack.lastElement();
}
}
}
} catch (Exception ignored) {
}
return activity;
}
public boolean canSwipeBack(Activity currentActivity) {
if(currentActivity == null){
return false;
}
Activity prevActivity = getPenultimateActivity(currentActivity);
return prevActivity != null && !prevActivity.isDestroyed() && !prevActivity.isFinishing();
}
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackLayout.java
================================================
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qmuiteam.qmui.arch;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.FrameLayout;
import android.widget.OverScroller;
import androidx.annotation.NonNull;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import com.qmuiteam.qmui.util.QMUILangHelper;
import com.qmuiteam.qmui.util.QMUIViewOffsetHelper;
import com.qmuiteam.qmui.util.QMUIWindowInsetHelper;
import java.util.ArrayList;
import java.util.List;
import static com.qmuiteam.qmui.QMUIInterpolatorStaticHolder.QUNITIC_INTERPOLATOR;
/**
* Created by cgspine on 2018/1/7.
* <p>
* modified from https://github.com/ikew0ng/SwipeBackLayout
*/
public class SwipeBackLayout extends FrameLayout {
private static final int MIN_FLING_VELOCITY = 400; // dips per second
private static final int DEFAULT_SCRIM_COLOR = 0x99000000;
private static final int FULL_ALPHA = 255;
private static final float DEFAULT_SCROLL_THRESHOLD = 0.3f;
private static final int BASE_SETTLE_DURATION = 256; // ms
private static final int MAX_SETTLE_DURATION = 600; // ms
public static final int DRAG_DIRECTION_NONE = 0;
public static final int DRAG_DIRECTION_LEFT_TO_RIGHT = 1;
public static final int DRAG_DIRECTION_RIGHT_TO_LEFT = 2;
public static final int DRAG_DIRECTION_TOP_TO_BOTTOM = 3;
public static final int DRAG_DIRECTION_BOTTOM_TO_TOP = 4;
public static final int EDGE_LEFT = 1;
public static final int EDGE_RIGHT = 2;
public static final int EDGE_TOP = 4;
public static final int EDGE_BOTTOM = 8;
public static final int STATE_IDLE = 0;
public static final int STATE_DRAGGING = 1;
public static final int STATE_SETTLING = 2;
public static final ViewMoveAction MOVE_VIEW_AUTO = new ViewMoveAuto();
public static final ViewMoveAction MOVE_VIEW_LEFT_TO_RIGHT = new ViewMoveLeftToRight();
public static final ViewMoveAction MOVE_VIEW_TOP_TO_BOTTOM = new ViewMoveTopToBottom();
private float mScrollThreshold = DEFAULT_SCROLL_THRESHOLD;
private View mContentView;
private List<SwipeListener> mListeners;
private Callback mCallback;
private OnInsetsHandler mOnInsetsHandler;
private Drawable mShadowLeft;
private Drawable mShadowRight;
private Drawable mShadowBottom;
private Drawable mShadowTop;
private float mScrimOpacity;
private int mScrimColor = DEFAULT_SCRIM_COLOR;
private VelocityTracker mVelocityTracker;
private float mMaxVelocity;
private float mMinVelocity;
private OverScroller mScroller;
private int mTouchSlop;
private float mInitialMotionX;
private float mInitialMotionY;
private float mLastMotionX;
private float mLastMotionY;
private int mDragState = STATE_IDLE;
private QMUIViewOffsetHelper mViewOffsetHelper;
private ViewMoveAction mViewMoveAction = MOVE_VIEW_AUTO;
private int mCurrentDragDirection = 0;
private boolean mIsScrollOverValid = true;
private boolean mEnableSwipeBack = true;
private int mRequestLayoutCount = 0;
private long mRequestLayoutCheckStartTime = -1;
public SwipeBackLayout(Context context) {
this(context, null);
}
public SwipeBackLayout(Context context, AttributeSet attrs) {
this(context, attrs, R.attr.SwipeBackLayoutStyle);
}
public SwipeBackLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SwipeBackLayout, defStyle,
R.style.SwipeBackLayout);
int shadowLeft = a.getResourceId(R.styleable.SwipeBackLayout_shadow_left,
R.drawable.shadow_left);
int shadowRight = a.getResourceId(R.styleable.SwipeBackLayout_shadow_right,
R.drawable.shadow_right);
int shadowBottom = a.getResourceId(R.styleable.SwipeBackLayout_shadow_bottom,
R.drawable.shadow_bottom);
int shadowTop = a.getResourceId(R.styleable.SwipeBackLayout_shadow_top,
R.drawable.shadow_top);
setShadow(shadowLeft, EDGE_LEFT);
setShadow(shadowRight, EDGE_RIGHT);
setShadow(shadowBottom, EDGE_BOTTOM);
setShadow(shadowTop, EDGE_TOP);
a.recycle();
final float density = getResources().getDisplayMetrics().density;
final float minVel = MIN_FLING_VELOCITY * density;
final ViewConfiguration vc = ViewConfiguration.get(context);
mTouchSlop = vc.getScaledTouchSlop();
mMaxVelocity = vc.getScaledMaximumFlingVelocity();
mMinVelocity = minVel;
mScroller = new OverScroller(context, QUNITIC_INTERPOLATOR);
QMUIWindowInsetHelper.setOnApplyWindowInsetsListener(this, new androidx.core.view.OnApplyWindowInsetsListener() {
@Override
public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
int insetsType = mOnInsetsHandler != null ? mOnInsetsHandler.getInsetsType() : 0;
if(insetsType != 0){
Insets toUsed = insets.getInsets(insetsType);
v.setPadding(toUsed.left, toUsed.top, toUsed.right, toUsed.bottom);
}else{
v.setPadding(0, 0, 0, 0);
}
return insets;
}
}, false);
}
public void setEnableSwipeBack(boolean enableSwipeBack) {
mEnableSwipeBack = enableSwipeBack;
}
public boolean isEnableSwipeBack() {
return mEnableSwipeBack;
}
private final Runnable mSetIdleRunnable = new Runnable() {
@Override
public void run() {
setDragState(STATE_IDLE);
}
};
/**
* Set up contentView which will be moved by user gesture
*
* @param view
*/
private void setContentView(View view) {
mContentView = view;
mViewOffsetHelper = new QMUIViewOffsetHelper(view);
}
public void setViewMoveAction(@NonNull ViewMoveAction viewMoveAction) {
mViewMoveAction = viewMoveAction;
}
public View getContentView() {
return mContentView;
}
public void setCallback(Callback callback) {
mCallback = callback;
}
/**
* Set a color to use for the scrim that obscures primary content while a
* drawer is open.
*
* @param color Color to use in 0xAARRGGBB format.
*/
public void setScrimColor(int color) {
mScrimColor = color;
invalidate();
}
/**
* Add a callback to be invoked when a swipe event is sent to this view.
*
* @param listener the swipe listener to attach to this view
*/
public ListenerRemover addSwipeListener(final SwipeListener listener) {
if (mListeners == null) {
mListeners = new ArrayList<>();
}
mListeners.add(listener);
return new ListenerRemover() {
@Override
public void remove() {
mListeners.remove(listener);
}
};
}
/**
* Removes a listener from the set of listeners
*
* @param listener
*/
public void removeSwipeListener(SwipeListener listener) {
if (mListeners == null) {
return;
}
mListeners.remove(listener);
}
public void clearSwipeListeners() {
if (mListeners == null) {
return;
}
mListeners.clear();
mListeners = null;
}
public void setOnInsetsHandler(OnInsetsHandler insetsHandler) {
mOnInsetsHandler = insetsHandler;
}
/**
* Set scroll threshold, we will close the activity, when scrollPercent over
* this value
*
* @param threshold
*/
public void setScrollThresHold(float threshold) {
if (threshold >= 1.0f || threshold <= 0) {
throw new IllegalArgumentException("Threshold value should be between 0 and 1.0");
}
mScrollThreshold = threshold;
}
/**
* Set a drawable used for edge shadow.
*
* @param shadow Drawable to use
* @param edgeFlag Combination of edge flags describing the edge to set
*/
public void setShadow(Drawable shadow, int edgeFlag) {
if ((edgeFlag & EDGE_LEFT) != 0) {
mShadowLeft = shadow;
} else if ((edgeFlag & EDGE_RIGHT) != 0) {
mShadowRight = shadow;
} else if ((edgeFlag & EDGE_BOTTOM) != 0) {
mShadowBottom = shadow;
} else if ((edgeFlag & EDGE_TOP) != 0) {
mShadowTop = shadow;
}
invalidate();
}
/**
* Set a drawable used for edge shadow.
*
* @param resId Resource of drawable to use
* @param edgeFlag Combination of edge flags describing the edge to set
* @see #EDGE_LEFT
* @see #EDGE_RIGHT
* @see #EDGE_BOTTOM
*/
public void setShadow(int resId, int edgeFlag) {
setShadow(getResources().getDrawable(resId), edgeFlag);
}
void setDragState(int state) {
removeCallbacks(mSetIdleRunnable);
if (mDragState != state) {
mDragState = state;
onViewDragStateChanged(mDragState);
}
}
private boolean isTouchInContentView(float x, float y) {
return x >= mContentView.getLeft() && x < mContentView.getRight()
&& y >= mContentView.getTop() && y < mContentView.getBottom();
}
private int selectDragDirection(float x, float y) {
final float dx = x - mInitialMotionX;
final float dy = y - mInitialMotionY;
mCurrentDragDirection = mCallback == null ? DRAG_DIRECTION_NONE :
mCallback.getDragDirection(this, mViewMoveAction, mInitialMotionX, mInitialMotionY, dx, dy, mTouchSlop);
if(mCurrentDragDirection != DRAG_DIRECTION_NONE){
mInitialMotionX = mLastMotionX = x;
mInitialMotionY = mLastMotionY = y;
onSwipeBackBegin();
requestParentDisallowInterceptTouchEvent(true);
setDragState(STATE_DRAGGING);
}
return mCurrentDragDirection;
}
private float getTouchMoveDelta(float x, float y) {
if (mCurrentDragDirection == DRAG_DIRECTION_LEFT_TO_RIGHT ||
mCurrentDragDirection == DRAG_DIRECTION_RIGHT_TO_LEFT) {
return x - mLastMotionX;
} else {
return y - mLastMotionY;
}
}
@Override
public void requestLayout() {
super.requestLayout();
mRequestLayoutCount++;
if(mRequestLayoutCheckStartTime == -1){
mRequestLayoutCheckStartTime = SystemClock.elapsedRealtime();
}
if(mRequestLayoutCount >= 100){
long duration = SystemClock.elapsedRealtime() - mRequestLayoutCheckStartTime;
if(duration < 4000){
if(mCallback != null){
mCallback.reportFrequentlyRequestLayout(mRequestLayoutCount, duration);
}
}
mRequestLayoutCount = 0;
mRequestLayoutCheckStartTime = -1;
}
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
mRequestLayoutCount=0;
mRequestLayoutCheckStartTime = -1;
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if(!mEnableSwipeBack){
cancel();
return false;
}
final int action = ev.getActionMasked();
if (action == MotionEvent.ACTION_DOWN) {
cancel();
}
if (mVelocityTracker == null) {
mVelocityTracker = VelocityTracker.obtain();
}
mVelocityTracker.addMovement(ev);
final float x = ev.getX();
final float y = ev.getY();
switch (action) {
case MotionEvent.ACTION_DOWN: {
mInitialMotionX = mLastMotionX = x;
mInitialMotionY = mLastMotionY = y;
if (mDragState == STATE_SETTLING) {
if (isTouchInContentView(x, y)) {
requestParentDisallowInterceptTouchEvent(true);
setDragState(STATE_DRAGGING);
}
}
break;
}
case MotionEvent.ACTION_MOVE: {
if (mDragState == STATE_IDLE) {
selectDragDirection(x, y);
} else if (mDragState == STATE_DRAGGING) {
mViewMoveAction.move(this, mContentView, mViewOffsetHelper,
mCurrentDragDirection, getTouchMoveDelta(x, y));
onScroll();
} else {
if (isTouchInContentView(x, y)) {
requestParentDisallowInterceptTouchEvent(true);
setDragState(STATE_DRAGGING);
}
}
mLastMotionX = x;
mLastMotionY = y;
break;
}
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL: {
cancel();
break;
}
}
return mDragState == STATE_DRAGGING;
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
if(!mEnableSwipeBack){
cancel();
return false;
}
final int action = ev.getActionMasked();
if (action == MotionEvent.ACTION_DOWN) {
cancel();
}
if (mVelocityTracker == null) {
mVelocityTracker = VelocityTracker.obtain();
}
mVelocityTracker.addMovement(ev);
final float x = ev.getX();
final float y = ev.getY();
switch (action) {
case MotionEvent.ACTION_DOWN: {
mInitialMotionX = mLastMotionX = x;
mInitialMotionY = mLastMotionY = y;
if (mDragState == STATE_SETTLING) {
if (isTouchInContentView(x, y)) {
requestParentDisallowInterceptTouchEvent(true);
setDragState(STATE_DRAGGING);
}
}
break;
}
case MotionEvent.ACTION_MOVE: {
if (mDragState == STATE_IDLE) {
selectDragDirection(x, y);
} else if (mDragState == STATE_DRAGGING) {
mViewMoveAction.move(this, mContentView, mViewOffsetHelper,
mCurrentDragDirection, getTouchMoveDelta(x, y));
onScroll();
} else {
if (isTouchInContentView(x, y)) {
requestParentDisallowInterceptTouchEvent(true);
setDragState(STATE_DRAGGING);
}
}
mLastMotionX = x;
mLastMotionY = y;
break;
}
case MotionEvent.ACTION_UP: {
if (mDragState == STATE_DRAGGING) {
releaseViewForPointerUp();
}
cancel();
break;
}
case MotionEvent.ACTION_CANCEL: {
if (mDragState == STATE_DRAGGING) {
settleContentViewAt(0, 0,
(int) mVelocityTracker.getXVelocity(),
(int) mVelocityTracker.getYVelocity());
}
cancel();
break;
}
}
return true;
}
private void requestParentDisallowInterceptTouchEvent(boolean disallowIntercept) {
final ViewParent parent = getParent();
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(disallowIntercept);
}
}
private void releaseViewForPointerUp() {
mVelocityTracker.computeCurrentVelocity(1000, mMaxVelocity);
int moveEdge = mViewMoveAction.getEdge(mCurrentDragDirection);
float v;
if(mCurrentDragDirection == DRAG_DIRECTION_LEFT_TO_RIGHT ||
mCurrentDragDirection == DRAG_DIRECTION_RIGHT_TO_LEFT){
v = clampMag(mVelocityTracker.getXVelocity(), mMinVelocity, mMaxVelocity);
}else{
v = clampMag(mVelocityTracker.getYVelocity(), mMinVelocity, mMaxVelocity);
}
if (moveEdge == EDGE_LEFT || moveEdge == EDGE_RIGHT) {
int target = mViewMoveAction.getSettleTarget(this, mContentView,
v, mCurrentDragDirection, mScrollThreshold);
settleContentViewAt(target, 0, (int) v, 0);
} else {
int target = mViewMoveAction.getSettleTarget(this, mContentView,
v, mCurrentDragDirection, mScrollThreshold);
settleContentViewAt(0, target, 0, (int) v);
}
}
/**
* Settle the captured view at the given (left, top) position.
*
* @param finalLeft Target left position for the captured view
* @param finalTop Target top position for the captured view
* @param xvel Horizontal velocity
* @param yvel Vertical velocity
* @return true if animation should continue through {@link #continueSettling(boolean)} calls
*/
private boolean settleContentViewAt(int finalLeft, int finalTop, int xvel, int yvel) {
final int startLeft = mContentView.getLeft();
final int startTop = mContentView.getTop();
final int dx = finalLeft - startLeft;
final int dy = finalTop - startTop;
if (dx == 0 && dy == 0) {
// Nothing to do. Send callbacks, be done.
mScroller.abortAnimation();
setDragState(STATE_IDLE);
return false;
}
final int duration = computeSettleDuration(dx, dy, xvel, yvel);
mScroller.startScroll(startLeft, startTop, dx, dy, duration);
setDragState(STATE_SETTLING);
invalidate();
return true;
}
public boolean continueSettling(boolean deferCallbacks) {
if (mDragState == STATE_SETTLING) {
boolean keepGoing = mScroller.computeScrollOffset();
final int x = mScroller.getCurrX();
final int y = mScroller.getCurrY();
mViewOffsetHelper.setOffset(
x - mViewOffsetHelper.getLayoutLeft(),
y - mViewOffsetHelper.getLayoutTop());
onScroll();
if (keepGoing && x == mScroller.getFinalX() && y == mScroller.getFinalY()) {
// Close enough. The interpolator/scroller might think we're still moving
// but the user sure doesn't.
mScroller.abortAnimation();
keepGoing = false;
}
if (!keepGoing) {
if (deferCallbacks) {
post(mSetIdleRunnable);
} else {
setDragState(STATE_IDLE);
}
}
}
return mDragState == STATE_SETTLING;
}
private int computeSettleDuration(int dx, int dy, int xvel, int yvel) {
xvel = clampMag(xvel, (int) mMinVelocity, (int) mMaxVelocity);
yvel = clampMag(yvel, (int) mMinVelocity, (int) mMaxVelocity);
final int absDx = Math.abs(dx);
final int absDy = Math.abs(dy);
final int absXVel = Math.abs(xvel);
final int absYVel = Math.abs(yvel);
final int addedVel = absXVel + absYVel;
final int addedDistance = absDx + absDy;
final float xweight = xvel != 0 ? (float) absXVel / addedVel :
(float) absDx / addedDistance;
final float yweight = yvel != 0 ? (float) absYVel / addedVel :
(float) absDy / addedDistance;
int range = mViewMoveAction.getDragRange(this, mCurrentDragDirection);
int xduration = computeAxisDuration(dx, xvel, range);
int yduration = computeAxisDuration(dy, yvel, range);
return (int) (xduration * xweight + yduration * yweight);
}
private int computeAxisDuration(int delta, int velocity, int motionRange) {
if (delta == 0) {
return 0;
}
final int width = getWidth();
final int halfWidth = width / 2;
final float distanceRatio = Math.min(1f, (float) Math.abs(delta) / width);
final float distance = halfWidth + halfWidth
* distanceInfluenceForSnapDuration(distanceRatio);
int duration;
velocity = Math.abs(velocity);
if (velocity > 0) {
duration = 4 * Math.round(1000 * Math.abs(distance / velocity));
} else if (motionRange != 0) {
final float range = (float) Math.abs(delta) / motionRange;
duration = (int) ((range + 1) * BASE_SETTLE_DURATION);
} else {
duration = BASE_SETTLE_DURATION;
}
return Math.min(duration, MAX_SETTLE_DURATION);
}
private float distanceInfluenceForSnapDuration(float f) {
f -= 0.5f; // center the values about 0.
f *= 0.3f * (float) Math.PI / 2.0f;
return (float) Math.sin(f);
}
/**
* Clamp the magnitude of value for absMin and absMax.
* If the value is below the minimum, it will be clamped to zero.
* If the value is above the maximum, it will be clamped to the maximum.
*
* @param value Value to clamp
* @param absMin Absolute value of the minimum significant value to return
* @param absMax Absolute value of the maximum value to return
* @return The clamped value with the same sign as <code>value</code>
*/
private int clampMag(int value, int absMin, int absMax) {
final int absValue = Math.abs(value);
if (absValue < absMin) return 0;
if (absValue > absMax) return value > 0 ? absMax : -absMax;
return value;
}
/**
* Clamp the magnitude of value for absMin and absMax.
* If the value is below the minimum, it will be clamped to zero.
* If the value is above the maximum, it will be clamped to the maximum.
*
* @param value Value to clamp
* @param absMin Absolute value of the minimum significant value to return
* @param absMax Absolute value of the maximum value to return
* @return The clamped value with the same sign as <code>value</code>
*/
private float clampMag(float value, float absMin, float absMax) {
final float absValue = Math.abs(value);
if (absValue < absMin) return 0;
if (absValue > absMax) return value > 0 ? absMax : -absMax;
return value;
}
public void cancel() {
if (mVelocityTracker != null) {
mVelocityTracker.recycle();
mVelocityTracker = null;
}
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
if (mViewOffsetHelper != null) {
mViewOffsetHelper.onViewLayout();
}
}
@Override
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
final boolean drawContent = child == mContentView;
boolean ret = super.drawChild(canvas, child, drawingTime);
if (mScrimOpacity > 0 && drawContent
&& mDragState != STATE_IDLE) {
drawShadow(canvas, child);
drawScrim(canvas, child);
}
return ret;
}
private void drawScrim(Canvas canvas, View child) {
final int baseAlpha = (mScrimColor & 0xff000000) >>> 24;
final int alpha = (int) (baseAlpha * mScrimOpacity);
final int color = alpha << 24 | (mScrimColor & 0xffffff);
int movingEdge = mViewMoveAction.getEdge(mCurrentDragDirection);
if ((movingEdge & EDGE_LEFT) != 0) {
canvas.clipRect(0, 0, child.getLeft(), getHeight());
} else if ((movingEdge & EDGE_RIGHT) != 0) {
canvas.clipRect(child.getRight(), 0, getRight(), getHeight());
} else if ((movingEdge & EDGE_BOTTOM) != 0) {
canvas.clipRect(0, child.getBottom(), getRight(), getHeight());
} else if ((movingEdge & EDGE_TOP) != 0) {
canvas.clipRect(0, 0, getRight(), child.getTop());
}
canvas.drawColor(color);
}
private void drawShadow(Canvas canvas, View child) {
int movingEdge = mViewMoveAction.getEdge(mCurrentDragDirection);
if ((movingEdge & EDGE_LEFT) != 0) {
mShadowLeft.setBounds(child.getLeft() - mShadowLeft.getIntrinsicWidth(),
child.getTop(), child.getLeft(), child.getBottom());
mShadowLeft.setAlpha((int) (mScrimOpacity * FULL_ALPHA));
mShadowLeft.draw(canvas);
} else if ((movingEdge & EDGE_RIGHT) != 0) {
mShadowRight.setBounds(child.getRight(), child.getTop(),
child.getRight() + mShadowRight.getIntrinsicWidth(), child.getBottom());
mShadowRight.setAlpha((int) (mScrimOpacity * FULL_ALPHA));
mShadowRight.draw(canvas);
} else if ((movingEdge & EDGE_BOTTOM) != 0) {
mShadowBottom.setBounds(child.getLeft(), child.getBottom(), child.getRight(),
child.getBottom() + mShadowBottom.getIntrinsicHeight());
mShadowBottom.setAlpha((int) (mScrimOpacity * FULL_ALPHA));
mShadowBottom.draw(canvas);
} else if ((movingEdge & EDGE_TOP) != 0) {
mShadowTop.setBounds(child.getLeft(), child.getTop() - mShadowTop.getIntrinsicHeight(),
child.getRight(), child.getTop());
mShadowTop.setAlpha((int) (mScrimOpacity * FULL_ALPHA));
mShadowTop.draw(canvas);
}
}
@Override
public void computeScroll() {
if (continueSettling(true)) {
ViewCompat.postInvalidateOnAnimation(this);
}
}
private void onSwipeBackBegin() {
mIsScrollOverValid = true;
mScrimOpacity = 1 - mViewMoveAction.getCurrentPercent(this, mContentView, mCurrentDragDirection);
if (mListeners != null && !mListeners.isEmpty()) {
for (SwipeListener listener : mListeners) {
listener.onSwipeBackBegin(mCurrentDragDirection, mViewMoveAction.getEdge(mCurrentDragDirection));
}
}
invalidate();
}
private void onScroll() {
float scrollPercent = mViewMoveAction.getCurrentPercent(this, mContentView, mCurrentDragDirection);
mScrimOpacity = 1 - mViewMoveAction.getCurrentPercent(this, mContentView, mCurrentDragDirection);
if (scrollPercent < mScrollThreshold && !mIsScrollOverValid) {
mIsScrollOverValid = true;
}
if (mDragState == STATE_DRAGGING && mIsScrollOverValid &&
scrollPercent >= mScrollThreshold) {
mIsScrollOverValid = false;
onScrollOverThreshold();
}
if (mListeners != null && !mListeners.isEmpty()) {
for (SwipeListener listener : mListeners) {
listener.onScroll(mCurrentDragDirection, mViewMoveAction.getEdge(mCurrentDragDirection), scrollPercent);
}
}
invalidate();
}
private void onScrollOverThreshold() {
if (mListeners != null && !mListeners.isEmpty()) {
for (SwipeListener listener : mListeners) {
listener.onScrollOverThreshold();
}
}
}
private void onViewDragStateChanged(int dragState) {
if (mListeners != null && !mListeners.isEmpty()) {
for (SwipeListener listener : mListeners) {
listener.onScrollStateChange(dragState,
mViewMoveAction.getCurrentPercent(this, mContentView, mCurrentDragDirection));
}
}
}
public void resetOffset(){
if(mViewOffsetHelper != null){
mViewOffsetHelper.setOffset(0, 0);
}
}
public static SwipeBackLayout wrap(View child, ViewMoveAction viewMoveAction, Callback callback) {
SwipeBackLayout wrapper = new SwipeBackLayout(child.getContext());
wrapper.addView(child, new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
wrapper.setContentView(child);
wrapper.setViewMoveAction(viewMoveAction);
wrapper.setCallback(callback);
return wrapper;
}
public static SwipeBackLayout wrap(Context context, int childRes, ViewMoveAction viewMoveAction, Callback callback) {
SwipeBackLayout wrapper = new SwipeBackLayout(context);
View child = LayoutInflater.from(context).inflate(childRes, wrapper, false);
wrapper.addView(child, new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
wrapper.setContentView(child);
wrapper.setCallback(callback);
wrapper.setViewMoveAction(viewMoveAction);
return wrapper;
}
public static void translateInSwipeBack(View view, int edgeFlag, int targetOffset){
if (edgeFlag == EDGE_BOTTOM) {
view.setTranslationY(targetOffset);
view.setTranslationX(0);
} else if (edgeFlag == EDGE_RIGHT) {
view.setTranslationY(0);
view.setTranslationX(targetOffset);
} else if(edgeFlag == EDGE_LEFT){
view.setTranslationY(0);
view.setTranslationX(-targetOffset);
}else{
view.setTranslationY(-targetOffset);
view.setTranslationX(0);
}
}
public float getXFraction() {
int width = getWidth();
if(width == 0){
ViewParent parent = getParent();
if(parent instanceof ViewGroup){
width = ((ViewGroup)parent).getWidth();
}
}
return (width == 0) ? 0 : getX() / (float) width;
}
public void setXFraction(float xFraction) {
int width = getWidth();
if(width == 0){
ViewParent parent = getParent();
if(parent instanceof ViewGroup){
width = ((ViewGroup)parent).getWidth();
}
}
setX((width > 0) ? (xFraction * width) : 0);
}
public float getYFraction() {
int height = getHeight();
if(height == 0){
ViewParent parent = getParent();
if(parent instanceof ViewGroup){
height = ((ViewGroup)parent).getHeight();
}
}
return (height == 0) ? 0 : getY() / (float) height;
}
public void setYFraction(float yFraction) {
int height = getHeight();
if(height == 0){
ViewParent parent = getParent();
if(parent instanceof ViewGroup){
height = ((ViewGroup)parent).getHeight();
}
}
setY((height > 0) ? (yFraction * height) : 0);
}
public interface Callback {
int getDragDirection(SwipeBackLayout swipeBackLayout, ViewMoveAction moveAction,
float downX, float downY, float dx, float dy, float touchSlop);
void reportFrequentlyRequestLayout(int count, long duration);
}
public interface ViewMoveAction {
float getCurrentPercent(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView, int dragDirection);
int getDragRange(@NonNull SwipeBackLayout swipeBackLayout, int dragDirection);
int getSettleTarget(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView,
float v, int dragDirection, float scrollThreshold);
int getEdge(int dragDirection);
void move(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView,
@NonNull QMUIViewOffsetHelper offsetHelper,
int dragDirection, float delta);
}
public interface ListenerRemover {
void remove();
}
public interface SwipeListener {
/**
* Invoke when state change
*
* @param state flag to describe scroll state
* @param scrollPercent scroll percent of this view
* @see #STATE_IDLE
* @see #STATE_DRAGGING
* @see #STATE_SETTLING
*/
void onScrollStateChange(int state, float scrollPercent);
/**
* Invoke when scrolling
*
* @param moveEdge flag to describe edge
* @param scrollPercent scroll percent of this view
*/
void onScroll(int dragDirection, int moveEdge, float scrollPercent);
/**
* Invoke when swipe back begin.
*/
void onSwipeBackBegin(int dragDirection, int moveEdge);
/**
* Invoke when scroll percent over the threshold for the first time
*/
void onScrollOverThreshold();
}
public interface OnInsetsHandler {
@WindowInsetsCompat.Type.InsetsType
int getInsetsType();
}
public static class ViewMoveAuto implements ViewMoveAction {
private boolean isHor(int dragDirection){
return dragDirection == DRAG_DIRECTION_RIGHT_TO_LEFT ||
dragDirection == DRAG_DIRECTION_LEFT_TO_RIGHT;
}
@Override
public float getCurrentPercent(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView, int dragDirection) {
float percent;
if(isHor(dragDirection)){
percent = Math.abs(contentView.getLeft() * 1f / swipeBackLayout.getWidth());
}else{
percent = Math.abs(contentView.getTop() * 1f / swipeBackLayout.getHeight());
}
return QMUILangHelper.constrain(percent, 0f, 1f);
}
@Override
public int getDragRange(@NonNull SwipeBackLayout swipeBackLayout, int dragDirection) {
if(isHor(dragDirection)){
return swipeBackLayout.getWidth();
}
return swipeBackLayout.getHeight();
}
@Override
public int getSettleTarget(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView,
float v, int dragDirection, float scrollThreshold) {
if(dragDirection == DRAG_DIRECTION_LEFT_TO_RIGHT){
if (v > 0 ||
(v == 0 && getCurrentPercent(swipeBackLayout, contentView, dragDirection) > scrollThreshold)) {
return swipeBackLayout.getWidth();
}
}else if(dragDirection == DRAG_DIRECTION_RIGHT_TO_LEFT){
if (v < 0 ||
(v == 0 && getCurrentPercent(swipeBackLayout, contentView, dragDirection) > scrollThreshold)) {
return -swipeBackLayout.getWidth();
}
}else if(dragDirection == DRAG_DIRECTION_TOP_TO_BOTTOM){
if (v > 0 ||
(v == 0 && getCurrentPercent(swipeBackLayout, contentView, dragDirection) > scrollThreshold)) {
return swipeBackLayout.getHeight();
}
}else{
if (v < 0 ||
(v == 0 && getCurrentPercent(swipeBackLayout, contentView, dragDirection) > scrollThreshold)) {
return -swipeBackLayout.getHeight();
}
}
return 0;
}
@Override
public int getEdge(int dragDirection) {
if(dragDirection == DRAG_DIRECTION_LEFT_TO_RIGHT){
return EDGE_LEFT;
}else if(dragDirection == DRAG_DIRECTION_RIGHT_TO_LEFT){
return EDGE_RIGHT;
}else if(dragDirection == DRAG_DIRECTION_TOP_TO_BOTTOM){
return EDGE_TOP;
}else{
return EDGE_BOTTOM;
}
}
@Override
public void move(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView,
@NonNull QMUIViewOffsetHelper offsetHelper,
int dragDirection, float delta) {
if(dragDirection == DRAG_DIRECTION_LEFT_TO_RIGHT){
int target = (int) (offsetHelper.getLeftAndRightOffset() + delta);
target = QMUILangHelper.constrain(target, 0, swipeBackLayout.getWidth());
offsetHelper.setLeftAndRightOffset(target);
}else if(dragDirection == DRAG_DIRECTION_RIGHT_TO_LEFT){
int target = (int) (offsetHelper.getLeftAndRightOffset() + delta);
target = QMUILangHelper.constrain(target, -swipeBackLayout.getWidth(),0);
offsetHelper.setLeftAndRightOffset(target);
}else if(dragDirection == DRAG_DIRECTION_TOP_TO_BOTTOM){
int target = (int) (offsetHelper.getTopAndBottomOffset() + delta);
target = QMUILangHelper.constrain(target, 0, swipeBackLayout.getHeight());
offsetHelper.setTopAndBottomOffset(target);
}else{
int target = (int) (offsetHelper.getTopAndBottomOffset() + delta);
target = QMUILangHelper.constrain(target, -swipeBackLayout.getHeight(),0);
offsetHelper.setTopAndBottomOffset(target);
}
}
}
public static class ViewMoveLeftToRight implements ViewMoveAction {
@Override
public float getCurrentPercent(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView, int dragDirection) {
return QMUILangHelper.constrain(
contentView.getLeft() * 1f / swipeBackLayout.getWidth(), 0f, 1f);
}
@Override
public int getDragRange(@NonNull SwipeBackLayout swipeBackLayout, int dragDirection) {
return swipeBackLayout.getWidth();
}
@Override
public int getSettleTarget(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView,
float v, int dragDirection, float scrollThreshold) {
if (v > 0 ||
(v == 0 && getCurrentPercent(swipeBackLayout, contentView, dragDirection) > scrollThreshold)) {
return swipeBackLayout.getWidth();
}
return 0;
}
@Override
public int getEdge(int dragDirection) {
return EDGE_LEFT;
}
@Override
public void move(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView,
@NonNull QMUIViewOffsetHelper offsetHelper, int dragDirection, float delta) {
if (dragDirection == DRAG_DIRECTION_BOTTOM_TO_TOP ||
dragDirection == DRAG_DIRECTION_TOP_TO_BOTTOM) {
delta = delta * swipeBackLayout.getWidth() / swipeBackLayout.getHeight();
}
int target = (int) (offsetHelper.getLeftAndRightOffset() + delta);
target = QMUILangHelper.constrain(target, 0, swipeBackLayout.getWidth());
offsetHelper.setLeftAndRightOffset(target);
}
}
public static class ViewMoveTopToBottom implements ViewMoveAction {
@Override
public float getCurrentPercent(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView, int dragDirection) {
return QMUILangHelper.constrain(
contentView.getTop() * 1f / swipeBackLayout.getHeight(), 0f, 1f);
}
@Override
public int getDragRange(@NonNull SwipeBackLayout swipeBackLayout, int dragDirection) {
return swipeBackLayout.getHeight();
}
@Override
public int getSettleTarget(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView,
float v, int dragDirection, float scrollThreshold) {
if (v > 0 ||
(v == 0 && getCurrentPercent(swipeBackLayout, contentView, dragDirection) > scrollThreshold)) {
return swipeBackLayout.getHeight();
}
return 0;
}
@Override
public int getEdge(int dragDirection) {
return EDGE_TOP;
}
@Override
public void move(@NonNull SwipeBackLayout swipeBackLayout,
@NonNull View contentView,
@NonNull QMUIViewOffsetHelper offsetHelper, int dragDirection, float delta) {
if (dragDirection == DRAG_DIRECTION_LEFT_TO_RIGHT ||
dragDirection == DRAG_DIRECTION_RIGHT_TO_LEFT) {
delta = delta * swipeBackLayout.getHeight() / swipeBackLayout.getWidth();
}
int target = (int) (offsetHelper.getTopAndBottomOffset() + delta);
target = QMUILangHelper.constrain(target, 0, swipeBackLayout.getHeight());
offsetHelper.setTopAndBottomOffset(target);
}
}
}
================================================
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackgroundView.java
================================================
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qmuiteam.qmui.arch;
import android.app.Activity;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.graphics.Canvas;
import android.graphics.Color;
import android.os.IBinder;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import com.qmuiteam.qmui.util.QMUIColorHelper;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
public class SwipeBackgroundView extends View {
private ArrayList<ViewInfo> mViewWeakReference;
private boolean mDoRotate = false;
public SwipeBackgroundView(Context context, boolean forceDisableHardwareAccelerated) {
super(context);
if(forceDisableHardwareAccelerated){
setLayerType(LAYER_TYPE_SOFTWARE, null);
}
}
public void bind(Activity activity, Activity swipeActivity, boolean restoreForSubWindow) {
mDoRotate = false;
if (mViewWeakReference != null) {
mViewWeakReference.clear();
}
int orientation = activity.getResources().getConfiguration().orientation;
if (orientation != getResources().getConfiguration().orientation) {
// the screen orientation changed, reMeasure and reLayout
int requestedOrientation = activity.getRequestedOrientation();
if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE ||
requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {
// TODO is it suitable for fixed screen orientation
// the prev activity has locked the screen orientation
mDoRotate = true;
} else if (swipeActivity instanceof InnerBaseActivity) {
swipeActivity.getWindow().getDecorView().setBackgroundColor(0);
((InnerBaseActivity) swipeActivity).convertToTranslucentCauseOrientationChanged();
invalidate();
return;
}
}
if (!restoreForSubWindow) {
View contentView = activity.findViewById(Window.ID_ANDROID_CONTENT);
if (mViewWeakReference == null) {
mViewWeakReference = new ArrayList<>();
}
mViewWeakReference.add(new ViewInfo(contentView, null, true));
invalidate();
return;
}
try {
IBinder windowToken = activity.getWindow().getDecorView().getWindowToken();
Field windowManagerGlobalField = activity.getWindowManager().getClass().getDeclaredField("mGlobal");
windowManagerGlobalField.setAccessible(true);
Object windowManagerGlobal = windowManagerGlobalField.get(activity.getWindowManager());
if (windowManagerGlobal != null) {
Field viewsField = windowManagerGlobal.getClass().getDeclaredField("mViews");
viewsField.setAccessible(true);
Field paramsField = windowManagerGlobal.getClass().getDeclaredField("mParams");
paramsField.setAccessible(true);
List<WindowManager.LayoutParams> params = (List<WindowManager.LayoutParams>) paramsField.get(windowManagerGlobal);
List<View> views = (List<View>) viewsField.get(windowManagerGlobal);
IBinder activityToken = null;
// reverse order
for (int i = params.size() - 1; i >= 0; i--) {
WindowManager.LayoutParams lp = params.get(i);
View view = views.get(i);
if (view.getWindowToken() == windowToken) {
activityToken = lp.token;
break;
}
}
if (activityToken != null) {
// reverse order
for (int i = params.size() - 1; i >= 0; i--) {
WindowManager.LayoutParams lp = params.get(i);
View view = views.get(i);
boolean isMain = view.getWindowToken() == windowToken;
// Dialog use activityToken in lp
// PopupWindow use windowToken in lp
if (isMain || lp.token == activityToken || lp.token == windowToken) {
View prevContentView = view.findViewById(Window.ID_ANDROID_CONTENT);
if (mViewWeakReference == null) {
mViewWeakReference = new ArrayList<>();
}
if (prevContentView != null) {
mViewWeakReference.add(new ViewInfo(prevContentView, lp, isMain));
}else {
// PopupWindow doest not exist a descendant view with id Window.ID_ANDROID_CONTENT
mViewWeakReference.add(new ViewInfo(view, lp, isMain));
}
}
}
}
}
} catch (Exception ignored) {
} finally {
// sure get one view
if (mViewWeakReference == null || mViewWeakReference.isEmpty()) {
View contentView = activity.findViewById(Window.ID_ANDROID_CONTENT);
if (mViewWeakReference == null) {
mViewWeakReference = new ArrayList<>();
}
mViewWeakReference.add(new ViewInfo(contentView, null, true));
}
}
invalidate();
}
public void
gitextract_k1p2gcqq/
├── .github/
│ └── ISSUE_TEMPLATE.md
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE.TXT
├── README.md
├── arch/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── qmui/
│ │ └── arch/
│ │ └── ExampleInstrumentedTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── qmuiteam/
│ │ │ └── qmui/
│ │ │ └── arch/
│ │ │ ├── InnerBaseActivity.java
│ │ │ ├── QMUIActivity.java
│ │ │ ├── QMUIFragment.java
│ │ │ ├── QMUIFragmentActivity.java
│ │ │ ├── QMUIFragmentContainerProvider.java
│ │ │ ├── QMUIFragmentPagerAdapter.java
│ │ │ ├── QMUILatestVisit.java
│ │ │ ├── QMUINavFragment.java
│ │ │ ├── QMUISwipeBackActivityManager.java
│ │ │ ├── SwipeBackLayout.java
│ │ │ ├── SwipeBackgroundView.java
│ │ │ ├── Utils.java
│ │ │ ├── annotation/
│ │ │ │ └── DefaultFirstFragment.java
│ │ │ ├── effect/
│ │ │ │ ├── Effect.java
│ │ │ │ ├── FragmentResultEffect.java
│ │ │ │ ├── MapEffect.java
│ │ │ │ ├── QMUIFragmentEffectHandler.java
│ │ │ │ ├── QMUIFragmentEffectRegistration.java
│ │ │ │ ├── QMUIFragmentEffectRegistry.java
│ │ │ │ ├── QMUIFragmentMapEffectHandler.java
│ │ │ │ └── QMUIFragmentResultEffectHandler.java
│ │ │ ├── record/
│ │ │ │ ├── DefaultLatestVisitStorage.java
│ │ │ │ ├── LatestVisitArgumentCollector.java
│ │ │ │ ├── QMUILatestVisitStorage.java
│ │ │ │ ├── RecordArgumentEditor.java
│ │ │ │ ├── RecordArgumentEditorImpl.java
│ │ │ │ └── RecordIdClassMap.java
│ │ │ └── scheme/
│ │ │ ├── ActivitySchemeItem.kt
│ │ │ ├── FragmentSchemeItem.kt
│ │ │ ├── QMUISchemeBuilder.kt
│ │ │ ├── QMUISchemeFragmentFactory.kt
│ │ │ ├── QMUISchemeHandler.kt
│ │ │ ├── QMUISchemeHandlerInterceptor.kt
│ │ │ ├── QMUISchemeIntentFactory.kt
│ │ │ ├── QMUISchemeMatcher.kt
│ │ │ ├── QMUIUnknownSchemeHandler.kt
│ │ │ ├── SchemeHandleContext.kt
│ │ │ ├── SchemeInfo.kt
│ │ │ ├── SchemeItem.kt
│ │ │ ├── SchemeMap.kt
│ │ │ ├── SchemeRefreshable.kt
│ │ │ └── SchemeValue.kt
│ │ └── res/
│ │ ├── anim/
│ │ │ ├── decelerate_factor_interpolator.xml
│ │ │ ├── decelerate_low_factor_interpolator.xml
│ │ │ ├── scale_enter.xml
│ │ │ ├── scale_exit.xml
│ │ │ ├── slide_in_left.xml
│ │ │ ├── slide_in_right.xml
│ │ │ ├── slide_out_left.xml
│ │ │ ├── slide_out_right.xml
│ │ │ ├── slide_still.xml
│ │ │ ├── swipe_back_enter.xml
│ │ │ ├── swipe_back_exit.xml
│ │ │ └── swipe_back_exit_still.xml
│ │ ├── animator/
│ │ │ ├── scale_enter.xml
│ │ │ ├── scale_exit.xml
│ │ │ ├── slide_in_left.xml
│ │ │ ├── slide_in_right.xml
│ │ │ ├── slide_out_left.xml
│ │ │ ├── slide_out_right.xml
│ │ │ └── slide_still.xml
│ │ └── values/
│ │ ├── attrs.xml
│ │ ├── ids.xml
│ │ ├── qmui_integers.xml
│ │ ├── strings.xml
│ │ └── style.xml
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmui/
│ └── arch/
│ └── ExampleUnitTest.java
├── arch-annotation/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmui/
│ └── arch/
│ └── annotation/
│ ├── ActivityScheme.java
│ ├── FragmentContainerParam.java
│ ├── FragmentScheme.java
│ └── LatestVisitRecord.java
├── arch-compiler/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmui/
│ └── arch/
│ ├── BaseProcessor.java
│ ├── LatestVisitProcessor.java
│ └── SchemeProcessor.java
├── build.gradle.kts
├── compiler/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmuidemo/
│ └── compiler/
│ └── WidgetProcessor.java
├── compose/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── compose/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── qmuiteam/
│ │ │ └── compose/
│ │ │ └── modal/
│ │ │ ├── ModalImpl.kt
│ │ │ ├── QMUIBottomSheet.kt
│ │ │ ├── QMUIDialog.kt
│ │ │ ├── QMUIModal.kt
│ │ │ └── QMUIToast.kt
│ │ └── res/
│ │ └── values/
│ │ └── ids.xml
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── compose/
│ └── ExampleUnitTest.kt
├── compose-core/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── compose/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── qmuiteam/
│ │ │ └── compose/
│ │ │ └── core/
│ │ │ ├── ex/
│ │ │ │ └── DrawScopeEx.kt
│ │ │ ├── helper/
│ │ │ │ ├── Dimen.kt
│ │ │ │ ├── Global.kt
│ │ │ │ ├── Log.kt
│ │ │ │ └── LogTag.kt
│ │ │ ├── provider/
│ │ │ │ └── WindowInsets.kt
│ │ │ └── ui/
│ │ │ ├── DefaultConfig.kt
│ │ │ ├── PressWithAlphaBox.kt
│ │ │ ├── QMUIIcon.kt
│ │ │ ├── QMUIItem.kt
│ │ │ └── QMUITopBar.kt
│ │ └── res/
│ │ ├── drawable/
│ │ │ ├── ic_qmui_checkbox_checked.xml
│ │ │ ├── ic_qmui_checkbox_normal.xml
│ │ │ ├── ic_qmui_checkbox_partial.xml
│ │ │ ├── ic_qmui_chevron.xml
│ │ │ ├── ic_qmui_mark.xml
│ │ │ └── ic_qmui_topbar_back.xml
│ │ └── values/
│ │ └── qmui_ids.xml
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── compose/
│ └── ExampleUnitTest.kt
├── deploy.sh
├── editor/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── editor/
│ ├── EditorBehavior.kt
│ ├── QMUIEditor.kt
│ ├── Range.kt
│ ├── TextFieldValueEx.kt
│ └── WordEdit.kt
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── lib/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── qmuidemo/
│ └── lib/
│ ├── Group.java
│ └── annotation/
│ └── Widget.java
├── photo/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── qmuiteam/
│ │ │ └── photo/
│ │ │ ├── activity/
│ │ │ │ ├── QMUIPhotoClipActivity.kt
│ │ │ │ ├── QMUIPhotoPickerActivity.kt
│ │ │ │ └── QMUIPhotoViewerActivity.kt
│ │ │ ├── compose/
│ │ │ │ ├── BitmapRegion.kt
│ │ │ │ ├── GesturePhoto.kt
│ │ │ │ ├── Loading.kt
│ │ │ │ ├── PhotoClipper.kt
│ │ │ │ ├── PhotoConfig.kt
│ │ │ │ ├── Thumbnail.kt
│ │ │ │ └── picker/
│ │ │ │ ├── Buckets.kt
│ │ │ │ ├── Common.kt
│ │ │ │ ├── Config.kt
│ │ │ │ ├── Edit.kt
│ │ │ │ ├── Grid.kt
│ │ │ │ ├── PaintEdit.kt
│ │ │ │ ├── Preview.kt
│ │ │ │ ├── TextEdit.kt
│ │ │ │ └── TopBarItem.kt
│ │ │ ├── data/
│ │ │ │ ├── QMUIBitmapRegion.kt
│ │ │ │ ├── QMUIMediaDataProvider.kt
│ │ │ │ ├── QMUIPhotoTransitionDelivery.kt
│ │ │ │ └── QMUIPhotoTransitionInfo.kt
│ │ │ ├── util/
│ │ │ │ ├── BitmapEx.kt
│ │ │ │ ├── QMUIPhotoHelper.kt
│ │ │ │ └── ViewEx.kt
│ │ │ └── vm/
│ │ │ └── QMUIPhotoPickerViewModel.kt
│ │ └── res/
│ │ └── anim/
│ │ ├── scale_enter.xml
│ │ └── scale_exit.xml
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── ExampleUnitTest.kt
├── photo-coil/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── photo/
│ │ └── coil/
│ │ ├── QMUICoilImageDecoderFactory.kt
│ │ ├── QMUICoilPhoto.kt
│ │ └── QMUIMediaCoilPhotoProviderFactory.kt
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── ExampleUnitTest.kt
├── photo-glide/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ └── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── photo/
│ │ └── glide/
│ │ ├── QMUIGlideModule.kt
│ │ ├── QMUIGlidePhoto.kt
│ │ └── QMUIMediaGlidePhotoProviderFactory.kt
│ └── test/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── ExampleUnitTest.kt
├── plugin/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── settings.gradle.kts
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── qmuiteam/
│ └── plugin/
│ ├── Dep.kt
│ ├── QMUIDepPlugin.kt
│ └── QMUIPublish.kt
├── qmui/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── assets/
│ │ └── QMUIWebviewBridge.js
│ ├── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── qmui/
│ │ ├── Beta.java
│ │ ├── QMUIConfig.java
│ │ ├── QMUIInterpolatorStaticHolder.java
│ │ ├── QMUILog.java
│ │ ├── alpha/
│ │ │ ├── QMUIAlphaButton.java
│ │ │ ├── QMUIAlphaConstraintLayout.java
│ │ │ ├── QMUIAlphaFrameLayout.java
│ │ │ ├── QMUIAlphaImageButton.java
│ │ │ ├── QMUIAlphaLinearLayout.java
│ │ │ ├── QMUIAlphaRelativeLayout.java
│ │ │ ├── QMUIAlphaTextView.java
│ │ │ ├── QMUIAlphaViewHelper.java
│ │ │ └── QMUIAlphaViewInf.java
│ │ ├── exposure/
│ │ │ ├── Exposure.kt
│ │ │ ├── ExposureChecker.kt
│ │ │ ├── ExposureContainer.kt
│ │ │ ├── ExposureEffect.kt
│ │ │ └── ExposureEx.kt
│ │ ├── kotlin/
│ │ │ ├── DimenKt.kt
│ │ │ ├── LayoutParamKt.kt
│ │ │ └── ViewKt.kt
│ │ ├── layout/
│ │ │ ├── IQMUILayout.java
│ │ │ ├── QMUIButton.java
│ │ │ ├── QMUIConstraintLayout.java
│ │ │ ├── QMUIFrameLayout.java
│ │ │ ├── QMUILayoutHelper.java
│ │ │ ├── QMUILinearLayout.java
│ │ │ ├── QMUIPriorityLinearLayout.java
│ │ │ └── QMUIRelativeLayout.java
│ │ ├── link/
│ │ │ ├── ITouchableSpan.java
│ │ │ ├── QMUILinkTouchDecorHelper.java
│ │ │ ├── QMUILinkTouchMovementMethod.java
│ │ │ ├── QMUILinkify.java
│ │ │ └── QMUIScrollingMovementMethod.java
│ │ ├── nestedScroll/
│ │ │ ├── IQMUIContinuousNestedBottomView.java
│ │ │ ├── IQMUIContinuousNestedScrollCommon.java
│ │ │ ├── IQMUIContinuousNestedTopView.java
│ │ │ ├── QMUIContinuousNestedBottomAreaBehavior.java
│ │ │ ├── QMUIContinuousNestedBottomDelegateLayout.java
│ │ │ ├── QMUIContinuousNestedBottomRecyclerView.java
│ │ │ ├── QMUIContinuousNestedScrollLayout.java
│ │ │ ├── QMUIContinuousNestedTopAreaBehavior.java
│ │ │ ├── QMUIContinuousNestedTopDelegateLayout.java
│ │ │ ├── QMUIContinuousNestedTopLinearLayout.java
│ │ │ ├── QMUIContinuousNestedTopRecyclerView.java
│ │ │ ├── QMUIContinuousNestedTopWebView.java
│ │ │ ├── QMUIDraggableScrollBar.java
│ │ │ └── QMUIViewOffsetBehavior.java
│ │ ├── qqface/
│ │ │ ├── IQMUIQQFaceManager.java
│ │ │ ├── QMUINoQQFaceManager.java
│ │ │ ├── QMUIQQFaceCompiler.java
│ │ │ ├── QMUIQQFaceView.java
│ │ │ └── QQFace.java
│ │ ├── recyclerView/
│ │ │ ├── QMUIRVDraggableScrollBar.java
│ │ │ ├── QMUIRVItemSwipeAction.java
│ │ │ ├── QMUISwipeAction.java
│ │ │ └── QMUISwipeViewHolder.java
│ │ ├── skin/
│ │ │ ├── IQMUISkinApplyListener.java
│ │ │ ├── IQMUISkinDispatchInterceptor.java
│ │ │ ├── IQMUISkinHandlerDecoration.java
│ │ │ ├── IQMUISkinHandlerSpan.java
│ │ │ ├── IQMUISkinHandlerView.java
│ │ │ ├── QMUISkinHelper.java
│ │ │ ├── QMUISkinLayoutInflaterFactory.java
│ │ │ ├── QMUISkinManager.java
│ │ │ ├── QMUISkinValueBuilder.java
│ │ │ ├── SkinWriter.java
│ │ │ ├── annotation/
│ │ │ │ ├── QMUISkinChangeNotAdapted.java
│ │ │ │ └── QMUISkinListenWithHierarchyChange.java
│ │ │ ├── defaultAttr/
│ │ │ │ ├── IQMUISkinDefaultAttrProvider.java
│ │ │ │ └── QMUISkinSimpleDefaultAttrProvider.java
│ │ │ └── handler/
│ │ │ ├── IQMUISkinRuleHandler.java
│ │ │ ├── QMUISkinRuleAlphaHandler.java
│ │ │ ├── QMUISkinRuleBackgroundHandler.java
│ │ │ ├── QMUISkinRuleBgTintColorHandler.java
│ │ │ ├── QMUISkinRuleBorderHandler.java
│ │ │ ├── QMUISkinRuleColorHandler.java
│ │ │ ├── QMUISkinRuleColorStateListHandler.java
│ │ │ ├── QMUISkinRuleDrawableHandler.java
│ │ │ ├── QMUISkinRuleFloatHandler.java
│ │ │ ├── QMUISkinRuleHintColorHandler.java
│ │ │ ├── QMUISkinRuleMoreBgColorHandler.java
│ │ │ ├── QMUISkinRuleMoreTextColorHandler.java
│ │ │ ├── QMUISkinRuleProgressColorHandler.java
│ │ │ ├── QMUISkinRuleSeparatorHandler.java
│ │ │ ├── QMUISkinRuleSrcHandler.java
│ │ │ ├── QMUISkinRuleTextColorHandler.java
│ │ │ ├── QMUISkinRuleTextCompoundSrcHandler.java
│ │ │ ├── QMUISkinRuleTextCompoundTintColorHandler.java
│ │ │ ├── QMUISkinRuleTintColorHandler.java
│ │ │ └── QMUISkinRuleUnderlineHandler.java
│ │ ├── span/
│ │ │ ├── QMUIAlignMiddleImageSpan.java
│ │ │ ├── QMUIBlockSpaceSpan.java
│ │ │ ├── QMUICustomTypefaceSpan.java
│ │ │ ├── QMUIMarginImageSpan.java
│ │ │ ├── QMUIOnSpanClickListener.java
│ │ │ ├── QMUITextSizeSpan.java
│ │ │ └── QMUITouchableSpan.java
│ │ ├── util/
│ │ │ ├── OnceReadValue.java
│ │ │ ├── QMUIActivityLifecycleCallbacks.java
│ │ │ ├── QMUICollapsingTextHelper.java
│ │ │ ├── QMUIColorHelper.java
│ │ │ ├── QMUIDeviceHelper.java
│ │ │ ├── QMUIDirection.java
│ │ │ ├── QMUIDisplayHelper.java
│ │ │ ├── QMUIDrawableHelper.java
│ │ │ ├── QMUIKeyboardHelper.java
│ │ │ ├── QMUILangHelper.java
│ │ │ ├── QMUINotchHelper.java
│ │ │ ├── QMUIPackageHelper.java
│ │ │ ├── QMUIReflectHelper.java
│ │ │ ├── QMUIResHelper.java
│ │ │ ├── QMUISpanHelper.java
│ │ │ ├── QMUIStatusBarHelper.java
│ │ │ ├── QMUIToastHelper.java
│ │ │ ├── QMUIViewHelper.java
│ │ │ ├── QMUIViewOffsetHelper.java
│ │ │ ├── QMUIWindowHelper.java
│ │ │ └── QMUIWindowInsetHelper.java
│ │ └── widget/
│ │ ├── IBlankTouchDetector.java
│ │ ├── IWindowInsetKeyboardConsumer.java
│ │ ├── QMUIAnimationListView.java
│ │ ├── QMUIAppBarLayout.java
│ │ ├── QMUICollapsingTopBarLayout.java
│ │ ├── QMUIEmptyView.java
│ │ ├── QMUIFloatLayout.java
│ │ ├── QMUIFontFitTextView.java
│ │ ├── QMUIItemViewsAdapter.java
│ │ ├── QMUILoadingView.java
│ │ ├── QMUINotchConsumeLayout.java
│ │ ├── QMUIObservableScrollView.java
│ │ ├── QMUIPagerAdapter.java
│ │ ├── QMUIProgressBar.java
│ │ ├── QMUIRadiusImageView.java
│ │ ├── QMUIRadiusImageView2.java
│ │ ├── QMUISeekBar.java
│ │ ├── QMUISlider.java
│ │ ├── QMUITopBar.java
│ │ ├── QMUITopBarLayout.java
│ │ ├── QMUIVerticalTextView.java
│ │ ├── QMUIViewPager.java
│ │ ├── QMUIWindowInsetLayout.java
│ │ ├── QMUIWindowInsetLayout2.java
│ │ ├── QMUIWrapContentListView.java
│ │ ├── QMUIWrapContentScrollView.java
│ │ ├── dialog/
│ │ │ ├── QMUIBaseDialog.java
│ │ │ ├── QMUIBottomSheet.java
│ │ │ ├── QMUIBottomSheetBaseBuilder.java
│ │ │ ├── QMUIBottomSheetBehavior.java
│ │ │ ├── QMUIBottomSheetGridItemModel.java
│ │ │ ├── QMUIBottomSheetGridItemView.java
│ │ │ ├── QMUIBottomSheetGridLineLayout.java
│ │ │ ├── QMUIBottomSheetListAdapter.java
│ │ │ ├── QMUIBottomSheetListItemDecoration.java
│ │ │ ├── QMUIBottomSheetListItemModel.java
│ │ │ ├── QMUIBottomSheetListItemView.java
│ │ │ ├── QMUIBottomSheetRootLayout.java
│ │ │ ├── QMUIDialog.java
│ │ │ ├── QMUIDialogAction.java
│ │ │ ├── QMUIDialogBlockBuilder.java
│ │ │ ├── QMUIDialogBuilder.java
│ │ │ ├── QMUIDialogMenuItemView.java
│ │ │ ├── QMUIDialogRootLayout.java
│ │ │ ├── QMUIDialogView.java
│ │ │ ├── QMUITipDialog.java
│ │ │ └── QMUITipDialogView.java
│ │ ├── grouplist/
│ │ │ ├── QMUICommonListItemView.java
│ │ │ ├── QMUIGroupListSectionHeaderFooterView.java
│ │ │ └── QMUIGroupListView.java
│ │ ├── popup/
│ │ │ ├── QMUIBasePopup.java
│ │ │ ├── QMUIFullScreenPopup.java
│ │ │ ├── QMUINormalPopup.java
│ │ │ ├── QMUIPopup.java
│ │ │ ├── QMUIPopups.java
│ │ │ └── QMUIQuickAction.java
│ │ ├── pullLayout/
│ │ │ ├── QMUIAlwaysFollowOffsetCalculator.java
│ │ │ ├── QMUICenterOffsetCalculator.java
│ │ │ ├── QMUIFixToTargetOffsetCalculator.java
│ │ │ ├── QMUIPullLayout.java
│ │ │ ├── QMUIPullLoadMoreView.java
│ │ │ └── QMUIPullRefreshView.java
│ │ ├── pullRefreshLayout/
│ │ │ ├── QMUICenterGravityRefreshOffsetCalculator.java
│ │ │ ├── QMUIDefaultRefreshOffsetCalculator.java
│ │ │ ├── QMUIFollowRefreshOffsetCalculator.java
│ │ │ └── QMUIPullRefreshLayout.java
│ │ ├── roundwidget/
│ │ │ ├── QMUIRoundButton.java
│ │ │ ├── QMUIRoundButtonDrawable.java
│ │ │ ├── QMUIRoundFrameLayout.java
│ │ │ ├── QMUIRoundLinearLayout.java
│ │ │ └── QMUIRoundRelativeLayout.java
│ │ ├── section/
│ │ │ ├── QMUIDefaultStickySectionAdapter.java
│ │ │ ├── QMUISection.java
│ │ │ ├── QMUISectionDiffCallback.java
│ │ │ ├── QMUIStickySectionAdapter.java
│ │ │ ├── QMUIStickySectionItemDecoration.java
│ │ │ └── QMUIStickySectionLayout.java
│ │ ├── tab/
│ │ │ ├── QMUIBasicTabSegment.java
│ │ │ ├── QMUITab.java
│ │ │ ├── QMUITabAdapter.java
│ │ │ ├── QMUITabBuilder.java
│ │ │ ├── QMUITabIcon.java
│ │ │ ├── QMUITabIndicator.java
│ │ │ ├── QMUITabSegment.java
│ │ │ ├── QMUITabSegment2.java
│ │ │ └── QMUITabView.java
│ │ ├── textview/
│ │ │ ├── ISpanTouchFix.java
│ │ │ ├── QMUILinkTextView.java
│ │ │ └── QMUISpanTouchFixTextView.java
│ │ └── webview/
│ │ ├── QMUIBridgeWebViewClient.java
│ │ ├── QMUIWebView.java
│ │ ├── QMUIWebViewBridgeHandler.java
│ │ ├── QMUIWebViewClient.java
│ │ └── QMUIWebViewContainer.java
│ └── res/
│ ├── anim/
│ │ ├── decelerate_factor_interpolator.xml
│ │ ├── decelerate_low_factor_interpolator.xml
│ │ ├── grow_from_bottom.xml
│ │ ├── grow_from_bottomleft_to_topright.xml
│ │ ├── grow_from_bottomright_to_topleft.xml
│ │ ├── grow_from_top.xml
│ │ ├── grow_from_topleft_to_bottomright.xml
│ │ ├── grow_from_topright_to_bottomleft.xml
│ │ ├── scale_in_center.xml
│ │ ├── scale_out_center.xml
│ │ ├── shrink_from_bottom.xml
│ │ ├── shrink_from_bottomleft_to_topright.xml
│ │ ├── shrink_from_bottomright_to_topleft.xml
│ │ ├── shrink_from_top.xml
│ │ ├── shrink_from_topleft_to_bottomright.xml
│ │ └── shrink_from_topright_to_bottomleft.xml
│ ├── color/
│ │ ├── qmui_btn_blue_bg.xml
│ │ ├── qmui_btn_blue_border.xml
│ │ ├── qmui_btn_blue_text.xml
│ │ ├── qmui_s_link_color.xml
│ │ ├── qmui_s_list_item_text_color.xml
│ │ ├── qmui_s_switch_text_color.xml
│ │ ├── qmui_s_transparent.xml
│ │ └── qmui_topbar_text_color.xml
│ ├── drawable/
│ │ ├── qmui_divider_bottom_bitmap.xml
│ │ ├── qmui_divider_top_bitmap.xml
│ │ ├── qmui_icon_popup_close.xml
│ │ ├── qmui_icon_popup_close_with_bg.xml
│ │ ├── qmui_icon_pull_down.xml
│ │ ├── qmui_icon_quick_action_more_arrow_left.xml
│ │ ├── qmui_icon_quick_action_more_arrow_right.xml
│ │ ├── qmui_icon_topbar_back.xml
│ │ ├── qmui_s_checkbox.xml
│ │ ├── qmui_s_icon_switch.xml
│ │ ├── qmui_s_list_item_bg_1.xml
│ │ ├── qmui_s_list_item_bg_2.xml
│ │ ├── qmui_s_switch_thumb.xml
│ │ ├── qmui_s_switch_track.xml
│ │ ├── qmui_switch_thumb.xml
│ │ ├── qmui_switch_thumb_checked.xml
│ │ ├── qmui_switch_track.xml
│ │ ├── qmui_switch_track_checked.xml
│ │ └── qmui_tips_point.xml
│ ├── drawable-v21/
│ │ └── qmui_s_list_item_bg_2.xml
│ ├── layout/
│ │ ├── qmui_bottom_sheet_dialog.xml
│ │ ├── qmui_common_list_item.xml
│ │ ├── qmui_empty_view.xml
│ │ └── qmui_group_list_section_layout.xml
│ ├── values/
│ │ ├── config_colors.xml
│ │ ├── qmui_attrs.xml
│ │ ├── qmui_attrs_alpha.xml
│ │ ├── qmui_attrs_base.xml
│ │ ├── qmui_attrs_custom.xml
│ │ ├── qmui_attrs_layout.xml
│ │ ├── qmui_attrs_round.xml
│ │ ├── qmui_colors.xml
│ │ ├── qmui_dimens.xml
│ │ ├── qmui_ids.xml
│ │ ├── qmui_strings.xml
│ │ ├── qmui_style_appearance.xml
│ │ ├── qmui_style_widget.xml
│ │ └── qmui_themes.xml
│ └── values-v21/
│ └── qmui_themes.xml
├── qmuidemo/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── lint.xml
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── assets/
│ │ └── demo.html
│ ├── java/
│ │ └── com/
│ │ └── qmuiteam/
│ │ └── qmuidemo/
│ │ ├── QDApplication.kt
│ │ ├── QDMainActivity.java
│ │ ├── QDQQFaceManager.java
│ │ ├── activity/
│ │ │ ├── ArchTestActivity.java
│ │ │ ├── LauncherActivity.kt
│ │ │ ├── QDPhotoPickerActivity.kt
│ │ │ ├── TestArchInViewPagerActivity.java
│ │ │ └── TranslucentActivity.java
│ │ ├── adaptor/
│ │ │ ├── QDRecyclerViewAdapter.java
│ │ │ └── QDSimpleAdapter.java
│ │ ├── base/
│ │ │ ├── BaseActivity.java
│ │ │ ├── BaseFragment.java
│ │ │ ├── BaseFragmentActivity.java
│ │ │ ├── BaseRecyclerAdapter.java
│ │ │ ├── ComposeBaseFragment.kt
│ │ │ └── RecyclerViewHolder.java
│ │ ├── decorator/
│ │ │ ├── DividerItemDecoration.java
│ │ │ └── GridDividerItemDecoration.java
│ │ ├── fragment/
│ │ │ ├── QDAboutFragment.kt
│ │ │ ├── QDDialogFragment.kt
│ │ │ ├── QDWebExplorerFragment.java
│ │ │ ├── components/
│ │ │ │ ├── QDBottomSheetFragment.java
│ │ │ │ ├── QDButtonFragment.kt
│ │ │ │ ├── QDCollapsingTopBarLayoutFragment.java
│ │ │ │ ├── QDEmptyViewFragment.java
│ │ │ │ ├── QDFloatLayoutFragment.java
│ │ │ │ ├── QDGroupListViewFragment.kt
│ │ │ │ ├── QDLayoutFragment.java
│ │ │ │ ├── QDLinkTextViewFragment.java
│ │ │ │ ├── QDPopupFragment.java
│ │ │ │ ├── QDPriorityLinearLayoutFragment.java
│ │ │ │ ├── QDProgressBarFragment.java
│ │ │ │ ├── QDPullRefreshFragment.kt
│ │ │ │ ├── QDRadiusImageView2ScaleTypeFragment.java
│ │ │ │ ├── QDRadiusImageView2UsageFragment.java
│ │ │ │ ├── QDRadiusImageViewFragment.java
│ │ │ │ ├── QDRadiusImageViewScaleTypeFragment.java
│ │ │ │ ├── QDRadiusImageViewUsageFragment.java
│ │ │ │ ├── QDRecyclerViewDraggableScrollBarFragment.java
│ │ │ │ ├── QDSliderFragment.java
│ │ │ │ ├── QDSpanTouchFixTextViewFragment.java
│ │ │ │ ├── QDTabSegment2FixModeFragment.java
│ │ │ │ ├── QDTabSegment2ScrollableModeFragment.java
│ │ │ │ ├── QDTabSegmentFixModeFragment.java
│ │ │ │ ├── QDTabSegmentFragment.java
│ │ │ │ ├── QDTabSegmentScrollableModeFragment.java
│ │ │ │ ├── QDTabSegmentSpaceWeightFragment.java
│ │ │ │ ├── QDTipDialogFragment.java
│ │ │ │ ├── QDVerticalTextViewFragment.java
│ │ │ │ ├── SliderSchemeMatcher.java
│ │ │ │ ├── pullLayout/
│ │ │ │ │ ├── QDPullFragment.java
│ │ │ │ │ ├── QDPullHorizontalTestFragment.java
│ │ │ │ │ ├── QDPullRefreshAndLoadMoreTestFragment.java
│ │ │ │ │ └── QDPullVerticalTestFragment.java
│ │ │ │ ├── qqface/
│ │ │ │ │ ├── QDQQFaceFragment.java
│ │ │ │ │ ├── QDQQFacePerformanceTestFragment.java
│ │ │ │ │ ├── QDQQFaceTestData.java
│ │ │ │ │ ├── QDQQFaceUsageFragment.kt
│ │ │ │ │ ├── emojicon/
│ │ │ │ │ │ ├── EmojiCache.java
│ │ │ │ │ │ ├── EmojiconHandler.java
│ │ │ │ │ │ ├── EmojiconSpan.java
│ │ │ │ │ │ ├── EmojiconTextView.java
│ │ │ │ │ │ └── emoji/
│ │ │ │ │ │ ├── Emojicon.java
│ │ │ │ │ │ ├── Nature.java
│ │ │ │ │ │ ├── Objects.java
│ │ │ │ │ │ ├── People.java
│ │ │ │ │ │ ├── Places.java
│ │ │ │ │ │ └── Symbols.java
│ │ │ │ │ └── pageView/
│ │ │ │ │ ├── QDEmojiconPagerView.java
│ │ │ │ │ ├── QDQQFaceBasePagerView.java
│ │ │ │ │ └── QDQQFacePagerView.java
│ │ │ │ ├── section/
│ │ │ │ │ ├── QDBaseSectionLayoutFragment.java
│ │ │ │ │ ├── QDGridSectionAdapter.java
│ │ │ │ │ ├── QDGridSectionLayoutFragment.java
│ │ │ │ │ ├── QDListSectionAdapter.java
│ │ │ │ │ ├── QDListSectionLayoutFragment.java
│ │ │ │ │ ├── QDListWithDecorationSectionAdapter.java
│ │ │ │ │ ├── QDListWithDecorationSectionLayoutFragment.java
│ │ │ │ │ └── QDSectionLayoutFragment.java
│ │ │ │ ├── swipeAction/
│ │ │ │ │ ├── QDRVSwipeActionFragment.java
│ │ │ │ │ ├── QDRVSwipeDeleteWithNoActionFragment.java
│ │ │ │ │ ├── QDRVSwipeMutiActionFragment.java
│ │ │ │ │ ├── QDRVSwipeMutiActionOnlyIconFragment.java
│ │ │ │ │ ├── QDRVSwipeMutiActionWithIconFragment.java
│ │ │ │ │ ├── QDRVSwipeSingleDeleteActionFragment.java
│ │ │ │ │ └── QDRVSwipeUpDeleteFragment.java
│ │ │ │ └── viewpager/
│ │ │ │ ├── CardTransformer.java
│ │ │ │ ├── QDFitSystemWindowViewPagerFragment.java
│ │ │ │ ├── QDLoopViewPagerFragment.java
│ │ │ │ └── QDViewPagerFragment.java
│ │ │ ├── home/
│ │ │ │ ├── HomeComponentsController.java
│ │ │ │ ├── HomeController.java
│ │ │ │ ├── HomeFragment.java
│ │ │ │ ├── HomeLabController.java
│ │ │ │ └── HomeUtilController.java
│ │ │ ├── lab/
│ │ │ │ ├── QDAnimationListViewFragment.java
│ │ │ │ ├── QDArchNavFragment.java
│ │ │ │ ├── QDArchSurfaceTestFragment.java
│ │ │ │ ├── QDArchTestFragment.java
│ │ │ │ ├── QDArchWebViewTestFragment.java
│ │ │ │ ├── QDComposeTipFragment.kt
│ │ │ │ ├── QDContinuousBottomView.java
│ │ │ │ ├── QDContinuousNestedScroll1Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll2Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll3Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll4Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll5Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll6Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll7Fragment.java
│ │ │ │ ├── QDContinuousNestedScroll8Fragment.java
│ │ │ │ ├── QDContinuousNestedScrollBaseFragment.java
│ │ │ │ ├── QDContinuousNestedScrollFragment.java
│ │ │ │ ├── QDEditorFragment.kt
│ │ │ │ ├── QDEmojiInputFragment.kt
│ │ │ │ ├── QDPhotoClipFragment.kt
│ │ │ │ ├── QDPhotoFragment.kt
│ │ │ │ ├── QDSchemeFragment.java
│ │ │ │ ├── QDSnapHelperFragment.java
│ │ │ │ ├── QDSwipeDeleteListViewFragment.java
│ │ │ │ ├── QDWebViewBridgeFragment.java
│ │ │ │ ├── QDWebViewFixFragment.java
│ │ │ │ └── QDWebViewFragment.java
│ │ │ └── util/
│ │ │ ├── QDColorHelperFragment.java
│ │ │ ├── QDDeviceHelperFragment.java
│ │ │ ├── QDDrawableHelperFragment.java
│ │ │ ├── QDNotchHelperFragment.java
│ │ │ ├── QDSpanFragment.java
│ │ │ ├── QDStatusBarHelperFragment.java
│ │ │ ├── QDViewHelperAnimationFadeFragment.java
│ │ │ ├── QDViewHelperAnimationSlideFragment.java
│ │ │ ├── QDViewHelperBackgroundAnimationBlinkFragment.java
│ │ │ ├── QDViewHelperBackgroundAnimationFullFragment.java
│ │ │ └── QDViewHelperFragment.java
│ │ ├── manager/
│ │ │ ├── QDAppGlideModule.kt
│ │ │ ├── QDDataManager.java
│ │ │ ├── QDPreferenceManager.java
│ │ │ ├── QDSchemeManager.kt
│ │ │ ├── QDSkinManager.java
│ │ │ ├── QDUpgradeManager.java
│ │ │ ├── UpgradeTask.java
│ │ │ └── UpgradeTipTask.java
│ │ ├── model/
│ │ │ ├── CustomEffect.java
│ │ │ ├── QDItemDescription.java
│ │ │ ├── SectionHeader.java
│ │ │ └── SectionItem.java
│ │ └── view/
│ │ ├── QDLoadingItemView.java
│ │ ├── QDSectionHeaderView.java
│ │ ├── QDShadowAdjustLayout.java
│ │ └── QDWebView.java
│ └── res/
│ ├── color/
│ │ ├── s_app_color_blue_2.xml
│ │ ├── s_app_color_blue_3.xml
│ │ ├── s_app_color_blue_to_red.xml
│ │ ├── s_app_color_gray.xml
│ │ ├── s_app_color_gray_dark.xml
│ │ ├── s_btn_blue.xml
│ │ ├── s_btn_gray.xml
│ │ └── s_topbar_btn_color.xml
│ ├── drawable/
│ │ ├── icon_popup_close_dark.xml
│ │ ├── icon_popup_close_with_bg_dark.xml
│ │ ├── icon_quick_action_copy.xml
│ │ ├── icon_quick_action_delete_line.xml
│ │ ├── icon_quick_action_dict.xml
│ │ ├── icon_quick_action_line.xml
│ │ ├── icon_quick_action_share.xml
│ │ ├── launcher_bg.xml
│ │ ├── pager_layout_item_bg.xml
│ │ ├── s_app_touch_fix_area_bg.xml
│ │ ├── s_list_item_bg_dark_1.xml
│ │ ├── s_list_item_bg_dark_2.xml
│ │ ├── tab_panel_bg.xml
│ │ └── web_explorer_progress.xml
│ ├── drawable-night/
│ │ └── launcher_bg.xml
│ ├── layout/
│ │ ├── activity_arch_test.xml
│ │ ├── activity_translucent.xml
│ │ ├── drawablehelper_createfromview.xml
│ │ ├── fragment_about.xml
│ │ ├── fragment_animation_listview.xml
│ │ ├── fragment_arch_test.xml
│ │ ├── fragment_button.xml
│ │ ├── fragment_collapsing_topbar_layout.xml
│ │ ├── fragment_colorhelper.xml
│ │ ├── fragment_continuous_nested_scroll.xml
│ │ ├── fragment_drawablehelper.xml
│ │ ├── fragment_emptyview.xml
│ │ ├── fragment_floatlayout.xml
│ │ ├── fragment_fsw_viewpager.xml
│ │ ├── fragment_grouplistview.xml
│ │ ├── fragment_home.xml
│ │ ├── fragment_layout.xml
│ │ ├── fragment_link_texview_layout.xml
│ │ ├── fragment_listview.xml
│ │ ├── fragment_loop_viewpager.xml
│ │ ├── fragment_notch.xml
│ │ ├── fragment_pagerlayoutmanager.xml
│ │ ├── fragment_popup.xml
│ │ ├── fragment_priority_linear_layout.xml
│ │ ├── fragment_progressbar.xml
│ │ ├── fragment_pull_horizontal_test_layout.xml
│ │ ├── fragment_pull_refresh_and_load_more_test_layout.xml
│ │ ├── fragment_pull_refresh_listview.xml
│ │ ├── fragment_pull_vertical_test_layout.xml
│ │ ├── fragment_qqface_layout.xml
│ │ ├── fragment_radius_imageview.xml
│ │ ├── fragment_radius_imageview2.xml
│ │ ├── fragment_radius_imageview2_scale_type.xml
│ │ ├── fragment_radius_imageview_scale_type.xml
│ │ ├── fragment_scheme.xml
│ │ ├── fragment_section_layout.xml
│ │ ├── fragment_slider.xml
│ │ ├── fragment_spanhelper.xml
│ │ ├── fragment_surface_test.xml
│ │ ├── fragment_swipe_delete_listview.xml
│ │ ├── fragment_tab_viewpager2_layout.xml
│ │ ├── fragment_tab_viewpager_layout.xml
│ │ ├── fragment_touch_span_fix_layout.xml
│ │ ├── fragment_verticaltextview.xml
│ │ ├── fragment_viewhelper_animation_show_and_hide.xml
│ │ ├── fragment_viewhelper_background_animation.xml
│ │ ├── fragment_webview_explorer.xml
│ │ ├── home_item_layout.xml
│ │ ├── home_layout.xml
│ │ ├── recycler_linear_layout_simple_item.xml
│ │ ├── recycler_view_item.xml
│ │ ├── simple_list_item.xml
│ │ ├── simple_list_item_1.xml
│ │ └── tipdialog_custom.xml
│ ├── values/
│ │ ├── attr.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── ids.xml
│ │ ├── strings.xml
│ │ ├── styles.xml
│ │ └── theme.xml
│ └── xml/
│ └── network_security_config.xml
├── settings.gradle.kts
└── type/
├── .gitignore
├── build.gradle.kts
└── src/
└── main/
├── AndroidManifest.xml
└── java/
└── com/
└── qmuiteam/
└── qmui/
└── type/
├── EnvironmentUpdater.kt
├── Line.kt
├── LineIndentHandler.kt
├── LineLayout.kt
├── TypeEnvironment.kt
├── TypeModel.kt
├── element/
│ ├── BreakWordLineElement.kt
│ ├── DrawableElement.kt
│ ├── Element.kt
│ ├── EmojiElement.kt
│ ├── IgnoreEffectElement.kt
│ ├── NextParagraphElement.kt
│ └── TextElement.kt
├── emoji/
│ ├── EmojiModel.kt
│ └── EmojiSpan.kt
├── parser/
│ ├── EmojiResourceProvider.kt
│ ├── EmojiTextParser.kt
│ ├── ParserHelper.kt
│ ├── PlainTextParser.kt
│ └── TextParser.kt
└── view/
├── BaseTypeView.kt
├── EmojiEditText.kt
├── LineTypeView.kt
└── MarqueeTypeView.kt
Showing preview only (464K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5382 symbols across 368 files)
FILE: arch-compiler/src/main/java/com/qmuiteam/qmui/arch/BaseProcessor.java
class BaseProcessor (line 44) | public abstract class BaseProcessor extends AbstractProcessor {
method init (line 74) | @Override
method getSupportedSourceVersion (line 82) | @Override
method getOverrideMethod (line 88) | protected ExecutableElement getOverrideMethod(ClassName creator, Strin...
method error (line 101) | public void error(Element element, String message, Object... args) {
method waring (line 105) | public void waring(Element element, String message, Object... args) {
method note (line 109) | public void note(Element element, String message, Object... args) {
method printMessage (line 113) | private void printMessage(Diagnostic.Kind kind, Element element, Strin...
method isSubtypeOfType (line 121) | static boolean isSubtypeOfType(TypeMirror typeMirror, String otherType) {
method isTypeEqual (line 161) | static boolean isTypeEqual(TypeMirror typeMirror, String otherType) {
method isInterface (line 165) | static boolean isInterface(TypeMirror typeMirror) {
method getAnnotationMirror (line 170) | static AnnotationMirror getAnnotationMirror(Element element, Class<?> ...
method getAnnotationValue (line 183) | static AnnotationValue getAnnotationValue(AnnotationMirror annotationM...
FILE: arch-compiler/src/main/java/com/qmuiteam/qmui/arch/LatestVisitProcessor.java
class LatestVisitProcessor (line 41) | @AutoService(Processor.class)
method process (line 52) | @Override
method getSupportedAnnotationTypes (line 133) | @Override
FILE: arch-compiler/src/main/java/com/qmuiteam/qmui/arch/SchemeProcessor.java
class SchemeProcessor (line 51) | @AutoService(Processor.class)
method process (line 73) | @Override
method appendRequired (line 295) | private void appendRequired(MethodSpec.Builder constructorBuilder, Str...
method generateTypedParams (line 317) | private CodeBlock generateTypedParams(String[] keys) {
method generateCustomFactory (line 335) | private CodeBlock generateCustomFactory(boolean isActivity, Annotation...
method generateCustomMatcher (line 354) | private CodeBlock generateCustomMatcher(AnnotationMirror annotationMir...
method generateValueInterceptor (line 367) | private CodeBlock generateValueInterceptor(AnnotationMirror annotation...
method generateFragmentHostActivityList (line 380) | private CodeBlock generateFragmentHostActivityList(FragmentScheme frag...
method getSupportedAnnotationTypes (line 410) | @Override
class Item (line 418) | static class Item {
method Item (line 424) | public Item(boolean isActivity, TypeElement element, TypeMirror type...
method getRequiredCount (line 431) | int getRequiredCount(){
FILE: arch/src/androidTest/java/com/qmuiteam/qmui/arch/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 17) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 19) | @Test
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/InnerBaseActivity.java
class InnerBaseActivity (line 43) | class InnerBaseActivity extends AppCompatActivity implements LatestVisit...
method onCreate (line 52) | @Override
method convertToTranslucentCauseOrientationChanged (line 62) | void convertToTranslucentCauseOrientationChanged() {
method setRequestedOrientation (line 67) | @Override
method onConfigurationChanged (line 78) | @SuppressLint("WrongConstant")
method getSkinManager (line 92) | public QMUISkinManager getSkinManager() {
method onStart (line 96) | @Override
method onStop (line 104) | @Override
method onResume (line 112) | @Override
method onLatestVisitArgumentChanged (line 118) | public final void onLatestVisitArgumentChanged() {
method shouldPerformLatestVisitRecord (line 125) | protected boolean shouldPerformLatestVisitRecord() {
method checkLatestVisitRecord (line 129) | private void checkLatestVisitRecord() {
method onCollectLatestVisitArgument (line 146) | @Override
method setSkinManager (line 151) | public void setSkinManager(@Nullable QMUISkinManager skinManager) {
method isStartedByScheme (line 163) | public final boolean isStartedByScheme() {
method useQMUISkinLayoutInflaterFactory (line 167) | protected boolean useQMUISkinLayoutInflaterFactory() {
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIActivity.java
class QMUIActivity (line 47) | public class QMUIActivity extends InnerBaseActivity implements ActivityS...
method onScrollStateChange (line 55) | @Override
method onScroll (line 75) | @Override
method onSwipeBackBegin (line 85) | @Override
method onScrollOverThreshold (line 110) | @Override
method getDragDirection (line 117) | @Override
method reportFrequentlyRequestLayout (line 132) | @Override
method onCreate (line 138) | @Override
method performTranslucent (line 144) | protected void performTranslucent(){
method setContentView (line 148) | @Override
method setContentView (line 153) | @Override
method setContentView (line 166) | @Override
method newSwipeBackLayout (line 171) | private View newSwipeBackLayout(View view) {
method onDestroy (line 183) | @Override
method onBackPressed (line 198) | @Override
method doOnBackPressed (line 205) | protected void doOnBackPressed() {
method reportFrequentlyRequestLayout (line 209) | protected void reportFrequentlyRequestLayout(int count, long duration){
method isInSwipeBack (line 213) | public boolean isInSwipeBack() {
method forceDisableHardwareAcceleratedForSwipeBackground (line 217) | protected boolean forceDisableHardwareAcceleratedForSwipeBackground(){
method canDragBack (line 227) | @Deprecated
method canDragBack (line 239) | @Deprecated
method backViewInitOffset (line 248) | @Deprecated
method backViewInitOffset (line 253) | protected int backViewInitOffset(Context context, int dragDirection, i...
method getDragDirection (line 257) | protected int getDragDirection(@NonNull SwipeBackLayout swipeBackLayout,
method onDragStart (line 289) | protected void onDragStart() {
method dragBackEdge (line 298) | @Deprecated
method dragBackDirection (line 303) | protected int dragBackDirection() {
method dragViewMoveAction (line 315) | protected SwipeBackLayout.ViewMoveAction dragViewMoveAction() {
method restoreSubWindowWhenDragBack (line 324) | protected boolean restoreSubWindowWhenDragBack() {
method onLastActivityFinish (line 334) | public Intent onLastActivityFinish() {
method getRootViewInsetsType (line 338) | @WindowInsetsCompat.Type.InsetsType
method finish (line 343) | @Override
method refreshFromScheme (line 354) | @Override
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragment.java
class QMUIFragment (line 93) | public abstract class QMUIFragment extends Fragment implements
method run (line 147) | @Override
method handleOnBackPressed (line 164) | @Override
method QMUIFragment (line 175) | public QMUIFragment() {
method onAttach (line 179) | @Override
method getBaseFragmentActivity (line 204) | public final QMUIFragmentActivity getBaseFragmentActivity() {
method isAttachedToActivity (line 208) | public boolean isAttachedToActivity() {
method onSaveInstanceState (line 212) | @Override
method onDestroyView (line 218) | @Override
method onResume (line 232) | @Override
method checkForRequestForHandlePopBack (line 246) | protected void checkForRequestForHandlePopBack(){
method shouldCheckLatestVisitRecord (line 253) | protected boolean shouldCheckLatestVisitRecord(){
method shouldPerformLatestVisitRecord (line 257) | protected boolean shouldPerformLatestVisitRecord() {
method checkLatestVisitRecord (line 261) | private void checkLatestVisitRecord() {
method onLatestVisitArgumentChanged (line 297) | public final void onLatestVisitArgumentChanged() {
method onCollectLatestVisitArgument (line 303) | @Override
method registerEffect (line 309) | @Nullable
method notifyEffect (line 321) | public <T extends Effect> void notifyEffect(T effect) {
method ensureFragmentEffectRegistry (line 331) | private void ensureFragmentEffectRegistry() {
method findFragmentContainerProvider (line 339) | @Nullable
method startFragmentAndDestroyCurrent (line 356) | public int startFragmentAndDestroyCurrent(QMUIFragment fragment) {
method startFragmentAndDestroyCurrent (line 373) | public int startFragmentAndDestroyCurrent(QMUIFragment fragment,
method startFragment (line 414) | public int startFragment(QMUIFragment fragment) {
method startFragment (line 431) | public int startFragment(QMUIFragment... fragments){
method startFragmentForResult (line 489) | @Deprecated
method startFragment (line 513) | private int startFragment(QMUIFragment fragment, QMUIFragmentContainer...
method setFragmentResult (line 535) | @Deprecated
method onCreate (line 543) | @Override
method onViewCreated (line 551) | @Override
method newSwipeBackLayout (line 560) | private SwipeBackLayout newSwipeBackLayout() {
method initSwipeBackLayout (line 613) | private void initSwipeBackLayout(SwipeBackLayout swipeBackLayout){
method onScrollStateChange (line 633) | @Override
method onScroll (line 713) | @Override
method onSwipeBackBegin (line 736) | @SuppressLint("PrivateApi")
method onScrollOverThreshold (line 819) | @Override
method addViewInSwipeBack (line 824) | private void addViewInSwipeBack(ViewGroup parent, View child) {
method addViewInSwipeBack (line 828) | private void addViewInSwipeBack(ViewGroup parent, View child, int inde...
method removeViewInSwipeBack (line 835) | private void removeViewInSwipeBack(ViewGroup parent, Function<View, Vo...
method handleChildFragmentListWhenSwipeBackStart (line 854) | private void handleChildFragmentListWhenSwipeBackStart(Fragment parent...
method handleSwipeBackCancelOrFinished (line 893) | private void handleSwipeBackCancelOrFinished(ViewGroup container) {
method isInSwipeBack (line 933) | public boolean isInSwipeBack() {
method forceDisableHardwareAcceleratedForSwipeBackground (line 937) | protected boolean forceDisableHardwareAcceleratedForSwipeBackground(){
method onCreateView (line 941) | @Override
method bubbleBackPressedEvent (line 953) | private void bubbleBackPressedEvent() {
method onNormalBackPressed (line 961) | protected final void onNormalBackPressed() {
method runSideEffectOnNormalBackPressed (line 1011) | protected void runSideEffectOnNormalBackPressed() {
method onBackPressed (line 1015) | protected void onBackPressed() {
method reportFrequentlyRequestLayout (line 1019) | protected void reportFrequentlyRequestLayout(int count, long duration){
method onHandleSpecLastFragmentFinish (line 1023) | protected void onHandleSpecLastFragmentFinish(FragmentActivity fragmen...
method popBackStack (line 1033) | protected void popBackStack() {
method popBackStack (line 1050) | protected void popBackStack(Class<? extends QMUIFragment> cls) {
method popBackStackInclusive (line 1061) | protected void popBackStackInclusive(Class<? extends QMUIFragment> cls) {
method checkPopBack (line 1067) | private boolean checkPopBack() {
method popBackStackAfterResume (line 1074) | protected void popBackStackAfterResume() {
method checkStateLoss (line 1096) | private boolean checkStateLoss(String logName) {
method onCreateAnimation (line 1108) | @Nullable
method onCreateAnimator (line 1114) | @Nullable
method checkAndCallOnEnterAnimationStart (line 1136) | private void checkAndCallOnEnterAnimationStart(@Nullable Animator anim...
method checkAndCallOnEnterAnimationEnd (line 1144) | private void checkAndCallOnEnterAnimationEnd(@Nullable Animator animat...
method onCreateView (line 1155) | protected abstract View onCreateView();
method onViewCreated (line 1166) | protected void onViewCreated(@NonNull View rootView) {
method onFragmentResult (line 1179) | @Deprecated
method canDragBack (line 1190) | @Deprecated
method canDragBack (line 1205) | @Deprecated
method backViewInitOffset (line 1214) | @Deprecated
method backViewInitOffset (line 1219) | protected int backViewInitOffset(Context context, int dragDirection, i...
method onDragStart (line 1226) | protected void onDragStart() {
method dragBackEdge (line 1234) | @Deprecated
method dragBackDirection (line 1244) | @Deprecated
method dragViewMoveAction (line 1257) | protected SwipeBackLayout.ViewMoveAction dragViewMoveAction() {
method canHandleSwipeBack (line 1261) | protected boolean canHandleSwipeBack(){
method setFinishActivityIfOnBackPressed (line 1304) | public void setFinishActivityIfOnBackPressed(boolean finishActivityIfO...
method getDragDirection (line 1308) | protected int getDragDirection(@NonNull SwipeBackLayout swipeBackLayout,
method runAfterAnimation (line 1343) | public void runAfterAnimation(Runnable runnable) {
method runAfterAnimation (line 1356) | public void runAfterAnimation(Runnable runnable, boolean onlyEnd) {
method runAfterResumed (line 1377) | public void runAfterResumed(Runnable runnable) {
method onEnterAnimationStart (line 1393) | protected void onEnterAnimationStart(@Nullable Animator animation) {
method onEnterAnimationEnd (line 1406) | protected void onEnterAnimationEnd(@Nullable Animator animation) {
method notifyDelayRenderRunnableList (line 1416) | private void notifyDelayRenderRunnableList(){
method getIsInEnterAnimationLiveData (line 1428) | public LiveData<Boolean> getIsInEnterAnimationLiveData() {
method enterAnimationAvoidTransform (line 1432) | protected <T> LiveData<T> enterAnimationAvoidTransform(final LiveData<...
method enterAnimationAvoidTransform (line 1436) | protected <T> LiveData<T> enterAnimationAvoidTransform(final LiveData<...
method onDestroy (line 1462) | @Override
method onKeyDown (line 1477) | public boolean onKeyDown(int keyCode, KeyEvent event) {
method onKeyUp (line 1481) | public boolean onKeyUp(int keyCode, KeyEvent event) {
method getRootViewInsetsType (line 1486) | @WindowInsetsCompat.Type.InsetsType
method refreshFromScheme (line 1491) | @Override
method onLastFragmentFinish (line 1502) | @SuppressWarnings("SameReturnValue")
method needInterceptLastFragmentFinish (line 1511) | protected boolean needInterceptLastFragmentFinish(){
method restoreSubWindowWhenDragBack (line 1521) | protected boolean restoreSubWindowWhenDragBack() {
method isStartedByScheme (line 1526) | public final boolean isStartedByScheme() {
method onFetchTransitionConfig (line 1535) | public TransitionConfig onFetchTransitionConfig() {
class TransitionConfig (line 1540) | public static final class TransitionConfig {
method TransitionConfig (line 1548) | public TransitionConfig(
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragmentActivity.java
class QMUIFragmentActivity (line 48) | public abstract class QMUIFragmentActivity extends InnerBaseActivity imp...
method getContextViewId (line 58) | @Override
method getContainerFragmentManager (line 63) | @Override
method getRootView (line 68) | public RootView getRootView() {
method onCreate (line 72) | @Override
method instantiationMutiFragment (line 121) | protected FragmentAutoInitResult instantiationMutiFragment(Intent inte...
method initMutiFragment (line 146) | protected boolean initMutiFragment(QMUIFragment... fragments) {
method initMutiFragment (line 152) | protected boolean initMutiFragment(List<QMUIFragment> fragments) {
method performTranslucent (line 198) | protected void performTranslucent() {
method isFragmentAutoInitResult (line 208) | protected FragmentAutoInitResult isFragmentAutoInitResult() {
method setFragmentAutoInitResult (line 212) | protected void setFragmentAutoInitResult(FragmentAutoInitResult fragme...
method getDefaultFirstFragment (line 216) | protected Class<? extends QMUIFragment> getDefaultFirstFragment() {
method instantiationFragment (line 230) | protected QMUIFragment instantiationFragment(Class<? extends QMUIFragm...
method getFragmentContainerView (line 245) | @Override
method getContainerViewModelStoreOwner (line 250) | @Override
method requestForHandlePopBack (line 255) | @Override
method isChildHandlePopBackRequested (line 260) | @Override
method onCreateRootView (line 265) | protected RootView onCreateRootView(int fragmentContainerId) {
method getCurrentFragment (line 272) | @Nullable
method getCurrentQMUIFragment (line 277) | @Nullable
method startFragmentAndDestroyCurrent (line 300) | public int startFragmentAndDestroyCurrent(QMUIFragment fragment, final...
method startFragment (line 327) | public int startFragment(QMUIFragment fragment) {
method startFragments (line 348) | public int startFragments(List<QMUIFragment> fragments) {
method onKeyDown (line 380) | @Override
method onKeyUp (line 389) | @Override
method popBackStack (line 398) | public void popBackStack() {
method intentOf (line 403) | public static Intent intentOf(@NonNull Context context,
method intentOf (line 418) | public static Intent intentOf(@NonNull Context context,
method intentOf (line 430) | public static Intent intentOf(@NonNull Context context,
class RootView (line 442) | public static abstract class RootView extends FrameLayout {
method RootView (line 445) | public RootView(Context context, int fragmentContainerId) {
method getFragmentContainerView (line 450) | public abstract FragmentContainerView getFragmentContainerView();
method onBackPressed (line 453) | @Override
class DefaultRootView (line 463) | @SuppressLint("ViewConstructor")
method DefaultRootView (line 467) | public DefaultRootView(Context context, int fragmentContainerId) {
method getFragmentContainerView (line 476) | @Override
type FragmentAutoInitResult (line 482) | public enum FragmentAutoInitResult {success, failed, unHandled}
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragmentContainerProvider.java
type QMUIFragmentContainerProvider (line 24) | public interface QMUIFragmentContainerProvider {
method getContextViewId (line 25) | int getContextViewId();
method getContainerFragmentManager (line 27) | FragmentManager getContainerFragmentManager();
method getFragmentContainerView (line 29) | @Nullable
method getContainerViewModelStoreOwner (line 32) | ViewModelStoreOwner getContainerViewModelStoreOwner();
method requestForHandlePopBack (line 34) | void requestForHandlePopBack(boolean toHandle);
method isChildHandlePopBackRequested (line 36) | boolean isChildHandlePopBackRequested();
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragmentPagerAdapter.java
class QMUIFragmentPagerAdapter (line 31) | public abstract class QMUIFragmentPagerAdapter extends QMUIPagerAdapter {
method QMUIFragmentPagerAdapter (line 37) | public QMUIFragmentPagerAdapter(@NonNull FragmentManager fm) {
method createFragment (line 41) | public abstract QMUIFragment createFragment(int position);
method isViewFromObject (line 43) | @Override
method hydrate (line 48) | @SuppressLint("CommitTransaction")
method populate (line 63) | @SuppressLint("CommitTransaction")
method destroy (line 86) | @SuppressLint("CommitTransaction")
method startUpdate (line 99) | @Override
method finishUpdate (line 107) | @Override
method setPrimaryItem (line 115) | @Override
method makeFragmentName (line 135) | private String makeFragmentName(int viewId, long id) {
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUILatestVisit.java
class QMUILatestVisit (line 21) | public class QMUILatestVisit {
method QMUILatestVisit (line 32) | private QMUILatestVisit(Context context) {
method getInstance (line 60) | @MainThread
method intentOfLatestVisit (line 68) | public static Intent intentOfLatestVisit(Activity activity) {
method setStorage (line 72) | public void setStorage(QMUILatestVisitStorage storage) {
method getStorage (line 76) | QMUILatestVisitStorage getStorage() {
method getLatestVisitIntent (line 83) | @SuppressWarnings("unchecked")
method clearFragmentLatestVisitRecord (line 162) | void clearFragmentLatestVisitRecord() {
method clearActivityLatestVisitRecord (line 166) | void clearActivityLatestVisitRecord() {
method performLatestVisitRecord (line 170) | void performLatestVisitRecord(QMUIFragment fragment) {
method performLatestVisitRecord (line 198) | void performLatestVisitRecord(InnerBaseActivity activity) {
method getNavFragmentStorePrefix (line 210) | private String getNavFragmentStorePrefix(int level) {
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUINavFragment.java
class QMUINavFragment (line 16) | public class QMUINavFragment extends QMUIFragment implements QMUIFragmen...
method getDefaultInstance (line 24) | public static QMUINavFragment getDefaultInstance(Class<? extends QMUIF...
method initArguments (line 34) | public static Bundle initArguments(Class<? extends QMUIFragment> first...
method initArguments (line 42) | static Bundle initArguments(String firstFragmentClsName, @Nullable Bun...
method onCreate (line 50) | @Override
method isFirstFragmentAdded (line 58) | public boolean isFirstFragmentAdded() {
method setFirstFragmentAdded (line 62) | protected void setFirstFragmentAdded(boolean firstFragmentAdded) {
method onCreateFirstFragment (line 66) | protected void onCreateFirstFragment(){
method instantiationFirstFragment (line 83) | @SuppressWarnings("unchecked")
method onCreateView (line 103) | @Override
method onViewCreated (line 110) | @Override
method configFragmentContainerView (line 119) | protected void configFragmentContainerView(FragmentContainerView fragm...
method onDestroyView (line 123) | @Override
method getContextViewId (line 129) | @Override
method requestForHandlePopBack (line 134) | @Override
method isChildHandlePopBackRequested (line 143) | @Override
method onAttach (line 148) | @Override
method checkForPrimaryNavigation (line 162) | private void checkForPrimaryNavigation(){
method checkForRequestForHandlePopBack (line 169) | @Override
method onResume (line 178) | @Override
method getContainerFragmentManager (line 184) | @Override
method getContainerViewModelStoreOwner (line 189) | @Override
method getFragmentContainerView (line 194) | @Nullable
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/QMUISwipeBackActivityManager.java
class QMUISwipeBackActivityManager (line 29) | public class QMUISwipeBackActivityManager implements Application.Activit...
method getInstance (line 35) | @MainThread
method QMUISwipeBackActivityManager (line 44) | private QMUISwipeBackActivityManager() {
method init (line 47) | public static void init(@NonNull Application application) {
method onActivityCreated (line 54) | @Override
method onActivityDestroyed (line 62) | @Override
method onActivityStarted (line 70) | @Override
method onActivityResumed (line 75) | @Override
method onActivityPaused (line 80) | @Override
method onActivityStopped (line 85) | @Override
method onActivitySaveInstanceState (line 90) | @Override
method getCurrentActivity (line 95) | @Nullable
method getActivityCount (line 100) | public int getActivityCount(){
method getActivityInStack (line 104) | @Nullable
method getPenultimateActivity (line 118) | @Nullable
method canSwipeBack (line 141) | public boolean canSwipeBack(Activity currentActivity) {
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackLayout.java
class SwipeBackLayout (line 56) | public class SwipeBackLayout extends FrameLayout {
method SwipeBackLayout (line 123) | public SwipeBackLayout(Context context) {
method SwipeBackLayout (line 127) | public SwipeBackLayout(Context context, AttributeSet attrs) {
method SwipeBackLayout (line 131) | public SwipeBackLayout(Context context, AttributeSet attrs, int defSty...
method setEnableSwipeBack (line 172) | public void setEnableSwipeBack(boolean enableSwipeBack) {
method isEnableSwipeBack (line 176) | public boolean isEnableSwipeBack() {
method run (line 181) | @Override
method setContentView (line 192) | private void setContentView(View view) {
method setViewMoveAction (line 197) | public void setViewMoveAction(@NonNull ViewMoveAction viewMoveAction) {
method getContentView (line 201) | public View getContentView() {
method setCallback (line 205) | public void setCallback(Callback callback) {
method setScrimColor (line 215) | public void setScrimColor(int color) {
method addSwipeListener (line 225) | public ListenerRemover addSwipeListener(final SwipeListener listener) {
method removeSwipeListener (line 243) | public void removeSwipeListener(SwipeListener listener) {
method clearSwipeListeners (line 250) | public void clearSwipeListeners() {
method setOnInsetsHandler (line 258) | public void setOnInsetsHandler(OnInsetsHandler insetsHandler) {
method setScrollThresHold (line 268) | public void setScrollThresHold(float threshold) {
method setShadow (line 281) | public void setShadow(Drawable shadow, int edgeFlag) {
method setShadow (line 303) | public void setShadow(int resId, int edgeFlag) {
method setDragState (line 307) | void setDragState(int state) {
method isTouchInContentView (line 315) | private boolean isTouchInContentView(float x, float y) {
method selectDragDirection (line 321) | private int selectDragDirection(float x, float y) {
method getTouchMoveDelta (line 336) | private float getTouchMoveDelta(float x, float y) {
method requestLayout (line 345) | @Override
method onDetachedFromWindow (line 364) | @Override
method onInterceptTouchEvent (line 371) | @Override
method onTouchEvent (line 432) | @Override
method requestParentDisallowInterceptTouchEvent (line 503) | private void requestParentDisallowInterceptTouchEvent(boolean disallow...
method releaseViewForPointerUp (line 510) | private void releaseViewForPointerUp() {
method settleContentViewAt (line 541) | private boolean settleContentViewAt(int finalLeft, int finalTop, int x...
method continueSettling (line 562) | public boolean continueSettling(boolean deferCallbacks) {
method computeSettleDuration (line 591) | private int computeSettleDuration(int dx, int dy, int xvel, int yvel) {
method computeAxisDuration (line 613) | private int computeAxisDuration(int delta, int velocity, int motionRan...
method distanceInfluenceForSnapDuration (line 637) | private float distanceInfluenceForSnapDuration(float f) {
method clampMag (line 653) | private int clampMag(int value, int absMin, int absMax) {
method clampMag (line 670) | private float clampMag(float value, float absMin, float absMax) {
method cancel (line 677) | public void cancel() {
method onLayout (line 684) | @Override
method drawChild (line 692) | @Override
method drawScrim (line 706) | private void drawScrim(Canvas canvas, View child) {
method drawShadow (line 723) | private void drawShadow(Canvas canvas, View child) {
method computeScroll (line 750) | @Override
method onSwipeBackBegin (line 757) | private void onSwipeBackBegin() {
method onScroll (line 768) | private void onScroll() {
method onScrollOverThreshold (line 787) | private void onScrollOverThreshold() {
method onViewDragStateChanged (line 795) | private void onViewDragStateChanged(int dragState) {
method resetOffset (line 804) | public void resetOffset(){
method wrap (line 810) | public static SwipeBackLayout wrap(View child, ViewMoveAction viewMove...
method wrap (line 820) | public static SwipeBackLayout wrap(Context context, int childRes, View...
method translateInSwipeBack (line 831) | public static void translateInSwipeBack(View view, int edgeFlag, int t...
method getXFraction (line 847) | public float getXFraction() {
method setXFraction (line 858) | public void setXFraction(float xFraction) {
method getYFraction (line 869) | public float getYFraction() {
method setYFraction (line 880) | public void setYFraction(float yFraction) {
type Callback (line 891) | public interface Callback {
method getDragDirection (line 892) | int getDragDirection(SwipeBackLayout swipeBackLayout, ViewMoveAction...
method reportFrequentlyRequestLayout (line 895) | void reportFrequentlyRequestLayout(int count, long duration);
type ViewMoveAction (line 898) | public interface ViewMoveAction {
method getCurrentPercent (line 899) | float getCurrentPercent(@NonNull SwipeBackLayout swipeBackLayout,
method getDragRange (line 902) | int getDragRange(@NonNull SwipeBackLayout swipeBackLayout, int dragD...
method getSettleTarget (line 904) | int getSettleTarget(@NonNull SwipeBackLayout swipeBackLayout,
method getEdge (line 908) | int getEdge(int dragDirection);
method move (line 910) | void move(@NonNull SwipeBackLayout swipeBackLayout,
type ListenerRemover (line 916) | public interface ListenerRemover {
method remove (line 917) | void remove();
type SwipeListener (line 920) | public interface SwipeListener {
method onScrollStateChange (line 930) | void onScrollStateChange(int state, float scrollPercent);
method onScroll (line 938) | void onScroll(int dragDirection, int moveEdge, float scrollPercent);
method onSwipeBackBegin (line 943) | void onSwipeBackBegin(int dragDirection, int moveEdge);
method onScrollOverThreshold (line 948) | void onScrollOverThreshold();
type OnInsetsHandler (line 951) | public interface OnInsetsHandler {
method getInsetsType (line 952) | @WindowInsetsCompat.Type.InsetsType
class ViewMoveAuto (line 956) | public static class ViewMoveAuto implements ViewMoveAction {
method isHor (line 958) | private boolean isHor(int dragDirection){
method getCurrentPercent (line 963) | @Override
method getDragRange (line 975) | @Override
method getSettleTarget (line 983) | @Override
method getEdge (line 1012) | @Override
method move (line 1025) | @Override
class ViewMoveLeftToRight (line 1051) | public static class ViewMoveLeftToRight implements ViewMoveAction {
method getCurrentPercent (line 1053) | @Override
method getDragRange (line 1060) | @Override
method getSettleTarget (line 1065) | @Override
method getEdge (line 1076) | @Override
method move (line 1081) | @Override
class ViewMoveTopToBottom (line 1095) | public static class ViewMoveTopToBottom implements ViewMoveAction {
method getCurrentPercent (line 1097) | @Override
method getDragRange (line 1104) | @Override
method getSettleTarget (line 1109) | @Override
method getEdge (line 1120) | @Override
method move (line 1125) | @Override
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackgroundView.java
class SwipeBackgroundView (line 39) | public class SwipeBackgroundView extends View {
method SwipeBackgroundView (line 44) | public SwipeBackgroundView(Context context, boolean forceDisableHardwa...
method bind (line 51) | public void bind(Activity activity, Activity swipeActivity, boolean re...
method unBind (line 144) | public void unBind() {
method hasChildWindow (line 152) | boolean hasChildWindow() {
method onDraw (line 156) | @Override
class ViewInfo (line 172) | static class ViewInfo {
method ViewInfo (line 178) | public ViewInfo(@NonNull View view, @Nullable WindowManager.LayoutPa...
method draw (line 184) | void draw(Canvas canvas) {
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/Utils.java
class Utils (line 37) | public class Utils {
method Utils (line 38) | private Utils() {
method convertActivityFromTranslucent (line 53) | public static void convertActivityFromTranslucent(Activity activity) {
method convertActivityToTranslucent (line 74) | public static void convertActivityToTranslucent(Activity activity) {
method assertInMainThread (line 96) | public static void assertInMainThread() {
method modifyOpForStartFragmentAndDestroyCurrent (line 107) | static void modifyOpForStartFragmentAndDestroyCurrent(FragmentManager ...
method findAndModifyOpInBackStackRecord (line 159) | static void findAndModifyOpInBackStackRecord(FragmentManager fragmentM...
method getBackStackEntryField (line 206) | static Field getBackStackEntryField(FragmentManager.BackStackEntry bac...
method getOpsField (line 225) | static Field getOpsField(FragmentManager.BackStackEntry backStackEntry) {
method getNameField (line 229) | static Field getNameField(FragmentManager.BackStackEntry backStackEntr...
method getOpField (line 235) | private static Field getOpField(Object op, String fieldNameNew, String...
method getOpCmdField (line 255) | static Field getOpCmdField(Object op) {
method getOpFragmentField (line 259) | static Field getOpFragmentField(Object op) {
method getOpPopEnterAnimField (line 263) | static Field getOpPopEnterAnimField(Object op) {
method getOpPopExitAnimField (line 267) | static Field getOpPopExitAnimField(Object op) {
type OpHandler (line 271) | interface OpHandler {
method handle (line 272) | boolean handle(Object op);
method needReNameTag (line 274) | boolean needReNameTag();
method newTagName (line 276) | String newTagName();
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/effect/Effect.java
class Effect (line 18) | public abstract class Effect {
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/effect/FragmentResultEffect.java
class FragmentResultEffect (line 22) | public class FragmentResultEffect extends Effect {
method FragmentResultEffect (line 29) | public FragmentResultEffect(int requestFragmentUUid, int resultCode, i...
method getRequestCode (line 36) | public int getRequestCode() {
method getResultCode (line 40) | public int getResultCode() {
method getIntent (line 44) | public Intent getIntent() {
method getRequestFragmentUUid (line 48) | public int getRequestFragmentUUid() {
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/effect/MapEffect.java
class MapEffect (line 21) | public class MapEffect extends Effect {
method MapEffect (line 24) | public MapEffect(Map<String, Object> map) {
method getValue (line 29) | public Object getValue(String key) {
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentEffectHandler.java
class QMUIFragmentEffectHandler (line 24) | public abstract class QMUIFragmentEffectHandler<T extends Effect> {
type HandlePolicy (line 26) | public enum HandlePolicy {
method provideHandlePolicy (line 46) | public HandlePolicy provideHandlePolicy() {
method shouldHandleEffect (line 55) | public abstract boolean shouldHandleEffect(@NonNull T effect);
method handleEffect (line 61) | public abstract void handleEffect(@NonNull T effect);
method handleEffect (line 67) | public void handleEffect(@NonNull List<T> effects) {
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentEffectRegistration.java
type QMUIFragmentEffectRegistration (line 19) | public interface QMUIFragmentEffectRegistration {
method unregister (line 20) | void unregister();
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentEffectRegistry.java
class QMUIFragmentEffectRegistry (line 44) | public class QMUIFragmentEffectRegistry extends ViewModel {
class PendingRegister (line 46) | class PendingRegister<T extends Effect> implements QMUIFragmentEffectR...
method PendingRegister (line 52) | public PendingRegister(LifecycleOwner lifecycleOwner, QMUIFragmentEf...
method doRegister (line 57) | public void doRegister(){
method unregister (line 64) | @Override
method register (line 93) | public <T extends Effect> QMUIFragmentEffectRegistration register(
method unregister (line 120) | @MainThread
method safeUnregister (line 129) | private void safeUnregister(int key){
method notifyEffect (line 143) | public <T extends Effect> void notifyEffect(T effect) {
class EffectHandlerWrapper (line 168) | private static class EffectHandlerWrapper<T extends Effect> implements...
method EffectHandlerWrapper (line 174) | EffectHandlerWrapper(QMUIFragmentEffectHandler<T> handler, Lifecycle...
method getHandlerEffectType (line 181) | @SuppressWarnings("unchecked")
method shouldHandleEffect (line 213) | @SuppressWarnings("unchecked")
method pushOrHandleEffect (line 218) | @MainThread
method onStateChanged (line 235) | @Override
method cancel (line 252) | void cancel() {
method onCleared (line 258) | @Override
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentMapEffectHandler.java
class QMUIFragmentMapEffectHandler (line 18) | public abstract class QMUIFragmentMapEffectHandler extends QMUIFragmentE...
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentResultEffectHandler.java
class QMUIFragmentResultEffectHandler (line 18) | public abstract class QMUIFragmentResultEffectHandler extends QMUIFragme...
method provideHandlePolicy (line 20) | @Override
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/record/DefaultLatestVisitStorage.java
class DefaultLatestVisitStorage (line 29) | public class DefaultLatestVisitStorage implements QMUILatestVisitStorage {
method DefaultLatestVisitStorage (line 43) | public DefaultLatestVisitStorage(Context context) {
method getFragmentRecordId (line 47) | @Override
method getFragmentArguments (line 52) | @Nullable
method getActivityRecordId (line 79) | @Override
method getAndWriteActivityArgumentsToIntent (line 84) | @Override
method clearFragmentStorage (line 108) | @Override
method clearActivityStorage (line 116) | @Override
method saveFragmentRecordInfo (line 124) | @Override
method saveActivityRecordInfo (line 132) | @Override
method clearAll (line 140) | @Override
method clearArgument (line 147) | private void clearArgument(SharedPreferences.Editor editor, String pre...
method putArguments (line 155) | private void putArguments(SharedPreferences.Editor editor,
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/record/LatestVisitArgumentCollector.java
type LatestVisitArgumentCollector (line 21) | public interface LatestVisitArgumentCollector {
method onCollectLatestVisitArgument (line 29) | void onCollectLatestVisitArgument(RecordArgumentEditor editor);
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/record/QMUILatestVisitStorage.java
type QMUILatestVisitStorage (line 28) | public interface QMUILatestVisitStorage {
method saveFragmentRecordInfo (line 33) | void saveFragmentRecordInfo(int id, @Nullable Map<String, RecordArgume...
method getFragmentRecordId (line 35) | int getFragmentRecordId();
method getFragmentArguments (line 37) | @Nullable
method clearFragmentStorage (line 41) | void clearFragmentStorage();
method saveActivityRecordInfo (line 45) | void saveActivityRecordInfo(int id, @Nullable Map<String, RecordArgume...
method getActivityRecordId (line 47) | int getActivityRecordId();
method getAndWriteActivityArgumentsToIntent (line 49) | void getAndWriteActivityArgumentsToIntent(@NonNull Intent intent);
method clearActivityStorage (line 51) | void clearActivityStorage();
method clearAll (line 53) | void clearAll();
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/record/RecordArgumentEditor.java
type RecordArgumentEditor (line 25) | public interface RecordArgumentEditor {
method putString (line 27) | RecordArgumentEditor putString(String key, @Nullable String value);
method putInt (line 29) | RecordArgumentEditor putInt(String key, int value);
method putLong (line 31) | RecordArgumentEditor putLong(String key, long value);
method putFloat (line 33) | RecordArgumentEditor putFloat(String key, float value);
method putBoolean (line 35) | RecordArgumentEditor putBoolean(String key, boolean value);
method put (line 37) | RecordArgumentEditor put(String key, RecordArgumentEditor.Argument arg...
method remove (line 39) | RecordArgumentEditor remove(String key);
method clear (line 41) | RecordArgumentEditor clear();
method getAll (line 43) | Map<String, Argument> getAll();
class Argument (line 45) | class Argument {
method Argument (line 49) | public Argument(Object value, Class<?> type) {
method getValue (line 54) | public Object getValue() {
method getType (line 58) | public Class<?> getType() {
method putToBundle (line 62) | public void putToBundle(Bundle bundle, String key){
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/record/RecordArgumentEditorImpl.java
class RecordArgumentEditorImpl (line 25) | public class RecordArgumentEditorImpl implements RecordArgumentEditor {
method putString (line 29) | @Override
method putInt (line 36) | @Override
method putLong (line 42) | @Override
method putFloat (line 48) | @Override
method putBoolean (line 54) | @Override
method put (line 60) | @Override
method remove (line 66) | @Override
method clear (line 72) | @Override
method getAll (line 78) | @Override
FILE: arch/src/main/java/com/qmuiteam/qmui/arch/record/RecordIdClassMap.java
type RecordIdClassMap (line 19) | public interface RecordIdClassMap {
method getRecordClassById (line 21) | Class<?> getRecordClassById(int id);
method getIdByRecordClass (line 23) | int getIdByRecordClass(Class<?> clazz);
FILE: arch/src/test/java/com/qmuiteam/qmui/arch/ExampleUnitTest.java
class ExampleUnitTest (line 9) | public class ExampleUnitTest {
FILE: compiler/src/main/java/com/qmuiteam/qmuidemo/compiler/WidgetProcessor.java
class WidgetProcessor (line 56) | @AutoService(Processor.class)
method init (line 77) | @Override
method getSupportedAnnotationTypes (line 89) | @Override
method getSupportedSourceVersion (line 96) | @Override
method process (line 101) | @Override
method error (line 186) | private void error(String msg, Object... args) {
method info (line 190) | private void info(String msg, Object... args) {
FILE: lib/src/main/java/com/qmuiteam/qmuidemo/lib/Group.java
type Group (line 24) | public enum Group {
FILE: qmui/src/main/assets/QMUIWebviewBridge.js
function createIframe (line 14) | function createIframe(doc) {
function send (line 21) | function send(data, callback) {
function isCmdSupport (line 37) | function isCmdSupport(cmd, callback){
function getSupportedCmdList (line 56) | function getSupportedCmdList(callback){
function _fetchQueueFromNative (line 67) | function _fetchQueueFromNative(){
function _handleResponseFromNative (line 73) | function _handleResponseFromNative(response){
FILE: qmui/src/main/java/com/qmuiteam/qmui/QMUIConfig.java
class QMUIConfig (line 19) | public class QMUIConfig {
FILE: qmui/src/main/java/com/qmuiteam/qmui/QMUIInterpolatorStaticHolder.java
class QMUIInterpolatorStaticHolder (line 34) | public class QMUIInterpolatorStaticHolder {
method getInterpolation (line 43) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/QMUILog.java
class QMUILog (line 24) | public class QMUILog {
type QMUILogDelegate (line 25) | public interface QMUILogDelegate {
method e (line 26) | void e(final String tag, final String msg, final Object ... obj);
method w (line 27) | void w(final String tag, final String msg, final Object ... obj);
method i (line 28) | void i(final String tag, final String msg, final Object ... obj);
method d (line 29) | void d(final String tag, final String msg, final Object ... obj);
method printErrStackTrace (line 30) | void printErrStackTrace(String tag, Throwable tr, final String forma...
method setDelegete (line 35) | public static void setDelegete(QMUILogDelegate delegete) {
method e (line 39) | public static void e(final String tag, final String msg, final Object ...
method w (line 45) | public static void w(final String tag, final String msg, final Object ...
method i (line 51) | public static void i(final String tag, final String msg, final Object ...
method d (line 57) | public static void d(final String tag, final String msg, final Object ...
method printErrStackTrace (line 63) | public static void printErrStackTrace(String tag, Throwable tr, final ...
FILE: qmui/src/main/java/com/qmuiteam/qmui/alpha/QMUIAlphaButton.java
class QMUIAlphaButton (line 26) | public class QMUIAlphaButton extends AppCompatButton implements QMUIAlph...
method QMUIAlphaButton (line 30) | public QMUIAlphaButton(Context context) {
method QMUIAlphaButton (line 34) | public QMUIAlphaButton(Context context, AttributeSet attrs) {
method QMUIAlphaButton (line 38) | public QMUIAlphaButton(Context context, AttributeSet attrs, int defSty...
method getAlphaViewHelper (line 42) | private QMUIAlphaViewHelper getAlphaViewHelper() {
method setPressed (line 49) | @Override
method setEnabled (line 55) | @Override
method setChangeAlphaWhenPress (line 66) | @Override
method setChangeAlphaWhenDisable (line 76) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/alpha/QMUIAlphaConstraintLayout.java
class QMUIAlphaConstraintLayout (line 27) | public class QMUIAlphaConstraintLayout extends ConstraintLayout implemen...
method QMUIAlphaConstraintLayout (line 31) | public QMUIAlphaConstraintLayout(Context context) {
method QMUIAlphaConstraintLayout (line 35) | public QMUIAlphaConstraintLayout(Context context, AttributeSet attrs) {
method QMUIAlphaConstraintLayout (line 39) | public QMUIAlphaConstraintLayout(Context context, AttributeSet attrs, ...
method getAlphaViewHelper (line 43) | private QMUIAlphaViewHelper getAlphaViewHelper() {
method setPressed (line 50) | @Override
method setEnabled (line 56) | @Override
method setChangeAlphaWhenPress (line 67) | @Override
method setChangeAlphaWhenDisable (line 77) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/alpha/QMUIAlphaFrameLayout.java
class QMUIAlphaFrameLayout (line 26) | public class QMUIAlphaFrameLayout extends FrameLayout implements QMUIAlp...
method QMUIAlphaFrameLayout (line 30) | public QMUIAlphaFrameLayout(Context context) {
method QMUIAlphaFrameLayout (line 34) | public QMUIAlphaFrameLayout(Context context, AttributeSet attrs) {
method QMUIAlphaFrameLayout (line 38) | public QMUIAlphaFrameLayout(Context context, AttributeSet attrs, int d...
method getAlphaViewHelper (line 42) | private QMUIAlphaViewHelper getAlphaViewHelper() {
method setPressed (line 49) | @Override
method setEnabled (line 55) | @Override
method setChangeAlphaWhenPress (line 66) | @Override
method setChangeAlphaWhenDisable (line 76) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/alpha/QMUIAlphaImageButton.java
class QMUIAlphaImageButton (line 23) | public class QMUIAlphaImageButton extends AppCompatImageButton implement...
method QMUIAlphaImageButton (line 27) | public QMUIAlphaImageButton(Context context) {
method QMUIAlphaImageButton (line 31) | public QMUIAlphaImageButton(Context context, AttributeSet attrs) {
method QMUIAlphaImageButton (line 35) | public QMUIAlphaImageButton(Context context, AttributeSet attrs, int d...
method getAlphaViewHelper (line 39) | private QMUIAlphaViewHelper getAlphaViewHelper() {
method setPressed (line 46) | @Override
method setEnabled (line 52) | @Override
method setChangeAlphaWhenPress (line 63) | @Override
method setChangeAlphaWhenDisable (line 73) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/alpha/QMUIAlphaLinearLayout.java
class QMUIAlphaLinearLayout (line 26) | public class QMUIAlphaLinearLayout extends LinearLayout implements QMUIA...
method QMUIAlphaLinearLayout (line 30) | public QMUIAlphaLinearLayout(Context context) {
method QMUIAlphaLinearLayout (line 34) | public QMUIAlphaLinearLayout(Context context, AttributeSet attrs) {
method QMUIAlphaLinearLayout (line 38) | public QMUIAlphaLinearLayout(Context context, AttributeSet attrs, int ...
method getAlphaViewHelper (line 42) | private QMUIAlphaViewHelper getAlphaViewHelper() {
method setPressed (line 49) | @Override
method setEnabled (line 55) | @Override
method setChangeAlphaWhenPress (line 66) | @Override
method setChangeAlphaWhenDisable (line 76) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/alpha/QMUIAlphaRelativeLayout.java
class QMUIAlphaRelativeLayout (line 26) | public class QMUIAlphaRelativeLayout extends RelativeLayout implements Q...
method QMUIAlphaRelativeLayout (line 30) | public QMUIAlphaRelativeLayout(Context context) {
method QMUIAlphaRelativeLayout (line 34) | public QMUIAlphaRelativeLayout(Context context, AttributeSet attrs) {
method QMUIAlphaRelativeLayout (line 38) | public QMUIAlphaRelativeLayout(Context context, AttributeSet attrs, in...
method getAlphaViewHelper (line 42) | private QMUIAlphaViewHelper getAlphaViewHelper() {
method setPressed (line 49) | @Override
method setEnabled (line 55) | @Override
method setChangeAlphaWhenPress (line 66) | @Override
method setChangeAlphaWhenDisable (line 76) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/alpha/QMUIAlphaTextView.java
class QMUIAlphaTextView (line 27) | public class QMUIAlphaTextView extends QMUISpanTouchFixTextView implemen...
method QMUIAlphaTextView (line 31) | public QMUIAlphaTextView(Context context) {
method QMUIAlphaTextView (line 35) | public QMUIAlphaTextView(Context context, AttributeSet attrs) {
method QMUIAlphaTextView (line 39) | public QMUIAlphaTextView(Context context, AttributeSet attrs, int defS...
method getAlphaViewHelper (line 43) | private QMUIAlphaViewHelper getAlphaViewHelper() {
method onSetPressed (line 50) | @Override
method setEnabled (line 56) | @Override
method setChangeAlphaWhenPress (line 67) | @Override
method setChangeAlphaWhenDisable (line 77) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/alpha/QMUIAlphaViewHelper.java
class QMUIAlphaViewHelper (line 27) | public class QMUIAlphaViewHelper {
method QMUIAlphaViewHelper (line 45) | public QMUIAlphaViewHelper(@NonNull View target) {
method QMUIAlphaViewHelper (line 51) | public QMUIAlphaViewHelper(@NonNull View target, float pressedAlpha, f...
method onPressedChanged (line 62) | public void onPressedChanged(View current, boolean pressed) {
method onEnabledChanged (line 81) | public void onEnabledChanged(View current, boolean enabled) {
method setChangeAlphaWhenPress (line 103) | public void setChangeAlphaWhenPress(boolean changeAlphaWhenPress) {
method setChangeAlphaWhenDisable (line 112) | public void setChangeAlphaWhenDisable(boolean changeAlphaWhenDisable) {
FILE: qmui/src/main/java/com/qmuiteam/qmui/alpha/QMUIAlphaViewInf.java
type QMUIAlphaViewInf (line 22) | public interface QMUIAlphaViewInf {
method setChangeAlphaWhenPress (line 29) | void setChangeAlphaWhenPress(boolean changeAlphaWhenPress);
method setChangeAlphaWhenDisable (line 36) | void setChangeAlphaWhenDisable(boolean changeAlphaWhenDisable);
FILE: qmui/src/main/java/com/qmuiteam/qmui/layout/IQMUILayout.java
type IQMUILayout (line 31) | public interface IQMUILayout {
method setWidthLimit (line 54) | boolean setWidthLimit(int widthLimit);
method setHeightLimit (line 62) | boolean setHeightLimit(int heightLimit);
method setUseThemeGeneralShadowElevation (line 67) | void setUseThemeGeneralShadowElevation();
method setOutlineExcludePadding (line 74) | void setOutlineExcludePadding(boolean outlineExcludePadding);
method setShadowElevation (line 81) | void setShadowElevation(int elevation);
method getShadowElevation (line 88) | int getShadowElevation();
method setShadowAlpha (line 95) | void setShadowAlpha(float shadowAlpha);
method getShadowAlpha (line 102) | float getShadowAlpha();
method setShadowColor (line 108) | void setShadowColor(int shadowColor);
method getShadowColor (line 113) | int getShadowColor();
method setRadius (line 120) | void setRadius(int radius);
method setRadius (line 128) | void setRadius(int radius, @QMUILayoutHelper.HideRadiusSide int hideRa...
method getRadius (line 135) | int getRadius();
method setOutlineInset (line 145) | void setOutlineInset(int left, int top, int right, int bottom);
method setShowBorderOnlyBeforeL (line 154) | void setShowBorderOnlyBeforeL(boolean showBorderOnlyBeforeL);
method setHideRadiusSide (line 163) | void setHideRadiusSide(@HideRadiusSide int hideRadiusSide);
method getHideRadiusSide (line 170) | int getHideRadiusSide();
method setRadiusAndShadow (line 179) | void setRadiusAndShadow(int radius, int shadowElevation, float shadowA...
method setRadiusAndShadow (line 189) | void setRadiusAndShadow(int radius, @HideRadiusSide int hideRadiusSide...
method setRadiusAndShadow (line 201) | void setRadiusAndShadow(int radius, @HideRadiusSide int hideRadiusSide...
method setBorderColor (line 208) | void setBorderColor(@ColorInt int borderColor);
method setBorderWidth (line 215) | void setBorderWidth(int borderWidth);
method updateTopDivider (line 225) | void updateTopDivider(int topInsetLeft, int topInsetRight, int topDivi...
method updateBottomDivider (line 235) | void updateBottomDivider(int bottomInsetLeft, int bottomInsetRight, in...
method updateLeftDivider (line 245) | void updateLeftDivider(int leftInsetTop, int leftInsetBottom, int left...
method updateRightDivider (line 255) | void updateRightDivider(int rightInsetTop, int rightInsetBottom, int r...
method onlyShowTopDivider (line 265) | void onlyShowTopDivider(int topInsetLeft, int topInsetRight, int topDi...
method onlyShowBottomDivider (line 275) | void onlyShowBottomDivider(int bottomInsetLeft, int bottomInsetRight, ...
method onlyShowLeftDivider (line 285) | void onlyShowLeftDivider(int leftInsetTop, int leftInsetBottom, int le...
method onlyShowRightDivider (line 295) | void onlyShowRightDivider(int rightInsetTop, int rightInsetBottom, int...
method setTopDividerAlpha (line 303) | void setTopDividerAlpha(int dividerAlpha);
method setBottomDividerAlpha (line 308) | void setBottomDividerAlpha(int dividerAlpha);
method setLeftDividerAlpha (line 313) | void setLeftDividerAlpha(int dividerAlpha);
method setRightDividerAlpha (line 318) | void setRightDividerAlpha(int dividerAlpha);
method setOuterNormalColor (line 325) | void setOuterNormalColor(int color);
method updateLeftSeparatorColor (line 332) | void updateLeftSeparatorColor(int color);
method updateRightSeparatorColor (line 339) | void updateRightSeparatorColor(int color);
method updateTopSeparatorColor (line 346) | void updateTopSeparatorColor(int color);
method updateBottomSeparatorColor (line 353) | void updateBottomSeparatorColor(int color);
method hasTopSeparator (line 355) | boolean hasTopSeparator();
method hasRightSeparator (line 357) | boolean hasRightSeparator();
method hasLeftSeparator (line 359) | boolean hasLeftSeparator();
method hasBottomSeparator (line 361) | boolean hasBottomSeparator();
method hasBorder (line 363) | boolean hasBorder();
FILE: qmui/src/main/java/com/qmuiteam/qmui/layout/QMUIButton.java
class QMUIButton (line 30) | public class QMUIButton extends QMUIAlphaButton implements IQMUILayout {
method QMUIButton (line 33) | public QMUIButton(Context context) {
method QMUIButton (line 38) | public QMUIButton(Context context, AttributeSet attrs) {
method QMUIButton (line 43) | public QMUIButton(Context context, AttributeSet attrs, int defStyleAtt...
method init (line 48) | private void init(Context context, AttributeSet attrs, int defStyleAtt...
method updateTopDivider (line 54) | @Override
method updateBottomDivider (line 60) | @Override
method updateLeftDivider (line 66) | @Override
method updateRightDivider (line 72) | public void updateRightDivider(int rightInsetTop, int rightInsetBottom...
method onlyShowTopDivider (line 77) | @Override
method onlyShowBottomDivider (line 84) | @Override
method onlyShowLeftDivider (line 91) | @Override
method onlyShowRightDivider (line 97) | @Override
method setTopDividerAlpha (line 103) | @Override
method setBottomDividerAlpha (line 109) | @Override
method setLeftDividerAlpha (line 115) | @Override
method setRightDividerAlpha (line 121) | @Override
method setHideRadiusSide (line 127) | @Override
method getHideRadiusSide (line 133) | @Override
method onMeasure (line 138) | @Override
method setRadiusAndShadow (line 150) | @Override
method setRadiusAndShadow (line 155) | @Override
method setRadiusAndShadow (line 160) | @Override
method setRadius (line 165) | @Override
method setRadius (line 170) | @Override
method getRadius (line 175) | @Override
method setOutlineInset (line 180) | @Override
method setBorderColor (line 185) | @Override
method setBorderWidth (line 191) | @Override
method setShowBorderOnlyBeforeL (line 197) | @Override
method setWidthLimit (line 203) | @Override
method setHeightLimit (line 212) | @Override
method setUseThemeGeneralShadowElevation (line 221) | @Override
method setOutlineExcludePadding (line 226) | @Override
method setShadowElevation (line 231) | @Override
method getShadowElevation (line 236) | @Override
method setShadowAlpha (line 241) | @Override
method getShadowAlpha (line 246) | @Override
method setShadowColor (line 251) | @Override
method getShadowColor (line 256) | @Override
method setOuterNormalColor (line 261) | @Override
method updateBottomSeparatorColor (line 266) | @Override
method updateLeftSeparatorColor (line 271) | @Override
method updateRightSeparatorColor (line 276) | @Override
method updateTopSeparatorColor (line 281) | @Override
method dispatchDraw (line 286) | @Override
method hasBorder (line 293) | @Override
method hasLeftSeparator (line 298) | @Override
method hasTopSeparator (line 303) | @Override
method hasRightSeparator (line 308) | @Override
method hasBottomSeparator (line 313) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/layout/QMUIConstraintLayout.java
class QMUIConstraintLayout (line 32) | public class QMUIConstraintLayout extends QMUIAlphaConstraintLayout impl...
method QMUIConstraintLayout (line 35) | public QMUIConstraintLayout(Context context) {
method QMUIConstraintLayout (line 40) | public QMUIConstraintLayout(Context context, AttributeSet attrs) {
method QMUIConstraintLayout (line 45) | public QMUIConstraintLayout(Context context, AttributeSet attrs, int d...
method init (line 50) | private void init(Context context, AttributeSet attrs, int defStyleAtt...
method updateTopDivider (line 56) | @Override
method updateBottomDivider (line 62) | @Override
method updateLeftDivider (line 68) | @Override
method updateRightDivider (line 74) | @Override
method onlyShowTopDivider (line 80) | @Override
method onlyShowBottomDivider (line 87) | @Override
method onlyShowLeftDivider (line 94) | @Override
method onlyShowRightDivider (line 100) | @Override
method setTopDividerAlpha (line 106) | @Override
method setBottomDividerAlpha (line 112) | @Override
method setLeftDividerAlpha (line 118) | @Override
method setRightDividerAlpha (line 124) | @Override
method onMeasure (line 130) | @Override
method setRadiusAndShadow (line 142) | @Override
method setRadiusAndShadow (line 147) | @Override
method setRadiusAndShadow (line 152) | @Override
method setRadius (line 157) | @Override
method setRadius (line 162) | @Override
method getRadius (line 167) | @Override
method setOutlineInset (line 172) | @Override
method setBorderColor (line 177) | @Override
method setBorderWidth (line 183) | @Override
method setShowBorderOnlyBeforeL (line 189) | @Override
method setHideRadiusSide (line 195) | @Override
method getHideRadiusSide (line 200) | @Override
method setWidthLimit (line 205) | @Override
method setHeightLimit (line 214) | @Override
method setUseThemeGeneralShadowElevation (line 223) | @Override
method setOutlineExcludePadding (line 228) | @Override
method updateBottomSeparatorColor (line 233) | @Override
method updateLeftSeparatorColor (line 238) | @Override
method updateRightSeparatorColor (line 243) | @Override
method updateTopSeparatorColor (line 248) | @Override
method setShadowElevation (line 253) | @Override
method getShadowElevation (line 258) | @Override
method setShadowAlpha (line 263) | @Override
method setShadowColor (line 268) | @Override
method getShadowColor (line 273) | @Override
method setOuterNormalColor (line 278) | @Override
method getShadowAlpha (line 283) | @Override
method dispatchDraw (line 288) | @Override
method hasBorder (line 300) | @Override
method hasLeftSeparator (line 305) | @Override
method hasTopSeparator (line 310) | @Override
method hasRightSeparator (line 315) | @Override
method hasBottomSeparator (line 320) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/layout/QMUIFrameLayout.java
class QMUIFrameLayout (line 31) | public class QMUIFrameLayout extends QMUIAlphaFrameLayout implements IQM...
method QMUIFrameLayout (line 34) | public QMUIFrameLayout(Context context) {
method QMUIFrameLayout (line 39) | public QMUIFrameLayout(Context context, AttributeSet attrs) {
method QMUIFrameLayout (line 44) | public QMUIFrameLayout(Context context, AttributeSet attrs, int defSty...
method init (line 49) | private void init(Context context, AttributeSet attrs, int defStyleAtt...
method onMeasure (line 55) | @Override
method updateTopDivider (line 67) | @Override
method updateBottomDivider (line 73) | @Override
method updateLeftDivider (line 79) | @Override
method updateRightDivider (line 85) | @Override
method onlyShowTopDivider (line 91) | @Override
method onlyShowBottomDivider (line 98) | @Override
method onlyShowLeftDivider (line 105) | @Override
method onlyShowRightDivider (line 111) | @Override
method setTopDividerAlpha (line 118) | @Override
method setBottomDividerAlpha (line 124) | @Override
method setLeftDividerAlpha (line 130) | @Override
method setRightDividerAlpha (line 136) | @Override
method setRadiusAndShadow (line 142) | @Override
method setRadiusAndShadow (line 147) | @Override
method setRadiusAndShadow (line 152) | @Override
method setRadius (line 157) | @Override
method setRadius (line 162) | @Override
method getRadius (line 167) | @Override
method setOutlineInset (line 172) | @Override
method setHideRadiusSide (line 177) | @Override
method getHideRadiusSide (line 182) | @Override
method setBorderColor (line 187) | @Override
method setBorderWidth (line 193) | @Override
method setShowBorderOnlyBeforeL (line 199) | @Override
method setWidthLimit (line 205) | @Override
method setHeightLimit (line 214) | @Override
method setUseThemeGeneralShadowElevation (line 223) | @Override
method setOutlineExcludePadding (line 228) | @Override
method setShadowElevation (line 233) | @Override
method getShadowElevation (line 238) | @Override
method setShadowAlpha (line 243) | @Override
method getShadowAlpha (line 248) | @Override
method setShadowColor (line 253) | @Override
method getShadowColor (line 258) | @Override
method setOuterNormalColor (line 263) | @Override
method updateBottomSeparatorColor (line 268) | @Override
method updateLeftSeparatorColor (line 273) | @Override
method updateRightSeparatorColor (line 278) | @Override
method updateTopSeparatorColor (line 283) | @Override
method dispatchDraw (line 288) | @Override
method hasBorder (line 295) | @Override
method hasLeftSeparator (line 300) | @Override
method hasTopSeparator (line 305) | @Override
method hasRightSeparator (line 310) | @Override
method hasBottomSeparator (line 315) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/layout/QMUILayoutHelper.java
class QMUILayoutHelper (line 48) | public class QMUILayoutHelper implements IQMUILayout {
method QMUILayoutHelper (line 112) | public QMUILayoutHelper(Context context, AttributeSet attrs, int defAt...
method QMUILayoutHelper (line 116) | public QMUILayoutHelper(Context context, AttributeSet attrs, int defAt...
method setUseThemeGeneralShadowElevation (line 213) | @Override
method setOutlineExcludePadding (line 219) | @Override
method setWidthLimit (line 232) | @Override
method setHeightLimit (line 241) | @Override
method updateLeftSeparatorColor (line 250) | @Override
method updateBottomSeparatorColor (line 258) | @Override
method updateTopSeparatorColor (line 266) | @Override
method updateRightSeparatorColor (line 274) | @Override
method getShadowElevation (line 282) | @Override
method getShadowAlpha (line 287) | @Override
method getShadowColor (line 292) | @Override
method setOutlineInset (line 297) | @Override
method setShowBorderOnlyBeforeL (line 313) | @Override
method setShadowElevation (line 319) | @Override
method setShadowAlpha (line 328) | @Override
method setShadowColor (line 337) | @Override
method setShadowColorInner (line 346) | private void setShadowColorInner(int shadowColor) {
method invalidateOutline (line 357) | private void invalidateOutline() {
method invalidate (line 372) | private void invalidate() {
method setHideRadiusSide (line 380) | @Override
method getHideRadiusSide (line 388) | @Override
method setRadius (line 393) | @Override
method setRadius (line 400) | @Override
method getRadius (line 408) | @Override
method setRadiusAndShadow (line 413) | @Override
method setRadiusAndShadow (line 418) | @Override
method setRadiusAndShadow (line 423) | @Override
method isRadiusWithSideHidden (line 513) | public boolean isRadiusWithSideHidden() {
method updateTopDivider (line 519) | @Override
method updateBottomDivider (line 527) | @Override
method updateLeftDivider (line 535) | @Override
method updateRightDivider (line 543) | @Override
method onlyShowTopDivider (line 551) | @Override
method onlyShowBottomDivider (line 560) | @Override
method onlyShowLeftDivider (line 569) | @Override
method onlyShowRightDivider (line 577) | @Override
method setTopDividerAlpha (line 585) | @Override
method setBottomDividerAlpha (line 590) | @Override
method setLeftDividerAlpha (line 595) | @Override
method setRightDividerAlpha (line 600) | @Override
method handleMiniWidth (line 606) | public int handleMiniWidth(int widthMeasureSpec, int measuredWidth) {
method handleMiniHeight (line 614) | public int handleMiniHeight(int heightMeasureSpec, int measuredHeight) {
method getMeasuredWidthSpec (line 622) | public int getMeasuredWidthSpec(int widthMeasureSpec) {
method getMeasuredHeightSpec (line 638) | public int getMeasuredHeightSpec(int heightMeasureSpec) {
method setBorderColor (line 653) | @Override
method setBorderWidth (line 658) | @Override
method setOuterNormalColor (line 663) | @Override
method hasTopSeparator (line 672) | @Override
method hasRightSeparator (line 677) | @Override
method hasBottomSeparator (line 682) | @Override
method hasLeftSeparator (line 687) | @Override
method hasBorder (line 692) | @Override
method drawDividers (line 697) | public void drawDividers(Canvas canvas, int w, int h) {
method getRealRadius (line 751) | private int getRealRadius(){
method dispatchRoundBorderDraw (line 767) | public void dispatchRoundBorderDraw(Canvas canvas) {
method drawRoundRect (line 858) | private void drawRoundRect(Canvas canvas, RectF rect, float[] radiusAr...
method useFeature (line 865) | public static boolean useFeature() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/layout/QMUILinearLayout.java
class QMUILinearLayout (line 31) | public class QMUILinearLayout extends QMUIAlphaLinearLayout implements I...
method QMUILinearLayout (line 34) | public QMUILinearLayout(Context context) {
method QMUILinearLayout (line 39) | public QMUILinearLayout(Context context, AttributeSet attrs) {
method QMUILinearLayout (line 44) | public QMUILinearLayout(Context context, AttributeSet attrs, int defSt...
method init (line 49) | private void init(Context context, AttributeSet attrs, int defStyleAtt...
method updateTopDivider (line 55) | @Override
method updateBottomDivider (line 61) | @Override
method updateLeftDivider (line 67) | @Override
method updateRightDivider (line 73) | @Override
method onlyShowTopDivider (line 79) | @Override
method onlyShowBottomDivider (line 86) | @Override
method onlyShowLeftDivider (line 93) | @Override
method onlyShowRightDivider (line 99) | @Override
method setTopDividerAlpha (line 105) | @Override
method setBottomDividerAlpha (line 111) | @Override
method setLeftDividerAlpha (line 117) | @Override
method setRightDividerAlpha (line 123) | @Override
method onMeasure (line 129) | @Override
method setRadiusAndShadow (line 141) | @Override
method setRadiusAndShadow (line 146) | @Override
method setRadiusAndShadow (line 151) | @Override
method setRadius (line 156) | @Override
method setRadius (line 161) | @Override
method getRadius (line 166) | @Override
method setOutlineInset (line 171) | @Override
method setBorderColor (line 176) | @Override
method setBorderWidth (line 182) | @Override
method setShowBorderOnlyBeforeL (line 188) | @Override
method setHideRadiusSide (line 194) | @Override
method getHideRadiusSide (line 199) | @Override
method setWidthLimit (line 204) | @Override
method setHeightLimit (line 213) | @Override
method setUseThemeGeneralShadowElevation (line 222) | @Override
method setOutlineExcludePadding (line 227) | @Override
method updateBottomSeparatorColor (line 232) | @Override
method updateLeftSeparatorColor (line 237) | @Override
method updateRightSeparatorColor (line 242) | @Override
method updateTopSeparatorColor (line 247) | @Override
method setShadowElevation (line 252) | @Override
method getShadowElevation (line 257) | @Override
method setShadowAlpha (line 262) | @Override
method setShadowColor (line 267) | @Override
method getShadowColor (line 272) | @Override
method setOuterNormalColor (line 277) | @Override
method getShadowAlpha (line 282) | @Override
method dispatchDraw (line 287) | @Override
method hasBorder (line 294) | @Override
method hasLeftSeparator (line 299) | @Override
method hasTopSeparator (line 304) | @Override
method hasRightSeparator (line 309) | @Override
method hasBottomSeparator (line 314) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/layout/QMUIPriorityLinearLayout.java
class QMUIPriorityLinearLayout (line 31) | public class QMUIPriorityLinearLayout extends QMUILinearLayout {
method QMUIPriorityLinearLayout (line 35) | public QMUIPriorityLinearLayout(Context context) {
method QMUIPriorityLinearLayout (line 39) | public QMUIPriorityLinearLayout(Context context, AttributeSet attrs) {
method onMeasure (line 43) | @Override
method handleHorizontal (line 54) | private void handleHorizontal(int widthMeasureSpec, int heightMeasureS...
method handleVertical (line 116) | private void handleVertical(int widthMeasureSpec, int heightMeasureSpe...
method handlePriorityIncompressible (line 178) | private int handlePriorityIncompressible(int widthMeasureSpec, int hei...
method dispatchSpaceToDisposableChildList (line 222) | protected void dispatchSpaceToDisposableChildList(ArrayList<View> chil...
method dispatchSpaceToMiniWidthChildList (line 275) | protected void dispatchSpaceToMiniWidthChildList(ArrayList<View> child...
method getVisibleChildCount (line 296) | private int getVisibleChildCount() {
method generateLayoutParams (line 307) | @Override
method generateLayoutParams (line 312) | @Override
method checkLayoutParams (line 317) | @Override
class LayoutParams (line 322) | public static class LayoutParams extends LinearLayout.LayoutParams {
method LayoutParams (line 338) | public LayoutParams(Context c, AttributeSet attrs) {
method LayoutParams (line 350) | public LayoutParams(int width, int height) {
method LayoutParams (line 354) | public LayoutParams(int width, int height, float weight) {
method LayoutParams (line 358) | public LayoutParams(ViewGroup.LayoutParams p) {
method LayoutParams (line 362) | public LayoutParams(MarginLayoutParams source) {
method LayoutParams (line 366) | @TargetApi(19)
method setPriority (line 371) | public void setPriority(int priority) {
method setMiniContentProtectionSize (line 375) | public void setMiniContentProtectionSize(int miniContentProtectionSi...
method getPriority (line 379) | public int getPriority(int orientation) {
method backupOrRestore (line 395) | void backupOrRestore() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/layout/QMUIRelativeLayout.java
class QMUIRelativeLayout (line 31) | public class QMUIRelativeLayout extends QMUIAlphaRelativeLayout implemen...
method QMUIRelativeLayout (line 34) | public QMUIRelativeLayout(Context context) {
method QMUIRelativeLayout (line 39) | public QMUIRelativeLayout(Context context, AttributeSet attrs) {
method QMUIRelativeLayout (line 44) | public QMUIRelativeLayout(Context context, AttributeSet attrs, int def...
method init (line 49) | private void init(Context context, AttributeSet attrs, int defStyleAtt...
method updateTopDivider (line 55) | @Override
method updateBottomDivider (line 61) | @Override
method updateLeftDivider (line 67) | @Override
method updateRightDivider (line 73) | @Override
method onlyShowTopDivider (line 79) | @Override
method onlyShowBottomDivider (line 86) | @Override
method onlyShowLeftDivider (line 93) | @Override
method onlyShowRightDivider (line 99) | @Override
method setTopDividerAlpha (line 105) | @Override
method setBottomDividerAlpha (line 111) | @Override
method setLeftDividerAlpha (line 117) | @Override
method setRightDividerAlpha (line 123) | @Override
method onMeasure (line 129) | @Override
method setRadiusAndShadow (line 141) | @Override
method setRadiusAndShadow (line 146) | @Override
method setRadiusAndShadow (line 151) | @Override
method setRadius (line 156) | @Override
method setRadius (line 161) | @Override
method getRadius (line 166) | @Override
method setOutlineInset (line 171) | @Override
method setHideRadiusSide (line 176) | @Override
method getHideRadiusSide (line 181) | @Override
method setBorderColor (line 186) | @Override
method setBorderWidth (line 192) | @Override
method setShowBorderOnlyBeforeL (line 198) | @Override
method setWidthLimit (line 204) | @Override
method setHeightLimit (line 213) | @Override
method setUseThemeGeneralShadowElevation (line 222) | @Override
method setOutlineExcludePadding (line 227) | @Override
method setShadowElevation (line 232) | @Override
method getShadowElevation (line 237) | public int getShadowElevation() {
method setShadowAlpha (line 241) | public void setShadowAlpha(float shadowAlpha) {
method setShadowColor (line 245) | @Override
method getShadowColor (line 250) | @Override
method setOuterNormalColor (line 255) | @Override
method getShadowAlpha (line 260) | @Override
method updateBottomSeparatorColor (line 265) | @Override
method updateLeftSeparatorColor (line 270) | @Override
method updateRightSeparatorColor (line 275) | @Override
method updateTopSeparatorColor (line 280) | @Override
method dispatchDraw (line 285) | @Override
method hasBorder (line 292) | @Override
method hasLeftSeparator (line 297) | @Override
method hasTopSeparator (line 302) | @Override
method hasRightSeparator (line 307) | @Override
method hasBottomSeparator (line 312) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/link/ITouchableSpan.java
type ITouchableSpan (line 26) | public interface ITouchableSpan {
method setPressed (line 27) | void setPressed(boolean pressed);
method onClick (line 28) | void onClick(View widget);
FILE: qmui/src/main/java/com/qmuiteam/qmui/link/QMUILinkTouchDecorHelper.java
class QMUILinkTouchDecorHelper (line 36) | public class QMUILinkTouchDecorHelper {
method onTouchEvent (line 39) | public boolean onTouchEvent(TextView textView, Spannable spannable, Mo...
method getPressedSpan (line 111) | public ITouchableSpan getPressedSpan(TextView textView, Spannable span...
FILE: qmui/src/main/java/com/qmuiteam/qmui/link/QMUILinkTouchMovementMethod.java
class QMUILinkTouchMovementMethod (line 33) | public class QMUILinkTouchMovementMethod extends LinkMovementMethod {
method onTouchEvent (line 35) | @Override
method getInstance (line 41) | public static MovementMethod getInstance() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/link/QMUILinkify.java
class QMUILinkify (line 77) | public class QMUILinkify {
method getPattern (line 122) | @Override
method getPattern (line 129) | @Override
method useQmuiWebUrlMatcher (line 135) | public static void useQmuiWebUrlMatcher(){
method setWebUrlMatcher (line 139) | public static void setWebUrlMatcher(WebUrlMatcher webUrlMatcher) {
method acceptMatch (line 148) | public final boolean acceptMatch(CharSequence s, int start, int end) {
method acceptMatch (line 182) | public final boolean acceptMatch(CharSequence s, int start, int end) {
method transformUrl (line 205) | public final String transformUrl(final Matcher match, String url) {
type MatchFilter (line 221) | public interface MatchFilter {
method acceptMatch (line 234) | boolean acceptMatch(CharSequence s, int start, int end);
type TransformFilter (line 245) | public interface TransformFilter {
method transformUrl (line 254) | String transformUrl(final Matcher match, String url);
method addLinks (line 264) | public static boolean addLinks(Spannable text, int mask, ColorStateLis...
method addLinks (line 317) | public static boolean addLinks(TextView text, int mask, ColorStateList...
method addLinkMovementMethod (line 345) | private static void addLinkMovementMethod(TextView t) {
method addLinks (line 367) | public static void addLinks(TextView text, Pattern pattern, String sch...
method addLinks (line 386) | public static void addLinks(TextView text, Pattern p, String scheme,
method addLinks (line 407) | public static boolean addLinks(Spannable text, Pattern pattern, String...
method addLinks (line 425) | public static boolean addLinks(Spannable s, Pattern p,
method applyLink (line 453) | private static void applyLink(String url, int start, int end, Spannabl...
class StyleableURLSpan (line 475) | private static abstract class StyleableURLSpan extends URLSpan impleme...
method StyleableURLSpan (line 481) | public StyleableURLSpan(String url, QMUIOnSpanClickListener l) {
method setPressed (line 487) | @Override
method onClick (line 492) | @Override
method makeUrl (line 502) | private static String makeUrl(String url, String[] prefixes,
method gatherLinks (line 532) | private static void gatherLinks(ArrayList<LinkSpec> links,
method gatherPhoneLinks (line 553) | private static void gatherPhoneLinks(ArrayList<LinkSpec> links,
method isInExcepts (line 578) | private static boolean isInExcepts(CharSequence data, Pattern[] except...
method isTooLarge (line 591) | private static boolean isTooLarge(CharSequence data) {
method gatherMapLinks (line 622) | private static void gatherMapLinks(ArrayList<LinkSpec> links, Spannabl...
method pruneOverlaps (line 662) | private static void pruneOverlaps(ArrayList<LinkSpec> links) {
class LinkSpec (line 716) | private static class LinkSpec {
class WebUrlPattern (line 722) | private static class WebUrlPattern {
type WebUrlMatcher (line 808) | public interface WebUrlMatcher {
method getPattern (line 809) | Pattern getPattern();
FILE: qmui/src/main/java/com/qmuiteam/qmui/link/QMUIScrollingMovementMethod.java
class QMUIScrollingMovementMethod (line 31) | public class QMUIScrollingMovementMethod extends ScrollingMovementMethod {
method onTouchEvent (line 33) | @Override
method getInstance (line 39) | public static MovementMethod getInstance() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/IQMUIContinuousNestedBottomView.java
type IQMUIContinuousNestedBottomView (line 19) | public interface IQMUIContinuousNestedBottomView extends IQMUIContinuous...
method consumeScroll (line 27) | void consumeScroll(int dyUnconsumed);
method smoothScrollYBy (line 29) | void smoothScrollYBy(int dy, int duration);
method stopScroll (line 31) | void stopScroll();
method getContentHeight (line 39) | int getContentHeight();
method getCurrentScroll (line 41) | int getCurrentScroll();
method getScrollOffsetRange (line 43) | int getScrollOffsetRange();
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/IQMUIContinuousNestedScrollCommon.java
type IQMUIContinuousNestedScrollCommon (line 25) | public interface IQMUIContinuousNestedScrollCommon {
method saveScrollInfo (line 31) | void saveScrollInfo(@NonNull Bundle bundle);
method restoreScrollInfo (line 33) | void restoreScrollInfo(@NonNull Bundle bundle);
method injectScrollNotifier (line 35) | void injectScrollNotifier(OnScrollNotifier notifier);
type OnScrollNotifier (line 37) | interface OnScrollNotifier {
method notify (line 38) | void notify(int innerOffset, int innerRange);
method onScrollStateChange (line 40) | void onScrollStateChange(View view, int newScrollState);
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/IQMUIContinuousNestedTopView.java
type IQMUIContinuousNestedTopView (line 19) | public interface IQMUIContinuousNestedTopView extends IQMUIContinuousNes...
method consumeScroll (line 26) | int consumeScroll(int dyUnconsumed);
method getCurrentScroll (line 28) | int getCurrentScroll();
method getScrollOffsetRange (line 30) | int getScrollOffsetRange();
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedBottomAreaBehavior.java
class QMUIContinuousNestedBottomAreaBehavior (line 32) | public class QMUIContinuousNestedBottomAreaBehavior extends QMUIViewOffs...
method setTopInset (line 39) | public void setTopInset(int topInset) {
method QMUIContinuousNestedBottomAreaBehavior (line 43) | public QMUIContinuousNestedBottomAreaBehavior() {
method QMUIContinuousNestedBottomAreaBehavior (line 46) | public QMUIContinuousNestedBottomAreaBehavior(Context context, Attribu...
method onMeasureChild (line 50) | @Override
method layoutChild (line 78) | @Override
method onLayoutChild (line 107) | @Override
method resolveGravity (line 118) | private static int resolveGravity(int gravity) {
method layoutDependsOn (line 122) | @Override
method onDependentViewChanged (line 127) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedBottomDelegateLayout.java
class QMUIContinuousNestedBottomDelegateLayout (line 48) | public abstract class QMUIContinuousNestedBottomDelegateLayout extends Q...
method run (line 72) | @Override
method QMUIContinuousNestedBottomDelegateLayout (line 78) | public QMUIContinuousNestedBottomDelegateLayout(Context context) {
method QMUIContinuousNestedBottomDelegateLayout (line 82) | public QMUIContinuousNestedBottomDelegateLayout(Context context, Attri...
method QMUIContinuousNestedBottomDelegateLayout (line 86) | public QMUIContinuousNestedBottomDelegateLayout(Context context, Attri...
method getHeaderView (line 108) | public View getHeaderView() {
method getContentView (line 112) | public View getContentView() {
method getOffsetCurrent (line 116) | public int getOffsetCurrent() {
method getOffsetRange (line 120) | public int getOffsetRange() {
method getMiniOffset (line 124) | private int getMiniOffset() {
method getContentHeight (line 136) | @Override
method onCreateHeaderView (line 150) | @NonNull
method onCreateContentView (line 153) | @NonNull
method getHeaderStickyHeight (line 156) | protected int getHeaderStickyHeight() {
method getHeaderHeightLayoutParam (line 161) | protected int getHeaderHeightLayoutParam() {
method getContentBottomMargin (line 165) | protected int getContentBottomMargin() {
method onMeasure (line 169) | @Override
method onLayout (line 179) | @Override
method postCheckLayout (line 194) | public void postCheckLayout() {
method checkLayout (line 199) | public void checkLayout() {
method offsetBy (line 208) | private int offsetBy(int dyUnConsumed) {
method consumeScroll (line 229) | @Override
method smoothScrollYBy (line 243) | @Override
method stopScroll (line 248) | @Override
method getCurrentScroll (line 253) | @Override
method getScrollOffsetRange (line 259) | @Override
method injectScrollNotifier (line 268) | @Override
method saveScrollInfo (line 287) | @Override
method restoreScrollInfo (line 295) | @Override
method startNestedScroll (line 308) | @Override
method stopNestedScroll (line 313) | @Override
method hasNestedScrollingParent (line 318) | @Override
method dispatchNestedScroll (line 323) | @Override
method dispatchNestedPreScroll (line 330) | @Override
method setNestedScrollingEnabled (line 338) | @Override
method isNestedScrollingEnabled (line 343) | @Override
method startNestedScroll (line 348) | @Override
method stopNestedScroll (line 353) | @Override
method hasNestedScrollingParent (line 358) | @Override
method dispatchNestedScroll (line 363) | @Override
method dispatchNestedPreScroll (line 370) | @Override
method dispatchNestedFling (line 375) | @Override
method dispatchNestedPreFling (line 380) | @Override
method onStartNestedScroll (line 387) | @Override
method onNestedScrollAccepted (line 393) | @Override
method onStopNestedScroll (line 400) | @Override
method onNestedScroll (line 406) | @Override
method onNestedPreScroll (line 414) | @Override
method onStartNestedScroll (line 426) | @Override
method onNestedScrollAccepted (line 431) | @Override
method onStopNestedScroll (line 436) | @Override
method onNestedScroll (line 441) | @Override
method onNestedPreScroll (line 448) | @Override
method onNestedFling (line 453) | @Override
method onNestedPreFling (line 462) | @Override
method getNestedScrollAxes (line 467) | @Override
method isPointInHeaderBounds (line 473) | private boolean isPointInHeaderBounds(int x, int y) {
method ensureVelocityTracker (line 478) | private void ensureVelocityTracker() {
method onInterceptTouchEvent (line 484) | @Override
method onTouchEvent (line 548) | @Override
class ViewFlinger (line 648) | class ViewFlinger implements Runnable {
method ViewFlinger (line 659) | ViewFlinger() {
method run (line 663) | @Override
method postOnAnimation (line 696) | void postOnAnimation() {
method internalPostOnAnimation (line 704) | private void internalPostOnAnimation() {
method fling (line 710) | public void fling(int velocityY) {
method stop (line 726) | public void stop() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedBottomRecyclerView.java
class QMUIContinuousNestedBottomRecyclerView (line 31) | public class QMUIContinuousNestedBottomRecyclerView extends RecyclerView
method QMUIContinuousNestedBottomRecyclerView (line 40) | public QMUIContinuousNestedBottomRecyclerView(@NonNull Context context) {
method QMUIContinuousNestedBottomRecyclerView (line 45) | public QMUIContinuousNestedBottomRecyclerView(@NonNull Context context...
method QMUIContinuousNestedBottomRecyclerView (line 50) | public QMUIContinuousNestedBottomRecyclerView(@NonNull Context context...
method init (line 55) | private void init() {
method consumeScroll (line 85) | @Override
method getContentHeight (line 118) | @Override
method injectScrollNotifier (line 135) | @Override
method getCurrentScroll (line 140) | @Override
method getScrollOffsetRange (line 145) | @Override
method smoothScrollYBy (line 150) | @Override
method saveScrollInfo (line 156) | @Override
method restoreScrollInfo (line 169) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedScrollLayout.java
class QMUIContinuousNestedScrollLayout (line 37) | public class QMUIContinuousNestedScrollLayout extends CoordinatorLayout ...
method run (line 48) | @Override
method QMUIContinuousNestedScrollLayout (line 62) | public QMUIContinuousNestedScrollLayout(@NonNull Context context) {
method QMUIContinuousNestedScrollLayout (line 66) | public QMUIContinuousNestedScrollLayout(@NonNull Context context, @Nul...
method QMUIContinuousNestedScrollLayout (line 70) | public QMUIContinuousNestedScrollLayout(@NonNull Context context, @Nul...
method ensureScrollBar (line 74) | private void ensureScrollBar() {
method setDraggableScrollBarEnabled (line 86) | public void setDraggableScrollBarEnabled(boolean draggableScrollBarEna...
method setEnableScrollBarFadeInOut (line 100) | public void setEnableScrollBarFadeInOut(boolean enableScrollBarFadeInO...
method createScrollBar (line 115) | protected QMUIDraggableScrollBar createScrollBar(Context context) {
method onDragStarted (line 119) | @Override
method onDragToPercent (line 124) | @Override
method onDragEnd (line 130) | @Override
method getCurrentScroll (line 135) | public int getCurrentScroll() {
method getScrollRange (line 147) | public int getScrollRange() {
method getCurrentScrollPercent (line 160) | public float getCurrentScrollPercent() {
method addOnScrollListener (line 169) | public void addOnScrollListener(@NonNull OnScrollListener onScrollList...
method removeOnScrollListener (line 175) | public void removeOnScrollListener(OnScrollListener onScrollListener) {
method setKeepBottomAreaStableWhenCheckLayout (line 179) | public void setKeepBottomAreaStableWhenCheckLayout(boolean keepBottomA...
method isKeepBottomAreaStableWhenCheckLayout (line 183) | public boolean isKeepBottomAreaStableWhenCheckLayout() {
method setTopAreaView (line 187) | public void setTopAreaView(View topView, @Nullable LayoutParams layout...
method getTopView (line 224) | public IQMUIContinuousNestedTopView getTopView() {
method getBottomView (line 228) | public IQMUIContinuousNestedBottomView getBottomView() {
method getTopAreaBehavior (line 232) | public QMUIContinuousNestedTopAreaBehavior getTopAreaBehavior() {
method getBottomAreaBehavior (line 236) | public QMUIContinuousNestedBottomAreaBehavior getBottomAreaBehavior() {
method setBottomAreaView (line 240) | public void setBottomAreaView(View bottomView, @Nullable LayoutParams ...
method onLayout (line 276) | @Override
method postCheckLayout (line 282) | public void postCheckLayout() {
method checkLayout (line 287) | public void checkLayout() {
method scrollBottomViewToTop (line 324) | public void scrollBottomViewToTop() {
method dispatchScroll (line 342) | private void dispatchScroll(int topCurrent, int topRange,
method onNestedScroll (line 357) | @Override
method dispatchScrollStateChange (line 366) | private void dispatchScrollStateChange(int newScrollState, boolean fro...
method scrollBy (line 373) | public void scrollBy(int dy) {
method smoothScrollBy (line 381) | public void smoothScrollBy(int dy, int duration) {
method stopScroll (line 392) | public void stopScroll() {
method scrollToTop (line 401) | public void scrollToTop() {
method scrollToBottom (line 412) | public void scrollToBottom() {
method getOffsetCurrent (line 438) | public int getOffsetCurrent() {
method getOffsetRange (line 442) | public int getOffsetRange() {
method onTopAreaOffset (line 459) | @Override
method onTopBehaviorTouchBegin (line 468) | @Override
method onTopBehaviorTouchEnd (line 474) | @Override
method onTopBehaviorFlingOrScrollStart (line 480) | @Override
method onTopBehaviorFlingOrScrollEnd (line 486) | @Override
method dispatchTouchEvent (line 492) | @Override
method saveScrollInfo (line 526) | public void saveScrollInfo(@NonNull Bundle bundle) {
method restoreScrollInfo (line 542) | public void restoreScrollInfo(@Nullable Bundle bundle) {
type OnScrollListener (line 559) | public interface OnScrollListener {
method onScroll (line 561) | void onScroll(QMUIContinuousNestedScrollLayout scrollLayout, int top...
method onScrollStateChange (line 565) | void onScrollStateChange(QMUIContinuousNestedScrollLayout scrollLayo...
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedTopAreaBehavior.java
class QMUIContinuousNestedTopAreaBehavior (line 36) | public class QMUIContinuousNestedTopAreaBehavior extends QMUIViewOffsetB...
method QMUIContinuousNestedTopAreaBehavior (line 53) | public QMUIContinuousNestedTopAreaBehavior(Context context) {
method QMUIContinuousNestedTopAreaBehavior (line 58) | public QMUIContinuousNestedTopAreaBehavior(Context context, AttributeS...
method setReplaceCancelActionWithMoveActionForWebView (line 63) | public void setReplaceCancelActionWithMoveActionForWebView(boolean rep...
method setCallback (line 67) | public void setCallback(Callback callback) {
method onInterceptTouchEvent (line 71) | @Override
method onTouchEvent (line 161) | @Override
method scroll (line 247) | void scroll(@NonNull CoordinatorLayout parent, @NonNull View child, in...
method smoothScrollBy (line 260) | void smoothScrollBy(@NonNull CoordinatorLayout parent, @NonNull View c...
method stopFlingOrScroll (line 264) | void stopFlingOrScroll() {
method ensureVelocityTracker (line 268) | private void ensureVelocityTracker() {
method onMeasureChild (line 274) | @Override
method onLayoutChild (line 299) | @Override
method onNestedPreScroll (line 312) | @Override
method onNestedScroll (line 355) | @Override
method onStartNestedScroll (line 413) | @Override
method findBottomView (line 420) | private View findBottomView(CoordinatorLayout parent) {
class ViewFlinger (line 431) | class ViewFlinger implements Runnable {
method ViewFlinger (line 445) | ViewFlinger(Context context) {
method run (line 449) | @Override
method postOnAnimation (line 490) | void postOnAnimation() {
method internalPostOnAnimation (line 498) | private void internalPostOnAnimation() {
method fling (line 506) | public void fling(CoordinatorLayout parent, View child, int velocity...
method startScroll (line 513) | public void startScroll(CoordinatorLayout parent, View child, int dy...
method onFlingOrScrollStart (line 519) | private void onFlingOrScrollStart(CoordinatorLayout parent, View chi...
method stop (line 537) | public void stop() {
method onFlingOrScrollEnd (line 547) | private void onFlingOrScrollEnd() {
method setTopAndBottomOffset (line 555) | @Override
type Callback (line 564) | public interface Callback {
method onTopAreaOffset (line 565) | void onTopAreaOffset(int offset);
method onTopBehaviorTouchBegin (line 567) | void onTopBehaviorTouchBegin();
method onTopBehaviorTouchEnd (line 569) | void onTopBehaviorTouchEnd();
method onTopBehaviorFlingOrScrollStart (line 571) | void onTopBehaviorFlingOrScrollStart();
method onTopBehaviorFlingOrScrollEnd (line 573) | void onTopBehaviorFlingOrScrollEnd();
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedTopDelegateLayout.java
class QMUIContinuousNestedTopDelegateLayout (line 37) | public class QMUIContinuousNestedTopDelegateLayout extends FrameLayout i...
method run (line 54) | @Override
method QMUIContinuousNestedTopDelegateLayout (line 60) | public QMUIContinuousNestedTopDelegateLayout(@NonNull Context context) {
method QMUIContinuousNestedTopDelegateLayout (line 64) | public QMUIContinuousNestedTopDelegateLayout(@NonNull Context context,...
method QMUIContinuousNestedTopDelegateLayout (line 68) | public QMUIContinuousNestedTopDelegateLayout(@NonNull Context context,
method setHeaderView (line 79) | public void setHeaderView(@NonNull View headerView) {
method setDelegateView (line 85) | public void setDelegateView(@NonNull IQMUIContinuousNestedTopView dele...
method setFooterView (line 99) | public void setFooterView(@NonNull View footerView) {
method onMeasure (line 105) | @Override
method onLayout (line 133) | @Override
method postCheckLayout (line 181) | public void postCheckLayout() {
method checkLayout (line 186) | public void checkLayout() {
method offsetTo (line 223) | private void offsetTo(int targetOffsetCurrent) {
method getDelegateView (line 241) | public IQMUIContinuousNestedTopView getDelegateView() {
method getHeaderView (line 245) | public View getHeaderView() {
method getFooterView (line 249) | public View getFooterView() {
method getContainerOffsetCurrent (line 253) | public int getContainerOffsetCurrent() {
method getContainerOffsetRange (line 257) | public int getContainerOffsetRange() {
method getContainerHeaderOffsetRange (line 261) | public int getContainerHeaderOffsetRange() {
method consumeScroll (line 269) | @Override
method getCurrentScroll (line 359) | @Override
method getScrollOffsetRange (line 368) | @Override
method injectScrollNotifier (line 377) | @Override
method saveScrollInfo (line 395) | @Override
method restoreScrollInfo (line 403) | @Override
method startNestedScroll (line 414) | @Override
method stopNestedScroll (line 419) | @Override
method hasNestedScrollingParent (line 424) | @Override
method dispatchNestedScroll (line 429) | @Override
method dispatchNestedPreScroll (line 436) | @Override
method setNestedScrollingEnabled (line 444) | @Override
method isNestedScrollingEnabled (line 449) | @Override
method startNestedScroll (line 454) | @Override
method stopNestedScroll (line 459) | @Override
method hasNestedScrollingParent (line 464) | @Override
method dispatchNestedScroll (line 469) | @Override
method dispatchNestedPreScroll (line 476) | @Override
method dispatchNestedFling (line 481) | @Override
method dispatchNestedPreFling (line 486) | @Override
method onStartNestedScroll (line 493) | @Override
method onNestedScrollAccepted (line 499) | @Override
method onStopNestedScroll (line 506) | @Override
method onNestedScroll (line 512) | @Override
method onNestedPreScroll (line 537) | @Override
method onStartNestedScroll (line 568) | @Override
method onNestedScrollAccepted (line 573) | @Override
method onStopNestedScroll (line 578) | @Override
method onNestedScroll (line 583) | @Override
method onNestedPreScroll (line 590) | @Override
method onNestedFling (line 595) | @Override
method onNestedPreFling (line 600) | @Override
method getNestedScrollAxes (line 605) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedTopLinearLayout.java
class QMUIContinuousNestedTopLinearLayout (line 27) | public class QMUIContinuousNestedTopLinearLayout extends QMUILinearLayou...
method QMUIContinuousNestedTopLinearLayout (line 30) | public QMUIContinuousNestedTopLinearLayout(Context context) {
method QMUIContinuousNestedTopLinearLayout (line 34) | public QMUIContinuousNestedTopLinearLayout(Context context, AttributeS...
method QMUIContinuousNestedTopLinearLayout (line 38) | public QMUIContinuousNestedTopLinearLayout(Context context, AttributeS...
method consumeScroll (line 43) | @Override
method getCurrentScroll (line 48) | @Override
method getScrollOffsetRange (line 53) | @Override
method injectScrollNotifier (line 58) | @Override
method restoreScrollInfo (line 63) | @Override
method saveScrollInfo (line 68) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedTopRecyclerView.java
class QMUIContinuousNestedTopRecyclerView (line 30) | public class QMUIContinuousNestedTopRecyclerView extends RecyclerView im...
method QMUIContinuousNestedTopRecyclerView (line 37) | public QMUIContinuousNestedTopRecyclerView(@NonNull Context context) {
method QMUIContinuousNestedTopRecyclerView (line 42) | public QMUIContinuousNestedTopRecyclerView(@NonNull Context context, @...
method QMUIContinuousNestedTopRecyclerView (line 47) | public QMUIContinuousNestedTopRecyclerView(@NonNull Context context, @...
method init (line 52) | private void init(){
method consumeScroll (line 56) | @Override
method getCurrentScroll (line 92) | @Override
method getScrollOffsetRange (line 97) | @Override
method injectScrollNotifier (line 102) | @Override
method onScrolled (line 107) | @Override
method saveScrollInfo (line 115) | @Override
method restoreScrollInfo (line 128) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIContinuousNestedTopWebView.java
class QMUIContinuousNestedTopWebView (line 28) | public class QMUIContinuousNestedTopWebView extends QMUIWebView implemen...
method QMUIContinuousNestedTopWebView (line 34) | public QMUIContinuousNestedTopWebView(Context context) {
method QMUIContinuousNestedTopWebView (line 39) | public QMUIContinuousNestedTopWebView(Context context, AttributeSet at...
method QMUIContinuousNestedTopWebView (line 44) | public QMUIContinuousNestedTopWebView(Context context, AttributeSet at...
method init (line 49) | private void init(){
method consumeScroll (line 53) | @Override
method getCurrentScroll (line 70) | @Override
method getScrollOffsetRange (line 77) | @Override
method injectScrollNotifier (line 82) | @Override
method onScrollChanged (line 87) | @Override
method saveScrollInfo (line 95) | @Override
method restoreScrollInfo (line 100) | @Override
method exec (line 107) | private void exec(final String jsCode) {
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIDraggableScrollBar.java
class QMUIDraggableScrollBar (line 51) | public class QMUIDraggableScrollBar extends View {
method run (line 63) | @Override
method QMUIDraggableScrollBar (line 77) | public QMUIDraggableScrollBar(Context context) {
method QMUIDraggableScrollBar (line 81) | public QMUIDraggableScrollBar(Context context, @NonNull Drawable dragD...
method QMUIDraggableScrollBar (line 86) | public QMUIDraggableScrollBar(Context context, @Nullable AttributeSet ...
method setCallback (line 90) | public void setCallback(Callback callback) {
method setAdjustDistanceWithAnimation (line 94) | public void setAdjustDistanceWithAnimation(boolean adjustDistanceWithA...
method setKeepShownTime (line 98) | public void setKeepShownTime(int keepShownTime) {
method setTransitionDuration (line 102) | public void setTransitionDuration(int transitionDuration) {
method setEnableFadeInAndOut (line 106) | public void setEnableFadeInAndOut(boolean enableFadeInAndOut) {
method isEnableFadeInAndOut (line 110) | public boolean isEnableFadeInAndOut() {
method setDragDrawable (line 114) | public void setDragDrawable(Drawable dragDrawable) {
method setPercent (line 119) | public void setPercent(float percent) {
method setPercentInternal (line 125) | private void setPercentInternal(float percent){
method onMeasure (line 130) | @Override
method onTouchEvent (line 141) | @Override
method onDragging (line 180) | private void onDragging(Drawable drawable, float currentY) {
method awakenScrollBar (line 189) | public void awakenScrollBar() {
method onDraw (line 200) | @Override
method getScrollBarTopMargin (line 269) | protected int getScrollBarTopMargin() {
method getScrollBarBottomMargin (line 273) | protected int getScrollBarBottomMargin() {
type Callback (line 277) | interface Callback {
method onDragStarted (line 278) | void onDragStarted();
method onDragToPercent (line 279) | void onDragToPercent(float percent);
method onDragEnd (line 280) | void onDragEnd();
FILE: qmui/src/main/java/com/qmuiteam/qmui/nestedScroll/QMUIViewOffsetBehavior.java
class QMUIViewOffsetBehavior (line 43) | public class QMUIViewOffsetBehavior<V extends View> extends CoordinatorL...
method QMUIViewOffsetBehavior (line 50) | public QMUIViewOffsetBehavior() {
method QMUIViewOffsetBehavior (line 53) | public QMUIViewOffsetBehavior(Context context, AttributeSet attrs) {
method onLayoutChild (line 57) | @Override
method layoutChild (line 79) | protected void layoutChild(CoordinatorLayout parent, V child, int layo...
method setTopAndBottomOffset (line 84) | public boolean setTopAndBottomOffset(int offset) {
method setLeftAndRightOffset (line 93) | public boolean setLeftAndRightOffset(int offset) {
method getTopAndBottomOffset (line 102) | public int getTopAndBottomOffset() {
method getLeftAndRightOffset (line 106) | public int getLeftAndRightOffset() {
method setVerticalOffsetEnabled (line 110) | public void setVerticalOffsetEnabled(boolean verticalOffsetEnabled) {
method getLayoutTop (line 116) | public int getLayoutTop() {
method getLayoutLeft (line 123) | public int getLayoutLeft() {
method isVerticalOffsetEnabled (line 130) | public boolean isVerticalOffsetEnabled() {
method setHorizontalOffsetEnabled (line 134) | public void setHorizontalOffsetEnabled(boolean horizontalOffsetEnabled) {
method isHorizontalOffsetEnabled (line 140) | public boolean isHorizontalOffsetEnabled() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/qqface/IQMUIQQFaceManager.java
type IQMUIQQFaceManager (line 30) | public interface IQMUIQQFaceManager {
method maybeSoftBankEmoji (line 38) | boolean maybeSoftBankEmoji(char c);
method getSoftbankEmojiResource (line 43) | int getSoftbankEmojiResource(char c);
method maybeEmoji (line 48) | boolean maybeEmoji(int codePoint);
method getEmojiResource (line 53) | int getEmojiResource(int codePoint);
method getDoubleUnicodeEmoji (line 58) | int getDoubleUnicodeEmoji(int currentCodePoint, int nextCodePoint);
method getQQfaceResource (line 63) | int getQQfaceResource(CharSequence text);
method getSpecialBoundsDrawable (line 68) | Drawable getSpecialBoundsDrawable(CharSequence text);
method getSpecialDrawableMaxHeight (line 74) | int getSpecialDrawableMaxHeight();
FILE: qmui/src/main/java/com/qmuiteam/qmui/qqface/QMUINoQQFaceManager.java
class QMUINoQQFaceManager (line 20) | public class QMUINoQQFaceManager implements IQMUIQQFaceManager{
method maybeSoftBankEmoji (line 22) | @Override
method getSoftbankEmojiResource (line 27) | @Override
method maybeEmoji (line 32) | @Override
method getEmojiResource (line 37) | @Override
method getDoubleUnicodeEmoji (line 42) | @Override
method getQQfaceResource (line 47) | @Override
method getSpecialBoundsDrawable (line 52) | @Override
method getSpecialDrawableMaxHeight (line 57) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/qqface/QMUIQQFaceCompiler.java
class QMUIQQFaceCompiler (line 43) | public class QMUIQQFaceCompiler {
method setDefaultQQFaceManager (line 48) | public static void setDefaultQQFaceManager(@NonNull IQMUIQQFaceManager...
method getDefaultInstance (line 56) | @MainThread
method getInstance (line 61) | @MainThread
method QMUIQQFaceCompiler (line 72) | private QMUIQQFaceCompiler(IQMUIQQFaceManager manager) {
method getSpecialBoundsMaxHeight (line 77) | public int getSpecialBoundsMaxHeight() {
method compile (line 81) | public ElementList compile(CharSequence text) {
method compile (line 88) | public ElementList compile(CharSequence text, int start, int end) {
method compile (line 92) | private ElementList compile(CharSequence text, int start, int end, boo...
method setCache (line 151) | public void setCache(LruCache<CharSequence, ElementList> cache) {
method realCompile (line 155) | @SuppressWarnings("ConstantConditions")
type ElementType (line 282) | public enum ElementType {
class Element (line 290) | public static class Element {
method getType (line 298) | public ElementType getType() {
method getText (line 302) | public CharSequence getText() {
method getDrawableRes (line 306) | public int getDrawableRes() {
method getChildList (line 310) | public ElementList getChildList() {
method getTouchableSpan (line 314) | public QMUITouchableSpan getTouchableSpan() {
method getSpecialBoundsDrawable (line 318) | public Drawable getSpecialBoundsDrawable() {
method createTextElement (line 322) | public static Element createTextElement(CharSequence text) {
method createDrawableElement (line 329) | public static Element createDrawableElement(int drawableRes) {
method createSpeaicalBoundsDrawableElement (line 336) | public static Element createSpeaicalBoundsDrawableElement(Drawable s...
method createTouchSpanElement (line 343) | public static Element createTouchSpanElement(CharSequence text,
method createNextLineElement (line 353) | public static Element createNextLineElement() {
class ElementList (line 361) | public static class ElementList {
method ElementList (line 368) | public ElementList(int start, int end) {
method getStart (line 374) | public int getStart() {
method getEnd (line 378) | public int getEnd() {
method getNewLineCount (line 382) | public int getNewLineCount() {
method getQQFaceCount (line 386) | public int getQQFaceCount() {
method add (line 390) | public void add(Element element) {
method getElements (line 405) | public List<Element> getElements() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/qqface/QMUIQQFaceView.java
class QMUIQQFaceView (line 67) | public class QMUIQQFaceView extends View {
method QMUIQQFaceView (line 115) | public QMUIQQFaceView(Context context) {
method QMUIQQFaceView (line 119) | public QMUIQQFaceView(Context context, AttributeSet attrs) {
method QMUIQQFaceView (line 123) | public QMUIQQFaceView(Context context, AttributeSet attrs, int defStyl...
method setOpenQQFace (line 174) | public void setOpenQQFace(boolean openQQFace) {
method setGravity (line 178) | public void setGravity(int gravity) {
method getGravity (line 182) | public int getGravity() {
method setMaxWidth (line 186) | public void setMaxWidth(int maxWidth) {
method getMaxWidth (line 193) | public int getMaxWidth() {
method onTouchEvent (line 199) | @Override
method setCompiler (line 292) | public void setCompiler(QMUIQQFaceCompiler compiler) {
method setTypeface (line 299) | public void setTypeface(Typeface typeface) {
method setTypeface (line 309) | public void setTypeface(Typeface tf, int style) {
method setParagraphSpace (line 333) | public void setParagraphSpace(int paragraphSpace) {
method setMoreActionText (line 341) | public void setMoreActionText(String moreActionText) {
method setLinkUnderLineColor (line 350) | public void setLinkUnderLineColor(int linkUnderLineColor) {
method setLinkUnderLineColor (line 354) | public void setLinkUnderLineColor(ColorStateList linkUnderLineColor) {
method setLinkUnderLineHeight (line 361) | public void setLinkUnderLineHeight(int linkUnderLineHeight) {
method setNeedUnderlineForMoreText (line 368) | public void setNeedUnderlineForMoreText(boolean needUnderlineForMoreTe...
method setMoreActionColor (line 375) | public void setMoreActionColor(int color) {
method setMoreActionColor (line 379) | public void setMoreActionColor(ColorStateList color) {
method setMoreActionBgColor (line 386) | public void setMoreActionBgColor(int color) {
method setMoreActionBgColor (line 390) | public void setMoreActionBgColor(ColorStateList color) {
method measureMoreActionTextLength (line 397) | private void measureMoreActionTextLength() {
method setSpecialDrawablePadding (line 405) | public void setSpecialDrawablePadding(int specialDrawablePadding) {
method setIncludeFontPadding (line 413) | public void setIncludeFontPadding(boolean includePad) {
method setQQFaceSizeAddon (line 422) | public void setQQFaceSizeAddon(int QQFaceSizeAddon) {
method setLineSpace (line 431) | public void setLineSpace(int lineSpace) {
method setEllipsize (line 439) | public void setEllipsize(TextUtils.TruncateAt where) {
method setMaxLine (line 447) | public void setMaxLine(int maxLine) {
method getMaxLine (line 455) | public int getMaxLine() {
method getLineCount (line 459) | public int getLineCount() {
method isNeedEllipsize (line 463) | public boolean isNeedEllipsize() {
method setSingleLine (line 467) | public void setSingleLine(boolean singleLine) {
method setTextColor (line 475) | public void setTextColor(@ColorInt int textColor) {
method setTextColor (line 479) | public void setTextColor(ColorStateList textColor) {
method getPaint (line 486) | public TextPaint getPaint() {
method setTextSize (line 490) | public void setTextSize(int textSize) {
method getTextSize (line 503) | public int getTextSize() {
method getText (line 507) | public CharSequence getText() {
method getMoreHitRect (line 516) | public Rect getMoreHitRect() {
method setText (line 520) | public void setText(CharSequence charSequence) {
method setText (line 524) | private void setText(CharSequence charSequence, boolean compareOldText) {
method calculateFontHeight (line 594) | protected int calculateFontHeight() {
method getFontHeight (line 619) | public int getFontHeight() {
method getLineSpace (line 623) | public int getLineSpace() {
method getFontHeightCalTop (line 627) | protected int getFontHeightCalTop(Paint.FontMetricsInt fontMetricsInt,...
method getFontHeightCalBottom (line 631) | protected int getFontHeightCalBottom(Paint.FontMetricsInt fontMetricsI...
method setPadding (line 635) | @Override
method calculateLinesAndContentWidth (line 651) | protected int calculateLinesAndContentWidth(int limitWidth) {
method calculateNeedDrawLine (line 686) | private void calculateNeedDrawLine(int maxline) {
method calculateLinesInner (line 697) | private void calculateLinesInner(List<QMUIQQFaceCompiler.Element> elem...
method isElementEmpty (line 756) | private boolean isElementEmpty() {
method setContentCalMaxWidth (line 762) | private void setContentCalMaxWidth(int width) {
method gotoCalNextLine (line 766) | private void gotoCalNextLine(int widthStart) {
method gotoCalNextLine (line 770) | private void gotoCalNextLine(int widthStart, boolean nextParagraph) {
method measureText (line 785) | private void measureText(CharSequence text, int widthStart, int widthE...
method setListener (line 812) | public void setListener(QQFaceViewListener listener) {
method onInitializeAccessibilityNodeInfo (line 816) | @Override
method onMeasure (line 823) | @Override
method onDraw (line 892) | @Override
method pickTextPaintColor (line 906) | private void pickTextPaintColor() {
method drawElements (line 924) | private void drawElements(Canvas canvas, List<QMUIQQFaceCompiler.Eleme...
method drawMoreActionText (line 985) | private void drawMoreActionText(Canvas canvas, int widthEnd) {
method toNewDrawLine (line 1036) | private void toNewDrawLine(int startLeft, int usefulWidth) {
method toNewDrawLine (line 1043) | private void toNewDrawLine(int startLeft, boolean paragraph, int usefu...
method setStartDrawUsedWidth (line 1073) | private void setStartDrawUsedWidth(int startLeft, int usefulWidth) {
method onRealDrawText (line 1091) | private void onRealDrawText(Canvas canvas, CharSequence text, float[] ...
method getMiddleEllipsizeLine (line 1109) | private int getMiddleEllipsizeLine() {
method onDrawText (line 1123) | private void onDrawText(Canvas canvas, CharSequence text, float[] font...
method handleTextAfterMiddleEllipsize (line 1249) | private void handleTextAfterMiddleEllipsize(Canvas canvas, CharSequenc...
method drawText (line 1296) | private void drawText(Canvas canvas, CharSequence text, int start, int...
method onDrawQQFace (line 1331) | private void onDrawQQFace(Canvas canvas, int res, @Nullable Drawable s...
method handleQQFaceAfterMiddleEllipsize (line 1416) | private void handleQQFaceAfterMiddleEllipsize(Canvas canvas, int res, ...
method onRealDrawQQFace (line 1457) | private void onRealDrawQQFace(Canvas canvas, int res, @Nullable Drawab...
method drawQQFace (line 1467) | private void drawQQFace(Canvas canvas, int res, @Nullable Drawable spe...
class SpanInfo (line 1522) | private class SpanInfo {
method SpanInfo (line 1530) | public SpanInfo(ITouchableSpan touchableSpan) {
method setStart (line 1534) | public void setStart(int startLine, int startPoint) {
method setPressed (line 1539) | public void setPressed(boolean pressed) {
method setEnd (line 1543) | public void setEnd(int endLine, int endPoint) {
method onClick (line 1548) | public void onClick() {
method invalidateSpan (line 1552) | public void invalidateSpan() {
method onTouch (line 1571) | @SuppressWarnings("SimplifiableIfStatement")
class PressCancelAction (line 1605) | public static class PressCancelAction implements Runnable {
method PressCancelAction (line 1608) | public PressCancelAction(SpanInfo spanInfo) {
method run (line 1612) | @Override
type QQFaceViewListener (line 1622) | public interface QQFaceViewListener {
method onCalculateLinesChange (line 1623) | void onCalculateLinesChange(int lines);
method onMoreTextClick (line 1625) | void onMoreTextClick();
FILE: qmui/src/main/java/com/qmuiteam/qmui/qqface/QQFace.java
class QQFace (line 24) | public class QQFace {
method QQFace (line 28) | public QQFace(String name, int res) {
method getName (line 33) | public String getName() {
method getRes (line 37) | public int getRes() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/recyclerView/QMUIRVDraggableScrollBar.java
class QMUIRVDraggableScrollBar (line 43) | public class QMUIRVDraggableScrollBar extends RecyclerView.ItemDecoratio...
method QMUIRVDraggableScrollBar (line 74) | public QMUIRVDraggableScrollBar(int startMargin,
method QMUIRVDraggableScrollBar (line 86) | public QMUIRVDraggableScrollBar(int startMargin,
method run (line 93) | @Override
method onInterceptTouchEvent (line 104) | @Override
method onTouchEvent (line 133) | @Override
method onRequestDisallowInterceptTouchEvent (line 161) | @Override
method onScrollStateChanged (line 173) | @Override
method setCallback (line 189) | public void setCallback(Callback callback) {
method invalidate (line 193) | private void invalidate() {
method setScrollBarDrawable (line 201) | public void setScrollBarDrawable(@Nullable Drawable scrollBarDrawable) {
method setScrollBarSkinRes (line 212) | public void setScrollBarSkinRes(int scrollBarSkinRes) {
method setScrollBarSkinTintColorRes (line 220) | public void setScrollBarSkinTintColorRes(int colorRes) {
method setDraggable (line 228) | public void setDraggable(boolean draggable) {
method isDraggable (line 232) | public boolean isDraggable() {
method setEnableScrollBarFadeInOut (line 236) | public void setEnableScrollBarFadeInOut(boolean enableScrollBarFadeInO...
method isEnableScrollBarFadeInOut (line 256) | public boolean isEnableScrollBarFadeInOut() {
method commonAttachToRecyclerView (line 260) | private void commonAttachToRecyclerView(@Nullable RecyclerView recycle...
method attachToRecyclerView (line 274) | public void attachToRecyclerView(@Nullable RecyclerView recyclerView) {
method attachToStickSectionLayout (line 282) | public void attachToStickSectionLayout(@Nullable QMUIStickySectionLayo...
method setupCallbacks (line 296) | private void setupCallbacks() {
method destroyCallbacks (line 302) | private void destroyCallbacks() {
method startDrag (line 309) | private void startDrag() {
method endDrag (line 323) | private void endDrag() {
method onDragging (line 334) | private void onDragging(RecyclerView recyclerView, Drawable drawable, ...
method onDrawOver (line 373) | @Override
method onDraw (line 380) | @Override
method onDrawOver (line 385) | @Override
method drawScrollBar (line 392) | private void drawScrollBar(@NonNull Canvas c, @NonNull RecyclerView re...
method getUsefulSpace (line 420) | private int getUsefulSpace(@NonNull RecyclerView recyclerView) {
method needDrawScrollBar (line 427) | private boolean needDrawScrollBar(RecyclerView recyclerView){
method setScrollBarBounds (line 434) | private void setScrollBarBounds(@NonNull RecyclerView recyclerView, @N...
method getScrollRange (line 450) | private int getScrollRange(@NonNull RecyclerView recyclerView) {
method getCurrentOffset (line 458) | private int getCurrentOffset(@NonNull RecyclerView recyclerView) {
method calculatePercent (line 465) | private float calculatePercent(@NonNull RecyclerView recyclerView) {
method ensureScrollBar (line 475) | public Drawable ensureScrollBar(Context context) {
method handle (line 483) | @Override
type Callback (line 499) | public interface Callback {
method onDragStarted (line 500) | void onDragStarted();
method onDragToPercent (line 502) | void onDragToPercent(float percent);
method onDragEnd (line 504) | void onDragEnd();
FILE: qmui/src/main/java/com/qmuiteam/qmui/recyclerView/QMUIRVItemSwipeAction.java
class QMUIRVItemSwipeAction (line 40) | public class QMUIRVItemSwipeAction extends RecyclerView.ItemDecoration
method run (line 137) | @Override
method onInterceptTouchEvent (line 154) | @Override
method onTouchEvent (line 231) | @Override
method onRequestDisallowInterceptTouchEvent (line 299) | @Override
method QMUIRVItemSwipeAction (line 311) | public QMUIRVItemSwipeAction(boolean swipeDeleteWhenOnlyOneAction, Cal...
method attachToRecyclerView (line 325) | public void attachToRecyclerView(@Nullable RecyclerView recyclerView) {
method setPressTimeToSwipe (line 341) | public void setPressTimeToSwipe(long pressTimeToSwipe) {
method setupCallbacks (line 345) | private void setupCallbacks() {
method destroyCallbacks (line 353) | private void destroyCallbacks() {
method onDrawOver (line 367) | @Override
method onDraw (line 378) | @Override
method onChildViewAttachedToWindow (line 389) | @Override
method onChildViewDetachedFromWindow (line 394) | @Override
method updateDxDy (line 410) | void updateDxDy(MotionEvent ev, int swipeDirection, int pointerIndex) {
method checkSelectForSwipe (line 434) | void checkSelectForSwipe(int action, MotionEvent motionEvent, int poin...
method clear (line 500) | public void clear() {
method handleActionUp (line 504) | void handleActionUp(float x, float y, int touchSlop) {
method handleSwipeActionActionUp (line 525) | void handleSwipeActionActionUp( QMUISwipeViewHolder swipeViewHolder, f...
method select (line 580) | void select(@Nullable RecyclerView.ViewHolder selected) {
method select (line 584) | void select(@Nullable RecyclerView.ViewHolder selected, boolean isActi...
method getSelectedDxDy (line 681) | private void getSelectedDxDy(float[] outPosition) {
method postDispatchSwipe (line 694) | void postDispatchSwipe(final RecoverAnimation anim, final int swipeDir) {
method hasRunningRecoverAnim (line 717) | boolean hasRunningRecoverAnim() {
method checkSwipe (line 727) | private int checkSwipe(RecyclerView.ViewHolder viewHolder, int swipeDi...
method findSwipedView (line 779) | @Nullable
method endRecoverAnimation (line 813) | void endRecoverAnimation(RecyclerView.ViewHolder viewHolder, boolean o...
method findChildView (line 828) | View findChildView(MotionEvent event) {
method findAnimation (line 848) | @Nullable
method obtainVelocityTracker (line 863) | void obtainVelocityTracker() {
method releaseVelocityTracker (line 870) | private void releaseVelocityTracker() {
method hitTest (line 877) | private static boolean hitTest(View child, float x, float y, float lef...
class RecoverAnimation (line 884) | private static class RecoverAnimation implements Animator.AnimatorList...
method RecoverAnimation (line 912) | RecoverAnimation(RecyclerView.ViewHolder viewHolder,
method setDuration (line 934) | public void setDuration(long duration) {
method start (line 938) | public void start() {
method cancel (line 943) | public void cancel() {
method setFraction (line 947) | public void setFraction(float fraction) {
method update (line 955) | public void update() {
method onAnimationStart (line 968) | @Override
method onAnimationEnd (line 973) | @Override
method onAnimationCancel (line 981) | @Override
method onAnimationRepeat (line 986) | @Override
class Callback (line 992) | public static abstract class Callback {
method clearView (line 995) | public void clearView(RecyclerView recyclerView, RecyclerView.ViewHo...
method getSwipeDirection (line 1004) | public int getSwipeDirection(@NonNull RecyclerView recyclerView,
method onStartSwipeAnimation (line 1009) | public void onStartSwipeAnimation(@NonNull RecyclerView.ViewHolder v...
method onSwiped (line 1013) | public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, in...
method getSwipeThreshold (line 1018) | public float getSwipeThreshold(@NonNull RecyclerView.ViewHolder view...
method getSwipeEscapeVelocity (line 1022) | public float getSwipeEscapeVelocity(float defaultValue) {
method getSwipeVelocityThreshold (line 1027) | public float getSwipeVelocityThreshold(float defaultValue) {
method getAnimationDuration (line 1032) | public long getAnimationDuration(@NonNull RecyclerView recyclerView,...
method onSelectedChanged (line 1037) | public void onSelectedChanged(RecyclerView.ViewHolder selected) {
method onClickAction (line 1041) | public void onClickAction(QMUIRVItemSwipeAction swipeAction, Recycle...
method getInterpolator (line 1045) | public TimeInterpolator getInterpolator(int animationType) {
method onDraw (line 1049) | void onDraw(Canvas c, RecyclerView parent, RecyclerView.ViewHolder s...
method onDrawOver (line 1072) | void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.ViewHold...
method onChildDrawOver (line 1100) | public void onChildDrawOver(@NonNull Canvas c, @NonNull RecyclerView...
method isOverThreshold (line 1105) | protected boolean isOverThreshold(RecyclerView recyclerView, Recycle...
method onChildDraw (line 1112) | public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView rec...
FILE: qmui/src/main/java/com/qmuiteam/qmui/recyclerView/QMUISwipeAction.java
class QMUISwipeAction (line 29) | public class QMUISwipeAction {
method QMUISwipeAction (line 55) | private QMUISwipeAction(ActionBuilder builder) {
method getText (line 98) | public String getText() {
method getTextColor (line 102) | public int getTextColor() {
method getTextSize (line 106) | public int getTextSize() {
method getTypeface (line 110) | public Typeface getTypeface() {
method getTextColorAttr (line 114) | public int getTextColorAttr() {
method getIcon (line 118) | public Drawable getIcon() {
method getIconAttr (line 122) | public int getIconAttr() {
method isUseIconTint (line 126) | public boolean isUseIconTint() {
method getBackgroundColor (line 130) | public int getBackgroundColor() {
method getBackgroundColorAttr (line 134) | public int getBackgroundColorAttr() {
method getPaddingStartEnd (line 138) | public int getPaddingStartEnd() {
method getIconTextGap (line 142) | public int getIconTextGap() {
method getSwipeDirectionMiniSize (line 146) | public int getSwipeDirectionMiniSize() {
method getOrientation (line 150) | public int getOrientation() {
method draw (line 154) | protected void draw(Canvas canvas) {
class ActionBuilder (line 202) | public static class ActionBuilder {
method text (line 223) | public ActionBuilder text(String text) {
method textSize (line 228) | public ActionBuilder textSize(int textSize) {
method textColor (line 233) | public ActionBuilder textColor(int textColor) {
method typeface (line 238) | public ActionBuilder typeface(Typeface typeface) {
method textColorAttr (line 243) | public ActionBuilder textColorAttr(int textColorAttr) {
method icon (line 248) | public ActionBuilder icon(@Nullable Drawable drawable) {
method iconAttr (line 253) | public ActionBuilder iconAttr(int iconAttr) {
method useIconTint (line 258) | public ActionBuilder useIconTint(boolean useIconTint) {
method backgroundColor (line 263) | public ActionBuilder backgroundColor(int backgroundColor) {
method backgroundColorAttr (line 268) | public ActionBuilder backgroundColorAttr(int backgroundColorAttr) {
method paddingStartEnd (line 273) | public ActionBuilder paddingStartEnd(int paddingStartEnd) {
method iconTextGap (line 278) | public ActionBuilder iconTextGap(int iconTextGap) {
method swipeDirectionMinSize (line 283) | public ActionBuilder swipeDirectionMinSize(int minSize) {
method orientation (line 288) | public ActionBuilder orientation(int orientation) {
method reverseDrawOrder (line 293) | public ActionBuilder reverseDrawOrder(boolean reverse) {
method swipeMoveInterpolator (line 298) | public ActionBuilder swipeMoveInterpolator(TimeInterpolator interpol...
method swipePxPerMS (line 303) | public ActionBuilder swipePxPerMS(int swipePxPerMS){
method build (line 308) | public QMUISwipeAction build() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/recyclerView/QMUISwipeViewHolder.java
class QMUISwipeViewHolder (line 39) | public class QMUISwipeViewHolder extends RecyclerView.ViewHolder {
method invalidate (line 49) | @Override
method QMUISwipeViewHolder (line 58) | public QMUISwipeViewHolder(@NonNull View itemView) {
method addSwipeAction (line 62) | public void addSwipeAction(QMUISwipeAction action) {
method clearActions (line 70) | public void clearActions(){
method hasAction (line 76) | public boolean hasAction() {
method clearTouchInfo (line 80) | public void clearTouchInfo() {
method setup (line 86) | void setup(int swipeDirection, boolean swipeDeleteIfOnlyOneAction) {
method checkDown (line 151) | boolean checkDown(float x, float y) {
method checkUp (line 163) | QMUISwipeAction checkUp(float x, float y, int touchSlop) {
method draw (line 172) | void draw(Canvas canvas, boolean overSwipeThreshold, float dx, float d...
class ActionWrapper (line 229) | static class ActionWrapper {
method onAnimationUpdate (line 254) | @Override
method ActionWrapper (line 262) | public ActionWrapper(@NonNull QMUISwipeAction action, @NonNull Callb...
method hitTest (line 267) | boolean hitTest(float x, float y) {
method draw (line 271) | void draw(Canvas canvas, boolean overSwipeThreshold, int direction) {
method startAnimator (line 347) | private void startAnimator(float curLeft, float curTop, float target...
method isVer (line 364) | private boolean isVer(int direction) {
method getAnchorDrawLeft (line 368) | private float getAnchorDrawLeft(int direction) {
method getAnchorDrawTop (line 381) | private float getAnchorDrawTop(int direction) {
method getFollowDrawLeft (line 394) | private float getFollowDrawLeft(int direction) {
method getFollowDrawTop (line 404) | private float getFollowDrawTop(int direction) {
type Callback (line 414) | interface Callback {
method invalidate (line 415) | void invalidate();
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/IQMUISkinApplyListener.java
type IQMUISkinApplyListener (line 23) | public interface IQMUISkinApplyListener {
method onApply (line 24) | void onApply(View view, int skinIndex, @NonNull Resources.Theme theme);
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/IQMUISkinDispatchInterceptor.java
type IQMUISkinDispatchInterceptor (line 22) | public interface IQMUISkinDispatchInterceptor {
method intercept (line 23) | boolean intercept(int skinIndex, @NonNull Resources.Theme theme);
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/IQMUISkinHandlerDecoration.java
type IQMUISkinHandlerDecoration (line 23) | public interface IQMUISkinHandlerDecoration {
method handle (line 25) | void handle(@NonNull RecyclerView recyclerView, @NonNull QMUISkinManag...
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/IQMUISkinHandlerSpan.java
type IQMUISkinHandlerSpan (line 24) | public interface IQMUISkinHandlerSpan {
method handle (line 26) | void handle(@NonNull View view, @NonNull QMUISkinManager manager, int ...
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/IQMUISkinHandlerView.java
type IQMUISkinHandlerView (line 24) | public interface IQMUISkinHandlerView {
method handle (line 25) | void handle(@NonNull QMUISkinManager manager,
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/QMUISkinHelper.java
class QMUISkinHelper (line 34) | public class QMUISkinHelper {
method getSkinTheme (line 38) | public static Resources.Theme getSkinTheme(@NonNull View view) {
method getSkinColor (line 49) | public static int getSkinColor(@NonNull View view, int colorAttr) {
method getSkinColorStateList (line 53) | public static ColorStateList getSkinColorStateList(@NonNull View view,...
method getSkinDrawable (line 57) | @Nullable
method setSkinValue (line 63) | public static void setSkinValue(@NonNull View view, QMUISkinValueBuild...
method setSkinValue (line 67) | public static void setSkinValue(@NonNull View view, String value) {
method setSkinValue (line 73) | @MainThread
method refreshRVItemDecoration (line 80) | public static void refreshRVItemDecoration(@NonNull RecyclerView view,...
method getCurrentSkinIndex (line 87) | public static int getCurrentSkinIndex(@NonNull View view) {
method refreshViewSkin (line 95) | public static void refreshViewSkin(@NonNull View view) {
method syncViewSkin (line 102) | public static void syncViewSkin(@NonNull View view, @NonNull View sour...
method setSkinDefaultProvider (line 112) | public static void setSkinDefaultProvider(@NonNull View view,
method setSkinApplyListener (line 117) | public static void setSkinApplyListener(@NonNull View view, @Nullable ...
method getSkinApplyListener (line 121) | @Nullable
method setIgnoreSkinApply (line 130) | public static void setIgnoreSkinApply(@NonNull View view, boolean igno...
method setInterceptSkinDispatch (line 134) | public static void setInterceptSkinDispatch(@NonNull View view, boolea...
method warnRuleNotSupport (line 138) | public static void warnRuleNotSupport(View view, String rule) {
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/QMUISkinLayoutInflaterFactory.java
class QMUISkinLayoutInflaterFactory (line 40) | public class QMUISkinLayoutInflaterFactory implements LayoutInflater.Fac...
method QMUISkinLayoutInflaterFactory (line 60) | public QMUISkinLayoutInflaterFactory(Activity activity, LayoutInflater...
method cloneForLayoutInflaterIfNeeded (line 65) | public QMUISkinLayoutInflaterFactory cloneForLayoutInflaterIfNeeded(La...
method onCreateView (line 72) | @Override
method originCreateViewForLowSDK (line 137) | private View originCreateViewForLowSDK(String name, Context context, A...
method onCreateView (line 150) | @Override
method getSkinValueFromAttributeSet (line 155) | public void getSkinValueFromAttributeSet(Context context, @Nullable At...
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/QMUISkinManager.java
class QMUISkinManager (line 72) | public final class QMUISkinManager {
method select (line 79) | @NonNull
method setDispatchListenStrategySelector (line 93) | public static void setDispatchListenStrategySelector(DispatchListenStr...
method defaultInstance (line 101) | @MainThread
method of (line 107) | @MainThread
method of (line 117) | @MainThread
method setRuleHandler (line 162) | public static void setRuleHandler(String name, IQMUISkinRuleHandler ha...
method onLayoutChange (line 170) | @Override
method onChildViewAdded (line 195) | @Override
method onChildViewRemoved (line 206) | @Override
method QMUISkinManager (line 213) | public QMUISkinManager(String name, Resources resources, String packag...
method getName (line 219) | public String getName() {
method getTheme (line 223) | @Nullable
method getCurrentTheme (line 232) | @Nullable
method addSkin (line 241) | @MainThread
method getViewSkinCurrent (line 257) | static ViewSkinCurrent getViewSkinCurrent(View view) {
method dispatch (line 265) | public void dispatch(View view, int skinIndex) {
method runDispatch (line 289) | private void runDispatch(@NonNull View view, int skinIndex, Resources....
method applyTheme (line 341) | private void applyTheme(@NonNull View view, int skinIndex, Resources.T...
method refreshRecyclerDecoration (line 372) | void refreshRecyclerDecoration(@NonNull RecyclerView recyclerView,
method refreshTheme (line 381) | void refreshTheme(@NonNull View view, int skinIndex) {
method defaultHandleSkinAttrs (line 388) | public void defaultHandleSkinAttrs(@NonNull View view, Resources.Theme...
method defaultHandleSkinAttr (line 401) | public void defaultHandleSkinAttr(View view, Resources.Theme theme, St...
method getSkinAttrs (line 413) | @Nullable
method getAttrFromName (line 469) | public int getAttrFromName(String attrName) {
class SkinItem (line 473) | class SkinItem {
method SkinItem (line 476) | SkinItem(int styleRes) {
method getStyleRes (line 480) | public int getStyleRes() {
method getTheme (line 484) | @NonNull
method register (line 502) | public void register(@NonNull Activity activity) {
method unRegister (line 509) | public void unRegister(@NonNull Activity activity) {
method register (line 513) | public void register(@NonNull Fragment fragment) {
method unRegister (line 520) | public void unRegister(@NonNull Fragment fragment) {
method register (line 524) | public void register(@NonNull View view) {
method unRegister (line 531) | public void unRegister(@NonNull View view) {
method register (line 535) | public void register(@NonNull Dialog dialog) {
method unRegister (line 545) | public void unRegister(@NonNull Dialog dialog) {
method register (line 549) | public void register(@NonNull PopupWindow popupWindow) {
method unRegister (line 556) | public void unRegister(@NonNull PopupWindow popupWindow) {
method register (line 560) | public void register(@NonNull Window window) {
method unRegister (line 567) | public void unRegister(@NonNull Window window) {
method removeSkinObserver (line 571) | private void removeSkinObserver(Object object) {
method containSkinObserver (line 583) | private boolean containSkinObserver(Object object) {
method changeSkin (line 596) | @MainThread
method addSkinChangeListener (line 638) | @MainThread
method removeSkinChangeListener (line 646) | public void removeSkinChangeListener(@NonNull OnSkinChangeListener lis...
method getCurrentSkin (line 653) | public int getCurrentSkin() {
type OnSkinChangeListener (line 657) | public interface OnSkinChangeListener {
method onSkinChange (line 658) | void onSkinChange(QMUISkinManager skinManager, int oldSkin, int newS...
class ViewSkinCurrent (line 661) | class ViewSkinCurrent {
method ViewSkinCurrent (line 665) | ViewSkinCurrent(String managerName, int index) {
method equals (line 670) | @Override
method hashCode (line 679) | @Override
type DispatchListenStrategySelector (line 685) | public interface DispatchListenStrategySelector {
method select (line 686) | @NonNull
type DispatchListenStrategy (line 690) | public enum DispatchListenStrategy {
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/QMUISkinValueBuilder.java
class QMUISkinValueBuilder (line 23) | public class QMUISkinValueBuilder {
method acquire (line 48) | public static QMUISkinValueBuilder acquire() {
method release (line 59) | public static void release(@NonNull QMUISkinValueBuilder valueBuilder) {
method QMUISkinValueBuilder (line 69) | private QMUISkinValueBuilder() {
method background (line 75) | public QMUISkinValueBuilder background(int attr) {
method background (line 80) | public QMUISkinValueBuilder background(String attrName) {
method underline (line 85) | public QMUISkinValueBuilder underline(int attr) {
method underline (line 90) | public QMUISkinValueBuilder underline(String attrName) {
method moreTextColor (line 95) | public QMUISkinValueBuilder moreTextColor(int attr) {
method moreTextColor (line 100) | public QMUISkinValueBuilder moreTextColor(String attrName) {
method moreBgColor (line 105) | public QMUISkinValueBuilder moreBgColor(int attr) {
method moreBgColor (line 110) | public QMUISkinValueBuilder moreBgColor(String attrName) {
method textCompoundTintColor (line 115) | public QMUISkinValueBuilder textCompoundTintColor(int attr) {
method textCompoundTintColor (line 120) | public QMUISkinValueBuilder textCompoundTintColor(String attrName) {
method textCompoundTopSrc (line 125) | public QMUISkinValueBuilder textCompoundTopSrc(int attr) {
method textCompoundTopSrc (line 130) | public QMUISkinValueBuilder textCompoundTopSrc(String attrName) {
method textCompoundRightSrc (line 135) | public QMUISkinValueBuilder textCompoundRightSrc(int attr) {
method textCompoundRightSrc (line 140) | public QMUISkinValueBuilder textCompoundRightSrc(String attrName) {
method textCompoundBottomSrc (line 145) | public QMUISkinValueBuilder textCompoundBottomSrc(int attr) {
method textCompoundBottomSrc (line 150) | public QMUISkinValueBuilder textCompoundBottomSrc(String attrName) {
method textCompoundLeftSrc (line 155) | public QMUISkinValueBuilder textCompoundLeftSrc(int attr) {
method textCompoundLeftSrc (line 160) | public QMUISkinValueBuilder textCompoundLeftSrc(String attrName) {
method textColor (line 165) | public QMUISkinValueBuilder textColor(int attr) {
method textColor (line 170) | public QMUISkinValueBuilder textColor(String attrName) {
method hintColor (line 175) | public QMUISkinValueBuilder hintColor(int attr) {
method hintColor (line 180) | public QMUISkinValueBuilder hintColor(String attrName) {
method progressColor (line 185) | public QMUISkinValueBuilder progressColor(int attr) {
method progressColor (line 190) | public QMUISkinValueBuilder progressColor(String attrName) {
method src (line 195) | public QMUISkinValueBuilder src(int attr) {
method src (line 200) | public QMUISkinValueBuilder src(String attrName) {
method border (line 205) | public QMUISkinValueBuilder border(int attr) {
method border (line 210) | public QMUISkinValueBuilder border(String attrName) {
method topSeparator (line 215) | public QMUISkinValueBuilder topSeparator(int attr) {
method topSeparator (line 220) | public QMUISkinValueBuilder topSeparator(String attrName) {
method rightSeparator (line 225) | public QMUISkinValueBuilder rightSeparator(int attr) {
method rightSeparator (line 230) | public QMUISkinValueBuilder rightSeparator(String attrName) {
method bottomSeparator (line 235) | public QMUISkinValueBuilder bottomSeparator(int attr) {
method bottomSeparator (line 240) | public QMUISkinValueBuilder bottomSeparator(String attrName) {
method leftSeparator (line 245) | public QMUISkinValueBuilder leftSeparator(int attr) {
method leftSeparator (line 250) | public QMUISkinValueBuilder leftSeparator(String attrName) {
method alpha (line 255) | public QMUISkinValueBuilder alpha(int attr) {
method alpha (line 260) | public QMUISkinValueBuilder alpha(String attrName) {
method tintColor (line 265) | public QMUISkinValueBuilder tintColor(int attr) {
method tintColor (line 270) | public QMUISkinValueBuilder tintColor(String attrName) {
method bgTintColor (line 275) | public QMUISkinValueBuilder bgTintColor(int attr) {
method bgTintColor (line 280) | public QMUISkinValueBuilder bgTintColor(String attrName) {
method secondTextColor (line 285) | public QMUISkinValueBuilder secondTextColor(int attr) {
method secondTextColor (line 290) | public QMUISkinValueBuilder secondTextColor(String attrName) {
method custom (line 295) | public QMUISkinValueBuilder custom(String name, int attr) {
method custom (line 300) | public QMUISkinValueBuilder custom(String name, String attrName) {
method clear (line 305) | public QMUISkinValueBuilder clear() {
method convertFrom (line 310) | public QMUISkinValueBuilder convertFrom(String value) {
method isEmpty (line 322) | public boolean isEmpty() {
method build (line 326) | public String build() {
method release (line 345) | public void release() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/SkinWriter.java
type SkinWriter (line 19) | public interface SkinWriter {
method write (line 20) | public void write(QMUISkinValueBuilder builder);
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/defaultAttr/IQMUISkinDefaultAttrProvider.java
type IQMUISkinDefaultAttrProvider (line 21) | public interface IQMUISkinDefaultAttrProvider {
method getDefaultSkinAttrs (line 22) | @Nullable
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/defaultAttr/QMUISkinSimpleDefaultAttrProvider.java
class QMUISkinSimpleDefaultAttrProvider (line 20) | public class QMUISkinSimpleDefaultAttrProvider implements IQMUISkinDefau...
method setDefaultSkinAttr (line 24) | public void setDefaultSkinAttr(String name, int attr) {
method getDefaultSkinAttrs (line 28) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/IQMUISkinRuleHandler.java
type IQMUISkinRuleHandler (line 25) | public interface IQMUISkinRuleHandler {
method handle (line 26) | void handle(@NonNull QMUISkinManager skinManager,
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleAlphaHandler.java
class QMUISkinRuleAlphaHandler (line 22) | public class QMUISkinRuleAlphaHandler extends QMUISkinRuleFloatHandler {
method handle (line 24) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleBackgroundHandler.java
class QMUISkinRuleBackgroundHandler (line 31) | public class QMUISkinRuleBackgroundHandler implements IQMUISkinRuleHandl...
method handle (line 33) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleBgTintColorHandler.java
class QMUISkinRuleBgTintColorHandler (line 27) | public class QMUISkinRuleBgTintColorHandler extends QMUISkinRuleColorSta...
method handle (line 29) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleBorderHandler.java
class QMUISkinRuleBorderHandler (line 29) | public class QMUISkinRuleBorderHandler extends QMUISkinRuleColorStateLis...
method handle (line 31) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleColorHandler.java
class QMUISkinRuleColorHandler (line 28) | public abstract class QMUISkinRuleColorHandler implements IQMUISkinRuleH...
method handle (line 29) | @Override
method handle (line 35) | protected abstract void handle(@NonNull View view, @NonNull String nam...
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleColorStateListHandler.java
class QMUISkinRuleColorStateListHandler (line 29) | public abstract class QMUISkinRuleColorStateListHandler implements IQMUI...
method handle (line 30) | @Override
method handle (line 36) | protected abstract void handle(@NonNull View view,
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleDrawableHandler.java
class QMUISkinRuleDrawableHandler (line 29) | public abstract class QMUISkinRuleDrawableHandler implements IQMUISkinRu...
method handle (line 30) | @Override
method handle (line 38) | protected abstract void handle(@NonNull View view, @NonNull String nam...
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleFloatHandler.java
class QMUISkinRuleFloatHandler (line 28) | public abstract class QMUISkinRuleFloatHandler implements IQMUISkinRuleH...
method handle (line 29) | @Override
method handle (line 35) | protected abstract void handle(@NonNull View view,
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleHintColorHandler.java
class QMUISkinRuleHintColorHandler (line 13) | public class QMUISkinRuleHintColorHandler extends QMUISkinRuleColorState...
method handle (line 14) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleMoreBgColorHandler.java
class QMUISkinRuleMoreBgColorHandler (line 26) | public class QMUISkinRuleMoreBgColorHandler extends QMUISkinRuleColorSta...
method handle (line 28) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleMoreTextColorHandler.java
class QMUISkinRuleMoreTextColorHandler (line 26) | public class QMUISkinRuleMoreTextColorHandler extends QMUISkinRuleColorS...
method handle (line 28) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleProgressColorHandler.java
class QMUISkinRuleProgressColorHandler (line 26) | public class QMUISkinRuleProgressColorHandler extends QMUISkinRuleColorH...
method handle (line 28) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleSeparatorHandler.java
class QMUISkinRuleSeparatorHandler (line 26) | public class QMUISkinRuleSeparatorHandler extends QMUISkinRuleColorHandl...
method handle (line 28) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleSrcHandler.java
class QMUISkinRuleSrcHandler (line 27) | public class QMUISkinRuleSrcHandler extends QMUISkinRuleDrawableHandler {
method handle (line 29) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleTextColorHandler.java
class QMUISkinRuleTextColorHandler (line 28) | public class QMUISkinRuleTextColorHandler extends QMUISkinRuleColorState...
method handle (line 30) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleTextCompoundSrcHandler.java
class QMUISkinRuleTextCompoundSrcHandler (line 12) | public class QMUISkinRuleTextCompoundSrcHandler extends QMUISkinRuleDraw...
method handle (line 13) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleTextCompoundTintColorHandler.java
class QMUISkinRuleTextCompoundTintColorHandler (line 16) | public class QMUISkinRuleTextCompoundTintColorHandler extends QMUISkinRu...
method handle (line 18) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleTintColorHandler.java
class QMUISkinRuleTintColorHandler (line 33) | public class QMUISkinRuleTintColorHandler extends QMUISkinRuleColorState...
method handle (line 35) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/skin/handler/QMUISkinRuleUnderlineHandler.java
class QMUISkinRuleUnderlineHandler (line 28) | public class QMUISkinRuleUnderlineHandler extends QMUISkinRuleColorState...
method handle (line 30) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/span/QMUIAlignMiddleImageSpan.java
class QMUIAlignMiddleImageSpan (line 43) | public class QMUIAlignMiddleImageSpan extends ImageSpan implements IQMUI...
method QMUIAlignMiddleImageSpan (line 65) | public QMUIAlignMiddleImageSpan(Drawable d, int verticalAlignment) {
method QMUIAlignMiddleImageSpan (line 74) | public QMUIAlignMiddleImageSpan(@NonNull Drawable d, int verticalAlign...
method setSkinSupportWithTintColor (line 82) | public void setSkinSupportWithTintColor(View skinFollowView, int drawa...
method getSize (line 91) | @Override
method draw (line 106) | @Override
method setAvoidSuperChangeFontMetrics (line 136) | public void setAvoidSuperChangeFontMetrics(boolean avoidSuperChangeFon...
method handle (line 140) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/span/QMUIBlockSpaceSpan.java
class QMUIBlockSpaceSpan (line 32) | public class QMUIBlockSpaceSpan extends ReplacementSpan {
method QMUIBlockSpaceSpan (line 35) | public QMUIBlockSpaceSpan(int height) {
method getSize (line 39) | @Override
method draw (line 49) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/span/QMUICustomTypefaceSpan.java
class QMUICustomTypefaceSpan (line 30) | public class QMUICustomTypefaceSpan extends TypefaceSpan {
method createFromParcel (line 35) | @Override
method newArray (line 40) | @Override
method QMUICustomTypefaceSpan (line 51) | public QMUICustomTypefaceSpan(String family, @Nullable Typeface type) {
method applyCustomTypeFace (line 56) | private static void applyCustomTypeFace(Paint paint, @Nullable Typefac...
method updateDrawState (line 81) | @Override
method updateMeasureState (line 86) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/span/QMUIMarginImageSpan.java
class QMUIMarginImageSpan (line 30) | public class QMUIMarginImageSpan extends QMUIAlignMiddleImageSpan {
method QMUIMarginImageSpan (line 36) | public QMUIMarginImageSpan(Drawable d, int verticalAlignment, int marg...
method QMUIMarginImageSpan (line 40) | public QMUIMarginImageSpan(Drawable d, int verticalAlignment, int marg...
method getSize (line 47) | @Override
method draw (line 58) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/span/QMUIOnSpanClickListener.java
type QMUIOnSpanClickListener (line 24) | public interface QMUIOnSpanClickListener {
method onSpanClick (line 25) | boolean onSpanClick(String text);
FILE: qmui/src/main/java/com/qmuiteam/qmui/span/QMUITextSizeSpan.java
class QMUITextSizeSpan (line 34) | public class QMUITextSizeSpan extends ReplacementSpan {
method QMUITextSizeSpan (line 40) | public QMUITextSizeSpan(int textSize, int verticalOffset){
method QMUITextSizeSpan (line 44) | public QMUITextSizeSpan(int textSize, int verticalOffset, Typeface typ...
method getSize (line 53) | @Override
method draw (line 65) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/span/QMUITouchableSpan.java
class QMUITouchableSpan (line 42) | public abstract class QMUITouchableSpan extends ClickableSpan implements...
method onSpanClick (line 57) | public abstract void onSpanClick(View widget);
method onClick (line 59) | @Override
method QMUITouchableSpan (line 67) | public QMUITouchableSpan(@ColorInt int normalTextColor,
method QMUITouchableSpan (line 77) | public QMUITouchableSpan(View initFollowSkinView,
method getNormalBackgroundColor (line 98) | public int getNormalBackgroundColor() {
method setNormalTextColor (line 102) | public void setNormalTextColor(int normalTextColor) {
method setPressedTextColor (line 106) | public void setPressedTextColor(int pressedTextColor) {
method getNormalTextColor (line 110) | public int getNormalTextColor() {
method getPressedBackgroundColor (line 114) | public int getPressedBackgroundColor() {
method getPressedTextColor (line 118) | public int getPressedTextColor() {
method setPressed (line 122) | public void setPressed(boolean isSelected) {
method isPressed (line 126) | public boolean isPressed() {
method setIsNeedUnderline (line 130) | public void setIsNeedUnderline(boolean isNeedUnderline) {
method isNeedUnderline (line 134) | public boolean isNeedUnderline() {
method updateDrawState (line 138) | @Override
method handle (line 146) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/OnceReadValue.java
class OnceReadValue (line 3) | public abstract class OnceReadValue<P, T> {
method get (line 8) | public T get(P param){
method read (line 21) | protected abstract T read(P param);
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIActivityLifecycleCallbacks.java
class QMUIActivityLifecycleCallbacks (line 30) | public abstract class QMUIActivityLifecycleCallbacks implements Applicat...
method QMUIActivityLifecycleCallbacks (line 34) | public QMUIActivityLifecycleCallbacks(Activity targetActivity) {
method onActivityCreated (line 38) | @Override
method onActivityStarted (line 43) | @Override
method onActivityResumed (line 48) | @Override
method onActivityPaused (line 53) | @Override
method onActivityStopped (line 58) | @Override
method onActivitySaveInstanceState (line 63) | @Override
method onActivityDestroyed (line 68) | @Override
method onTargetActivityDestroyed (line 76) | protected abstract void onTargetActivityDestroyed();
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUICollapsingTextHelper.java
class QMUICollapsingTextHelper (line 59) | public final class QMUICollapsingTextHelper {
method QMUICollapsingTextHelper (line 139) | public QMUICollapsingTextHelper(View view){
method QMUICollapsingTextHelper (line 143) | public QMUICollapsingTextHelper(View view, float defaultExpanededFract...
method setTextSizeInterpolator (line 154) | public void setTextSizeInterpolator(Interpolator interpolator) {
method setPositionInterpolator (line 159) | public void setPositionInterpolator(Interpolator interpolator) {
method setTextSize (line 164) | public void setTextSize(float collapsedTextSize, float expandedTextSiz...
method setExpandedTextSize (line 174) | public void setExpandedTextSize(float textSize) {
method setCollapsedTextSize (line 181) | public void setCollapsedTextSize(float textSize) {
method setCollapsedTextColor (line 188) | public void setCollapsedTextColor(ColorStateList textColor) {
method setExpandedTextColor (line 195) | public void setExpandedTextColor(ColorStateList textColor) {
method setTextColor (line 202) | public void setTextColor(ColorStateList collapsedTextColor, ColorState...
method setCollapsedTextAppearance (line 214) | public void setCollapsedTextAppearance(int resId) {
method setExpandedTextAppearance (line 234) | public void setExpandedTextAppearance(int resId) {
method setExpandedBounds (line 258) | public void setExpandedBounds(int left, int top, int right, int bottom) {
method setCollapsedBounds (line 266) | public void setCollapsedBounds(int left, int top, int right, int botto...
method onBoundsChanged (line 274) | void onBoundsChanged() {
method setExpandedTextGravity (line 279) | public void setExpandedTextGravity(int gravity) {
method getExpandedTextGravity (line 286) | public int getExpandedTextGravity() {
method setCollapsedTextGravity (line 290) | public void setCollapsedTextGravity(int gravity) {
method getCollapsedTextGravity (line 297) | public int getCollapsedTextGravity() {
method setGravity (line 301) | public void setGravity(int collapsedGravity, int expandedGravity, bool...
method readFontFamilyTypeface (line 312) | @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
method setTypeface (line 327) | public void setTypeface(Typeface collapsedTypeface, Typeface expandedT...
method setCollapsedTypeface (line 337) | public void setCollapsedTypeface(Typeface typeface) {
method setExpandedTypeface (line 344) | public void setExpandedTypeface(Typeface typeface) {
method setTypefaces (line 351) | public void setTypefaces(Typeface typeface) {
method getCollapsedTypeface (line 356) | public Typeface getCollapsedTypeface() {
method getExpandedTypeface (line 360) | public Typeface getExpandedTypeface() {
method setExpansionFraction (line 371) | public void setExpansionFraction(float fraction) {
method setState (line 380) | public final boolean setState(final int[] state) {
method setTypefaceUpdateAreaPercent (line 391) | public void setTypefaceUpdateAreaPercent(float typefaceUpdateAreaPerce...
method isStateful (line 395) | public final boolean isStateful() {
method getExpansionFraction (line 400) | public float getExpansionFraction() {
method getCollapsedTextSize (line 404) | public float getCollapsedTextSize() {
method getExpandedTextSize (line 408) | public float getExpandedTextSize() {
method calculateCurrentOffsets (line 412) | public void calculateCurrentOffsets() {
method calculateOffsets (line 416) | private void calculateOffsets(final float fraction) {
method getCurrentExpandedTextColor (line 448) | @ColorInt
method getCurrentCollapsedTextColor (line 460) | @ColorInt
method calculateBaseOffsets (line 472) | public void calculateBaseOffsets() {
method interpolateBounds (line 546) | private void interpolateBounds(float fraction) {
method draw (line 558) | @SuppressWarnings("UnusedAssignment")
method calculateIsRtl (line 603) | private boolean calculateIsRtl(CharSequence text) {
method setInterpolatedTextSize (line 611) | private void setInterpolatedTextSize(float textSize) {
method calculateUsingTextSize (line 625) | private void calculateUsingTextSize(final float textSize) {
method ensureExpandedTexture (line 699) | private void ensureExpandedTexture() {
method recalculate (line 727) | public void recalculate() {
method setText (line 741) | public void setText(CharSequence text) {
method getText (line 750) | public CharSequence getText() {
method clearTexture (line 754) | private void clearTexture() {
method getExpandedTextWidth (line 761) | public float getExpandedTextWidth() {
method getCollapsedTextWidth (line 765) | public float getCollapsedTextWidth() {
method getExpandedTextHeight (line 769) | public float getExpandedTextHeight() {
method getCollapsedTextHeight (line 773) | public float getCollapsedTextHeight() {
method getExpandedDrawX (line 777) | public float getExpandedDrawX() {
method getCollapsedDrawX (line 781) | public float getCollapsedDrawX() {
method isClose (line 790) | private static boolean isClose(float value, float targetValue) {
method getExpandedTextColor (line 794) | ColorStateList getExpandedTextColor() {
method getCollapsedTextColor (line 798) | ColorStateList getCollapsedTextColor() {
method lerp (line 802) | public static float lerp(float startValue, float endValue, float fract...
method rectEquals (line 810) | private static boolean rectEquals(Rect r, int left, int top, int right...
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIColorHelper.java
class QMUIColorHelper (line 27) | public class QMUIColorHelper {
method setColorAlpha (line 29) | public static int setColorAlpha(@ColorInt int color, float alpha) {
method setColorAlpha (line 41) | public static int setColorAlpha(@ColorInt int color, float alpha, bool...
method computeColor (line 55) | public static int computeColor(@ColorInt int fromColor, @ColorInt int ...
method colorToString (line 83) | public static String colorToString(@ColorInt int color) {
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIDeviceHelper.java
class QMUIDeviceHelper (line 52) | @SuppressLint("PrivateApi")
method accept (line 67) | @Override
method checkReadInfo (line 85) | private static void checkReadInfo(){
method _isTablet (line 118) | private static boolean _isTablet(Context context) {
method isTablet (line 126) | public static boolean isTablet(Context context) {
method read (line 139) | @Override
method isFlyme (line 145) | public static boolean isFlyme() {
method isMIUI (line 152) | public static boolean isMIUI() {
method isMIUIV5 (line 157) | public static boolean isMIUIV5() {
method isMIUIV6 (line 162) | public static boolean isMIUIV6() {
method isMIUIV7 (line 167) | public static boolean isMIUIV7() {
method isMIUIV8 (line 172) | public static boolean isMIUIV8() {
method isMIUIV9 (line 177) | public static boolean isMIUIV9() {
method isFlymeLowerThan (line 182) | public static boolean isFlymeLowerThan(int majorVersion) {
method isFlymeLowerThan (line 186) | public static boolean isFlymeLowerThan(int majorVersion, int minorVers...
method read (line 225) | @Override
method isMeizu (line 231) | public static boolean isMeizu() {
method read (line 240) | @Override
method isXiaomi (line 245) | public static boolean isXiaomi() {
method read (line 250) | @Override
method isVivo (line 255) | public static boolean isVivo() {
method read (line 260) | @Override
method isOppo (line 265) | public static boolean isOppo() {
method read (line 270) | @Override
method isHuawei (line 275) | public static boolean isHuawei() {
method read (line 280) | @Override
method isEssentialPhone (line 285) | public static boolean isEssentialPhone() {
method read (line 290) | @Override
method isMiuiFullDisplay (line 295) | public static boolean isMiuiFullDisplay(Context context){
method isPhone (line 299) | private static boolean isPhone(String[] boards) {
method getTotalMemory (line 313) | public static long getTotalMemory(Context context) {
method getInnerStorageSize (line 326) | public static long getInnerStorageSize() {
method hasExtraStorage (line 339) | public static boolean hasExtraStorage() {
method getExtraStorageSize (line 344) | public static long getExtraStorageSize() {
method getTotalStorageSize (line 359) | public static long getTotalStorageSize() {
method getCpuCoreCount (line 364) | public static int getCpuCoreCount() {
method getCoresFromCPUFiles (line 387) | private static int getCoresFromCPUFiles(String path) {
method getCoresFromFile (line 392) | private static int getCoresFromFile(String file) {
method isFloatWindowOpAllowed (line 414) | public static boolean isFloatWindowOpAllowed(Context context) {
method getBatteryCapacity (line 419) | public static double getBatteryCapacity(Context context) {
method checkOp (line 437) | private static boolean checkOp(Context context, int op) {
method getLowerCaseName (line 449) | @Nullable
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIDirection.java
type QMUIDirection (line 24) | public enum QMUIDirection {
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIDisplayHelper.java
class QMUIDisplayHelper (line 50) | public class QMUIDisplayHelper {
method getDisplayMetrics (line 72) | public static DisplayMetrics getDisplayMetrics(Context context) {
method dpToPx (line 82) | public static int dpToPx(int dpValue) {
method pxToDp (line 92) | public static int pxToDp(float pxValue) {
method getDensity (line 96) | public static float getDensity(Context context) {
method getFontDensity (line 100) | public static float getFontDensity(Context context) {
method getScreenWidth (line 109) | public static int getScreenWidth(Context context) {
method getScreenHeight (line 118) | public static int getScreenHeight(Context context) {
method getRealScreenSize (line 133) | public static int[] getRealScreenSize(Context context) {
method doGetRealScreenSize (line 165) | private static int[] doGetRealScreenSize(Context context) {
method getUsefulScreenWidth (line 206) | public static int getUsefulScreenWidth(Activity activity) {
method getUsefulScreenWidth (line 210) | public static int getUsefulScreenWidth(View view) {
method getUsefulScreenWidth (line 214) | public static int getUsefulScreenWidth(Context context, boolean hasNot...
method getUsefulScreenHeight (line 246) | public static int getUsefulScreenHeight(Activity activity) {
method getUsefulScreenHeight (line 250) | public static int getUsefulScreenHeight(View view) {
method getUsefulScreenHeight (line 254) | private static int getUsefulScreenHeight(Context context, boolean hasN...
method isNavMenuExist (line 275) | public static boolean isNavMenuExist(Context context) {
method dp2px (line 293) | public static int dp2px(Context context, int dp) {
method sp2px (line 303) | public static int sp2px(Context context, int sp) {
method px2dp (line 313) | public static int px2dp(Context context, int px) {
method px2sp (line 323) | public static int px2sp(Context context, int px) {
method hasStatusBar (line 333) | public static boolean hasStatusBar(Context context) {
method getActionBarHeight (line 348) | public static int getActionBarHeight(Context context) {
method getStatusBarHeight (line 364) | public static int getStatusBarHeight(Context context) {
method getNavMenuHeight (line 392) | public static int getNavMenuHeight(Context context) {
method getResourceNavHeight (line 405) | private static int getResourceNavHeight(Context context){
method hasCamera (line 414) | public static final boolean hasCamera(Context context) {
method hasHardwareMenuKey (line 433) | @SuppressWarnings("SimplifiableIfStatement")
method hasInternet (line 451) | @SuppressLint("MissingPermission")
method isPackageExist (line 463) | public static boolean isPackageExist(Context context, String pckName) {
method isSdcardReady (line 479) | public static boolean isSdcardReady() {
method getCurCountryLan (line 490) | public static String getCurCountryLan(Context context) {
method isZhCN (line 510) | public static boolean isZhCN(Context context) {
method setFullScreen (line 528) | public static void setFullScreen(Activity activity) {
method cancelFullScreen (line 540) | public static void cancelFullScreen(Activity activity) {
method isFullScreen (line 552) | public static boolean isFullScreen(Activity activity) {
method isElevationSupported (line 558) | public static boolean isElevationSupported() {
method hasNavigationBar (line 562) | public static boolean hasNavigationBar(Context context) {
method deviceHasNavigationBar (line 578) | private static boolean deviceHasNavigationBar() {
method vivoNavigationGestureEnabled (line 613) | public static boolean vivoNavigationGestureEnabled(Context context) {
method xiaomiNavigationGestureEnabled (line 619) | public static boolean xiaomiNavigationGestureEnabled(Context context) {
method huaweiIsNotchSetToShowInSetting (line 625) | public static boolean huaweiIsNotchSetToShowInSetting(Context context) {
method xiaomiIsNotchSetToShowInSetting (line 632) | @TargetApi(17)
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIDrawableHelper.java
class QMUIDrawableHelper (line 52) | public class QMUIDrawableHelper {
method createBitmapFromView (line 66) | public static Bitmap createBitmapFromView(View view, float scale) {
method createBitmapFromView (line 91) | public static Bitmap createBitmapFromView(View view) {
method createBitmapFromView (line 98) | public static Bitmap createBitmapFromView(View view, int leftCrop, int...
method createBitmapSafely (line 126) | public static Bitmap createBitmapSafely(int width, int height, Bitmap....
method createDrawableWithSize (line 149) | public static BitmapDrawable createDrawableWithSize(Resources resource...
method setDrawableTintColor (line 175) | @Deprecated
method drawableToBitmap (line 187) | public static Bitmap drawableToBitmap(Drawable drawable) {
method createCircleGradientDrawable (line 224) | @TargetApi(16)
method createItemSeparatorBg (line 249) | public static LayerDrawable createItemSeparatorBg(@ColorInt int separa...
method getVectorDrawable (line 269) | public static
method vectorDrawableToBitmap (line 280) | public static Bitmap vectorDrawableToBitmap(Context context, @Drawable...
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIKeyboardHelper.java
class QMUIKeyboardHelper (line 44) | public class QMUIKeyboardHelper {
method showKeyboard (line 53) | public static void showKeyboard(final EditText editText, boolean delay) {
method showKeyboard (line 63) | public static void showKeyboard(final EditText editText, int delay) {
method hideKeyboard (line 92) | public static boolean hideKeyboard(final View view) {
method listenKeyBoardWithOffsetSelf (line 104) | public static void listenKeyBoardWithOffsetSelf(final View view, final...
method listenKeyBoardWithOffsetSelfHalf (line 122) | public static void listenKeyBoardWithOffsetSelfHalf(final View view, f...
method setVisibilityEventListener (line 146) | @SuppressWarnings("deprecation")
method isKeyboardVisible (line 219) | public static boolean isKeyboardVisible(Activity activity) {
type KeyboardVisibilityEventListener (line 234) | public interface KeyboardVisibilityEventListener {
method onVisibilityChanged (line 239) | boolean onVisibilityChanged(boolean isOpen, int heightDiff);
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUILangHelper.java
class QMUILangHelper (line 30) | public class QMUILangHelper {
method getNumberDigits (line 38) | public static int getNumberDigits(int number) {
method getNumberDigits (line 44) | public static int getNumberDigits(long number) {
method formatNumberToLimitedDigits (line 50) | public static String formatNumberToLimitedDigits(int number, int maxDi...
method regularizePrice (line 69) | public static String regularizePrice(float price) {
method regularizePrice (line 79) | public static String regularizePrice(double price) {
method isNullOrEmpty (line 84) | public static boolean isNullOrEmpty(@Nullable CharSequence string) {
method close (line 88) | public static void close(Closeable c) {
method objectEquals (line 98) | @Deprecated
method constrain (line 103) | public static int constrain(int amount, int low, int high) {
method constrain (line 107) | public static float constrain(float amount, float low, float high) {
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUINotchHelper.java
class QMUINotchHelper (line 40) | public class QMUINotchHelper {
method hasNotchInVivo (line 54) | public static boolean hasNotchInVivo(Context context) {
method hasNotchInHuawei (line 78) | public static boolean hasNotchInHuawei(Context context) {
method hasNotchInOppo (line 95) | public static boolean hasNotchInOppo(Context context) {
method hasNotchInXiaomi (line 100) | @SuppressLint("PrivateApi")
method hasNotch (line 114) | public static boolean hasNotch(View view){
method hasNotch (line 128) | public static boolean hasNotch(Activity activity) {
method attachHasOfficialNotch (line 154) | @TargetApi(28)
method has3rdNotch (line 167) | public static boolean has3rdNotch(Context context){
method getSafeInsetTop (line 180) | public static int getSafeInsetTop(Activity activity) {
method getSafeInsetBottom (line 187) | public static int getSafeInsetBottom(Activity activity) {
method getSafeInsetLeft (line 194) | public static int getSafeInsetLeft(Activity activity) {
method getSafeInsetRight (line 201) | public static int getSafeInsetRight(Activity activity) {
method getSafeInsetTop (line 209) | public static int getSafeInsetTop(View view) {
method getSafeInsetBottom (line 216) | public static int getSafeInsetBottom(View view) {
method getSafeInsetLeft (line 223) | public static int getSafeInsetLeft(View view) {
method getSafeInsetRight (line 230) | public static int getSafeInsetRight(View view) {
method clearAllRectInfo (line 238) | private static void clearAllRectInfo() {
method clearPortraitRectInfo (line 245) | private static void clearPortraitRectInfo() {
method clearLandscapeRectInfo (line 250) | private static void clearLandscapeRectInfo() {
method getSafeInsetRect (line 255) | private static Rect getSafeInsetRect(Activity activity) {
method getSafeInsetRect (line 265) | private static Rect getSafeInsetRect(View view) {
method getOfficialSafeInsetRect (line 274) | @TargetApi(28)
method get3rdSafeInsetRect (line 287) | private static Rect get3rdSafeInsetRect(Context context){
method getRectInfoRotation0 (line 320) | private static Rect getRectInfoRotation0(Context context) {
method getRectInfoRotation90 (line 341) | private static Rect getRectInfoRotation90(Context context) {
method getRectInfoRotation180 (line 363) | private static Rect getRectInfoRotation180(Context context) {
method getRectInfoRotation270 (line 382) | private static Rect getRectInfoRotation270(Context context) {
method getNotchSizeInHuawei (line 405) | public static int[] getNotchSizeInHuawei(Context context) {
method getNotchWidthInXiaomi (line 425) | public static int getNotchWidthInXiaomi(Context context) {
method getNotchHeightInXiaomi (line 433) | public static int getNotchHeightInXiaomi(Context context) {
method getNotchWidthInVivo (line 441) | public static int getNotchWidthInVivo(Context context){
method getNotchHeightInVivo (line 445) | public static int getNotchHeightInVivo(Context context){
method getScreenRotation (line 455) | private static int getScreenRotation(Context context) {
method isNotchOfficialSupport (line 468) | public static boolean isNotchOfficialSupport(){
method needFixLandscapeNotchAreaFitSystemWindow (line 477) | public static boolean needFixLandscapeNotchAreaFitSystemWindow(View vi...
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIPackageHelper.java
class QMUIPackageHelper (line 26) | public class QMUIPackageHelper {
method getAppVersion (line 36) | public static String getAppVersion(Context context) {
method getMajorMinorVersion (line 56) | public static String getMajorMinorVersion(Context context) {
method getMajorVersion (line 66) | private static int getMajorVersion(Context context) {
method getMinorVersion (line 80) | private static int getMinorVersion(Context context) {
method getFixVersion (line 94) | public static int getFixVersion(Context context) {
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIReflectHelper.java
class QMUIReflectHelper (line 27) | public class QMUIReflectHelper {
method QMUIReflectHelper (line 30) | private QMUIReflectHelper() {
method getStaticFieldValue (line 32) | @SuppressWarnings("unchecked")
method setStaticFieldValue (line 49) | public static boolean setStaticFieldValue(final Class<?> cls, final St...
method getFieldValue (line 66) | @SuppressWarnings("unchecked")
method getFieldValue (line 83) | @SuppressWarnings("unchecked")
method setFieldValue (line 100) | public static boolean setFieldValue(final Object obj, final String nam...
method newInstance (line 117) | public static <T> T newInstance(final String className, final Object.....
method newInstance (line 126) | @SuppressWarnings("unchecked")
method invokeStaticMethod (line 153) | @SuppressWarnings("unchecked")
method invokeStaticMethod (line 158) | @SuppressWarnings("unchecked")
method invokeMethod (line 176) | @SuppressWarnings("unchecked")
method invokeMethod (line 181) | @SuppressWarnings("unchecked")
method getField (line 198) | public static Field getField(final Class<?> cls, final String name) {
method getField (line 210) | public static Field getField(final Class<?> cls, final Class<?> type) {
method getMethod (line 229) | private static Method getMethod(final Class<?> cls, final String name,...
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIResHelper.java
class QMUIResHelper (line 38) | public class QMUIResHelper {
method getAttrFloatValue (line 41) | public static float getAttrFloatValue(Context context, int attr) {
method getAttrFloatValue (line 45) | public static float getAttrFloatValue(Resources.Theme theme, int attr) {
method getAttrColor (line 55) | public static int getAttrColor(Context context, int attrRes) {
method getAttrColor (line 59) | public static int getAttrColor(Resources.Theme theme, int attr) {
method getAttrColorStateList (line 72) | @Nullable
method getAttrColorStateList (line 77) | @Nullable
method getAttrDrawable (line 101) | @Nullable
method getAttrDrawable (line 106) | @Nullable
method getAttrDrawable (line 131) | @Nullable
method getAttrDimen (line 142) | public static int getAttrDimen(Context context, int attrRes) {
method getAttrString (line 152) | @Nullable
method getAttrInt (line 164) | public static int getAttrInt(Context context, int attrRes) {
method assignTextViewWithAttr (line 173) | public static void assignTextViewWithAttr(TextView textView, int attrR...
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUISpanHelper.java
class QMUISpanHelper (line 34) | public class QMUISpanHelper {
method generateSideIconText (line 45) | public static CharSequence generateSideIconText(boolean left,
method generateSideIconText (line 51) | public static CharSequence generateSideIconText(boolean left,
method generateSideIconText (line 58) | public static CharSequence generateSideIconText(boolean left,
method generateSideIconText (line 65) | public static CharSequence generateSideIconText(boolean left,
method generateHorIconText (line 77) | public static CharSequence generateHorIconText(CharSequence text,
method generateHorIconText (line 84) | public static CharSequence generateHorIconText(CharSequence text,
method generateHorIconText (line 92) | public static CharSequence generateHorIconText(CharSequence text,
method generateHorIconText (line 100) | public static CharSequence generateHorIconText(CharSequence text,
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIStatusBarHelper.java
class QMUIStatusBarHelper (line 43) | public class QMUIStatusBarHelper {
type StatusBarType (line 45) | private enum StatusBarType {
method translucent (line 57) | public static void translucent(Activity activity) {
method translucent (line 61) | public static void translucent(Window window) {
method supportTranslucent (line 65) | private static boolean supportTranslucent() {
method translucent (line 76) | public static void translucent(Activity activity, @ColorInt int colorO...
method translucent (line 81) | @TargetApi(19)
method retainSystemUiFlag (line 129) | public static int retainSystemUiFlag(Window window, int out, int type) {
method handleDisplayCutoutMode (line 137) | @TargetApi(28)
method realHandleDisplayCutoutMode (line 160) | @TargetApi(28)
method setStatusBarLightMode (line 177) | public static boolean setStatusBarLightMode(Activity activity) {
method setStatusBarLightMode (line 204) | private static boolean setStatusBarLightMode(Activity activity, Status...
method setStatusBarDarkMode (line 220) | public static boolean setStatusBarDarkMode(Activity activity) {
method Android6SetStatusBarLightMode (line 244) | @TargetApi(23)
method MIUISetStatusBarLightMode (line 278) | @SuppressWarnings("unchecked")
method isMIUICustomStatusBarLightModeImpl (line 306) | private static boolean isMIUICustomStatusBarLightModeImpl() {
method FlymeSetStatusBarLightMode (line 322) | public static boolean FlymeSetStatusBarLightMode(Window window, boolea...
method isFullScreen (line 364) | public static boolean isFullScreen(Activity activity) {
method getStatusBarAPITransparentValue (line 379) | public static Integer getStatusBarAPITransparentValue(Context context) {
method getStatusbarHeight (line 412) | public static int getStatusbarHeight(Context context) {
method initStatusBarHeight (line 419) | private static void initStatusBarHeight(Context context) {
method setVirtualDensity (line 456) | public static void setVirtualDensity(float density) {
method setVirtualDensityDpi (line 460) | public static void setVirtualDensityDpi(float densityDpi) {
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIToastHelper.java
class QMUIToastHelper (line 28) | public class QMUIToastHelper {
method show (line 30) | public static void show(Toast toast){
method fixToastForAndroidN (line 38) | private static Toast fixToastForAndroidN(Toast toast){
class FixCallback (line 62) | public static class FixCallback implements Handler.Callback {
method FixCallback (line 66) | public FixCallback(final Handler handler) {
method handleMessage (line 70) | @Override
class FixRunnable (line 81) | public static class FixRunnable implements Runnable {
method FixRunnable (line 85) | public FixRunnable(final Runnable runnable) {
method run (line 89) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIViewHelper.java
class QMUIViewHelper (line 65) | public class QMUIViewHelper {
method checkAppCompatTheme (line 75) | public static void checkAppCompatTheme(Context context) {
method getActivityRoot (line 88) | public static View getActivityRoot(Activity activity) {
method requestApplyInsets (line 95) | @SuppressWarnings("deprecation")
method expendTouchArea (line 110) | public static void expendTouchArea(final View view, final int expendSi...
method setBackground (line 129) | @SuppressWarnings("deprecation")
method setBackgroundKeepingPadding (line 139) | public static void setBackgroundKeepingPadding(View view, Drawable dra...
method setBackgroundKeepingPadding (line 145) | @SuppressWarnings("deprecation")
method setBackgroundColorKeepPadding (line 150) | public static void setBackgroundColorKeepPadding(View view, @ColorInt ...
method playBackgroundBlinkAnimation (line 159) | public static void playBackgroundBlinkAnimation(final View v, @ColorIn...
method playViewBackgroundAnimation (line 176) | public static Animator playViewBackgroundAnimation(final View v, @Colo...
method playViewBackgroundAnimation (line 217) | public static void playViewBackgroundAnimation(final View v, @ColorInt...
method playViewBackgroundAnimation (line 232) | public static void playViewBackgroundAnimation(final View v, @ColorInt...
method playViewBackgroundAnimation (line 277) | public static void playViewBackgroundAnimation(final View v, int start...
method generateViewId (line 281) | public static int generateViewId() {
method fadeIn (line 306) | public static AlphaAnimation fadeIn(View view, int duration, Animation...
method fadeOut (line 337) | public static AlphaAnimation fadeOut(final View view, int duration, fi...
method clearValueAnimator (line 376) | public static void clearValueAnimator(Animator animator) {
method calcViewScreenLocation (line 390) | public static Rect calcViewScreenLocation(View view) {
method slideIn (line 409) | public static
method slideOut (line 471) | public static
method setPaddingLeft (line 546) | public static void setPaddingLeft(View view, int value) {
method setPaddingTop (line 558) | public static void setPaddingTop(View view, int value) {
method setPaddingRight (line 570) | public static void setPaddingRight(View view, int value) {
method setPaddingBottom (line 582) | public static void setPaddingBottom(View view, int value) {
method updateChildrenOffsetHelperOnLayout (line 588) | public static void updateChildrenOffsetHelperOnLayout(@NonNull ViewGro...
method getOffsetHelper (line 600) | @Nullable
method getOrCreateOffsetHelper (line 609) | @NonNull
method safeRequestDisallowInterceptTouchEvent (line 627) | public static void safeRequestDisallowInterceptTouchEvent(@NonNull Vie...
method safeSetImageViewSelected (line 641) | public static void safeSetImageViewSelected(ImageView imageView, boole...
method setImageViewTintColor (line 663) | @Deprecated
method isListViewAlreadyAtBottom (line 676) | public static boolean isListViewAlreadyAtBottom(ListView listView) {
method getDescendantRect (line 698) | public static void getDescendantRect(ViewGroup parent, View descendant...
method getDescendantVisibleRect (line 703) | public static boolean getDescendantVisibleRect(ViewGroup target, View ...
class ViewGroupHelper (line 731) | private static class ViewGroupHelper {
method offsetDescendantRect (line 735) | public static void offsetDescendantRect(ViewGroup group, View child,...
method offsetDescendantMatrix (line 758) | static void offsetDescendantMatrix(ViewParent target, View view, Mat...
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIViewOffsetHelper.java
class QMUIViewOffsetHelper (line 47) | public final class QMUIViewOffsetHelper {
method QMUIViewOffsetHelper (line 59) | public QMUIViewOffsetHelper(View view) {
method onViewLayout (line 63) | public void onViewLayout() {
method onViewLayout (line 67) | public void onViewLayout(boolean applyOffset) {
method applyOffsets (line 75) | public void applyOffsets() {
method setTopAndBottomOffset (line 86) | public boolean setTopAndBottomOffset(int offset) {
method setLeftAndRightOffset (line 101) | public boolean setLeftAndRightOffset(int offset) {
method setOffset (line 110) | public boolean setOffset(int leftOffset, int topOffset) {
method getTopAndBottomOffset (line 128) | public int getTopAndBottomOffset() {
method getLeftAndRightOffset (line 132) | public int getLeftAndRightOffset() {
method getLayoutTop (line 136) | public int getLayoutTop() {
method getLayoutLeft (line 140) | public int getLayoutLeft() {
method setHorizontalOffsetEnabled (line 144) | public void setHorizontalOffsetEnabled(boolean horizontalOffsetEnabled) {
method isHorizontalOffsetEnabled (line 148) | public boolean isHorizontalOffsetEnabled() {
method setVerticalOffsetEnabled (line 152) | public void setVerticalOffsetEnabled(boolean verticalOffsetEnabled) {
method isVerticalOffsetEnabled (line 156) | public boolean isVerticalOffsetEnabled() {
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIWindowHelper.java
class QMUIWindowHelper (line 36) | public class QMUIWindowHelper {
method setWindowType (line 52) | public static void setWindowType(WindowManager.LayoutParams layoutPara...
method unSafeGetWindowVisibleInsets (line 57) | @Nullable
method unSafeGetContentInsets (line 80) | @Nullable
method getAttachInfoFromView (line 103) | public static Object getAttachInfoFromView(@NonNull View view) {
FILE: qmui/src/main/java/com/qmuiteam/qmui/util/QMUIWindowInsetHelper.java
class QMUIWindowInsetHelper (line 42) | public class QMUIWindowInsetHelper {
method handleInset (line 45) | @Override
method handleInset (line 52) | @Override
method handleInset (line 59) | @Override
method handleInset (line 66) | @Override
method onApplyWindowInsets (line 74) | @Override
method onApplyWindowInsets (line 81) | @Override
method handleWindowInsets (line 87) | public static void handleWindowInsets(View v, @WindowInsetsCompat.Type...
method handleWindowInsets (line 91) | public static void handleWindowInsets(View v, @WindowInsetsCompat.Type...
method handleWindowInsets (line 95) | public static void handleWindowInsets(View v, @WindowInsetsCompat.Type...
method handleWindowInsets (line 99) | public static void handleWindowInsets(View v, @WindowInsetsCompat.Type...
method handleWindowInsets (line 116) | public static void handleWindowInsets(View v,
method stopDispatchWindowInsets (line 144) | public static void stopDispatchWindowInsets(View v){
method overrideWithDoNotHandleWindowInsets (line 148) | public static void overrideWithDoNotHandleWindowInsets(View v){
method setOnApplyWindowInsetsListener (line 153) | public static void setOnApplyWindowInsetsListener(final @NonNull View v,
method callCompatInsetAnimationCallback (line 222) | private static void callCompatInsetAnimationCallback(final @NonNull Wi...
method adapterInsetsWithGravity (line 234) | public static Insets adapterInsetsWithGravity(View view, Insets insets){
type InsetHandler (line 299) | public interface InsetHandler{
method handleInset (line 300) | void handleInset(View view, Insets insets);
FILE: qmui/src/main/java/com/qmuiteam/qmui/widget/IBlankTouchDetector.java
type IBlankTouchDetector (line 20) | public interface IBlankTouchDetector {
method isTouchInBlank (line 21) | boolean isTouchInBlank(MotionEvent event);
FILE: qmui/src/main/java/com/qmuiteam/qmui/widget/IWindowInsetKeyboardConsumer.java
type IWindowInsetKeyboardConsumer (line 19) | public interface IWindowInsetKeyboardConsumer {
method onHandleKeyboard (line 20) | void onHandleKeyboard(int keyboardInset);
FILE: qmui/src/main/java/com/qmuiteam/qmui/widget/QMUIAnimationListView.java
class QMUIAnimationListView (line 76) | @SuppressWarnings({"rawtypes", "unchecked"})
method QMUIAnimationListView (line 104) | public QMUIAnimationListView(Context context) {
method QMUIAnimationListView (line 108) | public QMUIAnimationListView(Context context, AttributeSet attrs) {
method QMUIAnimationListView (line 113) | public QMUIAnimationListView(Context context, AttributeSet attrs, int ...
method QMUIAnimationListView (line 118) | public QMUIAnimationListView(Context context, AttributeSet attrs, int ...
method init (line 123) | private void init() {
method getRealAdapter (line 127) | public ListAdapter getRealAdapter() {
method setAdapter (line 131) | @Override
method setAnimationManipulateDurationLimit (line 138) | public void setAnimationManipulateDurationLimit(int animationManipulat...
method manipulate (line 142) | public <T extends ListAdapter> void manipulate(final Manipulator<T> ma...
method manipulateWithoutAnimation (line 171) | public <T extends ListAdapter> void manipulateWithoutAnimation(final M...
method getOffsetDurationUnit (line 181) | public float getOffsetDurationUnit() {
method setOffsetDurationUnit (line 185) | public void setOffsetDurationUnit(float offsetDurationUnit) {
method getOffsetDuration (line 189) | private long getOffsetDuration(int start, int end) {
method setOpenChangeDisappearAnimation (line 199) | public void setOpenChangeDisappearAnimation(boolean openChangeDisappea...
method setOffsetInterpolator (line 203) | public void setOffsetInterpolator(Interpolator offsetInterpolator) {
method prepareAnimation (line 207) | private void prepareAnimation() {
method doAnimation (line 237) | private void doAnimation() {
method doPreLayoutAnimation (line 261) | private void doPreLayoutAnimation(Animator.AnimatorListener listener) {
method doPostLayoutAnimation (line 298) | private void doPostLayoutAnimation() {
method getChangeDisappearDuration (line 377) | protected long getChangeDisappearDuration() {
method onDraw (line 382) | @Override
method finishAnimation (line 411) | private void finishAnimation() {
method manipulatePending (line 427) | private void manipulatePending() {
method getDeleteAnimator (line 462) | protected Animator getDeleteAnimator(View view) {
method getOffsetAnimator (line 466) | protected Animator getOffsetAnimator(View view, int oldTop, int newTop) {
method getOffsetAnimator (line 470) | protected Animator getOffsetAnimator(View view, int oldTop, int newTop...
method getAddAnimator (line 479) | protected Animator getAddAnimator(View view, int top, int position, in...
method alphaObjectAnimator (line 491) | protected ObjectAnimator alphaObjectAnimator(View view, final boolean ...
method getPositionForId (line 512) | protected int getPositionForId(final long id) {
method dispatchTouchEvent (line 522) | @Override
type Manipulator (line 527) | public interface Manipulator<T extends ListAdapter> {
method manipulate (line 528) | void manipulate(T adapter);
class WrapperAdapter (line 531) | private static class WrapperAdapter extends BaseAdapter {
method onChanged (line 535) | @Override
method onInvalidated (line 542) | @Override
method WrapperAdapter (line 549) | public WrapperAdapter(ListAdapter adapter) {
method setShouldNotifyChange (line 554) | public void setShouldNotifyChange(boolean shouldNotifyChange) {
method isAnimationEnabled (line 558) | public boolean isAnimationEnabled() {
method notifyDataSetChanged (line 562) | @Override
method getCount (line 571) | @Override
method getItemViewType (line 576) | @Override
method getViewTypeCount (line 581) | @Override
method getItem (line 586) | @Override
method getItemId (line 591) | @Override
method getView (line 596) | @Override
method hasStableIds (line 601) | @Override
class ManipulateAnimatorListener (line 609) | private abstract class ManipulateAnimatorListener implements Animator....
method onAnimationStart (line 611) | @Override
method onAnimationCancel (line 616) | @Override
method onAnimationRepeat (line 621) | @Override
FILE: qmui/src/main/java/com/qmuiteam/qmui/widget/QMUIAppBarLayout.java
class QMUIAppBarLayout (line 24) | @Deprecated
method QMUIAppBarLayout (line 27) | public QMUIAppBarLayout(Context context) {
method QMUIAppBarLayout (line 31) | public QMUIAppBarLayout(Context context, AttributeSet attrs) {
FILE: qmui/src/main/java/com/qmuiteam/qmui/widget/QMUICollapsingTopBarLayout.java
class QMUICollapsingTopBarLayout (line 100) | public class QMUICollapsingTopBarLayout extends FrameLayout implements I...
method QMUICollapsingTopBarLayout (line 139) | public QMUICollapsingTopBarLayout(Context context) {
method QMUICollapsingTopBarLayout (line 143) | public QMUICollapsingTopBarLayout(Context context, AttributeSet attrs) {
method QMUICollapsingTopBarLayout (line 147) | public QMUICollapsingTopBarLayout(Context context, AttributeSet attrs,...
method followTopBarCommonSkin (line 247) | public void followTopBarCommonSkin() {
method onViewAdded (line 254) | @Override
method onAttachedToWindow (line 262) | @Override
method onDetachedFromWindow (line 282) | @Override
method draw (line 294) | @Override
method getWindowInsetTop (line 323) | private int getWindowInsetTop() {
method drawChild (line 330) | @Override
method onSizeChanged (line 344) | @Override
method ensureToolbar (line 352) | private void ensureT
Condensed preview — 758 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,346K chars).
[
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 311,
"preview": "### 运行环境 ###\n\n- [x] 设备型号:如:`Nexus 6`\n- [x] 设备系统版本:如 `Android 5.0`\n- [x] Gradle 版本:如 `2.3.0`\n- [x] QMUI Android 版本:`1.x.x"
},
{
"path": ".gitignore",
"chars": 127,
"preview": "/*.bin\n*.iml\n.DS_Store\n/.gradle\n/.gradletasknamecache\n/.idea\n/bin\n/build\n/local.properties\n/captures\n/gradle/deploy.prop"
},
{
"path": "CONTRIBUTING.md",
"chars": 601,
"preview": "[腾讯开源激励计划](https://opensource.tencent.com/contribution) 鼓励开发者的参与和贡献,期待你的加入。我们欢迎[report Issues](https://github.com/Tencen"
},
{
"path": "LICENSE.TXT",
"chars": 12608,
"preview": "Tencent is pleased to support the open source community by making QMUI_Android available. \nCopyright (C) 2017-2018 THL "
},
{
"path": "README.md",
"chars": 1019,
"preview": " <p align=\"center\">\n <img src=\"https://cloud.githubusercontent.com/assets/1190261/26751376/63f96538-486a-11e7-81cf-5bc8"
},
{
"path": "arch/.gitignore",
"chars": 102,
"preview": "/*.bin\n/*.iml\n/.DS_Store\n/.gradletasknamecache\n/.idea\n/bin\n/build\n/local.properties\n/deploy.properties"
},
{
"path": "arch/build.gradle.kts",
"chars": 846,
"preview": "import com.qmuiteam.plugin.Dep\n\nplugins {\n id(\"com.android.library\")\n kotlin(\"android\")\n `maven-publish`\n si"
},
{
"path": "arch/proguard-rules.pro",
"chars": 751,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "arch/src/androidTest/java/com/qmuiteam/qmui/arch/ExampleInstrumentedTest.java",
"chars": 750,
"preview": "package com.qmuiteam.qmui.arch;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\nim"
},
{
"path": "arch/src/main/AndroidManifest.xml",
"chars": 45,
"preview": "<manifest package=\"com.qmuiteam.qmui.arch\"/>\n"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/InnerBaseActivity.java",
"chars": 6149,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/QMUIActivity.java",
"chars": 13325,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragment.java",
"chars": 63609,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragmentActivity.java",
"chars": 20196,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragmentContainerProvider.java",
"chars": 1287,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragmentPagerAdapter.java",
"chars": 5165,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/QMUILatestVisit.java",
"chars": 9024,
"preview": "package com.qmuiteam.qmui.arch;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.content.Int"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/QMUINavFragment.java",
"chars": 7373,
"preview": "package com.qmuiteam.qmui.arch;\n\nimport android.content.Context;\nimport android.os.Bundle;\nimport android.view.View;\n\nim"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/QMUISwipeBackActivityManager.java",
"chars": 4628,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackLayout.java",
"chars": 42426,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/SwipeBackgroundView.java",
"chars": 8352,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/Utils.java",
"chars": 10851,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/annotation/DefaultFirstFragment.java",
"chars": 1111,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/effect/Effect.java",
"chars": 785,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/effect/FragmentResultEffect.java",
"chars": 1595,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/effect/MapEffect.java",
"chars": 1078,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentEffectHandler.java",
"chars": 2209,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentEffectRegistration.java",
"chars": 827,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentEffectRegistry.java",
"chars": 9999,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentMapEffectHandler.java",
"chars": 852,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/effect/QMUIFragmentResultEffectHandler.java",
"chars": 978,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/record/DefaultLatestVisitStorage.java",
"chars": 7665,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/record/LatestVisitArgumentCollector.java",
"chars": 1163,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/record/QMUILatestVisitStorage.java",
"chars": 1572,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/record/RecordArgumentEditor.java",
"chars": 2321,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/record/RecordArgumentEditorImpl.java",
"chars": 2386,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/record/RecordIdClassMap.java",
"chars": 877,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/ActivitySchemeItem.kt",
"chars": 3512,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/FragmentSchemeItem.kt",
"chars": 9712,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/QMUISchemeBuilder.kt",
"chars": 3160,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/QMUISchemeFragmentFactory.kt",
"chars": 4249,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/QMUISchemeHandler.kt",
"chars": 8867,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/QMUISchemeHandlerInterceptor.kt",
"chars": 1461,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/QMUISchemeIntentFactory.kt",
"chars": 2961,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/QMUISchemeMatcher.kt",
"chars": 1068,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/QMUIUnknownSchemeHandler.kt",
"chars": 189,
"preview": "package com.qmuiteam.qmui.arch.scheme\n\ninterface QMUIUnknownSchemeHandler {\n fun handle(handler: QMUISchemeHandler, h"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/SchemeHandleContext.kt",
"chars": 6814,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/SchemeInfo.kt",
"chars": 1029,
"preview": "package com.qmuiteam.qmui.arch.scheme\n\nclass SchemeInfo(\n val action: String,\n val params: MutableMap<String, Stri"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/SchemeItem.kt",
"chars": 7356,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/SchemeMap.kt",
"chars": 959,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/SchemeRefreshable.kt",
"chars": 972,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/java/com/qmuiteam/qmui/arch/scheme/SchemeValue.kt",
"chars": 1181,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch/src/main/res/anim/decelerate_factor_interpolator.xml",
"chars": 837,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/decelerate_low_factor_interpolator.xml",
"chars": 837,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/scale_enter.xml",
"chars": 1379,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/scale_exit.xml",
"chars": 1377,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/slide_in_left.xml",
"chars": 1135,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/slide_in_right.xml",
"chars": 1006,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/slide_out_left.xml",
"chars": 1143,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/slide_out_right.xml",
"chars": 1002,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/slide_still.xml",
"chars": 1000,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/swipe_back_enter.xml",
"chars": 962,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/swipe_back_exit.xml",
"chars": 1050,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/anim/swipe_back_exit_still.xml",
"chars": 1172,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/animator/scale_enter.xml",
"chars": 828,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <objectAnima"
},
{
"path": "arch/src/main/res/animator/scale_exit.xml",
"chars": 1566,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/animator/slide_in_left.xml",
"chars": 1319,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/animator/slide_in_right.xml",
"chars": 1079,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/animator/slide_out_left.xml",
"chars": 1318,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/animator/slide_out_right.xml",
"chars": 1079,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/animator/slide_still.xml",
"chars": 1071,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/values/attrs.xml",
"chars": 1101,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/values/ids.xml",
"chars": 1100,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/values/qmui_integers.xml",
"chars": 842,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/main/res/values/strings.xml",
"chars": 755,
"preview": "<!--\n Tencent is pleased to support the open source community by making QMUI_Android available.\n\n Copyright (C) 2017-201"
},
{
"path": "arch/src/main/res/values/style.xml",
"chars": 993,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "arch/src/test/java/com/qmuiteam/qmui/arch/ExampleUnitTest.java",
"chars": 239,
"preview": "package com.qmuiteam.qmui.arch;\n\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n"
},
{
"path": "arch-annotation/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "arch-annotation/build.gradle.kts",
"chars": 257,
"preview": "import com.qmuiteam.plugin.Dep\n\nplugins {\n `java-library`\n kotlin(\"jvm\")\n `maven-publish`\n signing\n id(\"q"
},
{
"path": "arch-annotation/src/main/java/com/qmuiteam/qmui/arch/annotation/ActivityScheme.java",
"chars": 1541,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch-annotation/src/main/java/com/qmuiteam/qmui/arch/annotation/FragmentContainerParam.java",
"chars": 1745,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch-annotation/src/main/java/com/qmuiteam/qmui/arch/annotation/FragmentScheme.java",
"chars": 1661,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch-annotation/src/main/java/com/qmuiteam/qmui/arch/annotation/LatestVisitRecord.java",
"chars": 1483,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch-compiler/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "arch-compiler/build.gradle.kts",
"chars": 438,
"preview": "import com.qmuiteam.plugin.Dep\n\nplugins {\n `java-library`\n `maven-publish`\n signing\n id(\"qmui-publish\")\n}\nve"
},
{
"path": "arch-compiler/src/main/java/com/qmuiteam/qmui/arch/BaseProcessor.java",
"chars": 7860,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch-compiler/src/main/java/com/qmuiteam/qmui/arch/LatestVisitProcessor.java",
"chars": 6335,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "arch-compiler/src/main/java/com/qmuiteam/qmui/arch/SchemeProcessor.java",
"chars": 20791,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "build.gradle.kts",
"chars": 610,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\nimport com.qmuiteam."
},
{
"path": "compiler/.gitignore",
"chars": 13,
"preview": "/build\n/*.iml"
},
{
"path": "compiler/build.gradle.kts",
"chars": 344,
"preview": "import com.qmuiteam.plugin.Dep\n\nplugins {\n `java-library`\n}\n\njava {\n sourceCompatibility = Dep.javaVersion\n tar"
},
{
"path": "compiler/src/main/java/com/qmuiteam/qmuidemo/compiler/WidgetProcessor.java",
"chars": 7806,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "compose/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "compose/build.gradle.kts",
"chars": 927,
"preview": "\nimport com.qmuiteam.plugin.Dep\n\nplugins {\n id(\"com.android.library\")\n kotlin(\"android\")\n `maven-publish`\n s"
},
{
"path": "compose/proguard-rules.pro",
"chars": 750,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "compose/src/androidTest/java/com/qmuiteam/compose/ExampleInstrumentedTest.kt",
"chars": 667,
"preview": "package com.qmuiteam.compose\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.r"
},
{
"path": "compose/src/main/AndroidManifest.xml",
"chars": 156,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "compose/src/main/java/com/qmuiteam/compose/modal/ModalImpl.kt",
"chars": 7025,
"preview": "package com.qmuiteam.compose.modal\n\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.FrameLa"
},
{
"path": "compose/src/main/java/com/qmuiteam/compose/modal/QMUIBottomSheet.kt",
"chars": 8428,
"preview": "package com.qmuiteam.compose.modal\n\nimport android.util.Log\nimport android.view.View\nimport androidx.compose.animation.*"
},
{
"path": "compose/src/main/java/com/qmuiteam/compose/modal/QMUIDialog.kt",
"chars": 11831,
"preview": "package com.qmuiteam.compose.modal\n\nimport android.view.View\nimport androidx.compose.animation.EnterTransition\nimport an"
},
{
"path": "compose/src/main/java/com/qmuiteam/compose/modal/QMUIModal.kt",
"chars": 5756,
"preview": "package com.qmuiteam.compose.modal\n\nimport android.os.SystemClock\nimport android.view.View\nimport android.view.Window\nim"
},
{
"path": "compose/src/main/java/com/qmuiteam/compose/modal/QMUIToast.kt",
"chars": 5910,
"preview": "package com.qmuiteam.compose.modal\n\nimport android.view.View\nimport androidx.compose.animation.*\nimport androidx.compose"
},
{
"path": "compose/src/main/res/values/ids.xml",
"chars": 104,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <item name=\"qmui_modals\" type=\"id\"/>\n</resources>"
},
{
"path": "compose/src/test/java/com/qmuiteam/compose/ExampleUnitTest.kt",
"chars": 217,
"preview": "package com.qmuiteam.compose\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n "
},
{
"path": "compose-core/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "compose-core/build.gradle.kts",
"chars": 1006,
"preview": "\nimport com.qmuiteam.plugin.Dep\n\nplugins {\n id(\"com.android.library\")\n kotlin(\"android\")\n `maven-publish`\n s"
},
{
"path": "compose-core/proguard-rules.pro",
"chars": 750,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "compose-core/src/androidTest/java/com/qmuiteam/compose/ExampleInstrumentedTest.kt",
"chars": 667,
"preview": "package com.qmuiteam.compose\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.r"
},
{
"path": "compose-core/src/main/AndroidManifest.xml",
"chars": 161,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/ex/DrawScopeEx.kt",
"chars": 1559,
"preview": "package com.qmuiteam.compose.core.ex\n\nimport androidx.compose.ui.geometry.Offset\nimport androidx.compose.ui.graphics.Col"
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/helper/Dimen.kt",
"chars": 285,
"preview": "package com.qmuiteam.compose.core.helper\n\nimport androidx.compose.runtime.Composable\nimport androidx.compose.ui.platform"
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/helper/Global.kt",
"chars": 94,
"preview": "package com.qmuiteam.compose.core.helper\n\nobject QMUIGlobal {\n var debug: Boolean = false\n}"
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/helper/Log.kt",
"chars": 1396,
"preview": "package com.qmuiteam.compose.core.helper\n\nimport android.util.Log\n\ninterface QMUILogDelegate {\n fun e(tag: String, ms"
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/helper/LogTag.kt",
"chars": 457,
"preview": "package com.qmuiteam.compose.core.helper\n\ninterface LogTag {\n val TAG: String\n get() = getTag(javaClass)\n}\n\nfu"
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/provider/WindowInsets.kt",
"chars": 1733,
"preview": "package com.qmuiteam.compose.core.provider\n\nimport androidx.compose.runtime.*\nimport androidx.compose.ui.platform.LocalD"
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/ui/DefaultConfig.kt",
"chars": 551,
"preview": "package com.qmuiteam.compose.core.ui\n\nimport androidx.compose.ui.graphics.Color\nimport androidx.compose.ui.unit.dp\n\nval "
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/ui/PressWithAlphaBox.kt",
"chars": 1169,
"preview": "package com.qmuiteam.compose.core.ui\n\nimport androidx.compose.foundation.clickable\nimport androidx.compose.foundation.in"
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/ui/QMUIIcon.kt",
"chars": 3289,
"preview": "package com.qmuiteam.compose.core.ui\n\nimport androidx.compose.animation.AnimatedVisibility\nimport androidx.compose.anima"
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/ui/QMUIItem.kt",
"chars": 3488,
"preview": "package com.qmuiteam.compose.core.ui\n\nimport androidx.compose.foundation.Indication\nimport androidx.compose.foundation.b"
},
{
"path": "compose-core/src/main/java/com/qmuiteam/compose/core/ui/QMUITopBar.kt",
"chars": 13912,
"preview": "package com.qmuiteam.compose.core.ui\n\nimport androidx.annotation.DrawableRes\nimport androidx.compose.foundation.Image\nim"
},
{
"path": "compose-core/src/main/res/drawable/ic_qmui_checkbox_checked.xml",
"chars": 531,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"18dp\"\n android:height=\"18dp\"\n "
},
{
"path": "compose-core/src/main/res/drawable/ic_qmui_checkbox_normal.xml",
"chars": 595,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"18dp\"\n android:height=\"18dp\"\n "
},
{
"path": "compose-core/src/main/res/drawable/ic_qmui_checkbox_partial.xml",
"chars": 507,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"18dp\"\n android:height=\"18dp\"\n "
},
{
"path": "compose-core/src/main/res/drawable/ic_qmui_chevron.xml",
"chars": 446,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"6dp\"\n android:height=\"9dp\"\n "
},
{
"path": "compose-core/src/main/res/drawable/ic_qmui_mark.xml",
"chars": 409,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"12dp\"\n android:height=\"12dp\"\n "
},
{
"path": "compose-core/src/main/res/drawable/ic_qmui_topbar_back.xml",
"chars": 1081,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "compose-core/src/main/res/values/qmui_ids.xml",
"chars": 116,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <item name=\"qmui_window_inset_cache\" type=\"id\"/>\n</resources>"
},
{
"path": "compose-core/src/test/java/com/qmuiteam/compose/ExampleUnitTest.kt",
"chars": 216,
"preview": "package com.qmuiteam.compose\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n "
},
{
"path": "deploy.sh",
"chars": 1483,
"preview": "#!/usr/bin/env bash\n\n#./deploy.sh qmui publishToMavenLocal\n#./deploy.sh arch publishToMavenLocal\n#./deploy.sh type publi"
},
{
"path": "editor/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "editor/build.gradle.kts",
"chars": 918,
"preview": "import com.qmuiteam.plugin.Dep\n\nplugins {\n id(\"com.android.library\")\n kotlin(\"android\")\n kotlin(\"kapt\")\n `ma"
},
{
"path": "editor/consumer-rules.pro",
"chars": 0,
"preview": ""
},
{
"path": "editor/proguard-rules.pro",
"chars": 750,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "editor/src/main/AndroidManifest.xml",
"chars": 49,
"preview": "<manifest package=\"com.qmuiteam.editor.editor\"/>\n"
},
{
"path": "editor/src/main/java/com/qmuiteam/editor/EditorBehavior.kt",
"chars": 2157,
"preview": "package com.qmuiteam.editor\n\nimport androidx.compose.ui.graphics.Color\nimport androidx.compose.ui.text.input.TextFieldVa"
},
{
"path": "editor/src/main/java/com/qmuiteam/editor/QMUIEditor.kt",
"chars": 11906,
"preview": "package com.qmuiteam.editor\n\nimport androidx.compose.foundation.background\nimport androidx.compose.foundation.layout.*\ni"
},
{
"path": "editor/src/main/java/com/qmuiteam/editor/Range.kt",
"chars": 1590,
"preview": "package com.qmuiteam.editor\n\nimport androidx.compose.ui.text.AnnotatedString\nimport androidx.compose.ui.text.TextRange\n\n"
},
{
"path": "editor/src/main/java/com/qmuiteam/editor/TextFieldValueEx.kt",
"chars": 8117,
"preview": "package com.qmuiteam.editor\n\nimport androidx.compose.ui.text.AnnotatedString\nimport androidx.compose.ui.text.ParagraphSt"
},
{
"path": "editor/src/main/java/com/qmuiteam/editor/WordEdit.kt",
"chars": 5050,
"preview": "package com.qmuiteam.editor\n\nimport androidx.compose.ui.text.input.TextFieldValue\nimport java.util.*\n\nenum class WordEdi"
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 232,
"preview": "#Thu Jun 11 14:18:59 CST 2020\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
},
{
"path": "gradle.properties",
"chars": 1228,
"preview": "# suppress inspection \"UnusedProperty\" for whole file\n# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users"
},
{
"path": "gradlew",
"chars": 4971,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "gradlew.bat",
"chars": 2314,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "lib/.gitignore",
"chars": 13,
"preview": "/build\n/*.iml"
},
{
"path": "lib/build.gradle.kts",
"chars": 157,
"preview": "import com.qmuiteam.plugin.Dep\n\nplugins {\n `java-library`\n}\n\njava {\n sourceCompatibility = Dep.javaVersion\n tar"
},
{
"path": "lib/src/main/java/com/qmuiteam/qmuidemo/lib/Group.java",
"chars": 866,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "lib/src/main/java/com/qmuiteam/qmuidemo/lib/annotation/Widget.java",
"chars": 1233,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "photo/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "photo/build.gradle.kts",
"chars": 1100,
"preview": "import com.qmuiteam.plugin.Dep\n\nplugins {\n id(\"com.android.library\")\n kotlin(\"android\")\n `maven-publish`\n si"
},
{
"path": "photo/consumer-rules.pro",
"chars": 0,
"preview": ""
},
{
"path": "photo/proguard-rules.pro",
"chars": 750,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "photo/src/androidTest/java/com/qmuiteam/ExampleInstrumentedTest.kt",
"chars": 656,
"preview": "package com.qmuiteam\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.runners.A"
},
{
"path": "photo/src/main/AndroidManifest.xml",
"chars": 154,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/activity/QMUIPhotoClipActivity.kt",
"chars": 5641,
"preview": "package com.qmuiteam.photo.activity\n\nimport android.content.Intent\nimport android.graphics.Bitmap\nimport android.net.Uri"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/activity/QMUIPhotoPickerActivity.kt",
"chars": 23759,
"preview": "package com.qmuiteam.photo.activity\n\nimport android.Manifest\nimport android.app.Application\nimport android.content.Inten"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/activity/QMUIPhotoViewerActivity.kt",
"chars": 15576,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/BitmapRegion.kt",
"chars": 1295,
"preview": "package com.qmuiteam.photo.compose\n\nimport android.graphics.Bitmap\nimport androidx.compose.foundation.Image\nimport andro"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/GesturePhoto.kt",
"chars": 27102,
"preview": "package com.qmuiteam.photo.compose\n\nimport android.util.Log\nimport androidx.compose.animation.core.*\nimport androidx.com"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/Loading.kt",
"chars": 1450,
"preview": "package com.qmuiteam.photo.compose\n\nimport androidx.compose.animation.core.*\nimport androidx.compose.foundation.Canvas\ni"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/PhotoClipper.kt",
"chars": 5875,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/PhotoConfig.kt",
"chars": 1087,
"preview": "package com.qmuiteam.photo.compose\n\nimport androidx.compose.foundation.background\nimport androidx.compose.foundation.lay"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/Thumbnail.kt",
"chars": 12804,
"preview": "package com.qmuiteam.photo.compose\n\nimport androidx.activity.ComponentActivity\nimport androidx.compose.foundation.clicka"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/picker/Buckets.kt",
"chars": 6073,
"preview": "package com.qmuiteam.photo.compose.picker\n\nimport androidx.compose.animation.*\nimport androidx.compose.foundation.backgr"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/picker/Common.kt",
"chars": 8437,
"preview": "package com.qmuiteam.photo.compose.picker\n\nimport androidx.compose.animation.*\nimport androidx.compose.foundation.Canvas"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/picker/Config.kt",
"chars": 4645,
"preview": "package com.qmuiteam.photo.compose.picker\n\nimport androidx.compose.runtime.Composable\nimport androidx.compose.runtime.Co"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/picker/Edit.kt",
"chars": 29306,
"preview": "package com.qmuiteam.photo.compose.picker\n\nimport android.graphics.drawable.Drawable\nimport androidx.activity.OnBackPres"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/picker/Grid.kt",
"chars": 7024,
"preview": "package com.qmuiteam.photo.compose.picker\n\nimport androidx.compose.animation.core.animateFloatAsState\nimport androidx.co"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/picker/PaintEdit.kt",
"chars": 4147,
"preview": "package com.qmuiteam.photo.compose.picker\n\nimport androidx.compose.foundation.clickable\nimport androidx.compose.foundati"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/picker/Preview.kt",
"chars": 6879,
"preview": "package com.qmuiteam.photo.compose.picker\n\nimport androidx.compose.foundation.background\nimport androidx.compose.foundat"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/picker/TextEdit.kt",
"chars": 17867,
"preview": "package com.qmuiteam.photo.compose.picker\n\nimport android.graphics.Typeface\nimport android.text.TextPaint\nimport android"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/compose/picker/TopBarItem.kt",
"chars": 4468,
"preview": "package com.qmuiteam.photo.compose.picker\n\nimport androidx.compose.animation.core.animateFloat\nimport androidx.compose.a"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/data/QMUIBitmapRegion.kt",
"chars": 8288,
"preview": "package com.qmuiteam.photo.data\n\nimport android.graphics.*\nimport android.graphics.drawable.Drawable\nimport android.os.B"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/data/QMUIMediaDataProvider.kt",
"chars": 7131,
"preview": "package com.qmuiteam.photo.data\n\nimport android.content.ContentUris\nimport android.content.Context\nimport android.databa"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/data/QMUIPhotoTransitionDelivery.kt",
"chars": 1582,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/data/QMUIPhotoTransitionInfo.kt",
"chars": 3581,
"preview": "/*\n * Tencent is pleased to support the open source community by making QMUI_Android available.\n *\n * Copyright (C) 2017"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/util/BitmapEx.kt",
"chars": 5272,
"preview": "package com.qmuiteam.photo.util\n\nimport android.content.Context\nimport android.graphics.Bitmap\nimport android.net.Uri\nim"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/util/QMUIPhotoHelper.kt",
"chars": 5049,
"preview": "package com.qmuiteam.photo.util\n\nimport android.content.ContentValues\nimport android.content.Context\nimport android.grap"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/util/ViewEx.kt",
"chars": 1353,
"preview": "package com.qmuiteam.photo.util\n\nimport android.content.Context\nimport android.graphics.Bitmap\nimport android.graphics.C"
},
{
"path": "photo/src/main/java/com/qmuiteam/photo/vm/QMUIPhotoPickerViewModel.kt",
"chars": 6745,
"preview": "package com.qmuiteam.photo.vm\n\nimport android.app.Application\nimport android.net.Uri\nimport androidx.annotation.Keep\nimp"
},
{
"path": "photo/src/main/res/anim/scale_enter.xml",
"chars": 1331,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "photo/src/main/res/anim/scale_exit.xml",
"chars": 1329,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Tencent is pleased to support the open source community by making QMUI_Andr"
},
{
"path": "photo/src/test/java/com/qmuiteam/ExampleUnitTest.kt",
"chars": 209,
"preview": "package com.qmuiteam\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [t"
},
{
"path": "photo-coil/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "photo-coil/build.gradle.kts",
"chars": 1040,
"preview": "import com.qmuiteam.plugin.Dep\n\nplugins {\n id(\"com.android.library\")\n kotlin(\"android\")\n `maven-publish`\n si"
},
{
"path": "photo-coil/consumer-rules.pro",
"chars": 0,
"preview": ""
},
{
"path": "photo-coil/proguard-rules.pro",
"chars": 750,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "photo-coil/src/androidTest/java/com/qmuiteam/ExampleInstrumentedTest.kt",
"chars": 656,
"preview": "package com.qmuiteam\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.runners.A"
},
{
"path": "photo-coil/src/main/AndroidManifest.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "photo-coil/src/main/java/com/qmuiteam/photo/coil/QMUICoilImageDecoderFactory.kt",
"chars": 2799,
"preview": "package com.qmuiteam.photo.coil\n\nimport android.graphics.BitmapFactory\nimport android.graphics.drawable.BitmapDrawable\ni"
},
{
"path": "photo-coil/src/main/java/com/qmuiteam/photo/coil/QMUICoilPhoto.kt",
"chars": 10399,
"preview": "package com.qmuiteam.photo.coil\n\nimport android.graphics.Bitmap\nimport android.net.Uri\nimport android.os.Bundle\nimport a"
},
{
"path": "photo-coil/src/main/java/com/qmuiteam/photo/coil/QMUIMediaCoilPhotoProviderFactory.kt",
"chars": 438,
"preview": "package com.qmuiteam.photo.coil\n\nimport com.qmuiteam.photo.data.QMUIMediaModel\nimport com.qmuiteam.photo.data.QMUIMediaP"
},
{
"path": "photo-coil/src/test/java/com/qmuiteam/ExampleUnitTest.kt",
"chars": 209,
"preview": "package com.qmuiteam\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [t"
},
{
"path": "photo-glide/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "photo-glide/build.gradle.kts",
"chars": 1087,
"preview": "import com.qmuiteam.plugin.Dep\n\nplugins {\n id(\"com.android.library\")\n kotlin(\"android\")\n kotlin(\"kapt\")\n `ma"
},
{
"path": "photo-glide/consumer-rules.pro",
"chars": 0,
"preview": ""
},
{
"path": "photo-glide/proguard-rules.pro",
"chars": 750,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "photo-glide/src/androidTest/java/com/qmuiteam/ExampleInstrumentedTest.kt",
"chars": 656,
"preview": "package com.qmuiteam\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.runners.A"
},
{
"path": "photo-glide/src/main/AndroidManifest.xml",
"chars": 160,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "photo-glide/src/main/java/com/qmuiteam/photo/glide/QMUIGlideModule.kt",
"chars": 3409,
"preview": "package com.qmuiteam.photo.glide\n\nimport android.content.Context\nimport android.graphics.BitmapFactory\nimport android.gr"
},
{
"path": "photo-glide/src/main/java/com/qmuiteam/photo/glide/QMUIGlidePhoto.kt",
"chars": 10082,
"preview": "package com.qmuiteam.photo.glide\n\nimport android.graphics.drawable.Drawable\nimport android.net.Uri\nimport android.os.Bun"
}
]
// ... and 558 more files (download for full content)
About this extraction
This page contains the full source code of the Tencent/QMUI_Android GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 758 files (4.0 MB), approximately 1.1M tokens, and a symbol index with 5382 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.