Added text view to display URIs at the bottom of the file page (#116)

* Added text view to display URIs at the bottom of the file page
* added color constants
This commit is contained in:
akinwale 2018-05-10 21:18:18 +01:00 committed by GitHub
parent 3d3f1e0ff0
commit 48350ff175
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 7 deletions

View file

@ -44,6 +44,7 @@ install:
- echo $'\nd56f5187479451eabf01fb78af6dfcb131a6481e' > ~/.buildozer/android/platform/android-sdk-23/licenses/android-sdk-license - echo $'\nd56f5187479451eabf01fb78af6dfcb131a6481e' > ~/.buildozer/android/platform/android-sdk-23/licenses/android-sdk-license
script: script:
- "./release.sh | grep -Fv -e 'working:' -e 'copy' -e 'Compiling' --line-buffered" - "./release.sh | grep -Fv -e 'working:' -e 'copy' -e 'Compiling' --line-buffered"
- cp bin/*.apk /dev/null
before_deploy: before_deploy:
- cd bin - cd bin
- export BUILD_VERSION=$(cat ../src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+') - export BUILD_VERSION=$(cat ../src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+')

View file

@ -5,6 +5,7 @@ import {
Alert, Alert,
Button, Button,
Text, Text,
TextInput,
View, View,
ScrollView, ScrollView,
StatusBar, StatusBar,
@ -156,6 +157,12 @@ class FilePage extends React.PureComponent {
{channelName && <Text style={filePageStyle.channelName}>{channelName}</Text>} {channelName && <Text style={filePageStyle.channelName}>{channelName}</Text>}
{description && <Text style={filePageStyle.description}>{description}</Text>} {description && <Text style={filePageStyle.description}>{description}</Text>}
</ScrollView> </ScrollView>
<View style={filePageStyle.uriContainer}>
<TextInput style={filePageStyle.uriText}
underlineColorAndroid={'transparent'}
numberOfLines={1}
value={navigation.state.params.uri} />
</View>
</View> </View>
); );
} }

View file

@ -1,6 +1,12 @@
const Colors = { const Colors = {
LbryGreen: '#40b89a' Black: '#000000',
ChannelGrey: '#9b9b9b',
DescriptionGrey: '#999999',
LbryGreen: '#40b89a',
LightGrey: '#cccccc',
Red: '#ff0000',
VeryLightGrey: '#f1f1f1',
White: '#ffffff'
}; };
export default Colors; export default Colors;

View file

@ -1,4 +1,5 @@
import { StyleSheet, Dimensions } from 'react-native'; import { StyleSheet, Dimensions } from 'react-native';
import Colors from './colors';
const screenDimension = Dimensions.get('window'); const screenDimension = Dimensions.get('window');
const screenWidth = screenDimension.width; const screenWidth = screenDimension.width;
@ -25,7 +26,7 @@ const filePageStyle = StyleSheet.create({
}, },
scrollContainer: { scrollContainer: {
flex: 1, flex: 1,
marginTop: -20, marginTop: -16,
marginBottom: -4, marginBottom: -4,
paddingTop: 10 paddingTop: 10
}, },
@ -46,7 +47,7 @@ const filePageStyle = StyleSheet.create({
marginLeft: 20, marginLeft: 20,
marginRight: 20, marginRight: 20,
marginBottom: 20, marginBottom: 20,
color: '#9b9b9b' color: Colors.ChannelGrey
}, },
description: { description: {
fontFamily: 'Metropolis-Regular', fontFamily: 'Metropolis-Regular',
@ -54,7 +55,7 @@ const filePageStyle = StyleSheet.create({
marginLeft: 20, marginLeft: 20,
marginRight: 20, marginRight: 20,
marginBottom: 40, marginBottom: 40,
color: '#999999' color: Colors.DescriptionGrey
}, },
thumbnail: { thumbnail: {
width: screenWidth, width: screenWidth,
@ -79,7 +80,7 @@ const filePageStyle = StyleSheet.create({
right: 0, right: 0,
bottom: 0, bottom: 0,
flex: 1, flex: 1,
backgroundColor: '#000000', backgroundColor: Colors.Black,
zIndex: 100 zIndex: 100
}, },
actions: { actions: {
@ -91,12 +92,26 @@ const filePageStyle = StyleSheet.create({
width: '50%', width: '50%',
}, },
deleteButton: { deleteButton: {
backgroundColor: '#ff0000', backgroundColor: Colors.Red,
width: 80 width: 80
}, },
loading: { loading: {
position: 'absolute', position: 'absolute',
top: '40%' top: '40%'
},
uriContainer: {
padding: 8,
backgroundColor: Colors.VeryLightGrey,
alignSelf: 'flex-end'
},
uriText: {
backgroundColor: Colors.White,
borderWidth: 1,
borderColor: Colors.LightGrey,
padding: 8,
borderRadius: 4,
fontFamily: 'Metropolis-Regular',
fontSize: 16
} }
}); });