private class FieldInformation.ButtonActions extends Object implements android.view.View.OnClickListener, android.view.View.OnTouchListener, android.widget.AdapterView.OnItemClickListener
Modifier and Type | Field and Description |
---|---|
(package private) android.content.Context |
context |
Constructor and Description |
---|
ButtonActions(android.content.Context context)
We pass and assign the context of the activity.
|
Modifier and Type | Method and Description |
---|---|
void |
onClick(android.view.View v)
Tap configuration so we can choose the color of a terrain,
the initial and final tile fo the character, and finally
the ok button to proceed with the app.
|
void |
onItemClick(android.widget.AdapterView<?> parent,
android.view.View view,
int position,
long id)
Relevant information related to the field, so it can be shown and processed.
|
boolean |
onTouch(android.view.View v,
android.view.MotionEvent event)
Detect the touch on the phone panel
|
public ButtonActions(android.content.Context context)
context
- context of the correct activity.public void onClick(android.view.View v)
onClick
in interface android.view.View.OnClickListener
v
- the corresponding with in the activity.public boolean onTouch(android.view.View v, android.view.MotionEvent event)
onTouch
in interface android.view.View.OnTouchListener
v
- The view (button, text field, etc) touched by the user.event
- The specific event in which the view is tapped.public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id)
onItemClick
in interface android.widget.AdapterView.OnItemClickListener
parent
- Adapter view.view
- tapped view.position
- position of the tapped tile.id
- id related to the view.