Skip to content

Commit

Permalink
Merge commit '7c0f9568eacff69637ec838b38fe497697a5ab1b' into custom
Browse files Browse the repository at this point in the history
  • Loading branch information
reyalpsirc committed Nov 14, 2017
2 parents 074e758 + 7c0f956 commit 34eb8d2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ private void createLayout() {
if (hasBackgroundColor()) {
layout.asView().setBackgroundColor(AppStyle.appStyle.screenBackgroundColor.getColor());
}
String screenBackgroundImageName = activityParams.screenParams.styleParams.screenBackgroundImageName;
if (screenBackgroundImageName != null) {
layout.asView().setBackgroundResource(this.getResources().getIdentifier(screenBackgroundImageName, "drawable", this.getPackageName()));
}
setContentView(layout.asView());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public String toString() {
public int topTabsHeight;

public Color screenBackgroundColor;
public String screenBackgroundImageName;

public boolean drawScreenAboveBottomTabs;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public StyleParams parse() {
result.topTabsHeight = getInt("topTabsHeight", getDefaultTopTabsHeight());

result.screenBackgroundColor = getColor("screenBackgroundColor", getDefaultScreenBackgroundColor());
result.screenBackgroundImageName = params.getString("screenBackgroundImageName");

result.bottomTabsInitialIndex = getInt("initialTabIndex", 0);
result.bottomTabsHidden = getBoolean("bottomTabsHidden", getDefaultBottomTabsHidden());
Expand Down
4 changes: 2 additions & 2 deletions docs/styling-the-navigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ this.props.navigator.setStyle({
navBarSubtitleFontFamily: 'font-name', // subtitle font, 'sans-serif-thin' for example
navBarSubtitleFontSize: 13, // subtitle font size
screenBackgroundColor: 'white', // Default screen color, visible before the actual react view is rendered
screenBackgroundImageName: 'ios:<name of image in Images.xcassets>, android: <name of drawable>', // Optional. default screen background image.
orientation: 'portrait' // Sets a specific orientation to a modal and all screens pushed to it. Default: 'auto'. Supported values: 'auto', 'landscape', 'portrait'
disabledButtonColor: '#ff0000' // chnaged the navigation bar button text color when disabled.
disabledButtonColor: '#ff0000' // changed the navigation bar button text color when disabled.

// iOS only
statusBarTextColorSchemeSingleScreen: 'light', // same as statusBarTextColorScheme but does NOT remember across pushes
Expand All @@ -81,7 +82,6 @@ this.props.navigator.setStyle({

disabledBackGesture: false, // default: false. Disable the back gesture (swipe gesture) in order to pop the top screen.
disabledSimultaneousGesture: true, // default: true. Disable simultaneous gesture recognition.
screenBackgroundImageName: '<name of image in Images.xcassets>', // Optional. default screen background image.
rootBackgroundImageName: '<name of image in Images.xcassets>', // Static while you transition between screens. Works best with screenBackgroundColor: 'transparent'

navBarButtonFontSize: 20, // Change font size nav bar buttons (eg. the back button) (remembered across pushes)
Expand Down
1 change: 1 addition & 0 deletions src/deprecated/platformSpecificDeprecated.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ function convertStyleParams(originalStyleObject) {
topTabsScrollable: originalStyleObject.topTabsScrollable,
topTabsHeight: originalStyleObject.topTabsHeight,
screenBackgroundColor: processColor(originalStyleObject.screenBackgroundColor),
screenBackgroundImageName: originalStyleObject.screenBackgroundImageName,

drawScreenAboveBottomTabs: !originalStyleObject.drawUnderTabBar,

Expand Down

0 comments on commit 34eb8d2

Please sign in to comment.