private void createEditModeView(Context context){
  String[] entries=new String[10];
  for (int i=0; i < 10; i++) {
    entries[i]="item " + i;
  }
  List<String> entriesList=Arrays.asList(entries);
  mPickerUIAdapter=new PickerUIAdapter(context,R.layout.pickerui_item,entriesList,entriesList.size() / 2,true,true);
  setAdapter(mPickerUIAdapter);
  setSelection(entriesList.size() / 2);
}

private void createEditModeView ( Context context ) { String [ ] entries = new String [ 10 ] ; for ( int i = 0 ; i < 10 ; i ++ ) { entries [ i ] = "item " + i ; } List < String > entriesList = Arrays . asList ( entries ) ; mPickerUIAdapter = new PickerUIAdapter ( context , R . layout . pickerui_item , entriesList , entriesList . size ( ) / 2 , true , true ) ; setAdapter ( mPickerUIAdapter ) ; setSelection ( entriesList . size ( ) / 2 ) ; }
this method inflates the listview to be visible from preview layout . it use a mock list ( item0 , item1 , item2 . . . ) and set the center in the middle of the list with ' setselection ( . . . ) ' it only applies in preview layout .
