Example usage for android.view View getId

List of usage examples for android.view View getId

Introduction

In this page you can find the example usage for android.view View getId.

Prototype

@IdRes
@ViewDebug.CapturedViewProperty
public int getId() 

Source Link

Document

Returns this view's identifier.

Usage

From source file:com.tapchatapp.android.app.ui.TapchatServiceStatusBar.java

@Override
public void onClick(View v) {
    if (v.getId() == R.id.reconnect_button) {
        mService.connect();
    }
}

From source file:com.crossword.activity.FeedbackActivity.java

@Override
public void onClick(View v) {
    switch (v.getId()) {
    case R.id.feed_send:
        final ProgressDialog progress = ProgressDialog.show(FeedbackActivity.this, "",
                getResources().getString(R.string.feedback_sending), true);
        new Thread((new Runnable() {
            @Override//w  w  w  . j  a  va2s.c om
            public void run() {
                postMessage();
                progress.dismiss();
                runOnUiThread(new Runnable() {
                    public void run() {
                        new AlertDialog.Builder(FeedbackActivity.this).setMessage(FeedbackActivity.this.error)
                                .setCancelable(false)
                                .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                                    public void onClick(DialogInterface dialog, int id) {
                                        dialog.cancel();
                                    }
                                }).create().show();
                    }
                });
            }
        })).start();
    }
}

From source file:com.vehicle.drivemehomeontime.RegisterCustomerEmployee.java

public void submitRegistration(View v) {
    switch (v.getId()) {
    case R.id.submit_button_Register_Customer_Employee:
        new RegisterAccount().execute();
        finish();//w  w w  .  ja  v  a2  s . c o  m
        break;
    }
}

From source file:id.zelory.tanipedia.activity.LoginActivity.java

@Override
public void onClick(View v) {
    switch (v.getId()) {
    case R.id.login:
        email = editEmail.getText().toString();
        password = editPass.getText().toString();
        if (email.isEmpty()) {
            Snackbar.make(v, "Mohon isi email terlebih dahulu!", Snackbar.LENGTH_LONG).show();
        } else if (password.isEmpty()) {
            Snackbar.make(v, "Mohon isi password terlebih dahulu!", Snackbar.LENGTH_LONG).show();
        } else {/* ww w . j  a v  a2 s .c o  m*/
            new Login().execute();
        }
        break;
    case R.id.register:
        startActivity(new Intent(this, RegisterActivity.class));
        break;
    }
}

From source file:com.app.swaedes.swaedes.LoginPage.java

@Override
public void onClick(View v) {
    if (v.getId() == R.id.button_signin) {
        login();/*ww w .  j av  a 2 s .c o m*/
    } else if (v.getId() == R.id.sign_up) {
        //launch activity where the user can sign up
        Intent i = new Intent(LoginPage.this, SignUpPage.class);
        startActivity(i);
    }

}

From source file:com.royclarkson.springagram.GalleryAddFragment.java

public void onClick(View view) {
    if (view.getId() == R.id.button_save) {
        new AddGalleryTask().execute(this.galleriesUrl);
    }/*w  w  w.  j  a v a2 s. com*/
}

From source file:net.dahanne.android.regalandroid.activity.Start.java

@Override
public void onClick(View v) {
    switch (v.getId()) {
    case R.id.enter_gallery_button:
        startActivity(new Intent(this, ShowAlbums.class));
        break;/*ww  w.jav a  2  s .  c o m*/
    }
}

From source file:com.liferay.tasks.activity.AddTaskActivity.java

@Override
public void onClick(View view) {
    if (view.getId() == R.id.save) {
        String title = _titleView.getText().toString();
        int status = _seekBar.getProgress() + 1;

        if (_update) {
            updateTask(_task.getId(), title, status);
        } else {//from w w  w . j a va  2 s  . c o  m
            addTask(title);
        }
    }
}

From source file:com.google.android.gms.samples.vision.barcodereader.MainActivity.java

/**
 * Called when a view has been clicked.//from w  w w . j a  v  a  2s .  c o m
 *
 * @param v The view that was clicked.
 */
@Override
public void onClick(View v) {
    if (v.getId() == R.id.read_barcode) {
        // launch barcode activity.
        Intent intent = new Intent(this, BarcodeCaptureActivity.class);
        intent.putExtra(BarcodeCaptureActivity.AutoFocus, autoFocus.isChecked());
        intent.putExtra(BarcodeCaptureActivity.UseFlash, useFlash.isChecked());

        startActivityForResult(intent, RC_BARCODE_CAPTURE);
    }

}

From source file:de.awisus.refugeeaidleipzig.views.login.FragmentAnmelden.java

@Override
public void onClick(View view) {
    if (view.getId() == R.id.btAnmelden) {
        login();/* w w w  . j  ava 2 s.  c o  m*/
    }
    if (view.getId() == R.id.btNeu) {
        dismiss();

        //            FragmentSignup fragmentSignup;
        //            fragmentSignup = FragmentSignup.newInstance(model, false);
        //            fragmentSignup.show(getActivity().getSupportFragmentManager(), "Neues Konto");

        FragmentSelectRole fragmentSelectRole;
        fragmentSelectRole = FragmentSelectRole.newInstance(model);
        fragmentSelectRole.show(getActivity().getSupportFragmentManager(), "Rolle waehlen");
    }
}