@@ -13,6 +13,7 @@ import {
1313
1414import delay from 'delay'
1515
16+ import Icon from 'react-native-vector-icons/Ionicons'
1617import type { StoryType } from './types'
1718import LoadingView from '../components/loading'
1819import * as c from '../components/colors'
@@ -22,6 +23,7 @@ const entities = new Entities()
2223
2324export default class NewsContainer extends React . Component {
2425 static propTypes = {
26+ name : PropTypes . string . isRequired ,
2527 navigator : PropTypes . instanceOf ( Navigator ) . isRequired ,
2628 route : PropTypes . object . isRequired ,
2729 url : PropTypes . string . isRequired ,
@@ -72,9 +74,12 @@ export default class NewsContainer extends React.Component {
7274 let snippet = entities . decode ( story . contentSnippet )
7375 return (
7476 < TouchableHighlight underlayColor = { '#ebebeb' } onPress = { ( ) => this . onPressNews ( title , story ) } >
75- < View style = { styles . rowContainer } >
76- < Text style = { styles . itemTitle } numberOfLines = { 1 } > { title } </ Text >
77- < Text style = { styles . itemPreview } numberOfLines = { 2 } > { snippet } </ Text >
77+ < View style = { [ styles . row ] } >
78+ < View style = { [ styles . rowContainer ] } >
79+ < Text style = { styles . itemTitle } numberOfLines = { 1 } > { title } </ Text >
80+ < Text style = { styles . itemPreview } numberOfLines = { 2 } > { snippet } </ Text >
81+ </ View >
82+ < Icon style = { [ styles . arrowIcon ] } name = 'ios-arrow-forward' />
7883 </ View >
7984 </ TouchableHighlight >
8085 )
@@ -85,6 +90,7 @@ export default class NewsContainer extends React.Component {
8590 id : 'NewsItemView' ,
8691 index : this . props . route . index + 1 ,
8792 title : title ,
93+ backButtonTitle : this . props . name ,
8894 props : { story} ,
8995 } )
9096 }
@@ -117,26 +123,35 @@ const styles = StyleSheet.create({
117123 paddingBottom : 50 ,
118124 backgroundColor : '#ffffff' ,
119125 } ,
120- rowContainer : {
121- marginLeft : 10 ,
126+ row : {
127+ flexDirection : 'row' ,
128+ alignItems : 'flex-start' ,
129+ borderBottomWidth : 1 ,
130+ borderBottomColor : '#ebebeb' ,
131+ marginLeft : 20 ,
122132 paddingRight : 10 ,
123133 paddingTop : 8 ,
124134 paddingBottom : 8 ,
125- borderBottomWidth : 1 ,
126- borderBottomColor : '#ebebeb' ,
135+ } ,
136+ arrowIcon : {
137+ color : c . iosText ,
138+ fontSize : 20 ,
139+ marginRight : 6 ,
140+ marginLeft : 6 ,
141+ marginTop : 0 ,
142+ } ,
143+ rowContainer : {
144+ flexDirection : 'column' ,
145+ flex : 1 ,
127146 } ,
128147 itemTitle : {
129148 color : c . black ,
130- paddingLeft : 10 ,
131- paddingRight : 10 ,
132149 paddingBottom : 3 ,
133150 fontSize : 16 ,
134151 textAlign : 'left' ,
135152 } ,
136153 itemPreview : {
137154 color : c . iosText ,
138- paddingLeft : 10 ,
139- paddingRight : 10 ,
140155 fontSize : 13 ,
141156 textAlign : 'left' ,
142157 } ,
0 commit comments