public class

HtcAlertController

extends Object
java.lang.Object
   ↳ com.htc.app.HtcAlertController

Class Overview

A view containing controls for an Htc style AlertDialog.

Summary

Nested Classes
class HtcAlertController.AlertParams The parameters for the alert. 
Public Constructors
HtcAlertController(Context context, DialogInterface di, Window window)
Public Methods
Button getButton(int whichButton)
ListView getListView()
void installContent()
Sets content view.
boolean onKeyDown(int keyCode, KeyEvent event)
boolean onKeyUp(int keyCode, KeyEvent event)
void setButton(int whichButton, CharSequence text, DialogInterface.OnClickListener listener, Message msg)
Sets a click listener or a message to be sent when the button is clicked.
void setCustomTitle(View customTitleView)
void setIcon(Drawable icon)
void setIcon(int resId)
Sets resId to 0 if you don't want an icon.
void setInverseBackgroundForced(boolean forceInverseBackground)
void setMessage(CharSequence message)
void setTitle(CharSequence title)
void setView(View view, int viewSpacingLeft, int viewSpacingTop, int viewSpacingRight, int viewSpacingBottom)
Sets the view to display in the dialog along with the spacing around that view
void setView(View view)
Sets the view to display in the dialog.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public HtcAlertController (Context context, DialogInterface di, Window window)

Since: API Level 2.0

Public Methods

public Button getButton (int whichButton)

Since: API Level 2.0

See Also

public ListView getListView ()

Since: API Level 2.0

See Also

public void installContent ()

Since: API Level 2.0

Sets content view. We use a custom title so never request a window title

public boolean onKeyDown (int keyCode, KeyEvent event)

Since: API Level 2.0

public boolean onKeyUp (int keyCode, KeyEvent event)

Since: API Level 2.0

public void setButton (int whichButton, CharSequence text, DialogInterface.OnClickListener listener, Message msg)

Since: API Level 2.0

Sets a click listener or a message to be sent when the button is clicked. You only need to pass one of listener or msg.

Parameters
whichButton Which button, can be one of BUTTON_POSITIVE, BUTTON_NEGATIVE, or BUTTON_NEUTRAL
text The text to display in positive button.
listener The DialogInterface.OnClickListener to use.
msg The Message to be sent when clicked.

public void setCustomTitle (View customTitleView)

Since: API Level 2.0

public void setIcon (Drawable icon)

Since: API Level 2.0

public void setIcon (int resId)

Since: API Level 2.0

Sets resId to 0 if you don't want an icon.

Parameters
resId The resourceId of the drawable to use as the icon or 0 if you don't want an icon.

public void setInverseBackgroundForced (boolean forceInverseBackground)

Since: API Level 2.0

public void setMessage (CharSequence message)

Since: API Level 2.0

public void setTitle (CharSequence title)

Since: API Level 2.0

public void setView (View view, int viewSpacingLeft, int viewSpacingTop, int viewSpacingRight, int viewSpacingBottom)

Since: API Level 2.0

Sets the view to display in the dialog along with the spacing around that view

public void setView (View view)

Since: API Level 2.0

Sets the view to display in the dialog.