Coder Social home page Coder Social logo

Comments (7)

Lesilva avatar Lesilva commented on August 18, 2024

@PrafullaKumarSahu Since you are using library-material, you should be using MaterialBetterSpinner instead of BetterSpinner.

from betterspinner.

PrafullaKumarSahu avatar PrafullaKumarSahu commented on August 18, 2024

In-convertible types : can not cast android.view.View on com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner

 MaterialBetterSpinner spinner = (MaterialBetterSpinner) findViewById(R.id.payment_methods);

Is there any problem with my XML ??

from betterspinner.

douglasjunior avatar douglasjunior commented on August 18, 2024

MaterialBetterSpinner != BetterSpinner

Your XML layout must have be:

<com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="left"
                    android:layout_weight="1"
                    android:id="@+id/payment_methods"
                    android:text="Select Payment Methods" />

from betterspinner.

PrafullaKumarSahu avatar PrafullaKumarSahu commented on August 18, 2024

Thank you for your kind response, sorry if I am doing it like a fool, but still getting same error.


dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.wdullaer:materialdatetimepicker:2.2.0'
    compile ('com.weiwangcn.betterspinner:library-material:1.1.0') {
        exclude group: 'com.android.support', module: 'appcompat-v7'
        exclude group: 'com.rengwuxian.materialedittext', module: 'library'
    }
}

MainActivity.java

import com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner;

and

 MaterialBetterSpinner spinner = (MaterialBetterSpinner) findViewById(R.id.payment_methods);

xml

  <com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="left"
                android:layout_weight="1"
                android:id="@+id/payment_methods"
                android:text="Select Payment Methods" />

from betterspinner.

douglasjunior avatar douglasjunior commented on August 18, 2024

What is "same error"?

Recompile your project and get the sample App to compare::

https://github.com/Lesilva/BetterSpinner/tree/master/app

Ps: If you are not using a different version of MaterialEditText, then you should not delete it.

compile ('com.weiwangcn.betterspinner:library-material:1.1.0') {
    exclude group: 'com.android.support', module: 'appcompat-v7'
}

from betterspinner.

PrafullaKumarSahu avatar PrafullaKumarSahu commented on August 18, 2024

After so much work, I made it work, thank you so much for your guidance, but one important thing

app:met_floatingLabel="normal"

I want to add, what shows me app is unbound, no idea how I can make it work, Can you please guide me.

from betterspinner.

PrafullaKumarSahu avatar PrafullaKumarSahu commented on August 18, 2024

Adding

  xmlns:app="http://schemas.android.com/apk/res-auto"

solved the problem, but I want it to be like your demo where you are selecting April from the spinner , that is what I am still unable to achieve .

from betterspinner.

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.