最低限の修正 #16
|
@ -140,19 +140,21 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
||||||
CreateRoot createRoot = new CreateRoot(MainActivity.this);
|
CreateRoot createRoot = new CreateRoot(MainActivity.this);
|
||||||
createRoot.receiveData(myDataList);
|
createRoot.receiveData(myDataList);
|
||||||
latch.countDown();
|
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();
|
executor.shutdown();
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,6 @@ public class SetUpActivity extends FragmentActivity
|
||||||
AppDatabase.class,
|
AppDatabase.class,
|
||||||
"SetUpTable"
|
"SetUpTable"
|
||||||
)
|
)
|
||||||
.fallbackToDestructiveMigration()
|
|
||||||
.build();
|
.build();
|
||||||
SetUpTableDao setUpTableDao = db.setUpTableDao();
|
SetUpTableDao setUpTableDao = db.setUpTableDao();
|
||||||
// Roomの操作を行う
|
// Roomの操作を行う
|
||||||
|
|
Loading…
Reference in New Issue
Block a user