android.widget.SimpleCursorAdapter.setDropDownViewResource()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中android.widget.SimpleCursorAdapter.setDropDownViewResource()方法的一些代码示例,展示了SimpleCursorAdapter.setDropDownViewResource()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SimpleCursorAdapter.setDropDownViewResource()方法的具体详情如下:
包路径:android.widget.SimpleCursorAdapter
类名称:SimpleCursorAdapter
方法名:setDropDownViewResource

SimpleCursorAdapter.setDropDownViewResource介绍

暂无

代码示例

代码示例来源:origin: commonsguy/cw-omnibus

SpinnerAdapter buildPhonesAdapter(Activity a) {
  String[] PROJECTION=new String[] { Contacts._ID,
                       Contacts.DISPLAY_NAME,
                       Phone.NUMBER
                      };
  String[] ARGS={String.valueOf(Phone.TYPE_MOBILE)};
  Cursor c=a.managedQuery(Phone.CONTENT_URI,
              PROJECTION, Phone.TYPE+"=?",
              ARGS, Contacts.DISPLAY_NAME);
  
  SimpleCursorAdapter adapter=new SimpleCursorAdapter(a,
                  android.R.layout.simple_spinner_item,
                  c,
                  new String[] {
                   Contacts.DISPLAY_NAME
                  },
                  new int[] {
                   android.R.id.text1
                  });
                  
  adapter.setDropDownViewResource(
      android.R.layout.simple_spinner_dropdown_item);
  
  return(adapter);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

SpinnerAdapter buildPhonesAdapter(Activity a) {
  String[] PROJECTION=new String[] {  Contacts.Phones._ID,
                    Contacts.Phones.NAME,
                    Contacts.Phones.NUMBER
                   };
  String[] ARGS={String.valueOf(Contacts.Phones.TYPE_MOBILE)};
  Cursor c=a.managedQuery(Contacts.Phones.CONTENT_URI,
              PROJECTION,
              Contacts.Phones.TYPE+"=?", ARGS,
              Contacts.Phones.NAME);
  
  SimpleCursorAdapter adapter=new SimpleCursorAdapter(a,
                  android.R.layout.simple_spinner_item,
                  c,
                  new String[] {
                   Contacts.Phones.NAME
                  },
                  new int[] {
                   android.R.id.text1
                  });
                  
  adapter.setDropDownViewResource(
      android.R.layout.simple_spinner_dropdown_item);
  
  return(adapter);
 }
}

代码示例来源:origin: dsolonenko/financisto

SimpleCursorAdapter currencyAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, currencyCursor,
    new String[]{"e_name"}, new int[]{android.R.id.text1});
currencyAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
currencySpinner.setAdapter(currencyAdapter);

相关文章