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;
}
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);
}
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);
}
}
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;
}
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;
}
Aggregations