Loading...
Searching...
No Matches
com.navigine.view.widgets.FollowMeButton Class Reference

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FollowMeButton() [1/2]

com.navigine.view.widgets.FollowMeButton.FollowMeButton ( @NonNull Context context,
OnPressedListener onPressed )
inline

Initializes follow me button with a listener.

Definition at line 46 of file FollowMeButton.java.

◆ FollowMeButton() [2/2]

com.navigine.view.widgets.FollowMeButton.FollowMeButton ( @NonNull Context context,
OnPressedListener onPressed,
@Nullable FollowMeButtonConfig config )
inline

Initializes follow me button with a listener and optional config.

Definition at line 51 of file FollowMeButton.java.

Member Function Documentation

◆ applyConfig()

void com.navigine.view.widgets.FollowMeButton.applyConfig ( @Nullable FollowMeButtonConfig newConfig)
inline

Applies config at runtime. Call when config has changed.

Definition at line 106 of file FollowMeButton.java.

◆ isFollowing()

boolean com.navigine.view.widgets.FollowMeButton.isFollowing ( )
inline

Returns current following state.

Definition at line 118 of file FollowMeButton.java.

◆ onMeasure()

void com.navigine.view.widgets.FollowMeButton.onMeasure ( int widthMeasureSpec,
int heightMeasureSpec )
inlineprotected

Definition at line 175 of file FollowMeButton.java.

◆ updateAppearanceForFollowingState()

void com.navigine.view.widgets.FollowMeButton.updateAppearanceForFollowingState ( boolean isFollowing)
inline

Updates button appearance based on following state.

Definition at line 112 of file FollowMeButton.java.


The documentation for this class was generated from the following file: