Search in sources :

Example 26 with ArrayAdapter

use of android.widget.ArrayAdapter in project facebook-android-sdk by facebook.

the class AccountKitLoginActivity method setupSkinUIOptions.

private View setupSkinUIOptions() {
    final View skinLayout = findViewById(R.id.skin_ui_options);
    skinTintSpinner = (Spinner) skinLayout.findViewById(R.id.skin_tint_spinner);
    final List<CharSequence> tints = new ArrayList<>();
    for (SkinManager.Tint tint : SkinManager.Tint.values()) {
        tints.add(tint.toString());
    }
    final ArrayAdapter<CharSequence> skinTintAdapter = new ArrayAdapter<>(AccountKitLoginActivity.this, android.R.layout.simple_spinner_dropdown_item, tints);
    skinTintSpinner.setAdapter(skinTintAdapter);
    return skinLayout;
}
Also used : ArrayList(java.util.ArrayList) SkinManager(com.facebook.accountkit.ui.SkinManager) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) ArrayAdapter(android.widget.ArrayAdapter)

Example 27 with ArrayAdapter

use of android.widget.ArrayAdapter in project cardslib by gabrielemariotti.

the class ListViewGridAnimationsFragment method populateNavigationList.

/**
     * Populate the downDownValues to select the different animations
     */
private void populateNavigationList() {
    getActivity().getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    final String[] dropdownValues = { "Alpha", "Left", "Right", "Bottom", "Bottom right", "Scale" };
    ActionBar actionBar = getActivity().getActionBar();
    // Specify a SpinnerAdapter to populate the dropdown list.
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(actionBar.getThemedContext(), android.R.layout.simple_spinner_item, android.R.id.text1, dropdownValues);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    // Set up the dropdown list navigation in the action bar.
    actionBar.setListNavigationCallbacks(adapter, this);
}
Also used : ActionBar(android.app.ActionBar) CardGridArrayAdapter(it.gmariotti.cardslib.library.internal.CardGridArrayAdapter) ArrayAdapter(android.widget.ArrayAdapter)

Example 28 with ArrayAdapter

use of android.widget.ArrayAdapter in project WordPress-Android by wordpress-mobile.

the class StatsPublicizeFragment method updateUI.

@Override
protected void updateUI() {
    if (!isAdded()) {
        return;
    }
    if (hasPublicize()) {
        ArrayAdapter adapter = new PublicizeAdapter(getActivity(), getPublicize());
        StatsUIHelper.reloadLinearLayout(getActivity(), adapter, mList, getMaxNumberOfItemsToShowInList());
        showHideNoResultsUI(false);
    } else {
        showHideNoResultsUI(true);
    }
}
Also used : ArrayAdapter(android.widget.ArrayAdapter)

Example 29 with ArrayAdapter

use of android.widget.ArrayAdapter in project Android-skin-support by ximsfei.

the class FirstFragment method onCreateView.

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_first, null);
    view.findViewById(R.id.image_button).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(getActivity(), "Image Button", Toast.LENGTH_SHORT).show();
        }
    });
    view.findViewById(R.id.checked_text_view).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            CheckedTextView checkedTextView = (CheckedTextView) v;
            checkedTextView.toggle();
        //                checkedMap.put(position, checkedTextView.isChecked());
        }
    });
    MultiAutoCompleteTextView autoCompleteTextView = (MultiAutoCompleteTextView) view.findViewById(R.id.auto);
    String[] arr = { "aa", "aab", "aac" };
    ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, arr);
    autoCompleteTextView.setAdapter(arrayAdapter);
    autoCompleteTextView.setThreshold(1);
    autoCompleteTextView.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
    return view;
}
Also used : CheckedTextView(android.widget.CheckedTextView) MultiAutoCompleteTextView(android.widget.MultiAutoCompleteTextView) CheckedTextView(android.widget.CheckedTextView) View(android.view.View) MultiAutoCompleteTextView(android.widget.MultiAutoCompleteTextView) ArrayAdapter(android.widget.ArrayAdapter) Nullable(android.support.annotation.Nullable)

Example 30 with ArrayAdapter

use of android.widget.ArrayAdapter in project Android-skin-support by ximsfei.

the class MiddleFragment method onCreateView.

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_middle, null);
    mHorizontalBar = (ProgressBar) view.findViewById(R.id.progress_horizontal);
    mAdd = (Button) view.findViewById(R.id.add);
    mAdd.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            mHorizontalBar.setProgress(mHorizontalBar.getProgress() + 2);
        }
    });
    mSpinner = (Spinner) view.findViewById(R.id.spinner);
    final CharSequence[] entries = getResources().getStringArray(R.array.languages);
    if (entries != null) {
        final ArrayAdapter<CharSequence> adapter = new ArrayAdapter<>(getActivity(), R.layout.simple_spinner_item, entries);
        adapter.setDropDownViewResource(R.layout.simple_spinner_item);
        mSpinner.setAdapter(adapter);
    }
    return view;
}
Also used : View(android.view.View) ArrayAdapter(android.widget.ArrayAdapter) Nullable(android.support.annotation.Nullable)

Aggregations

ArrayAdapter (android.widget.ArrayAdapter)309 View (android.view.View)154 TextView (android.widget.TextView)102 ListView (android.widget.ListView)92 AdapterView (android.widget.AdapterView)89 ArrayList (java.util.ArrayList)55 Spinner (android.widget.Spinner)51 ViewGroup (android.view.ViewGroup)40 Intent (android.content.Intent)33 AutoCompleteTextView (android.widget.AutoCompleteTextView)29 Button (android.widget.Button)26 ImageView (android.widget.ImageView)26 DialogInterface (android.content.DialogInterface)23 ListAdapter (android.widget.ListAdapter)21 RecyclerView (android.support.v7.widget.RecyclerView)18 LayoutInflater (android.view.LayoutInflater)18 LinearLayout (android.widget.LinearLayout)18 Bundle (android.os.Bundle)17 OnItemClickListener (android.widget.AdapterView.OnItemClickListener)17 EditText (android.widget.EditText)15