QMUI_Android
Features
Global UI configuration
Only you need to modify a configuration table can be adjusted App global style, including component colors, navigation bars, dialog boxes, lists, etc. A modification takes effect globally.
Rich UI controls
Provide a rich common UI controls, such as BottomSheet, Tab, rounded ImageView, pull down to refresh, etc., easy to use and flexible, and supports custom style.
Efficient tool method
The method provides efficient tools, including device information, information screen, keyboard management, management, status bar, can solve a variety of common scenarios and greatly enhance the development efficiency.
function list
-
QMUIAnimationListView
-
The
ListView
support of the Add / Remove Item animations, support for custom animations. -
QMUIBottomSheet
- On
Dialog
the basis of re-customizedshow()
andhide()
animated when theDialog
raised and lowered at the bottom of the screen. The following two panels style:
-
List style: Use
QMUIBottomSheet.BottomListSheetBuilder
generated. - Grids type: Use
QMUIBottomSheet.BottomGridSheetBuilder
generated.
-
QMUICommonListItemView
- As a generic list
QMUIGroupListView
in the Item, also it is used alone. It supports the following styles:
-
Exhibition line character.
-
Add a line to the right of or below the caption.
- In the item appears on the right arrow or a switch or a custom View
-
QMUIDialog
- It offers a range of common dialog to solve using the system default dialog inconsistent performance on different Android version of the problem. Using different Builder to build different types of dialog boxes, which have set the title Builder and add buttons at the bottom of the function, different Builder specific role is as follows:
-
MessageDialogBuilder
: Message Type dialog Builder. It may be generated by a band title, message text, buttons, dialog. -
ConfirmMessageDialogBuilder
: Checkbox confirmation message with the frame Builder. -
EditTextDialogBuilder
: Builder dialog box with input box. -
MenuDialogBuilder
: Menu Dialog Builder. -
CheckableDialogBuilder
: Radio Type dialog Builder. MultiCheckableDialogBuilder
: Multiple choice type of dialog Builder.
7 CustomDialogBuilder
: Customize dialog content area Builder.
AutoResizeDialogBuilder
: Lift automatically adjust the height of the Dialog Builder with keyboard
-
QMUIEmptyView
-
Common air interface controls, support for display loading, the main headings and subheadings, and pictures.
-
QMUIFloatLayout
- Similarly the CSS
float: left
floating layout, from left to right child View and wrap. It supports the following features:
-
Control sub
View
vertically between / horizontal spacing. -
The control sub-
View
horizontally aligned direction (left / center / right justified). - Restricted sub-
View
number or the number of rows.
-
QMUIFontFitTextView
-
So that
TextView
in the case of a fixed width, the text character size can be reduced from the adaptation to a multi-line fit. -
QMUIGroupListView
-
General list, commonly used in App's settings interface, note its parent class is not
ListView
butLinearLayout
, it is generally withScrollView
use. Providing the concept of the Section for the block list. WithQMUIGroupListView.Section
,QMUICommonListItemView
andQMUIGroupListSectionHeaderFooterView
use. -
QMUIGroupListSectionHeaderFooterView
-
As a general list
QMUIGroupListView
in the head or the tail of each Section it can also be used alone. -
QMUIItemViewsAdapter
-
"Data -View list" with a cache function of the adapter for custom
View
needs repeating unit displayListView
scene, mainly to ensure cache function in case of need to refresh the data or multiple layout (ListView
orRecycleView
the ItemView) have been multiplexed It existsView
. QMUI forQMUITabSegment
theTab
adaptation of the data. -
QMUIKeyboardHelper
-
Provide a more convenient way for a given EditText show / hide the soft keyboard, and provides utility methods to determine whether the current keyboard visible.
-
QMUILinkTextView
- So that
TextView
can automatically identify URL, phone, email address, compared withTextView
the following characteristics:
-
You can set the style of the link.
- You can set click on the event link.
-
QMUILoadingView
-
For displaying
Loading
theView
supports color and size settings. -
QMUIObservableScrollView
-
Can listen scrolling events
ScrollView
, and to obtain an offset before and after each rolling in a rolling callback. -
QMUIPopup
-
A floating layer, support for custom content floating layer, show support for the floating layer next to either direction of the specified View, support for custom floating layer Appear / Disappear animations.
-
QMUIListPopup
-
Inherited from
QMUIPopup
, theQMUIPopup
base supports the display of a list. -
QMUIProgressBar
- A control progress bar displayed by the progress of the color change, and a rectangular annular support two forms, the main features are as follows:
-
Support show progress, support modifying the text color and size in the progress bar in text form.
-
Can
xml
attribute modification progress of the background color, the color of the current progress, the size of the progress bar. - Support maximum limit progress.
-
QMUIPullRefreshLayout
-
Pull-down refresh control. Support for custom RefreshView (represented being refreshed View), trigger characteristics refresh location.
- QMUIQQFaceView
-
It supports the display of expression pseudo
TextView
(continued Custom View, rather than trueTextView
), to achieveTextView
themaxLine
,ellipsize
,textSize
,textColor
and other basic functions. - Support and
QMUITouchableSpan
cooperation to achieve the use of clickable content.
-
QMUIQQFaceCompiler
-
QMUIQQFaceView
The content parser to parse the textQMUIQQFaceView
you want to format the data. -
IQMUIQQFaceManager
-
QMUIQQFaceView
Resource management interface, useQMUIQQFaceView
must implement this interface to provide expression resources. -
QMUIRadiusImageView
-
Provide added rounded, borders to picture, clipped to a circular shape or other features.
-
QMUIRoundButton
- To
Button
provide rounded corners, support for the following features:
-
Fillet size specified.
-
Specify the size of the fillet in different directions.
-
Specify the size of half the height of the fillet, and the fillet size following the change in height adaptation.
- Support specify a background color and border color, support the use of color or when a specified color
ColorStateList
.
-
QMUIRoundButtonDrawable
-
Using this
Drawable
can easily generate rounded rectangle / circularDrawable
, to provide a background color, stroke color and size, height and other characteristics rounded adaptive View. -
QMUISpanTouchFixTextView
- Compared
TextView
, amended two common problems:
-
Fixed
TextView
andClickableSpan
when used together, clickClickableSpan
will triggerTextView
the problem events. - Fixed
TextView
default if you addClickableSpan
later will not be able to pass a click event to theTextView
problems of the Parent.
-
QMUITabSegment
- A plurality of transverse
Tab
layout comprising a plurality of features:
-
You can use
xml
orQMUITabSegment
set the configuration method provides a unified text color, icon position, whether you want to underline. -
Each
Tab
can be very flexible configuration to support the text and icon displayed on the content, select the icon state support, support for publishing content alignment direction of settings, support for displaying red spots, insert custom supportView
, support for monitor double-click events. - By
setupWithViewPager(ViewPager)
methods andViewPager
binding.
-
QMUITipDialog
- A floating layer in the middle of the screen display, the following two styles:
-
Use
QMUITipDialog.Builder
generated, providing a style icon and a line of text, which has an icon Loading, success, failure, and other types optional. - Use
QMUITipDialog.CustomBuilder
generate, support incoming customlayoutResId
.
-
QMUITopBar
- GM's top Bar. It provides the following features:
More may refer to wiki documents
-
In the left / right button add picture / text buttons / Custom View.
- Set the title / subtitle and supports set the title / subtitle of the horizontal alignment.
-
QMUITopBarLayout
-
On
QMUITopBar
the parcel, and agents of theQMUITopBar
way. WithQMUIWindowInsetLayout
use, canQMUITopBar
support the status bar immersive interface extends to the top of the status bar. -
QMUIVerticalTextView
-
In
TextView
support vertical text basis. - QMUITouchableSpan
Inherited from - ClickableSpan
have a different background color and font color, the press and state support normal state. Recommendations with QMUISpanTouchFixTextView
or subclasses, facilitate the coordination of event delivery.
-
QMUIWindowInsetLayout
-
With immersive status bar used to coordinate the child
View
'sfitSystemWindows
. -
QMUIWrapContentListView
-
It supports highly value
wrap_content
theListView
resolve nativeListView
set the height ofwrap_content
the height of the calculation error of the bug. -
QMUIBlockSpaceSpan
-
By providing the span between paragraphs, to achieve the effect of spacing segments.
-
QMUICustomTypefaceSpan
-
By providing the span between paragraphs, to achieve the effect of spacing segments.
-
QMUICustomTypefaceSpan
-
Support for
Typeface
a way to setspan
the font, font achieve custom effects. -
QMUIAlignMiddleImageSpan
-
Inherited from
ImageSpan
, so that on this basis to achievespan
vertical centering effect. -
QMUIMarginImageSpan
-
Inherited from
QMUIMarginImageSpan
left and right on this basis supports the picture settings pitch. -
QMUITextSizeSpan
-
Support adjust the font size
span
.AbsoluteSizeSpan
The font size can be adjusted, but in English because of the different shuffling decent can not be aligned with the bottom or top aligned according to particular needs. AndQMUITextSizeSpan
you can pass more than one parameter, so that you can determine the offset value depending on the circumstances. -
QMUISticSectionLayout
- List of supported secondary structure is folded and deployed; this suspension support section header when scrolling; Support add custom list item in front sectionTop list or sectionTop
View
. More may refer to wiki documents.
Helper Classes
-
QMUIColorHelper
- Color processing tools, divided according to the function type, containing a total of the following features:
-
Set Transparency is a color.
-
The specified ratio between two color values in a color value is calculated.
- Converting the color value to a string.
-
QMUIDeviceHelper
- Get Device information tools, in accordance with the type of function to divide a total includes the following features:
-
Judgment means for the phone / tablet.
-
Determine whether the device is Meizu phone.
-
Determine whether the current system is Flyme system.
-
Determine whether the current system MIUI system.
- Determine whether the current floating window has the authority.
-
QMUIDisplayHelper
- Tools screen-related, according to the type of function to divide a total includes the following features:
-
Easy access to an
DisplayMetrics
instance. -
Acquiring screen information includes screen density, screen width and height, the height of the status bar, the ActionBar height.
-
Acquisition device hardware information, including whether there is a camera available, whether there are hardware menu, whether there is a network, SD Card is available, the country currently selected language.
-
Judgment is currently in full screen mode, controlled entry / exit full screen mode.
- dp value of px and interconversion.
- QMUIDrawableHelper
-
Fast draw a specified size, color, border image support rounded rectangular and circular shapes.
-
Bring quickly draw a dividing line or below the line of the picture.
-
Fading pictures can quickly draw a rounded.
-
The color of the current picture into another color.
-
The two images to generate a new image after the superposition.
- For a
View
generation picture shots.
-
QMUIPackageHelper
-
Provides an easy way to get the version information App, you can get the major version number, minor version number, and revision number alone.
-
QMUIResHelper
- Encapsulating a more convenient method for obtaining the current
Theme
at theAttr
value of the supportFloat
,Color
,ColorStateList
,Drawable
andDimen
typesAttr
.
-QMUISpanHelper
-
Providing such a method
QMUIMarginImageSpan
can be more convenient to use. -
QMUIStatusBarHelper
- The status bar related tools, according to the type of function to divide a total includes the following features:
-
Fast implementation immersive status bar (support 4.4 or higher
MIUI
andFlyme
, as well as other 5.0+Android
). - Quick set the status bar is black or white font icon (support 4.4 or later
MIUI
andFlyme
, version 6.0 and above otherAndroid
).
3. The method of providing a plurality of common tools, such as access to the status bar height, determines whether the current full-screen and the like.
-
QMUIViewHelper
- View tools, according to the type of function to divide a total includes the following features:
-
To
ImageView
be processed, you can be scaled pictures. -
To
View
do animation background color changes, support for multiple animation parameters. -
To
View
do retreat cinematics, supports transparency and change up and down displacement in two ways.
View providing a plurality of tools commonly used method, e.g., acquired from a ViewStub View View of the single direction provided padding, determining whether ListView has scrolled in the end portion and the like. - Providing a plurality of common
View
tools method, such asView
providing a single directionpadding
, fromViewStub
obtaining oneView
, it is determinedListView
whether the scroll in the end portion and the like.
start using
qmui
1. import library
The latest JCenter library is uploaded to the warehouse, make sure you configure the JCenter warehouse source, and then direct reference:
implementation 'com.qmuiteam:qmui:1.2.0'
So far, QMUI has been introduced into the project.
Configuration Topics
The project theme
is parent
directed QMUI.Compat
, so far, QMUI can work properly.
3. override the default performance components
You can in the project theme
used <item name="(name)">(value)</item>
to override the default performance QMUI component form. You can specify the name of the specific property, please refer to @style/QMUI.Compat
the property.
1. import library
arch library will depend qmui library, the library also need to introduce qmui
implementation com.qmuiteam:arch:0.3.1
2. Initialize the Application # onCreate in
QMUISwipeBackActivityManager.init(this);
At last
If you see here, I feel well written articles give a praise chant? If you think there need to be improved, please give me a message. Will be serious inquiry, insufficiently corrected. Thank you.