SHARE
TWEET

Untitled

a guest May 2nd, 2012 14 Never
  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);
RAW Paste Data
Top