Skip to content

Commit

Permalink
Implement new recyclerview and card types from builder
Browse files Browse the repository at this point in the history
  • Loading branch information
deadman96385 committed Feb 20, 2024
1 parent 642e1b2 commit f57ca91
Show file tree
Hide file tree
Showing 21 changed files with 1,087 additions and 364 deletions.

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public boolean onMenuItemSelected(@NonNull MenuItem menuItem) {
.setPositiveButton("Yes", (dialog, Identify) -> {
Bundle bundle = controller.saveState();
if (bundle != null) {
String qrData = scoutUtils.saveData(requireView(),true);
String qrData = scoutUtils.saveData(requireView(),false);
bundle.putString("qrData", qrData);
bundle.putBoolean("mode", false);
}
Expand Down Expand Up @@ -265,13 +265,13 @@ public void onViewCreated(@NonNull View v, Bundle savedInstanceState) {
mRecyclerViewBot = scoutUtils.makeRecyclerView(requireContext(), v, R.id.recycler_view_bot);

//Sorts the tables based on saved Table Status
int table_status = configPreference.getInt("table_mode", ScoutUtils.BOTH);
int table_status = configPreference.getInt("table_mode", ScoutUtils.NONE);
scoutUtils.tableSorter(table_status, requireView(), mRecyclerViewTop, mRecyclerViewBot);
scoutUtils.setupTables(requireView());

File layoutLoc = new File(requireContext().getFilesDir(), fileName);
if (fileUtils.fileExists(layoutLoc.toString())) {
scoutUtils.layoutMaker(ScoutUtils.BOTH, fileUtils.readFile(layoutLoc),
scoutUtils.layoutMaker(table_status, fileUtils.readFile(layoutLoc),
requireView(), mRecyclerViewTop, mRecyclerViewBot);
}

Expand All @@ -284,10 +284,10 @@ public void onViewCreated(@NonNull View v, Bundle savedInstanceState) {
binding.loadButton.setOnClickListener(v1 -> {
String storedLayout = fileUtils.readTextFile(getResources().
openRawResource(R.raw.crowd_layout));
scoutUtils.layoutMaker(ScoutUtils.BOTH, storedLayout, requireView(),
scoutUtils.layoutMaker(table_status, storedLayout, requireView(),
mRecyclerViewTop, mRecyclerViewBot);
binding.loadButton.setVisibility(View.GONE);
binding.autoLoadCheckBox.setVisibility(View.GONE);
//binding.loadButton.setVisibility(View.GONE);
//binding.autoLoadCheckBox.setVisibility(View.GONE);
});

if (configPreference.getBoolean("role_locked_toggle")) {
Expand Down Expand Up @@ -329,9 +329,10 @@ public void refreshActionBar() {
}

public void createLayout(Uri uri) {
int table_status = configPreference.getInt("table_mode", ScoutUtils.NONE);
File layoutFile = new File(
Objects.requireNonNull(FileUtils.copyFileToInternal(requireContext(), uri, fileName)));
scoutUtils.layoutMaker(ScoutUtils.BOTH,fileUtils.readFile(layoutFile), requireView(),
scoutUtils.layoutMaker(table_status,fileUtils.readFile(layoutFile), requireView(),
mRecyclerViewTop, mRecyclerViewBot);
}

Expand Down
Loading

0 comments on commit f57ca91

Please sign in to comment.