Package im.getsocial.sdk.ui
Class ViewBuilder<V extends ViewBuilder>
- java.lang.Object
-
- im.getsocial.sdk.ui.ViewBuilder<V>
-
- Type Parameters:
V
- Type of view builder to return from chain methods.
- Direct Known Subclasses:
AbstractActivitiesViewBuilder
,InvitesViewBuilder
,NotificationCenterViewBuilder
public abstract class ViewBuilder<V extends ViewBuilder> extends java.lang.Object
Base class for all GetSocial view builders.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
setCustomErrorMessageProvider(CustomErrorMessageProvider customErrorMessageProvider)
Sets a custom error message provider.V
setUiActionListener(UiActionListener uiActionListener)
Sets the UI action listener.V
setViewStateListener(ViewStateListener listener)
Sets the view state listener for the window, that will be invoked when view is opened and closed.V
setWindowTitle(java.lang.String title)
Sets the title for the window.boolean
show()
Show window on the screen.
-
-
-
Method Detail
-
setWindowTitle
public V setWindowTitle(java.lang.String title)
Sets the title for the window.- Parameters:
title
- Title for the window.- Returns:
- Instance of view builder to chain calls.
-
setViewStateListener
public V setViewStateListener(ViewStateListener listener)
Sets the view state listener for the window, that will be invoked when view is opened and closed.- Parameters:
listener
- Listener object.- Returns:
- Instance of view builder to chain calls.
-
setUiActionListener
public V setUiActionListener(UiActionListener uiActionListener)
Sets the UI action listener. It allows you to track actions done by users while using GetSocial UI. Also, you can allow or disallow users to perform some action. To perform an action, in UI action listener callUiAction.Pending.proceed()
. Without calling it, action won't be invoked. If you don't set a listener, all actions will be performed.- Parameters:
uiActionListener
- instance ofUiActionListener
.- Returns:
- Instance of view builder to chain calls.
-
setCustomErrorMessageProvider
public V setCustomErrorMessageProvider(CustomErrorMessageProvider customErrorMessageProvider)
Sets a custom error message provider.- Parameters:
customErrorMessageProvider
- instance ofCustomErrorMessageProvider
.- Returns:
- Custom error message or the received error message.
-
show
public boolean show()
Show window on the screen.- Returns:
- true if GetSocial window was shown on the screen, false otherwise.
-
-