From b202760cdc2b443fd07dcee593ed7f3e09d6b77b Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Tue, 4 May 2021 23:31:34 -0600 Subject: watched friend codes work --- .../example/wiimmterfaceandroid/MainActivity.java | 28 ++++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'app/src/main/java/com/example/wiimmterfaceandroid/MainActivity.java') diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/MainActivity.java b/app/src/main/java/com/example/wiimmterfaceandroid/MainActivity.java index 71b25fa..96f1511 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/MainActivity.java +++ b/app/src/main/java/com/example/wiimmterfaceandroid/MainActivity.java @@ -21,31 +21,27 @@ public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - FragmentContainerView fcInput = findViewById(R.id.room_fragment); - this.database = Room.databaseBuilder(this, AppDatabase.class, "friend-codes-db").build(); - new Thread(() -> { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - recentFCList.addAll(database.getFriendCodeDao().getAll()); - }).start(); +// FragmentContainerView fcInput = findViewById(R.id.room_fragment); +// this.database = Room.databaseBuilder(this, AppDatabase.class, "friend-codes-db").build(); +// new Thread(() -> { +// try { +// Thread.sleep(1000); +// } catch (InterruptedException e) { +// e.printStackTrace(); +// } +// recentFCList.addAll(database.getFriendCodeDao().getAll()); +// }).start(); - setContentView(R.layout.activity_main); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .replace(R.id.friend_code_input_fragment, new WatchCodeFragment(), null) .setReorderingAllowed(true) .commit(); - getSupportFragmentManager().beginTransaction() - .replace(R.id.room_fragment, new RecentCodesFragment(), null) - .setReorderingAllowed(true) - .commit(); - } + } + setContentView(R.layout.activity_main); } } \ No newline at end of file -- cgit v1.2.3