Floating “follow me” button for navigation view. Toggles following mode and updates its appearance. More...
Inherits FrameLayout.
Classes | |
| interface | OnPressedListener |
| Callback interface invoked when the button toggles state. More... | |
Public Member Functions | |
| FollowMeButton (@NonNull Context context, OnPressedListener onPressed) | |
| Initializes follow me button with a listener. | |
| FollowMeButton (@NonNull Context context, OnPressedListener onPressed, @Nullable FollowMeButtonConfig config) | |
| Initializes follow me button with a listener and optional config. | |
| void | applyConfig (@Nullable FollowMeButtonConfig newConfig) |
| Applies config at runtime. Call when config has changed. | |
| void | updateAppearanceForFollowingState (boolean isFollowing) |
| Updates button appearance based on following state. | |
| boolean | isFollowing () |
| Returns current following state. | |
Protected Member Functions | |
| void | onMeasure (int widthMeasureSpec, int heightMeasureSpec) |
Floating “follow me” button for navigation view. Toggles following mode and updates its appearance.
FollowMeButtonConfig for styling.
Definition at line 33 of file FollowMeButton.java.
|
inline |
Initializes follow me button with a listener.
Definition at line 46 of file FollowMeButton.java.
|
inline |
Initializes follow me button with a listener and optional config.
Definition at line 51 of file FollowMeButton.java.
|
inline |
Applies config at runtime. Call when config has changed.
Definition at line 106 of file FollowMeButton.java.
|
inline |
Returns current following state.
Definition at line 118 of file FollowMeButton.java.
|
inlineprotected |
Definition at line 175 of file FollowMeButton.java.
|
inline |
Updates button appearance based on following state.
Definition at line 112 of file FollowMeButton.java.