preface

If you’re an Android developer hearing about this library for the first time, you’ll find it terrifying when you learn about AndroidUtilCode.

The updated content of the last version I only put in my planet, this time I also share with you: collection of three Musketeers tool class, if you want to get the latest content in the first time, you can join my knowledge planet oh.

The new version of the updated things or more, specifically including the following:

  • Overall Demo code and interface optimization;
  • New UiMessageUtils;
  • New NotificationUtils;
  • New ShadowUtils;
  • New TouchUtils;
  • Added the ClickUtils Pressed BG dimming effect;
  • Api-plugin upgraded to 1.2;
  • Bus-plugin upgraded to 2.4;
  • AucFrame for Gradle 6.0

Below I only need to carry on a simple introduction, specific want to understand the best to experience Demo and read the source code.

Overall Demo code and interface optimization

The Demo version 1.26.0 can be downloaded in 1.26.0 Release, and its interface looks like this:

In the UI is not stronger than before, but the code is much better than before, before is by inserting a Button in the layout, now has been changed to a RV to go all over the world. About this project, I recommend you to pull down the source code to read, whether AucFrame, base and common source code, Demo implementation…… There is a lot of template code for you to copy.

UI message correlation -> UiMessageUtils

Send: sends a message. AddListener: adds a message listener. RemoveListener: removes a message listenerCopy the code

This class is through the Handler implementation of the main thread message communication, can be used instead of local broadcast, efficiency is also more efficient, used to pass messages between pages is more suitable.

Notification related -> NotificationUtils

AreNotificationsEnabled: determine whether or not notice of any available notify: send a notice to cancel: cancellation cancelAll: cancel all notice setNotificationBarVisibility: Sets whether the notification bar is visibleCopy the code

This class is also a long time, to satisfy you, I still took a little effort to finish.

ShadowUtils

A does not increase the level, only on the basis of its background can be set arbitrary color shadow tool class, the entire View size needs to take into account the shadow oh!

TouchUtils

A tool class that allows you to quickly implement one-finger gestures.

Click Related -> Clickutils.java

ApplyPressedViewScale: applyPressedViewAlpha: applyPressedBgAlpha: applyPressedViewScale: applyPressedViewAlpha: applyPressedBgAlpha: ApplyPressedBgDark: applyPressedBgDark: applySingleDebouncing: Applies to the single view Click applyGlobalDebouncing: For all Settings GlobalDebouncing view application if you click ClickUtils# OnDebouncingClickListener: if you click listener ClickUtils# OnMultiClickListener: continuous click listenerCopy the code

It’s so sweet of me to meet the click needs of everyday use.

The last word

This is a lot of introduction is a brushstroke, mainly want to recommend you to read the source code, for fear that you wasted such a good opportunity, I said to this, no longer look at the source of the loss is really you oh.

A little commercial

Welcome to my little column “You’re so beautiful”.