public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) { Xlog.e( TAG, "arg0.getId(): " + arg1.getId() + " " + R.id.WiFi_RX_Channel_Spinner + " " + R.id.WiFi_Bandwidth_Spinner); if (arg0.getId() == R.id.WiFi_RX_Channel_Spinner) { if (EMWifi.sIsInitialed) { mChannel.mChannelSelect = mChannelAdapter.getItem(arg2); EMWifi.setChannel(mChannel.getChannelFreq()); } else { showDialog(DIALOG_WIFI_ERROR); } } else if (arg0.getId() == R.id.WiFi_Bandwidth_Spinner) { mBandwidthIndex = arg2 < mBandwidth.length ? arg2 : mBandwidthIndex; if (mBandwidth[BW_INDX_ADVANCED].equals( mBandwidthSpinner.getSelectedItem().toString())) { mBandwidthIndex = BW_INDX_ADVANCED; } if (mBandwidthIndex == BW_INDX_ADVANCED) { onAdvancedBandwidthSelected(); } else { updateChannels(); findViewById(R.id.wifi_bandwidth_advanced_ll).setVisibility(View.GONE); } } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { Spinner spinner = (Spinner) parent; if (parent.getId() == R.id.listEncoders) { mSelectedEncoder = mEncodersNames[spinner.getSelectedItemPosition()]; Log.d(TAG, "onItemSelected - encoder: " + mSelectedEncoder); } else if (parent.getId() == R.id.listFiles) { mSelectedFile = mFilesNames[spinner.getSelectedItemPosition()]; Log.d(TAG, "onItemSelected - file: " + mSelectedFile); } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { Toast.makeText(parent.getContext(), "clicked!", Toast.LENGTH_LONG); Log.d("see", "clicked!"); if (parent.getId() == R.id.location_spinner) { subLoc_spinner.setVisibility(View.VISIBLE); Toast.makeText(parent.getContext(), "clicked!", Toast.LENGTH_LONG); Log.d("see", "clicked!!"); } if (parent.getId() == R.id.sublocation_spinner) { submit_btn.setEnabled(true); submit_btn.setVisibility(View.VISIBLE); Log.d("see", "clicked!!"); } }
@Override public void onItemSelected(AdapterView<?> adapter, View view, int pos, long id) { if (modifyingSpinner) { return; } Tossup t = game.currTossup(); String playerName = (String) adapter.getSelectedItem(); // team a was selected if (adapter.getId() == R.id.teamaplayerspinner) { // team a won if (t.getWinnerTeam().equals(game.getTeamA())) { Player p = t.getWinnerTeam().getPlayer(playerName); t.setWinnerPlayer(p); } // team a lost else { Player p = t.getLoserTeam().getPlayer(playerName); t.setLoserPlayer(p); } } // team b was selected else { // team b won if (t.getWinnerTeam().equals(game.getTeamB())) { Player p = t.getWinnerTeam().getPlayer(playerName); t.setWinnerPlayer(p); } // team b lost else { Player p = t.getLoserTeam().getPlayer(playerName); t.setLoserPlayer(p); } } }
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Log.i("GridView点击了: ", "position"); // toast("点击了: " + position); switch (parent.getId()) { // 点击校园通中的子项 case R.id.gv_school_class: toShopAllActivity(GridAdapter.mSchoolTexts[position], "1" + (position + 1)); break; // 点击美食区中的子项 case R.id.gv_food_class: toShopAllActivity(GridAdapter.mFoodTexts[position], "2" + (position + 1)); break; // 点击礼物区中的子项 case R.id.gv_gift_class: toShopAllActivity(GridAdapter.mGiftTexts[position], "3" + (position + 1)); break; // 点击出行区中的子项 case R.id.gv_out_class: toShopAllActivity(GridAdapter.mOutTexts[position], "4" + (position + 1)); break; default: break; } }
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { switch (parent.getId()) { case R.id.menulist: // 左边选项菜单的点击 if (!tabMenu(position)) { // 替换片段不成功直接return return; } break; case R.id.room_menu_listview: setMenuItemClick(position); break; case R.id.menu_listview: closeRoomPopUpWindow(); tabMenu(0); SPdata.writeSelectBoardRoomPosition(this, position); initParameter(position); mMenuListViewAdapter.clearEquipList(); mMenuListViewAdapter.setEquipList(mEquipList); mMenuListViewAdapter.notifyDataSetChanged(); break; default: break; } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (parent.getId() == R.id.spScaleType) { ItemSpinner item = (ItemSpinner) this.spScaleType.getSelectedItem(); ImageView.ScaleType st = (ImageView.ScaleType) item.tag; this.ivMinion2.setScaleType(st); } }
@Override public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { if (parent.getId() == R.id.apps_listview) { ((AppsAdapter) lvApps.getAdapter()).setSelectedItem(position); getActivity().invalidateOptionsMenu(); } return false; }
@Override public void onItemClick(AdapterView arg0, View v, int arg2, long arg3) { switch (arg0.getId()) { case R.id.listView2: // Log.v("Item Clicked: ", Integer.toString(arg2)); break; } }
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { switch (parent.getId()) { case R.id.lv_member: pos_member = position; adapter_member.update(pos_member); setDetail(members.get(pos_member)); break; } }
@Override public void onItemClick(AdapterView<?> l, View v, int position, long id) { if (l.getId() == R.id.photosGridView) { String clickedItem = photosGridViewContents[position]; Intent intent = new Intent(PhotoGridActivity.this, PhotoViewerActivity.class); intent.putExtra( "filename", clickedItem); // use putExtra method of Intent here for passing additional information to // PhotoViewerActivity startActivity(intent); } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { Log.d(REGISTER_ACTIVITY, "Adapter " + parent); if (parent.getId() == R.id.sp_cities) { String[] cities = this.getResources().getStringArray(R.array.cities); Toast.makeText( this, String.format("Position %s %s", position, cities[position]), Toast.LENGTH_LONG) .show(); } }
public void onItemSelected( final AdapterView<?> parent, final View view, final int position, final long id) { typesFilter.clear(); // check which spinner triggered the listener switch (parent.getId()) { // country spinner case R.id.spinner_place_types: // filterList final PlacesTypes placeType = placesTypesList[position]; typesFilter.add(placeType.toString()); break; } }
@Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { switch (arg0.getId()) { case R.id.upload_gridview: // 上传凭证图片 startPhotoViewActivity(imageAdapter.getImageUrlList(), arg2); break; default: break; } }
public void onItemClick(AdapterView paramAdapterView, View paramView, int paramInt, long paramLong) { switch (paramAdapterView.getId()) { default: return; case 2131231077: } int m = this.r; int i1 = e; if (m == i1) return; a(paramLong); }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { LinearLayout linearLayout; TextView textView; if (parent.getId() == R.id.sp_family_cast) { if (position != 0) { Religion religion = castArrayList.get(position); strCast = religion.getId(); } // Toast.makeText(thisActivity,religion.getName(),Toast.LENGTH_SHORT).show(); } else if (parent.getId() == R.id.sp_family_dharm) { if (position != 0) { Religion religion = religionArrayList.get(position); strReligion = religion.getId(); } } else if (parent.getId() == R.id.sp_street_name) { if (position != 0) { Religion religion = faliyaArrayList.get(position); strFaliyaId = religion.getId(); } } else if (parent.getId() == R.id.sp_Marital_status) { if (position != 0) { linearLayout = (LinearLayout) view; textView = (TextView) linearLayout.getChildAt(0); maritalStatus = textView.getTag().toString(); } } else if (parent.getId() == R.id.sp_aganvali) { if (position != 0) { linearLayout = (LinearLayout) view; textView = (TextView) linearLayout.getChildAt(0); aaganvadiId = textView.getTag().toString(); } } }
@Override public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) { switch (arg0.getId()) { case R.id.spinner: String temp = (String) arg0.getSelectedItem(); if (temp.equals("--선택해주십시오--")) { province = ""; } else { province = temp; } break; default: break; } }
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { if (parent.getId() == R.id.activity_republican_gridView) switch (position) { case 0: { startActivity(new Intent(this, DonaldTrump.class)); break; } default: { break; } } }
@Override public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { if (arg0.getId() == R.id.listView1) { Log.d("listview", "position" + position); switch (position) { case 0: alertDialog.dismiss(); prompt(); break; case 1: Bundle basket = new Bundle(); basket.putInt("position", pos); basket.putSerializable("abolist", abolist); Intent i = new Intent(ProviderList.this, EditBundle.class); i.putExtras(basket); startActivity(i); break; case 2: alertDialog.dismiss(); new delete().execute(); break; case 3: String provider = abolist.get(pos).getProvider(); Log.d("basket", provider); Bundle b = new Bundle(); b.putString("provider", provider); Intent intent = new Intent(ProviderList.this, Insert.class); intent.putExtras(b); startActivity(intent); } } else { Bundle basket = new Bundle(); basket.putInt("position", position); basket.putSerializable("abolist", abolist); Intent i = new Intent(ProviderList.this, EditBundle.class); i.putExtras(basket); startActivity(i); } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { if (parent.getId() == R.id.category) { mPosition = pos; } else { EntryHolder eh = (EntryHolder) parent.getTag(); int type = pos + 1; eh.mEntryItem.mType = type; eh.mValueField.setInputType(INPUT_TYPES[type]); if (type == AccountManager.EntryType.PASSWORD || type == AccountManager.EntryType.PIN) { eh.mAutoPwd.setVisibility(View.VISIBLE); } else { eh.mAutoPwd.setVisibility(View.INVISIBLE); } } }
public void onItemClick( AdapterView<?> parent, View clickedView, int position, long rowViewResourceId) { switch (parent.getId()) { case (R.id.admin_event_list_view): eventListItemClicked(position); break; case (R.id.admin_event_participants_list_view): participantItemClicked(position); break; case (R.id.admin_event_participant_classes_list_view): classItemClicked(position); break; case (R.id.admin_divisions_list_view): divisionItemClicked(position); break; } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { Log.d("debug", "onItemSelected -->> "); Map<String, String> params = new HashMap<String, String>(); switch (parent.getId()) { case R.id.spinCname: Log.d("debug", "cid -->> " + courses.get(position).get("cid")); params.put("cid", courses.get(position).get("cid")); dlg.loadClasses(params); break; case R.id.spinClname: Log.d("debug", "clid -->> " + classes.get(position).get("clid")); params.put("clid", classes.get(position).get("clid")); dlg.loadStudents(params); break; } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { switch (parent.getId()) { case R.id.intermediary_direct: if (!parent.getItemAtPosition(position).toString().equalsIgnoreCase("Select a category")) { inter = true; intermediary = parent.getItemAtPosition(position).toString(); if (intermediary.equalsIgnoreCase("Agent/Broker")) { agent.setVisibility(View.VISIBLE); } else { ag.setText(""); agent.setVisibility(View.GONE); } } break; } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { String selected = parent.getItemAtPosition(position).toString(); // Spinner Objets if (parent.getId() == R.id.objet_tech) { for (int i = 0; i < listobjet.size(); i++) { if (selected.equals(listobjet.get(i))) { String lan = Locale.getDefault().getLanguage(); if (lan.toLowerCase().equals("ar")) { objet = listobjet.get(i); if (objet.equals("تبديل")) { objet = "Remplacement"; } else if (objet.equals("تتبيت")) { objet = "Installation"; } else if (objet.equals("معاينة")) { objet = "Vérification"; } else if (objet.equals("ازالة")) { objet = "Désinstallation"; } else if (objet.equals("ازالة/تتبيت")) { objet = "Désinstallation/Réinstallation"; } } else if (lan.toLowerCase().equals("fr")) { if ("Désinstallation".equals(listobjet.get(i))) { objet = "Désinstallation"; } else if ("Désin/Réinstall".equals(listobjet.get(i))) { objet = "Désinstallation/Réinstallation"; } if ("Vérification".equals(listobjet.get(i))) { objet = "Vérification"; } else { objet = listobjet.get(i); } } Log.e(">> Objet Selected Selected", objet); break; } } } }
// Click_ITEM @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // TODO Auto-generated method stub switch (parent.getId()) { case R.id.content_frame: SundaySQL mySQL = new SundaySQL(Sunday.this); mySQL.Open(); String basket = mySQL.getPosition_data(position); mySQL.Close(); Bundle bd = new Bundle(); bd.putString("BASKET", basket); bd.putInt("BASKET_KEY", position); Intent i = new Intent(Sunday.this, SundayActivityEdit.class); i.putExtras(bd); startActivity(i); break; case R.id.left_drawer: String cheese = menu[position]; Class<?> ourClass = null; try { if (position == 0) { ourClass = Class.forName("com.example.tasktable.monday." + cheese); } else if (position == 1) { ourClass = Class.forName("com.example.tasktable.tuesday." + cheese); } else if (position == 2) { ourClass = Class.forName("com.example.tasktable.wednesday." + cheese); } else if (position == 3) { ourClass = Class.forName("com.example.tasktable.thursday." + cheese); } else if (position == 4) { ourClass = Class.forName("com.example.tasktable.friday." + cheese); } else if (position == 5) { ourClass = Class.forName("com.example.tasktable.saturday." + cheese); } else if (position == 6) { ourClass = Class.forName("com.example.tasktable.sunday." + cheese); } Intent ourIntent = new Intent(Sunday.this, ourClass); startActivity(ourIntent); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } break; } }
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { switch (parent.getId()) { case R.id.lvMenu: ((IMainIntf) getActivity()).switchPage(position, true); break; case R.id.lvExit: { switch (position) { case 0: startActivity(new Intent(getActivity(), AboutActivity.class)); break; case 1: getActivity().finish(); break; } } break; } }
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { switch (parent.getId()) { case R.id.date_spinner: daysLeft = (pos + 1) - calendar.get(Calendar.DAY_OF_MONTH); break; case R.id.month_spinner: daysLeft = daysLeft + ((pos - calendar.get(Calendar.MONTH)) * 30); break; case R.id.year_spinner: daysLeft = daysLeft + (2013 + pos - calendar.get(Calendar.YEAR)) * 365; break; default: break; } /* Toast.makeText(parent.getContext(), "SelectedId : " + String.valueOf(pos+1), Toast.LENGTH_SHORT).show(); */ }
@Override public void onItemClick(AdapterView<?> list, View view, int position, long id) { if (list.getId() == android.R.id.list) { synchronized (RaceDatabase.class) { // they've selected something from our list DBPathEntry db = (DBPathEntry) list.getItemAtPosition(position); // the filename they want is GetParentPath + cs + ".wflp" String strFilename = MakeParentPath() + db.toString() + ".wflp"; File fPicked = new File(strFilename); if (fPicked.exists()) { AlertDialog ad = new AlertDialog.Builder(this).create(); ad.setMessage( "You are about to overwrite all your recorded race sessions. Data will be lost. Make sure to back them up using the save button (right side) first."); ad.setButton(AlertDialog.BUTTON_POSITIVE, "Ok", this); ad.setButton(AlertDialog.BUTTON_NEGATIVE, "Cancel", this); m_copyThis = fPicked; m_dbWarning = ad; ad.show(); } else { Toast.makeText(this, "Could not find file " + strFilename, Toast.LENGTH_LONG).show(); } } } }
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { switch (parent.getId()) { case R.id.dobYear_sp: if (String.valueOf(itemsyear[position]) != "Year") { itemsmonth = new KeyValuePair[13]; itemsmonth[0] = new KeyValuePair(0, "Month"); itemsmonth[1] = new KeyValuePair(1, "Jan"); itemsmonth[2] = new KeyValuePair(2, "Feb"); itemsmonth[3] = new KeyValuePair(3, "Mar"); itemsmonth[4] = new KeyValuePair(4, "Apr"); itemsmonth[5] = new KeyValuePair(5, "May"); itemsmonth[6] = new KeyValuePair(6, "Jun"); itemsmonth[7] = new KeyValuePair(7, "Jul"); itemsmonth[8] = new KeyValuePair(8, "Aug"); itemsmonth[9] = new KeyValuePair(9, "Sep"); itemsmonth[10] = new KeyValuePair(10, "Oct"); itemsmonth[11] = new KeyValuePair(11, "Nov"); itemsmonth[12] = new KeyValuePair(12, "Dec"); dob_month = (Spinner) findViewById(R.id.dobMonth_sp); dataAdapter = new ArrayAdapter<KeyValuePair>( this, android.R.layout.simple_spinner_item, itemsmonth); dob_month.setAdapter(dataAdapter); dob_month.setOnItemSelectedListener(this); } case R.id.dobMonth_sp: if (String.valueOf(itemsyear[position]) != "Year" && itemsmonth[dob_month.getSelectedItemPosition()].getId() != 0) { int year = itemsyear[dob_year.getSelectedItemPosition()].getId(); int month = itemsmonth[dob_month.getSelectedItemPosition()].getId(); int days = getDaysInMonth(month, year); itemsdays = new KeyValuePair[days + 1]; itemsdays[0] = new KeyValuePair(0, "Day"); for (int i = 1; i <= days; i++) { itemsdays[i] = new KeyValuePair(i, String.valueOf(i)); } dob_day = (Spinner) findViewById(R.id.dobDay_sp); dataAdapter = new ArrayAdapter<KeyValuePair>(this, android.R.layout.simple_spinner_item, itemsdays); dob_day.setAdapter(dataAdapter); dob_day.setOnItemSelectedListener(this); } case R.id.unbornYear_sp: if (unbitemsyear[unborn_year.getSelectedItemPosition()].getValue() != "Year" && parent.getId() == R.id.unbornYear_sp) { Calendar calendar = Calendar.getInstance(); String[] montha = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; if (calendar.get(Calendar.YEAR) == unbitemsyear[position].getId()) { int currmont = calendar.get(Calendar.MONTH); unbitemsmonth = new KeyValuePair[(12 - currmont) + 1]; unbitemsmonth[0] = new KeyValuePair(0, "Month"); Log.d("ml", String.valueOf(unbitemsmonth.length) + "cm" + currmont); for (int i = 1; i < unbitemsmonth.length; i++) { unbitemsmonth[i] = new KeyValuePair(currmont + 1, montha[currmont]); currmont++; } } else { unbitemsmonth = new KeyValuePair[13]; unbitemsmonth[0] = new KeyValuePair(0, "Month"); unbitemsmonth[1] = new KeyValuePair(1, "Jan"); unbitemsmonth[2] = new KeyValuePair(2, "Feb"); unbitemsmonth[3] = new KeyValuePair(3, "Mar"); unbitemsmonth[4] = new KeyValuePair(4, "Apr"); unbitemsmonth[5] = new KeyValuePair(5, "May"); unbitemsmonth[6] = new KeyValuePair(6, "Jun"); unbitemsmonth[7] = new KeyValuePair(7, "Jul"); unbitemsmonth[8] = new KeyValuePair(8, "Aug"); unbitemsmonth[9] = new KeyValuePair(9, "Sep"); unbitemsmonth[10] = new KeyValuePair(10, "Oct"); unbitemsmonth[11] = new KeyValuePair(11, "Nov"); unbitemsmonth[12] = new KeyValuePair(12, "Dec"); } unborn_month = (Spinner) findViewById(R.id.unbornMonth_sp); dataAdapter = new ArrayAdapter<KeyValuePair>( this, android.R.layout.simple_spinner_item, unbitemsmonth); unborn_month.setAdapter(dataAdapter); unborn_month.setOnItemSelectedListener(this); } case R.id.unbornMonth_sp: if (parent.getId() == R.id.unbornMonth_sp && unbitemsyear[unborn_year.getSelectedItemPosition()].getValue() != "Year" && unbitemsmonth[unborn_month.getSelectedItemPosition()].getId() != 0) { int year = unbitemsyear[unborn_year.getSelectedItemPosition()].getId(); int month = unbitemsmonth[unborn_month.getSelectedItemPosition()].getId(); int days = getDaysInMonth(month, year); Calendar calendar = Calendar.getInstance(); int currday = calendar.get(Calendar.DAY_OF_WEEK); Log.d("aa", String.valueOf(days) + "y" + year + "m" + month); if (calendar.get(Calendar.MONTH) == month - 1) { unbitemsdays = new KeyValuePair[(days - currday) + 2]; unbitemsdays[0] = new KeyValuePair(0, "Day"); int j = currday; for (int i = 1; i < unbitemsdays.length; i++) { unbitemsdays[i] = new KeyValuePair(j, String.valueOf(j)); j++; } } else { unbitemsdays = new KeyValuePair[days + 1]; unbitemsdays[0] = new KeyValuePair(0, "Day"); for (int i = 1; i <= days; i++) { unbitemsdays[i] = new KeyValuePair(i, String.valueOf(i)); } } unborn_day = (Spinner) findViewById(R.id.unbornDay_sp); dataAdapter = new ArrayAdapter<KeyValuePair>( this, android.R.layout.simple_spinner_item, unbitemsdays); unborn_day.setAdapter(dataAdapter); unborn_day.setOnItemSelectedListener(this); } default: break; } }
public void onItemSelected( AdapterView paramAdapterView, View paramView, int paramInt, long paramLong) { int m = paramAdapterView.getId(); }