base-v*
contains common utils for Android View system.
compose-v*
contains common utils for Android Compose.
v*
contains both.
![](https://private-user-images.githubusercontent.com/24718357/257031910-3e4d5c27-35fe-40da-a1b0-592c9a5f16d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMxMjQ0MzUsIm5iZiI6MTcyMzEyNDEzNSwicGF0aCI6Ii8yNDcxODM1Ny8yNTcwMzE5MTAtM2U0ZDVjMjctMzVmZS00MGRhLWExYjAtNTkyYzlhNWYxNmQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA4VDEzMzUzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcxMmM4NTQyNGMzMjA5ZWQyNjg1ZThiNjY2NDg1MTcxZDE4MzQ2MDIwYjk0NThkOGQwM2E1YTFjOWYzMDQ2YjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8GqUSMX_WnE4JepIv20fRkkQf0g_QtizBoepXYbwq3Q)
JInsetsHelper -- Handling WindowInsets easily
Included in
base-*
, used for handling WindowInsets.
- LifeCycle aware, auto-release when activity destroyed.
- Auto handle WindowInsets.
- Auto handle SystemBar Scrim.
- Support Gesture Navigation detection.
- Support Dark Mode.
Usage:
class MyActivity: AppCompatActivity() {
private val insetsHelper = JInsetsHelper()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
lifecycle.addObserver(insetsHelper)
// init ViewBinding
// Config Inset View
insetsHelper.statusBarResponseView = binding.toolBarAttMain
insetsHelper.navBarResponseView = binding.recycleViewAttMain
}
}
JLoadingHelper -- LifeCycle aware Progress Dialog
Included in
base-*
, used to show a normal prompt.
- Support delay trigger.
- LifeCycle aware, auto-release when activity destroyed.
- Avoid duplicate, all components in the same activity share one dialog.
JAppTheme Pre-set Compose Theme
Included in
compose-*
, used for quickly handling staff related to the status bar and navigation bar.
- Include all JInsetsHelper features.
JTooltips One line of code to create Tooltips
Included in
base-*
, used for show tooltips easily.
With the extension function we can auto-calculate view position and tip stick offset
![](https://private-user-images.githubusercontent.com/24718357/275937349-dce83869-2d1e-4a0f-8188-a62a7a3d9d50.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMxMjQ0MzUsIm5iZiI6MTcyMzEyNDEzNSwicGF0aCI6Ii8yNDcxODM1Ny8yNzU5MzczNDktZGNlODM4NjktMmQxZS00YTBmLTgxODgtYTYyYTdhM2Q5ZDUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA4VDEzMzUzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUyZmY3YmNhMGFiNmM3YzI3ZTNmYWEyNGU3ZTMwZjRiMzQ5MTVmMjZkZDM3YTZlNTZmNzZmMWM4NjVhMTVmZWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.7q2VS4y5OCpaHI1-cUIg-u8bVvbJrxvv6hQYOMq7cIw)
-
JTooltipsLayout extends from FrameLayout, supporting custom material edge treatment.
attr desc tipEdge change tip stick positions, support edgeStart
,edgeTop
,edgeEnd
,edgeBottom
,edgeHorizontal
,edgeVertical
,edgeAll
tipDrawGravity change tip stick draw direction, support start
,center
,end
tipDrawOffset offset tip stick tipDrawStyle support triangle
,roundTriangle
,circle
,defaultLine
tipDrawInside whether tip stick inside or outside view tipDepth tip stick height tipWidth tip stick width shapeCornerRadius support fraction and dimension android:insetLeft as the name says android:insetTop as the name says android:insetRight as the name says android:insetBottom as the name says android:strokeColor as the name says strokeWidth as the name says android:backgroundTint as the name says android:backgroundTintMode as the name says rippleColor as the name says android:elevation as the name says android:background as the name says, but affects all the other background related attrs -
JDefaultTooltips extends JTooltipsLayout, and has a fixed inner layout, used to speed up common requirements.
It is a text followed by a divider and close icon by default, which can be customized using the following attrs.
attr desc android:text as the name says android:textColor as the name says android:textSize as the name says android:drawableStart as the name says android:drawablePadding as the name says android:src as the name says disableTailIcon hide the divider and icon
Deprecated: since GitHub Packages do not allow public access.