mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-31 03:59:56 +02:00
Don't call startActivityForResult when no result is needed
This commit is contained in:
@@ -279,7 +279,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
case R.id.nav_settings:
|
case R.id.nav_settings:
|
||||||
Intent settingsIntent = new Intent(this, SettingsActivity.class);
|
Intent settingsIntent = new Intent(this, SettingsActivity.class);
|
||||||
settingsIntent.putExtra(SettingsActivity.EXTRA_TINT_COLOR, navDrawer.getItemTextColor().getDefaultColor());
|
settingsIntent.putExtra(SettingsActivity.EXTRA_TINT_COLOR, navDrawer.getItemTextColor().getDefaultColor());
|
||||||
startActivityForResult(settingsIntent, 1);
|
startActivity(settingsIntent);
|
||||||
return;
|
return;
|
||||||
case R.id.nav_help:
|
case R.id.nav_help:
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/oliexdev/openScale/wiki")));
|
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;
|
return true;
|
||||||
case R.id.action_add_measurement:
|
case R.id.action_add_measurement:
|
||||||
Intent intent = new Intent(getApplicationContext(), DataEntryActivity.class);
|
Intent intent = new Intent(getApplicationContext(), DataEntryActivity.class);
|
||||||
startActivityForResult(intent, 1);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_bluetooth_status:
|
case R.id.action_bluetooth_status:
|
||||||
invokeSearchBluetoothDevice();
|
invokeSearchBluetoothDevice();
|
||||||
|
@@ -640,7 +640,7 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
|
|
||||||
Intent intent = new Intent(graphView.getContext(), DataEntryActivity.class);
|
Intent intent = new Intent(graphView.getContext(), DataEntryActivity.class);
|
||||||
intent.putExtra(DataEntryActivity.EXTRA_ID, id);
|
intent.putExtra(DataEntryActivity.EXTRA_ID, id);
|
||||||
startActivityForResult(intent, 1);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -281,7 +281,7 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
Intent intent = new Intent(tableView.getContext(), DataEntryActivity.class);
|
Intent intent = new Intent(tableView.getContext(), DataEntryActivity.class);
|
||||||
intent.putExtra(DataEntryActivity.EXTRA_ID, (int)id);
|
intent.putExtra(DataEntryActivity.EXTRA_ID, (int)id);
|
||||||
startActivityForResult(intent, 1);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user