public class

SCChoiceDialog

extends Dialog
java.lang.Object
   ↳ android.app.Dialog
     ↳ com.c2call.sdk.pub.gui.dialog.SCChoiceDialog

Class Overview

Instances of this class are used by IDialogFactory to create simple dialogs that contains a list of choices for the user.
It's recommended to use an instance of the SCChoiceDialog.Builder class to generate a new Dilog. E.g.:

 SCChoiceDialog.Builder builder = new SCChoiceDialog.Builder(controller.getContext());

 builder.addItem(R.string.title1,
 				R.string.summary1,
 				R.drawable.picture1,
 				new MyRunnable1())

 		.addItem(R.string.title2,
 					R.string.summary2,
 					R.drawable.picture2,
 					new MyRunnable1());

 SCChoiceDialog dlg = builder.build();
 if (dlg != null) {
 	dlg.show();
 }
 

Summary

Nested Classes
class SCChoiceDialog.Builder  
[Expand]
Inherited Constants
From interface android.content.DialogInterface
Public Constructors
SCChoiceDialog(Context context, int lineLayout, ArrayList<HashMap<String, Object>> listData, List<Runnable> runnables)
Outside of the SDK you should use a SCChoiceDialog.Builder to create new SCChoiceDialogs.
SCChoiceDialog(Context context, ArrayList<HashMap<String, Object>> listData, List<Runnable> runnables)
Public Methods
boolean isCancelClicked()
Check if the cancel button was clicked to close this dialog.
void show()
void showButtonSection(boolean show)
With this method you control if the button bar containing a cancel button should be shown
Protected Methods
void onCancelClicked()
Called if the cancel button was clicked.
[Expand]
Inherited Methods
From class android.app.Dialog
From class java.lang.Object
From interface android.content.DialogInterface
From interface android.view.KeyEvent.Callback
From interface android.view.View.OnCreateContextMenuListener
From interface android.view.Window.Callback

Public Constructors

public SCChoiceDialog (Context context, int lineLayout, ArrayList<HashMap<String, Object>> listData, List<Runnable> runnables)

Outside of the SDK you should use a SCChoiceDialog.Builder to create new SCChoiceDialogs.

 SCChoiceDialog.Builder builder = new SCChoiceDialog.Builder(controller.getContext());

 builder.addItem(R.string.title1,
 				R.string.summary1,
 				R.drawable.picture1,
 				new MyRunnable1())

 		.addItem(R.string.title2,
 					R.string.summary2,
 					R.drawable.picture2,
 					new MyRunnable1());

 SCChoiceDialog dlg = builder.build();
 if (dlg != null) {
 	dlg.show();
 }
 

Parameters
context Context.
lineLayout the layout that will be inflated for each line of this dialog
listData The data to create the choice list from.
runnables A list of runnables that are linked to items (in order)

public SCChoiceDialog (Context context, ArrayList<HashMap<String, Object>> listData, List<Runnable> runnables)

Public Methods

public boolean isCancelClicked ()

Check if the cancel button was clicked to close this dialog.

Returns
  • Whether the cancel button was clicked

public void show ()

public void showButtonSection (boolean show)

With this method you control if the button bar containing a cancel button should be shown

Parameters
show Whether the button bar should be shown

Protected Methods

protected void onCancelClicked ()

Called if the cancel button was clicked.