Skip to content
This repository was archived by the owner on Mar 25, 2018. It is now read-only.

Trying to add the LabelledSpinner programmatically..but did not adding to the layout.. #41

@techvedikasolutions

Description

@techvedikasolutions

This is my code..Please check and let me know how can i do this..
LabelledSpinner spinner= new LabelledSpinner(getActivity());
spinner.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT));

        spinner.setLabelText(labelName);
        spinner.setItemsArray(R.array.planets_array);
        spinner.setOnItemChosenListener(new LabelledSpinner.OnItemChosenListener() {
            @Override
            public void onItemChosen(View labelledSpinner, AdapterView<?> adapterView, View itemView, int position, long id) {
                Log.e("sas","sas");
            }

            @Override
            public void onNothingChosen(View labelledSpinner, AdapterView<?> adapterView) {

            }
        });
        ll_extraLayout.addView(spinner);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions