Skip to content

Commit

Permalink
UI: show back button, if there is a back operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisguse committed Oct 11, 2023
1 parent 43b8b97 commit 2657417
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ protected void onCreate(Bundle savedInstanceState) {
});
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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

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;
Expand Down Expand Up @@ -56,7 +56,7 @@
* 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();

Expand Down Expand Up @@ -152,6 +152,8 @@ public void onCreate(Bundle savedInstanceState) {
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);
Expand Down Expand Up @@ -188,7 +190,6 @@ public void onCreate(Bundle savedInstanceState) {
}

viewBinding.exportActivityToolbar.setTitle(getString(R.string.export_progress_message, directoryDisplayName));
viewBinding.bottomAppBarLayout.bottomAppBar.setNavigationIcon(R.drawable.ic_logo_color_24dp);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ public void onCreate(Bundle savedInstanceState) {

//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
Expand Down

0 comments on commit 2657417

Please sign in to comment.