UI: show back button, if there is a back operation.

This commit is contained in:
Dennis Guse
2023-10-10 22:02:28 +02:00
parent 43b8b97aaf
commit 2657417887
3 changed files with 4 additions and 5 deletions
@@ -147,7 +147,6 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
});
viewBinding.trackRecordingFabAction.setOnClickListener((view) -> Toast.makeText(TrackRecordingActivity.this, getString(R.string.hold_to_stop), Toast.LENGTH_LONG).show());
viewBinding.bottomAppBar.setNavigationIcon(R.drawable.ic_baseline_arrow_back_24);
setSupportActionBar(viewBinding.bottomAppBar);
}
@@ -25,9 +25,9 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import androidx.documentfile.provider.DocumentFile;
import androidx.fragment.app.FragmentActivity;
import java.util.ArrayList;
import java.util.List;
@@ -56,7 +56,7 @@ import de.dennisguse.opentracks.util.FileUtils;
* So, for this check actually a different file name might be used than in the ExportService.
* * Saved state as an object instead of individual values.
*/
public class ExportActivity extends FragmentActivity implements ExportService.ExportServiceResultReceiver.Receiver {
public class ExportActivity extends AppCompatActivity implements ExportService.ExportServiceResultReceiver.Receiver {
private static final String TAG = ExportActivity.class.getSimpleName();
@@ -152,6 +152,8 @@ public class ExportActivity extends FragmentActivity implements ExportService.Ex
viewBinding = ExportActivityBinding.inflate(getLayoutInflater());
setContentView(viewBinding.getRoot());
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
directoryUri = getIntent().getParcelableExtra(EXTRA_DIRECTORY_URI_KEY);
trackFileFormat = (TrackFileFormat) getIntent().getSerializableExtra(EXTRA_TRACKFILEFORMAT_KEY);
boolean allInOneFile = getIntent().getBooleanExtra(EXTRA_ONE_FILE_KEY, false);
@@ -188,7 +190,6 @@ public class ExportActivity extends FragmentActivity implements ExportService.Ex
}
viewBinding.exportActivityToolbar.setTitle(getString(R.string.export_progress_message, directoryDisplayName));
viewBinding.bottomAppBarLayout.bottomAppBar.setNavigationIcon(R.drawable.ic_logo_color_24dp);
}
@Override
@@ -112,7 +112,6 @@ public class ImportActivity extends FragmentActivity {
//Works for a directory, but we might have received multiple files via SEND_MULTIPLE.
viewBinding.importActivityToolbar.setTitle(getString(R.string.import_progress_message, documentFiles.get(0).getName()));
viewBinding.bottomAppBarLayout.bottomAppBar.setNavigationIcon(R.drawable.ic_logo_color_24dp);
}
@Override