Skip to content
This repository has been 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

Open
techvedikasolutions opened this issue Mar 30, 2017 · 0 comments

Comments

@techvedikasolutions
Copy link

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);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant