Update the label to prevent attempting to continue mapping

This commit is contained in:
TwistedUmbrella 2014-02-23 18:43:38 -05:00
parent a2b8aba035
commit d53fb51d25
2 changed files with 6 additions and 2 deletions

View File

@ -115,4 +115,7 @@
<string name="textOn">ON</string>
<string name="textOff">OFF</string>
<string name="cancel">Cancel</string>
<string name="manual">Manual</string>
</resources>

View File

@ -324,20 +324,21 @@ public class InputFragment extends Fragment {
builder.setTitle(getString(R.string.select_controller_title));
builder.setMessage(getString(R.string.select_controller_message,
String.valueOf(listenForButton)));
builder.setPositiveButton("Cancel",
builder.setPositiveButton(getString(R.string.cancel),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
listenForButton = 0;
dialog.dismiss();
}
});
builder.setNegativeButton("Custom",
builder.setNegativeButton(getString(R.string.manual),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
InputModFragment inputModFrag = new InputModFragment();
Bundle args = new Bundle();
args.putInt("portNumber", listenForButton - 1);
inputModFrag.setArguments(args);
listenForButton = 0;
getActivity().getSupportFragmentManager()
.beginTransaction()
.replace(R.id.fragment_container, inputModFrag,