This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.70 KB  |  views: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ArrayAdapter<CharSequence> cuisineAdapter=ArrayAdapter.createFromResource(this,
  2.                                 R.array.cuisine, R.layout.cuisine_spinner_item);
  3.                 cuisineListView.setAdapter(cuisineAdapter);
  4.        
  5. R.array.cuisine=an array of cuisines
  6. R.layout.cuisine_spinner_item::
  7. <?xml version="1.0" encoding="UTF-8"?>
  8. <TextView xmlns:android="http://schemas.android.com/apk/res/android"
  9.     android:id="@+id/textView_cuisineview"
  10.     style="?android:attr/spinnerItemStyle"
  11.     android:layout_width="match_parent"
  12.     android:layout_height="wrap_content"
  13.     android:ellipsize="marquee"
  14.     android:singleLine="true"
  15.     android:textColor="#FFFFFF"
  16.     android:textSize="30dp" />
  17.  
  18. cuisineListView.setAdapter(cuisineAdapter);
clone this paste RAW Paste Data