[RN] Assorted hintbox fixes

* Align hint box text to center

* Fix disappearing hint box on android
This commit is contained in:
Zoltan Bettenbuk 2018-04-04 14:50:12 +02:00 committed by Saúl Ibarra Corretgé
parent cc6e04ddf8
commit 2412239206
3 changed files with 11 additions and 2 deletions

View File

@ -51,7 +51,6 @@ export default class PagedList extends AbstractPagedList {
] }> ] }>
<ViewPagerAndroid <ViewPagerAndroid
initialPage = { DEFAULT_PAGE } initialPage = { DEFAULT_PAGE }
keyboardDismissMode = 'on-drag'
onPageSelected = { this._onPageSelected } onPageSelected = { this._onPageSelected }
peekEnabled = { true } peekEnabled = { true }
ref = { this._setPagerReference } ref = { this._setPagerReference }
@ -67,6 +66,7 @@ export default class PagedList extends AbstractPagedList {
</ViewPagerAndroid> </ViewPagerAndroid>
<View style = { styles.pageIndicatorContainer }> <View style = { styles.pageIndicatorContainer }>
<TouchableOpacity <TouchableOpacity
disabled = { disabled }
onPress = { this._onSelectPage(0) } onPress = { this._onSelectPage(0) }
style = { styles.pageIndicator } > style = { styles.pageIndicator } >
<View style = { styles.pageIndicator }> <View style = { styles.pageIndicator }>
@ -86,6 +86,7 @@ export default class PagedList extends AbstractPagedList {
</View> </View>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
disabled = { disabled }
onPress = { this._onSelectPage(1) } onPress = { this._onSelectPage(1) }
style = { styles.pageIndicator } > style = { styles.pageIndicator } >
<View style = { styles.pageIndicator }> <View style = { styles.pageIndicator }>

View File

@ -48,6 +48,7 @@ class WelcomePage extends AbstractWelcomePage {
constructor(props) { constructor(props) {
super(props); super(props);
this.state._fieldFocused = false;
this.state.hintBoxAnimation = new Animated.Value(0); this.state.hintBoxAnimation = new Animated.Value(0);
// Bind event handlers so they are only bound once per instance. // Bind event handlers so they are only bound once per instance.
@ -230,7 +231,7 @@ class WelcomePage extends AbstractWelcomePage {
return ( return (
<Animated.View style = { this._getHintBoxStyle() }> <Animated.View style = { this._getHintBoxStyle() }>
<View style = { styles.hintTextContainer } > <View style = { styles.hintTextContainer } >
<Text> <Text style = { styles.hintText }>
{ t('welcomepage.roomnameHint') } { t('welcomepage.roomnameHint') }
</Text> </Text>
</View> </View>

View File

@ -114,6 +114,13 @@ export default createStyleSheet({
paddingVertical: 2 * BoxModel.padding paddingVertical: 2 * BoxModel.padding
}, },
/**
* The text of the hint box.
*/
hintText: {
textAlign: 'center'
},
/** /**
* Container for the text on the hint box. * Container for the text on the hint box.
*/ */