Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 225821c

Browse files
committed
background
1 parent f80e65f commit 225821c

File tree

7 files changed

+201
-328
lines changed

7 files changed

+201
-328
lines changed

‎ios/AwesomeProject.xcodeproj/xcshareddata/xcschemes/AwesomeProject.xcscheme

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
</TestAction>
8282
<LaunchAction
8383
buildConfiguration = "Debug"
84-
selectedDebuggerIdentifier = ""
85-
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
84+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
85+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
8686
launchStyle = "0"
8787
useCustomWorkingDirectory = "NO"
8888
ignoresPersistentStateOnLaunch = "NO"

‎package-lock.json

Lines changed: 160 additions & 310 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"react-redux": "^5.0.7",
2929
"redux": "^3.7.2",
3030
"redux-logger": "^3.0.6",
31+
"redux-saga": "^0.16.0",
3132
"redux-thunk": "^2.2.0",
3233
"teaset": "^0.5.6"
3334
},

‎src/modules/PopupDialog.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ const Button = props => (
1313
<Text style={styles.buttonTitle}>{props.title}</Text>
1414
</TouchableOpacity>
1515
);
16+
const popupDialogStyle = {overflow: 'hidden'};
1617
const PopupDialogView = props => (
17-
<PopupDialog {...props}>
18+
<PopupDialog {...props}dialogStyle={Object.assign({},popupDialogStyle,props.dialogStyle)}>
1819
{props.children}
19-
<View style={{flexDirection: 'row',position: 'absolute',bottom: 0}}>
20+
<View style={styles.dialogButtonStyle}>
2021
{props.cancelBtn && (
2122
<Button
2223
onPress={props.cancelBtn.onPress}
@@ -65,7 +66,7 @@ PopupDialog.defaultProps = {
6566
cancelBtn: null,
6667
overlayOpacity: 0.7,
6768
overlayBackgroundColor: '#000',
68-
dialogStyle: { overflow: 'hidden',backgroundColor: 'rgba(0,0,0,.3)' }
69+
dialogStyle: { backgroundColor: 'rgba(0,0,0,.3)' }
6970
};
7071
const styles = StyleSheet.create({
7172
container: {
@@ -77,6 +78,11 @@ const styles = StyleSheet.create({
7778
buttonTitle: {
7879
color: '#fff',
7980
fontSize: 16
81+
},
82+
dialogButtonStyle:{
83+
flexDirection: 'row',
84+
position: 'absolute',
85+
bottom: 0
8086
}
8187
});
8288
export default PopupDialogView;

‎src/navigators/AppWithNavigation.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component } from 'react';
22
import { StackNavigator, TabNavigator, TabBarBottom } from 'react-navigation';
3-
import Ionicons from 'react-native-vector-icons/Ionicons';
3+
import Icons from 'react-native-vector-icons/Ionicons';
44
import CardStackStyleInterpolator from 'react-navigation/src/views/CardStack/CardStackStyleInterpolator';
55
import LoginScreen from '../page/Login';
66
import RootScreen from '../page/Root';
@@ -16,23 +16,28 @@ import ECMAScript2016 from '../page/ECMAScript2016';
1616
// main
1717
import MainScreen from '../page/main';
1818

19-
const TabOptions = (title, navigation) => {
19+
const TabOptions = (title, yesFocused,noFocused,navigation) => {
2020
const { state, goBack } = navigation;
21-
const tabBarLabel = title;
22-
// const tabBarIcon = (({ focused }) => (
23-
// focused
24-
// ? <Image source={iconName} resizeMode={'stretch'} style={{ width: WH, height: WH, tintColor: UTIL.THEMEBG }} />
25-
// : <Image source={iconName} resizeMode={'stretch'} style={{ width: WH, height: WH, tintColor: '#B6B9C3' }} />
26-
// ));
21+
const tabBarLabel = title;//tintColor: '#B6B9C3'
22+
const tabBarIcon = (({ focused }) => (
23+
focused
24+
? <Icons name={yesFocused} size={28} color={'#188eee'}/>
25+
: <Icons name={noFocused} size={28} color={'#B6B9C3'} />
26+
));
27+
2728

28-
return { tabBarLabel/*tabBarIcon*/ };
29+
return { tabBarLabel,tabBarIcon };
2930
};
3031

3132
export const NavigationBar = TabNavigator(
3233
{
3334
HomeController: {
3435
screen: MainScreen,
35-
navigationOptions: ({ navigation }) => TabOptions('微门户', navigation)
36+
navigationOptions: ({ navigation }) => TabOptions('圈子', 'ios-aperture','ios-aperture-outline',navigation)
37+
},
38+
MyController: {
39+
screen: MainScreen,
40+
navigationOptions: ({ navigation }) => TabOptions('我的','ios-contact','ios-contact-outline', navigation)
3641
}
3742
},
3843
{
@@ -43,7 +48,7 @@ export const NavigationBar = TabNavigator(
4348
lazy: true,
4449
backBehavior: 'none',
4550
tabBarOptions: {
46-
activeTintColor: 'red',
51+
activeTintColor: '#188eee',
4752
inactiveTintColor: '#B6B9C3',
4853
indicatorStyle: { height: 0 },
4954
showIcon: true,

‎src/page/main/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ const customAnimationConfig = {
2727
}
2828
};
2929
export default class MainHomeScreen extends Component {
30+
static navigationOptions = ({ navigation, navigationOptions }) => {
31+
const { params } = navigation.state;
32+
return {
33+
title: params ? params.otherParam : 'MainHome',
34+
headerStyle: {
35+
backgroundColor: "#188eee"
36+
},
37+
headerRight: <View />,
38+
headerTintColor: "#fff"
39+
};
40+
};
3041
onExitLogin = () => {
3142
const resetAction = NavigationActions.reset({
3243
index: 0,
@@ -39,7 +50,7 @@ export default class MainHomeScreen extends Component {
3950
return (
4051
<View>
4152
<Text>MainHomeScreen</Text>
42-
<Button onClick={this.onExitLogin} title={'退出登录'} bgColor="#C0392C" />
53+
<Button onClick={this.onExitLogin} title={'退出登录'} bgColor="#188eee" />
4354
</View>
4455
);
4556
}

‎src/redux/actions/dialogType.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const PUBLIC_DIALOG = {
1313
width: 100,
1414
height: 100,
1515
overlayOpacity: 0,
16-
dialogStyle: { backgroundColor: 'rgba(0, 0, 0, .7)' }
16+
dialogStyle: { backgroundColor: 'rgba(0, 0, 0, .7)', }
1717
};
1818

1919
export const UPDATE_DIALOG = {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /