java.lang.Object | ||
↳ | com.neomades.app.Screen | |
↳ | com.neomades.app.SlideScreen |
The SlideScreen
is a screen that manages the presentation of
three side-by-side Screen
. The left
screen and the
right
screen are slideable and are hidden at the presentation of
the slide screen.
You use this class to implement a Screen
with sliding menu user
interface.
A typical implementation of SlideScreen
could be:
public class MySLideScreen extends SlideScreen { public void onCreate() { // content setMiddleScreen(MyContentScreen.class); // A sliding menu will be displayed on the left part setLeftScreen(MySlidingMenuScreen.class); } }
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SlideScreen() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
isLeftScreenOpened()
Checks if the left sliding pane is opened or not.
| ||||||||||
boolean |
isRightScreenOpened()
Checks if the right sliding pane is opened or not.
| ||||||||||
void |
setLeftScreenOpened(boolean opened)
Programmatically opens or closes the left pane.
| ||||||||||
void |
setLeftScreenWidth(int width)
Forces a width for the left pane.
| ||||||||||
void |
setLeftSlidingTouchEnabled(boolean enabled)
Activates or deactivates the opening of the left panel by dragging the
screen.
| ||||||||||
void |
setRightScreenOpened(boolean opened)
Programmatically opens or closes the right pane.
| ||||||||||
void |
setRightScreenWidth(int width)
Forces a width for the right pane.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
onLeftScreenClosed()
Called when the left screen is closed.
| ||||||||||
void |
onLeftScreenOpened()
Called when the left screen is opened.
| ||||||||||
void |
onRightScreenClosed()
Called when the right screen is closed.
| ||||||||||
void |
onRightScreenOpened()
Called when the right screen is opened.
| ||||||||||
void |
setContent(View content)
Do not use this method: to set the middle content of a
SlideScreen , use setMiddleScreen(Class) . | ||||||||||
void |
setContent(int layoutResId)
Do not use this method: to set the middle content of a
SlideScreen , use setMiddleScreen(Class) . | ||||||||||
void |
setLeftScreen(Class screen)
Sets the left sliding pane screen.
| ||||||||||
void |
setLeftScreen(Class screen, ScreenParams params)
Sets the left sliding pane screen with screen parameters.
| ||||||||||
void |
setLeftShadowEnabled(boolean enabled)
Enables or not the shadow over the middle screen when the left screen is
opened.
| ||||||||||
void |
setLeftSlidingTouchAreaWidth(int width)
Sets the area width where the SlideScreen's left screen can be dragged.
| ||||||||||
void |
setMiddleScreen(Class screen, ScreenParams params)
Sets the middle screen (main screen) of this
SlideScreen with
screen parameters. | ||||||||||
void |
setMiddleScreen(Class screen)
Sets the middle screen (main screen) of this
SlideScreen . | ||||||||||
void |
setRightContentSlidingEnabled(boolean enabled)
Enables or disables the middle content sliding effect when the right panel is
sliding.
| ||||||||||
void |
setRightScreen(Class screen)
Sets the right sliding pane screen.
| ||||||||||
void |
setRightScreen(Class screen, ScreenParams params)
Sets the right sliding pane screen with screen parameters.
| ||||||||||
void |
setRightShadowEnabled(boolean enabled)
Enables or not the shadow over the middle screen when the right screen is
opened.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Checks if the left sliding pane is opened or not.
true
if the left sliding pane is opened
Checks if the right sliding pane is opened or not.
true
if the right sliding pane is opened
Programmatically opens or closes the left pane.
opened | true to open the sliding left pane
|
---|
Forces a width for the left pane. Negative values are ignored (default width is used).
width | width in DP units
|
---|
Activates or deactivates the opening of the left panel by dragging the screen. By default it is activated.
enabled | true to enable (default value) |
---|
Programmatically opens or closes the right pane.
opened | true to open the sliding right pane
|
---|
Forces a width for the right pane. Negative values are ignored (default width is used).
width | width in DP units
|
---|
Called when the left screen is closed. Override this method to add custom actions when the left screen has just closed.
Called when the left screen is opened. Override this method to add custom actions when the left screen has just opened.
Called when the right screen is closed. Override this method to add custom actions when the right screen has just closed.
Called when the right screen is opened. Override this method to add custom actions when the right screen has just opened.
Do not use this method: to set the middle content of a
SlideScreen
, use setMiddleScreen(Class)
.
An IllegalStateException
will be thrown if this method is called for
a SlideScreen
.
content | the content of this screen |
---|
Do not use this method: to set the middle content of a
SlideScreen
, use setMiddleScreen(Class)
.
An IllegalStateException
will be thrown if this method is called for
a SlideScreen
.
layoutResId | Resources ID of the XML layout |
---|
ResourceNotFoundException |
---|
Sets the left sliding pane screen.
screen | the left screen |
---|
Sets the left sliding pane screen with screen parameters.
screen | the left screen |
---|---|
params | screen parameters for the left screen |
Enables or not the shadow over the middle screen when the left screen is
opened. By default the shadow is enabled in Android
.
enabled | true to enable (default value) |
---|
Sets the area width where the SlideScreen's left screen can be dragged.
width | the area width in dp, 0 or negative to use all the available width |
---|
Sets the middle screen (main screen) of this SlideScreen
with
screen parameters.
screen | the middle screen |
---|---|
params | screen parameters for the middle screen |
Sets the middle screen (main screen) of this SlideScreen
.
screen | the middle screen |
---|
Enables or disables the middle content sliding effect when the right panel is sliding.
If true
the middle content will be pushed from right to left by
the right panel. Otherwise, the right panel will slide over the middle
content.
In iOS, this method has no effect. The middle content sliding effect is always enabled.
enabled | true to enable middle content sliding effect
|
---|
Sets the right sliding pane screen.
screen | the right screen |
---|
Sets the right sliding pane screen with screen parameters.
screen | the right screen |
---|---|
params | screen parameters for the right screen |
Enables or not the shadow over the middle screen when the right screen is
opened. By default the shadow is enabled in Android
.
enabled | true to enable (default value) |
---|