Authored by 孙凯

添加indexListView 搜索图标资源 review by zhanglixia

@@ -23,7 +23,7 @@ export default class IndexListView extends React.Component { @@ -23,7 +23,7 @@ export default class IndexListView extends React.Component {
23 23
24 onTouchMove(e) { 24 onTouchMove(e) {
25 let {dataSource} = this.props; 25 let {dataSource} = this.props;
26 - let Y = e.nativeEvent.pageY - Math.ceil((viewHeight - dataSource.length * (itemHeight+2))/2); 26 + let Y = e.nativeEvent.pageY - Math.ceil((viewHeight - dataSource.length * (itemHeight+2))/2) - 8;
27 var index = Math.ceil(Y/(itemHeight+2))-1; 27 var index = Math.ceil(Y/(itemHeight+2))-1;
28 let sectionID = dataSource[index] 28 let sectionID = dataSource[index]
29 this.props.onLetterPress && this.props.onLetterPress(index,sectionID); 29 this.props.onLetterPress && this.props.onLetterPress(index,sectionID);
@@ -36,6 +36,8 @@ export default class IndexListView extends React.Component { @@ -36,6 +36,8 @@ export default class IndexListView extends React.Component {
36 return null; 36 return null;
37 } 37 }
38 let keyData = []; 38 let keyData = [];
  39 +
  40 + keyData.push(<Image style={styles.image} source={require('../../images/search.png')}/>);
39 for (var i = 0; i < dataSource.length; i++) { 41 for (var i = 0; i < dataSource.length; i++) {
40 let name = dataSource[i]; 42 let name = dataSource[i];
41 if (name == '0-9') { 43 if (name == '0-9') {
@@ -62,7 +64,7 @@ let styles = StyleSheet.create({ @@ -62,7 +64,7 @@ let styles = StyleSheet.create({
62 width: 10, 64 width: 10,
63 height: viewHeight, 65 height: viewHeight,
64 bottom : 1, 66 bottom : 1,
65 - right: 1, 67 + right: 2,
66 backgroundColor: 'rgba(255,255,255,0.2)', 68 backgroundColor: 'rgba(255,255,255,0.2)',
67 justifyContent: 'center', 69 justifyContent: 'center',
68 }, 70 },
@@ -71,8 +73,11 @@ let styles = StyleSheet.create({ @@ -71,8 +73,11 @@ let styles = StyleSheet.create({
71 textAlign: 'center', 73 textAlign: 'center',
72 fontSize: 10, 74 fontSize: 10,
73 color: 'black', 75 color: 'black',
74 - fontWeight: 'bold',  
75 backgroundColor: 'transparent', 76 backgroundColor: 'transparent',
76 marginTop: 2, 77 marginTop: 2,
77 - } 78 + },
  79 + image: {
  80 + width: 8,
  81 + height: 8,
  82 + },
78 }); 83 });