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

View File

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

View File

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