java.lang.Object | ||
↳ | com.neomades.app.Screen | |
↳ | com.neomades.app.SplitScreen |
The SplitScreen
class is a screen that manages the presentation of
two side-by-side Screen
. You use this class to implement a
master-detail user interface for tablets devices, in which the left-side
Screen
presents a Screen
and the right-side presents details
of the selected item with another Screen
.
Important: A SplitScreen
should be the first Screen
pushed by an Application
.
The SplitScreen
has no significant actions to do. Its job is to
manager two side with two different screens. The master (left-side) screen
could update the details (right-side) screen.
A typical implementation of SplitScreen
could be:
public class MySplitScreen extends SplitScreen { public void onCreate() { // list of items setMasterScreen(MyListScreen.class); // optional : the details screen could be blank // here, we push a details screen for the first item from the master // screen setDetailsScreen(MyDetailsScreen.class, new ScreenParam().putInt("itemIndex", 0)); } }
If you use a SplitScreen
on a phone, only the Master Screen
is shown. When a Screen
is pushed by the controller inside the Master
Screen
, then the Details Screen
is pushed into the navigation
Stack. The end-user could navigate between master and details thanks to
navigation stack. To be sure having this behaviour, The main screen should
prefer using pushScreen(Class)
instead of other navigation
stack actions.
By default, both Screen
are displayed in landscape orientation but
only the detail view controller is displayed in portrait orientations. In
portrait orientations, the master view controller can be displayed in a
'popup' way from a button.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SplitScreen() |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Screen | getDetailsScreen() | ||||||||||
Screen | getMasterScreen() | ||||||||||
void |
setDetailsScreen(Class screen, ScreenParams params)
Set the Right-side panel screen with extra information.
| ||||||||||
void |
setDetailsScreen(Class screen)
Set the Right-side panel screen.
| ||||||||||
void |
setMasterScreen(Class screen)
Set the Left-side panel screen.
| ||||||||||
void |
setMasterScreen(Class screen, ScreenParams screenParams)
Set the Left-side panel screen.
| ||||||||||
void |
setMasterScreenWidth(int widthInDp)
Sets the master screen with in DP units.
| ||||||||||
void |
setSlidingMasterScreen(boolean enabled)
Sets the Master-Screen sliding enabled or not in portrait mode for
android tablets.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Set the Right-side panel screen with extra information.
screen | screen type to create into the right-side. |
---|---|
params | extra information to give to the screen |
IllegalArgumentException | if screen parameter is SplitScreen or TabScreen
or does not inherit from Screen |
---|---|
NullPointerException | if screen is null |
Set the Right-side panel screen.
screen | screen type to create into the right-side. |
---|
IllegalArgumentException | if screen parameter is SplitScreen or TabScreen
or does not inherit from Screen |
---|---|
NullPointerException | if screen is null |
Set the Left-side panel screen.
screen | screen type to create into the left-side. |
---|
IllegalArgumentException | if screen parameter is SplitScreen or TabScreen
or does not inherit from Screen |
---|---|
NullPointerException | if screen is null |
Set the Left-side panel screen.
screen | screen type to create into the left-side. |
---|---|
screenParams | parameters to push to the master screen |
IllegalArgumentException | if screen parameter is SplitScreen or TabScreen
or does not inherit from Screen |
---|---|
NullPointerException | if screen is null |
Sets the master screen with in DP units.
Only supported by Android tablets.
widthInDp | the master screen width |
---|
Sets the Master-Screen sliding enabled or not in portrait mode for android tablets.
Only supported by Android tablets.
IllegalStateException | if this method has been called outside onCreate() and
after setMasterScreen(Class) or
setDetailsScreen(Class)
|
---|