List of usage examples for android.view View getId
@IdRes @ViewDebug.CapturedViewProperty public int getId()
From source file:edu.mit.mobile.android.locast.accounts.AuthenticatorActivity.java
@Override public void onClick(View v) { switch (v.getId()) { case R.id.login: handleLogin();/*from w w w .j ava 2 s. c o m*/ break; case R.id.cancel: finish(); break; case R.id.register: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.signup_url)))); break; } }
From source file:cm.aptoide.pt.webservices.login.Login.java
public void createUser(View v) { startActivityForResult(new Intent(this, CreateUser.class), CreateUser.REQUEST_CODE); Log.d("", "click " + v.getId()); }
From source file:com.zlkj.dingdangwuyou.activity.CompanyInfoActivity.java
@OnClick({ R.id.imgViBack, R.id.txtRight, R.id.imgViLicense, R.id.imgViLegalPerson, R.id.imgViLegalPersonID }) public void onClick(View view) { Intent intent = new Intent(context, ImageBrowseActivity.class); switch (view.getId()) { case R.id.imgViBack: finish();//www.j a va2 s . co m break; case R.id.txtRight: saveCompanyInfo(); break; case R.id.imgViLicense: choosePosition = 1; showAvatarOption(); break; case R.id.imgViLegalPerson: choosePosition = 2; showAvatarOption(); break; case R.id.imgViLegalPersonID: choosePosition = 3; showAvatarOption(); break; default: break; } }
From source file:com.campusconnect.GoogleSignInActivity.java
@Override public void onClick(View v) { switch (v.getId()) { case R.id.sign_in_button: signIn();/*from ww w. j a v a2 s . co m*/ break; case R.id.sign_out_button: signOut(); break; case R.id.disconnect_button: revokeAccess(); break; } }
From source file:org.elasticdroid.SshConnectorView.java
@Override public void onClick(View button) { switch (button.getId()) { case R.id.sshConnectorLoginButton: EditText usernameEditText = (EditText) findViewById(R.id.sshConnectorUsernameEditTextView); //if no user name entered, do not proceed; warn user and exit if (usernameEditText.getText().toString().trim().equals("")) { usernameEditText.setError(getString(R.string.loginview_invalid_username_err)); } else {/* w w w . j av a 2 s . co m*/ executeSshConnectorModel();//execute the SSH connector model } break; } }
From source file:com.iss.android.wearable.datalayer.MainActivity.java
public void onClicked(View view) { switch (view.getId()) { case R.id.morningHR: if (SensorsDataService.itself != null) { if (!SensorsDataService.isNowASleepingHour()) SensorsDataService.itself.SwitchSportsAction("MorningHR"); }/*w w w .ja va 2s . c o m*/ break; case R.id.trainingHR: if (SensorsDataService.itself != null) { SensorsDataService.itself.SwitchSportsAction("TrainingHR"); } break; case R.id.startCooldown: if (SensorsDataService.itself != null) { SensorsDataService.itself.SwitchSportsAction("Cooldown"); } break; case R.id.continueCooldown: if (SensorsDataService.itself != null) { SensorsDataService.itself.SwitchSportsAction("Recovery"); } break; case R.id.eveningHR: if (SensorsDataService.itself != null) { if (SensorsDataService.isNowASleepingHour()) SensorsDataService.itself.SwitchSportsAction("EveningHR"); } break; case R.id.searchForHRM: try { final Intent bluetoothSelector = new Intent(this, DeviceScanActivity.class); startActivity(bluetoothSelector); } catch (Exception ex) { Log.e(TAG, ex.toString()); } break; default: Log.e(TAG, "Unknown click event registered"); } showCurrentAppState(); }
From source file:li.barter.fragments.SelectPreferredLocationFragment.java
@Override public void onClick(View v) { switch (v.getId()) { case R.id.text_add_manually: { showAddLocationDialog();/*from w w w . j av a2 s .co m*/ break; } case R.id.text_try_again: { fetchVenuesForLocation(DeviceInfo.INSTANCE.getLatestLocation(), SEARCH_RADIUS_IN_METERS); break; } case R.id.overlay: { removeOverlay(); break; } default: break; } }
From source file:ac.robinson.mediaphone.activity.TemplateBrowserActivity.java
public void handleButtonClicks(View currentButton) { if (!verifyButtonClick(currentButton)) { return;// w w w . j a v a 2s . co m } switch (currentButton.getId()) { case R.id.button_finished_templates: onBackPressed(); break; } }
From source file:com.arantius.tivocommander.NowShowing.java
public void onClickRemote(View v) { MindRpc.addRequest(Remote.viewIdToEvent(v.getId()), null); }
From source file:com.z.stproperty.PropertyDetailFragment.java
/** * onClick :: OnClickListener/*from w ww . j av a2 s.c om*/ * * Is common on-click listener for all the buttons and images in home screen * This is grouped into single listener to make easier to alter the code and reduce the * line of code. * * This will check the View ID to match with the predefined View-ID to identify * which view is clicked * * Based on the view id this will perform different functionalities */ private void performClickAction(View v) { try { switch (v.getId()) { case R.id.LoanCalculator: Intent calIntent = new Intent(getActivity(), LoanCalculator.class); calIntent.putExtra("price", price); startActivity(calIntent); break; case R.id.AgentMobile: String url = "tel:" + mobileNoStr; url = url.replace("+65-", ""); Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse(url)); startActivity(callIntent); break; case R.id.SendEmailBtn: String text = "I'm interested in your property advertised on STProperty\n\n" + "PROPERTY TITLE:" + title + "\n" + "PRICE:" + price + "\n\nClick on the following link to view more details about the property\n\n" + prurl; Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("plain/text"); intent.putExtra(Intent.EXTRA_EMAIL, new String[] { agentEmail }); intent.putExtra(Intent.EXTRA_SUBJECT, "Enquiry"); intent.putExtra(Intent.EXTRA_TEXT, text); SharedFunction.postAnalytics(PropertyDetailFragment.this.getActivity(), "Lead", "Successful Email Enquiry", title); startActivity(Intent.createChooser(intent, "")); break; /**case R.id.SendEnquiryBtn: Intent enqInt = new Intent(getActivity(), SaleEnquiry.class); enqInt.putExtra("propertyId", detailsJson.getString("id")); enqInt.putExtra("agentId", detailsJson.getJSONObject("seller_info").getString("agent_cea_reg_no")); startActivity(enqInt); break;*/ default: break; } } catch (Exception e) { Log.e(this.getClass().getSimpleName(), e.getLocalizedMessage(), e); } }