1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-30 11:40:23 +02:00

Don't call startActivityForResult when no result is needed

This commit is contained in:
Erik Johansson
2018-02-12 23:33:26 +01:00
parent b9f4c7de8e
commit 33a6a365fe
3 changed files with 4 additions and 4 deletions

View File

@@ -279,7 +279,7 @@ public class MainActivity extends AppCompatActivity {
case R.id.nav_settings:
Intent settingsIntent = new Intent(this, SettingsActivity.class);
settingsIntent.putExtra(SettingsActivity.EXTRA_TINT_COLOR, navDrawer.getItemTextColor().getDefaultColor());
startActivityForResult(settingsIntent, 1);
startActivity(settingsIntent);
return;
case R.id.nav_help:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/oliexdev/openScale/wiki")));
@@ -336,7 +336,7 @@ public class MainActivity extends AppCompatActivity {
return true;
case R.id.action_add_measurement:
Intent intent = new Intent(getApplicationContext(), DataEntryActivity.class);
startActivityForResult(intent, 1);
startActivity(intent);
return true;
case R.id.action_bluetooth_status:
invokeSearchBluetoothDevice();

View File

@@ -640,7 +640,7 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
Intent intent = new Intent(graphView.getContext(), DataEntryActivity.class);
intent.putExtra(DataEntryActivity.EXTRA_ID, id);
startActivityForResult(intent, 1);
startActivity(intent);
}
@Override

View File

@@ -281,7 +281,7 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(tableView.getContext(), DataEntryActivity.class);
intent.putExtra(DataEntryActivity.EXTRA_ID, (int)id);
startActivityForResult(intent, 1);
startActivity(intent);
}
}