Giter VIP home page Giter VIP logo

Comments (4)

xuexiangjys avatar xuexiangjys commented on May 22, 2024

麻烦出问题了多看看源码,使用了自定义的适配器后就不要使用setItems方法了,那个方法使用的是默认的适配器

 /**
     * Set the dropdown items
     *
     * @param items A list of items
     * @param <T>   The item type
     */
    public <T> MaterialSpinner setItems(@NonNull List<T> items) {
        mAdapter = new MaterialSpinnerAdapter<>(getContext(), items)
                .setTextColor(mTextColor).setTextSize(getTextSize());
        setAdapterInternal(mAdapter);
        return this;
    }

你调用了setItems方法就直接覆盖了你之前设置的适配器了

from xui.

XH888 avatar XH888 commented on May 22, 2024

@xuexiangjys 要是我需要设置 wifiSpinner.setItems(WifiBean wifiBeans); 这里我显示需要取出里面的name 值显示;需要怎么做 。谢谢了

from xui.

xuexiangjys avatar xuexiangjys commented on May 22, 2024

重写你WifiBean对象的tostring方法,返回name就行了

from xui.

XH888 avatar XH888 commented on May 22, 2024

谢谢了。我也是刚刚想到。

from xui.

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.