### Handle Button Click Logic Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/SmartLoadingViewGuide.md Determine the current state of SmartLoadingView to manage button click logic. Use this to start loading or reset to the initial state. ```java if (!smartLoadingView.isFinished) { //当前不时结束,状态,开启加载loading smartLoadingView.startLoading() } else { //当前结束时,再次点击回到初始状态 //kotlin使用 smartLoadingView.isFinished = false //java使用 //smartLoadingView.setFinished(false); } ``` -------------------------------- ### Add ShadowLayout Dependency Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/README218.md Add the JitPack repository to your project's build.gradle file and then add the ShadowLayout dependency to your app's build.gradle file. ```gradle allprojects { repositories { maven { url 'https://jitpack.io' } } } ``` ```gradle dependencies { implementation 'com.github.lihangleo2:ShadowLayout:2.1.8' } ``` -------------------------------- ### Basic ShadowLayout Usage Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/README218.md Use the com.lihang.ShadowLayout tag in your XML layout file. Customize shadow properties using app:hl_ attributes. ```xml ``` -------------------------------- ### ShadowLayout Selector Mode Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/README218.md Configure which states (selected, pressed, or both) the selector mode should apply to. ```xml app:hl_selectorMode="selected" ``` -------------------------------- ### Handle Network Results Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/SmartLoadingViewGuide.md Call this method to indicate the result of a network operation, either success or failure, with an optional callback. ```java //true则走成功,false则走失败 //kotlin使用 smartLoadingView.finishLoading(true) { } //java使用 smartLoadingView.finishLoading(true, success -> { }); ``` -------------------------------- ### Set Finished State Without Animation Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/SmartLoadingViewGuide.md Directly set the finished state of the SmartLoadingView without triggering any animations. Useful for immediate state changes. ```java //kotlin使用 smartLoadingView.isFinished = true //java使用 smartLoadingView.setFinished(true); ``` -------------------------------- ### ShadowLayout Custom Corner Radius Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/README218.md Individually control the corner radius for each side of the ShadowLayout. ```xml app:hl_cornerRadius_leftTop="0dp" app:hl_cornerRadius_leftBottom="0dp" app:hl_cornerRadius_rigthTop="0dp" app:hl_cornerRadius_rightBottom="0dp" ``` -------------------------------- ### ShadowLayout Clicked Background Color Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/README218.md Set different background colors for normal and clicked/selected states. The hl_shadowBackColorClicked attribute is used for the clicked state. ```xml app:hl_shadowBackColorClicked="#ff0000" ``` -------------------------------- ### ShadowLayout Symmetry Toggle Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/README218.md Control whether the layout area is symmetrical with the shadow area. Setting hl_isSym to false allows the layout area to follow the shadow area. ```xml app:hl_isSym="false" ``` -------------------------------- ### ShadowLayout Show Shadow Toggle Source: https://github.com/lihangleo2/shadowlayout/blob/master/showImages/README218.md Use this attribute to disable shadows if you only need the shape and selector functionalities. ```xml app:hl_isShowShadow="false" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.