Coder Social home page Coder Social logo

Android styles about picker HOT 14 CLOSED

react-native-picker avatar react-native-picker commented on August 15, 2024 25
Android styles

from picker.

Comments (14)

Naturalclar avatar Naturalclar commented on August 15, 2024 12

🎉 This issue has been resolved in version 1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from picker.

LeonDong199509 avatar LeonDong199509 commented on August 15, 2024 8

Does anyone know how to change the popup background dynamically? I need to implement dark mode for my app, but I cannot change the background color dynamically. The method on stackoverflow above can only set a fixed background color.

from picker.

hadnet avatar hadnet commented on August 15, 2024 7

Why in hell we can't change de background color and text color of the Android picker (both dialog/dropdown prop) on RN?? Is it so difficult? This is ridiculous, seriously!
PS: I'm using Expo so I'm screwed..

from picker.

ArekChr avatar ArekChr commented on August 15, 2024 1

Does anyone know how to change the popup background dynamically? I need to implement dark mode for my app, but I cannot change the background color dynamically. The method on stackoverflow above can only set a fixed background color.

it's impossible

from picker.

jainkuniya avatar jainkuniya commented on August 15, 2024

hey @ArekChr can you please share more information, what you mean by biggest disaster and what is your expected behaviour.

from picker.

bfraiman avatar bfraiman commented on August 15, 2024

Please check this example --> https://stackoverflow.com/questions/38921492/how-to-style-the-standard-react-native-android-picker/39141949#39141949

from picker.

ArekChr avatar ArekChr commented on August 15, 2024

I mean this should be possible to do inside react component, jsx.
not like here -> https://stackoverflow.com/questions/38921492/how-to-style-the-standard-react-native-android-picker/39141949#39141949

from picker.

Biplovkumar avatar Biplovkumar commented on August 15, 2024

Does anyone know how to change the popup background dynamically? I need to implement dark mode for my app, but I cannot change the background color dynamically. The method on stackoverflow above can only set a fixed background color.

it's impossible

Plz suggest what should we do ?

from picker.

ArekChr avatar ArekChr commented on August 15, 2024

Does anyone know how to change the popup background dynamically? I need to implement dark mode for my app, but I cannot change the background color dynamically. The method on stackoverflow above can only set a fixed background color.

it's impossible

Plz suggest what should we do ?

The same behavior like on iOS. dark/light mode doesn't supported on android and can't change it dynamically

from picker.

ryanbabbly avatar ryanbabbly commented on August 15, 2024

This stackoverflow post is linked everywhere regarding this issue: https://stackoverflow.com/questions/38921492/how-to-style-the-standard-react-native-android-picker/39141949#39141949 but it doesn't work for me at all whether I import from this library or right from 'react-native'.

This is my styles.xml:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- styles for android react native picker -->
    <item name="android:spinnerStyle">@style/spinnerTextStyle</item>
    <item name="android:spinnerItemStyle">@style/spinnerTextStyle</item>
    <item name="android:spinnerDropDownItemStyle">@style/spinnerTextStyle</item>
  </style>

  <style name="spinnerTextStyle" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:fontFamily">@font/merriweather_family</item>
    <item name="android:textSize">12dp</item>
  </style>

I don't even want to do anything complicated but it doesn't work. No matter what I try.

from picker.

russeg avatar russeg commented on August 15, 2024

The same behavior like on iOS. dark/light mode doesn't supported on android and can't change it dynamically

That's right. I have to roll my own non native picker. It's not native looking already because of React Navigation.

Might as well use Flutter since it has a more consistent user interface, than my weird looking app with my native/non native components 😞

from picker.

hugotox avatar hugotox commented on August 15, 2024

any docs on this? I tried the example from https://github.com/react-native-picker/picker/pull/233/files#diff-12f76272c0ab68693fac6a6a5c943434480858eeac4ca45cec588bbda23efd46R21 but styles aren't applied

from picker.

JenilynnB avatar JenilynnB commented on August 15, 2024

I've also tried the example on both the emulator and real device and styles aren't applied on either. Any help here?

from picker.

afonsopbarros avatar afonsopbarros commented on August 15, 2024

Not working

from picker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.