question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I target the Picker text alignment on Android?

See original GitHub issue

Hi. I’d like to justifyContent: 'flex-end' for the text inside a picker but it seems to have no affect on Android.

I’m trying to move 3 hours and Yes right justified next to the dropdown.

Thanks for any help! screenshot_20180322-093357

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

50reactions
SupriyaKalghatgicommented, Mar 27, 2018

@stokesbga I shared source code of similar use case I am sorry if you cant do this either

46reactions
SupriyaKalghatgicommented, Mar 28, 2018

As per my comment here https://github.com/GeekyAnts/NativeBase/issues/1716#issuecomment-375538617 Here is the code snippet

         <ListItem icon>
            <Left>
              <Button style={{ backgroundColor: "#4CDA64" }}>
                <Icon name="arrow-dropdown" />
              </Button>
            </Left>
            <Body>
              <Text>Pick SIM</Text>
            </Body>
            <Right>
              <Picker
                note
                iosHeader="Select Your Sim"
                iosIcon={<Icon name="ios-arrow-down-outline" />}
                mode="dropdown"
                selectedValue={this.state.selected1}
                onValueChange={this.onValueChange.bind(this)}
              >
                <Item label="TATA" value="key0" />
                <Item label="AIRTEL" value="key1" />
              </Picker>
            </Right>
          </ListItem>

Here is the screenshot for this

image

@stokesbga i hope your query is addressed appropriately

The use case is to put the picker in <Right></Right>

Read more comments on GitHub >

github_iconTop Results From Across the Web

TextAlign - Android Developers
Defines how to align text horizontally. ... Align the text on the trailing edge of the container. ... Check out Android Developers on...
Read more >
How to align text and Picker in React Native - Stack Overflow
Give equal flex for both text and picker(eg: parent have flex: 1 and give flex: 0.5 to both text and picker ). Better...
Read more >
text-align - CSS: Cascading Style Sheets - MDN Web Docs
The text-align CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box.
Read more >
Platform Controls Extensions | Grial Docs
For instance, there's a property to define the text alignment of a Picker which ... Attached properties are defined in their own class...
Read more >
Date pickers - Material Design
The picker can be started in text input mode with: xxxxxxxxxx. MaterialDatePicker. ... Typography, android:textAppearance, N/A ?attr/textAppearanceOverline ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found