本文整理了Java中android.widget.Spinner.getId()
方法的一些代码示例,展示了Spinner.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spinner.getId()
方法的具体详情如下:
包路径:android.widget.Spinner
类名称:Spinner
方法名:getId
暂无
代码示例来源:origin: stackoverflow.com
/**
* Creates a new {@link Spinner} which overlays another
* @param spinner {@link Spinner} to overlay
* @return The new {@link Spinner}
*/
private Spinner createNewSpinner(Spinner spinner){
LayoutParams spinnerParams = new LayoutParams(spinner.getWidth(), LayoutParams.WRAP_CONTENT);
spinnerParams.addRule(RelativeLayout.ALIGN_TOP, spinner.getId());
spinnerParams.addRule(RelativeLayout.ALIGN_LEFT, spinner.getId());
Spinner overlaySpinner = new Spinner(HomeActivity.this);
overlaySpinner.setLayoutParams(spinnerParams);
return overlaySpinner;
}
代码示例来源:origin: nasa-jpl/osr-android-app
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
if(spinner.getId() == R.id.spinner1)
代码示例来源:origin: stackoverflow.com
Spinner spinner = (Spinner) parent;
if(spinner.getId() == R.id.spinnerFrom){
else if(spinner.getId() == R.id.spinnerTo){
代码示例来源:origin: stackoverflow.com
if(parent.getId()==hairSpinner.getId())
type = hairTypeArray.get(position);
else
代码示例来源:origin: stackoverflow.com
if (parent.getId()==hairSpinner.getId())
type = hairTypeArray.get(position);
else
内容来源于网络,如有侵权,请联系作者删除!