Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4821798

Browse files
committed
人生电量
2 parents c937dba + 715ddc1 commit 4821798

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

android/app/src/main/res/values/styles.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<!-- Base application theme. -->
44
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
55
<!-- Customize your theme here. -->
6+
<item name="android:windowTranslucentStatus">true</item>
67
<item name="android:textColor">#000000</item>
78
</style>
89

src/lifePower/LifeGridPage.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default class LifeGridPage extends Component {
3232
this.setState({tableData:tableDataTemp});
3333
}
3434

35+
3536
render(){
3637
return (
3738
// <View style={{justifyContent:"space-around",flex:1}}>

src/lifePower/LifePowerPage.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66

77
import { HcdWaveView } from '../utils/HcdWaveView'
88

9+
910
export default class App extends Component {
1011
render() {
1112
return (
@@ -16,7 +17,9 @@ export default class App extends Component {
1617
powerPercent = {76}
1718
type="dc"
1819
style = {{backgroundColor:'#FF7800'}}></HcdWaveView>
19-
20+
21+
22+
2023
</View>
2124
)
2225
}
@@ -29,4 +32,6 @@ const styles = StyleSheet.create({
2932
alignItems: 'center',
3033
backgroundColor: '#fff',
3134
}
32-
});
35+
});
36+
37+

src/utils/HcdWaveView.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React, { Component } from 'react';
22
import {
33
View,
4-
54
} from 'react-native';
65
import {Surface,Shape,Path,LinearGradient,Text} from '@react-native-community/art';
76

7+
88
export class HcdWaveView extends Component {
99
static defaultProps = {
1010
powerPercent: 50, //0-100
@@ -142,7 +142,8 @@ export class HcdWaveView extends Component {
142142
x={this.props.surfaceHeigth / 2}
143143
y={this.props.surfaceHeigth / 2 + 10}
144144
fill="#FFFFFF"
145-
font={`12px "Helvetica Neue", "Helvetica", Arial`}>汽车当前电量</Text>
145+
146+
font={`12px "Helvetica Neue", "Helvetica", Arial`}>当前电量</Text>
146147
</Surface>
147148
</View>
148149
}

0 commit comments

Comments
 (0)