aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-05-10 13:23:25 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-05-10 13:23:25 -0600
commit27b36802b876805ae30c322ecbadf7286d2239fb (patch)
tree4ef9f2d216cf585315b435b926e9082f35fbed40 /app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java
parenteb45e67349cc3ebec45aaca7822f9d7881db7aeb (diff)
downloadwiimmfi-watcher-27b36802b876805ae30c322ecbadf7286d2239fb.tar
wiimmfi-watcher-27b36802b876805ae30c322ecbadf7286d2239fb.tar.gz
wiimmfi-watcher-27b36802b876805ae30c322ecbadf7286d2239fb.tar.bz2
final cleanup before first release
Diffstat (limited to 'app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java')
-rw-r--r--app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java24
1 files changed, 1 insertions, 23 deletions
diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java
index d935d48..c37aaf7 100644
--- a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java
+++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java
@@ -1,21 +1,14 @@
package me.brysonsteck.wiimmfiwatcher;
-
-import android.content.ClipData;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.ObservableArrayList;
-import androidx.lifecycle.ViewModelProvider;
import androidx.room.Room;
-import androidx.sqlite.db.SimpleSQLiteQuery;
-
-import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
import me.brysonsteck.wiimmfiwatcher.database.AppDatabase;
import me.brysonsteck.wiimmfiwatcher.model.FriendCode;
-import me.brysonsteck.wiimmfiwatcher.viewmodel.FriendCodeViewModel;
public class MainActivity extends AppCompatActivity {
ObservableArrayList<FriendCode> recentFCList = new ObservableArrayList<>();
@@ -27,7 +20,6 @@ public class MainActivity extends AppCompatActivity {
setContentView(R.layout.activity_main);
View aboutButton = findViewById(R.id.about_button);
-
if (savedInstanceState == null) {
aboutButton.setVisibility(View.VISIBLE);
getSupportFragmentManager().beginTransaction()
@@ -37,24 +29,10 @@ public class MainActivity extends AppCompatActivity {
}
- database = Room.databaseBuilder(this, AppDatabase.class, "friend-codes-db").build();
-
-// aboutButton.setVisibility(View.INVISIBLE);
-// ExtendedFloatingActionButton clearButton = findViewById(R.id.clear_button);
- FriendCodeViewModel viewModel = new ViewModelProvider(MainActivity.this).get(FriendCodeViewModel.class);
-// clearButton.setOnClickListener(new View.OnClickListener() {
-//
-//
-// @Override
-// public void onClick(View view) {
-// getApplicationContext().deleteDatabase("friend-codes-db");
-// database = Room.databaseBuilder(getApplicationContext(), AppDatabase.class, "friend-codes-db").build();
-// }
-// });
+ database = Room.databaseBuilder(this, AppDatabase.class, "friend-codes-db").build();
aboutButton.setOnClickListener((about) -> {
-// aboutButton.setClickable(false);
aboutButton.setVisibility(View.INVISIBLE);
getSupportFragmentManager().beginTransaction()
.replace(R.id.friend_code_input_fragment, new AboutFragment(), null)