This repository has been archived on 2025-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
wiimmfi-watcher/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java

41 lines
1.3 KiB
Java
Raw Normal View History

2021-05-08 14:58:18 -06:00
package me.brysonsteck.wiimmfiwatcher;
2021-04-30 09:57:06 -06:00
2021-05-08 18:01:47 -06:00
import android.content.ClipData;
2021-05-08 14:58:18 -06:00
import android.os.Bundle;
2021-05-08 18:01:47 -06:00
import android.view.View;
2021-04-30 09:57:06 -06:00
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.ObservableArrayList;
2021-05-08 14:58:18 -06:00
import me.brysonsteck.wiimmfiwatcher.database.AppDatabase;
import me.brysonsteck.wiimmfiwatcher.model.FriendCode;
2021-05-02 22:38:15 -06:00
2021-04-30 09:57:06 -06:00
public class MainActivity extends AppCompatActivity {
ObservableArrayList<FriendCode> recentFCList = new ObservableArrayList<>();
AppDatabase database;
2021-04-30 09:57:06 -06:00
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
2021-05-02 22:38:15 -06:00
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction()
.replace(R.id.friend_code_input_fragment, new WatchCodeFragment(), null)
2021-05-02 22:38:15 -06:00
.setReorderingAllowed(true)
.commit();
2021-05-04 23:31:34 -06:00
}
setContentView(R.layout.activity_main);
2021-05-08 18:01:47 -06:00
View aboutButton = findViewById(R.id.about_button);
aboutButton.setOnClickListener((about) -> {
getSupportFragmentManager().beginTransaction()
.replace(R.id.friend_code_input_fragment, new AboutFragment(), null)
.setReorderingAllowed(true)
.addToBackStack(null)
.commit();
});
2021-04-30 09:57:06 -06:00
}
}