Android DialogInterface.OnClickListener - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android DialogInterface.OnClickListener class.

This code example shows how to use the following methods:onClick
			 
			@Override 
			public void onClick(DialogInterface dialog, int which) {
				 
				ActionItem item = items.get(which);				
				listener.onClick(dialog, item.id);
				 
			} 
			 
		}; 
    	 
    	 
    	AlertDialog dia = new AlertDialog.Builder(act)    	
        .setAdapter(adapter, ocl)
        .create();
    	 
    	dia.setCanceledOnTouchOutside(true);
    	dia.setInverseBackgroundForced(false);
    	 
    	 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onClick
 
    @Override 
    public void onClick(DialogInterface dialog, int which)
    { 
        if (onClickListener != null)
            onClickListener.onClick(dialog, which);
    } 
 
    public void setOnClickListener(OnClickListener onClickListener)
    { 
        this.onClickListener = onClickListener;
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onClick
 
			@Override 
			public void onClick(DialogInterface dialog, int which) {
 
				if (lOnClickListener != null) {
					lOnClickListener.onClick(dialog, which);
				} else { 
					dialog.dismiss();
				} 
 
			} 
		}); 
		return builder.create();
	} 
 
	public Dialog getAlertDialog(String message) {
		return getAlertDialog(ctx.getResources().getString(R.string.ALRT_DIALOG_TITLE), message, ctx.getResources().getString(R.string.ALRT_BUTTON_OK), null);
	} 
 
	public Dialog getAlertDialog(String message, OnClickListener listener) {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onClick
    } 
 
    @Override 
    public void onClick(DialogInterface dialog, int which) {
        if (onClickListener != null) {
            onClickListener.onClick(dialog, which);
        } else { 
            onDoneListener.onFinishInputDialog(txtEmailInput.getText().toString(), txtPasswordInput.getText().toString());
            this.dismiss();
        } 
    } 
 
    @Override 
    public void onClick(View v) {
        txtEmailInput.setText("");
        txtEmailInput.requestFocus();
    } 
 
    @Override 
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onClick
 
	@Override 
	public void onClick(DialogInterface dialog, int which) {
		dismiss(); 
		if (mListener != null) {
			mListener.onClick(dialog, which);
		} 
	} 
 
	public void setClickListener(OnClickListener listener) {
		mListener = listener;
	} 
 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onClick
        } 
 
        @Override 
        public void onClick(View view) {
            mDropdown.dismiss();
            mListener.onClick(null, (Integer)view.getTag());
        } 
    } 
     
    private ListNavigationDropdown(Context context) {
        super(context);
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onClick
    public void testPreConditions() { 
        assertFalse(isFinishCalled());
    } 
 
    public void testOnClick() { 
        mListener.onClick(null, 0);
        assertTrue(isFinishCalled());
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onClick
        } 
 
        @Override 
        public void onClick(View view) {
            mDropdown.dismiss();
            mListener.onClick(null, (Integer)view.getTag());
        } 
    } 
     
    private ListNavigationDropdown(Context context) {
        super(context);
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onClick
		this.dismiss();
	} 
	 
	public void onPositiveClick(View view) {
		if (mOnPositiveListener != null) {
			mOnPositiveListener.onClick(this.getDialog(), DialogInterface.BUTTON_POSITIVE);
		} 
		 
		this.dismiss();
	} 
	 
} 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Android DialogInterface.OnClickListener Questions & Answers:

Other Android DialogInterface.OnClickListener Examples

25:	
26:	private final class CancelOnClickListener implements
27:	    DialogInterface.OnClickListener {
28:	  public void onClick(DialogInterface dialog, int which) {
29:	    Toast.makeText(getApplicationContext(), "Cancle selected, activity continues",
-
33:	
34:	private final class OkOnClickListener implements
35:	    DialogInterface.OnClickListener {
36:	  public void onClick(DialogInterface dialog, int which) {
37:	    AlertExampleActivity.this.finish();

Read More

19:	
20:					// Setting Negative "NO" Button
21:					alertDialog.setNegativeButton("NO", new DialogInterface.OnClickListener() {
22:						public void onClick(DialogInterface dialog, int which) {
23:						// User pressed No button. Write Logic Here
-
27:	
28:					// Setting Netural "Cancel" Button
29:					alertDialog.setNeutralButton("Cancel", new DialogInterface.OnClickListener() {
30:						public void onClick(DialogInterface dialog, int which) {
31:						// User pressed Cancel button. Write Logic Here

Read More

22:	 
23:	        // On pressing Settings button
24:	        alertDialog.setPositiveButton("Settings", new DialogInterface.OnClickListener() {
25:	            public void onClick(DialogInterface dialog,int which) {
26:	            	Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
-
30:	 
31:	        // on pressing cancel button
32:	        alertDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
33:	            public void onClick(DialogInterface dialog, int which) {
34:	            dialog.cancel();

Read More

11:				alert.setTitle("Error");
12:				alert.setMessage("Sorry, your device doesn't support flash light!");
13:				alert.setButton("OK", new DialogInterface.OnClickListener() {
14:					public void onClick(DialogInterface dialog, int which) {
15:						// closing the application

Read More

See Code Examples for Android DialogInterface.OnClickListener Methods: