Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Make the MotionAlertDialog private. This isn't needed to be…
… protected anymore. The only reason it was protected was for when the input settings were coupled as all hell to the GameListActivity (lol). Also documented the interface method within it.
  • Loading branch information
lioncash committed Sep 7, 2013
1 parent 913853d commit cc054b9
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -208,7 +208,7 @@ public void onAttach(Activity activity)
* to be set anonymously, so the creation of an explicit class for
* providing functionality is not necessary.
*/
protected static final class MotionAlertDialog extends AlertDialog
private static final class MotionAlertDialog extends AlertDialog
{
private OnMotionEventListener motionListener;

Expand All @@ -229,6 +229,13 @@ public MotionAlertDialog(Context ctx)
*/
public interface OnMotionEventListener
{
/**
* Denotes the behavior that should happen when a motion event occurs.
*
* @param event Reference to the {@link MotionEvent} that occurred.
*
* @return true if the {@link MotionEvent} is consumed in this call; false otherwise.
*/
boolean onMotion(MotionEvent event);
}

Expand All @@ -245,7 +252,7 @@ public void setOnMotionEventListener(OnMotionEventListener listener)
@Override
public boolean dispatchKeyEvent(KeyEvent event)
{
if (this.onKeyDown(event.getKeyCode(), event))
if (onKeyDown(event.getKeyCode(), event))
return true;

return super.dispatchKeyEvent(event);
Expand Down

0 comments on commit cc054b9

Please sign in to comment.