Constructor
# <BlockScreen />
You can use this component to display the Block screen in your custom screen.
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
pageId
|
Number |
<optional> |
Id of the app page to be used in the block screen |
screenTitle
|
String |
<optional> |
List screen title |
hideTitle
|
Boolean |
<optional> |
Use |
hideNavigationHeader
|
Boolean |
<optional> |
Use |
contentInsetTop
|
Number |
<optional> |
The amount by which the scroll view content is inset from the edges of the scroll view. |
contentOffsetY
|
Number |
<optional> |
Used to manually set the starting scroll offset. |
Example
//In custom_code/components/MyCustomScreen.js...
import React from 'react';
import BlockScreen from "@src/containers/Custom/BlockScreen";
const MyCustomScreen = (props) => {
if (!props.isFocused)
return null;
return (
<BlockScreen pageId={33}
screenTitle="Home Screen"
contentInsetTop={0}
contentOffsetY={0}
hideNavigationHeader={true}
{...props} />
)
}
export default MyCustomScreen;
//In custom_code/index.js...
...
import MyCustomScreen from "./components/MyCustomScreen";
export const applyCustomCode = externalCodeSetup => {
externalCodeSetup.navigationApi.addNavigationRoute(
"book",
"BookScreen",
MyCustomScreen,
"All"
);
externalCodeSetup.navigationApi.addNavigationRoute(
"book",
"BookScreen",
MyCustomScreen,
"Main"
);
}