Giter Club home page Giter Club logo

Comments (6)

ShawnLin013 avatar ShawnLin013 commented on May 26, 2024

Have you tried the sample app?
Default orientation should be vertical.

<com.shawnlin.numberpicker.NumberPicker
    android:id="@+id/number_picker"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

from numberpicker.

usergoodvery avatar usergoodvery commented on May 26, 2024

Hi,
I tried as per the sample code. I also tried to set it explicitly, but neither worked.

from numberpicker.

ShawnLin013 avatar ShawnLin013 commented on May 26, 2024

I tried installing the sample app on Android 7.1.1 emulator.
And it's working correctly.
Any more details or your code?

from numberpicker.

usergoodvery avatar usergoodvery commented on May 26, 2024

Hi,
I am not doing anything special really. My layout code is below, where I set the orientation explicitly.
I have not run the sample app.

I also tried to set orientation programatically:
numberPicker.setOrientation(NumberPicker.VERTICAL);

<com.shawnlin.numberpicker.NumberPicker
android:id="@+id/number_picker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
app:np_textSize="12sp"
app:np_dividerColor="#EEDDDD"
app:np_max="200"
app:np_min="0"
app:np_selectedTextColor="?attr/colorPrimaryDark"
app:np_orientation="vertical"
app:np_value="0" />

from numberpicker.

shawyunz avatar shawyunz commented on May 26, 2024

Hi Shawn,
When I tried to set programmatically, got some error:
Must be one of: LinearLayout.HORIZONTAL, LinearLayout.VERTICAL less... (Ctrl+F1)
Must be one of: NumberPicker.VERTICAL, NumberPicker.HORIZONTAL less... (Ctrl+F1)

I didn't check your codes, but I saw that NumberPicker.VERTICAL is equal to LinearLayout.HORIZONTAL.
If I used either of this, IDE warned me the other error message, but anyway I could deploy it and run it correctly.

from numberpicker.

ShawnLin013 avatar ShawnLin013 commented on May 26, 2024

Close this inactive issue for now. Please reopen this issue if are still encountering problems.

from numberpicker.

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.