最低限の修正

This commit is contained in:
nemukemo 2024-06-24 15:05:30 +09:00
parent 55302e9665
commit 8281474e02
2 changed files with 13 additions and 12 deletions

View File

@ -140,19 +140,21 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
CreateRoot createRoot = new CreateRoot(MainActivity.this);
createRoot.receiveData(myDataList);
latch.countDown();
new Thread(() -> {
try {
latch.await(); // Both tasks must call countDown() before this returns
runOnUiThread(() -> {
Intent toRoot = new Intent(MainActivity.this, Maps.class);
startActivity(toRoot);
});
} catch (InterruptedException e) {
e.printStackTrace();
}
}).start();
});
new Thread(() -> {
try {
latch.await(); // Both tasks must call countDown() before this returns
runOnUiThread(() -> {
Intent toRoot = new Intent(MainActivity.this, Maps.class);
startActivity(toRoot);
});
} catch (InterruptedException e) {
e.printStackTrace();
}
}).start();
executor.shutdown();
}

View File

@ -127,7 +127,6 @@ public class SetUpActivity extends FragmentActivity
AppDatabase.class,
"SetUpTable"
)
.fallbackToDestructiveMigration()
.build();
SetUpTableDao setUpTableDao = db.setUpTableDao();
// Roomの操作を行う