Merge pull request #5339 from mahdihijazi/fix_edit_controls_layout
[Android] Fix edit controls layout
This commit is contained in:
commit
721695435a
|
@ -468,7 +468,11 @@ public final class EmulationActivity extends AppCompatActivity
|
|||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item)
|
||||
{
|
||||
handleMenuAction(buttonsActionsMap.get(item.getItemId()));
|
||||
int action = buttonsActionsMap.get(item.getItemId(), -1);
|
||||
if (action >= 0)
|
||||
{
|
||||
handleMenuAction(action);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,10 @@ public final class LoadStateFragment extends Fragment implements View.OnClickLis
|
|||
@Override
|
||||
public void onClick(View button)
|
||||
{
|
||||
((EmulationActivity) getActivity()).handleMenuAction(buttonsActionsMap.get(button.getId()));
|
||||
int action = buttonsActionsMap.get(button.getId(), -1);
|
||||
if (action >= 0)
|
||||
{
|
||||
((EmulationActivity) getActivity()).handleMenuAction(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,11 @@ public final class MenuFragment extends Fragment implements View.OnClickListener
|
|||
@Override
|
||||
public void onClick(View button)
|
||||
{
|
||||
((EmulationActivity) getActivity()).handleMenuAction(buttonsActionsMap.get(button.getId()));
|
||||
int action = buttonsActionsMap.get(button.getId());
|
||||
if (action >= 0)
|
||||
{
|
||||
((EmulationActivity) getActivity()).handleMenuAction(action);
|
||||
}
|
||||
}
|
||||
|
||||
public void setTitleText(String title)
|
||||
|
|
|
@ -62,6 +62,10 @@ public final class SaveStateFragment extends Fragment implements View.OnClickLis
|
|||
@Override
|
||||
public void onClick(View button)
|
||||
{
|
||||
((EmulationActivity) getActivity()).handleMenuAction(buttonsActionsMap.get(button.getId()));
|
||||
int action = buttonsActionsMap.get(button.getId(), -1);
|
||||
if (action >= 0)
|
||||
{
|
||||
((EmulationActivity) getActivity()).handleMenuAction(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue