diff options
75 files changed, 517 insertions, 180 deletions
@@ -1,12 +1,24 @@ +## This is the `dev` branch!! +**You are on the `dev` branch for Wiimmfi Watcher.** This is seperate from the `master` branch, which contains the currently most stable version (which is the version currently avaliable on the Google Play Store), while this branch is made for me to work on the app without changing currently stable code. If you are looking for the `master` branch, [click here.](https://github.com/brysonsteck/wiimmfi-watcher/tree/master) + # Wiimmfi Watcher -Wiimmfi Watcher is an Android application that allows you to watch Mario Kart Wii gameplay by simply entering your friend code. +Wiimmfi Watcher is an Android application that allows you to watch Mario Kart Wii gameplay by simply entering your friend code. This application can be found on the Google Play Store here (link goes here when created)! + +This application is currently being maintained by myself out of love for Mario Kart Wii and appreciation for the developers of Wiimmfi. I am in no way affiliated with Wiimmfi or any of the Wiimmfi developers. + +## Screenshots + +(Screenshots go here) + +## Download + +You can visit the Google Play Store to download the most recent and stable version (link). You are also free to clone the repository and download the source code for the most stable release in the Releases tab. + +## Feedback + +This is officially my first project and Google Play app that I'm maintaining, so if you have any feedback about my work, I would love to hear it! You can create an issue tagged "feedback", or you can fill out this Google Form. (Create google form) I also have a section in my TODO list under "Features I would like to add" for things I am already considering adding to future releases. -## TODO +## Bugs -* Add an indentifiable user agent for Jsoup -* Add a new fragment for the "info" button on the main screen -* Fix the repeating recent friend codes -* Figure out if a license is appropriate -* Create the app on the Play Store -* Create a meaningful README +If you found any bugs in the `master` branch (i. e. the most recent Google Play release), **PLEASE READ MY TODO LIST FIRST** to make sure that the bug you found isn't something I'm already aware of. Once you have made sure of that, you can then create an issue or fill out this Google Form. (Link the new Google form) @@ -0,0 +1,24 @@ +# TODO +These are issues in Wiimmfi Watcher I am at least aware of. Please **DO NOT** submit a bug report on the Google Form or an issue here on GitHub if it is mentioned on this list, unless you found a way that the bug can crash the app. + +## Completed For Next Release + +## Working On +* The last player in the list has the potential to hide behind the refresh button +* Create the app on the Play Store +* Create a meaningful README + +## Aware Of +* Fix the repeating recent friend codes +* Recent friend codes do not scroll like they should + * Problem with ConstraintLayout probably, convert to a new Layout? + +# Features I would like to add +* The watcher activity does not refresh automatically like the official website does + * Added a refresh button, but is there a better way with Jsoup? Like a new Thread? +* Create a better looking header for the watcher activity + * Add 'sections' I guess??? +* Add the Mario Kart Wii font +* Add pictures for Nintendo and CTGP tracks + + diff --git a/app/build.gradle b/app/build.gradle index 37f338e..1b11131 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { buildToolsVersion "30.0.3" defaultConfig { - applicationId "com.example.wiimmterfaceandroid" - minSdkVersion 29 + applicationId "me.brysonsteck.wiimmfiwatcher" + minSdkVersion 22 targetSdkVersion 30 versionCode 1 versionName "1.0" @@ -31,7 +31,6 @@ android { } } - dependencies { dependencies { dependencies { @@ -43,7 +42,7 @@ dependencies { // LiveData implementation "androidx.lifecycle:lifecycle-livedata:$lifecycle_version" } - def lifecycle_version = "2.3.1" + def lifecycle_version = "2.3.1" def arch_version = "2.1.0" // ViewModel diff --git a/app/src/androidTest/java/com/example/wiimmterfaceandroid/ExampleInstrumentedTest.java b/app/src/androidTest/java/me/brysonsteck/wiimmfiwatcher/ExampleInstrumentedTest.java index 1e59b29..5d9b03b 100644 --- a/app/src/androidTest/java/com/example/wiimmterfaceandroid/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/me/brysonsteck/wiimmfiwatcher/ExampleInstrumentedTest.java @@ -1,4 +1,4 @@ -package com.example.wiimmterfaceandroid; +package me.brysonsteck.wiimmfiwatcher; import android.content.Context; @@ -21,6 +21,6 @@ public class ExampleInstrumentedTest { public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.example.wiimmterfaceandroid", appContext.getPackageName()); + assertEquals("me.brysonsteck.wiimmfiwatcher", appContext.getPackageName()); } }
\ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3fa2f1f..bae710f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,24 +1,24 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.example.wiimmterfaceandroid"> + package="me.brysonsteck.wiimmfiwatcher"> <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" - android:icon="@mipmap/wiimmterface_launcher" + android:icon="@mipmap/ic_watcher_icons" android:label="@string/app_name" - android:roundIcon="@mipmap/wiimmterface_launcher" + android:roundIcon="@mipmap/ic_watcher_icons_round" android:supportsRtl="true" - android:theme="@style/Theme.WiimmterfaceAndroid"> - <activity android:name=".MainActivity"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> + android:theme="@style/Theme.WiimmfiWatcher"> + <activity android:name=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - <activity android:name=".wiimmfi.WiimmfiActivity"/> - </application> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + <activity android:name=".wiimmfi.WiimmfiActivity"/> +</application> </manifest>
\ No newline at end of file diff --git a/app/src/main/ic_watcher_icons-playstore.png b/app/src/main/ic_watcher_icons-playstore.png Binary files differnew file mode 100644 index 0000000..b06bb01 --- /dev/null +++ b/app/src/main/ic_watcher_icons-playstore.png diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/AboutFragment.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/AboutFragment.java new file mode 100644 index 0000000..8f9111c --- /dev/null +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/AboutFragment.java @@ -0,0 +1,82 @@ +package me.brysonsteck.wiimmfiwatcher; + +import android.annotation.SuppressLint; +import android.os.Bundle; +import android.text.method.LinkMovementMethod; +import android.view.View; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; + +import com.google.android.material.appbar.MaterialToolbar; + +public class AboutFragment extends Fragment { + View aboutButton; + MaterialToolbar toolbar; + + public AboutFragment() { + super(R.layout.about_fragment); + } + + @SuppressLint("SetTextI18n") + @Override + public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + + aboutButton = getActivity().findViewById(R.id.about_button); + toolbar = getActivity().findViewById(R.id.toolbar); + toolbar.setTitle("About Wiimmfi Watcher"); + + TextView aboutWatcher = view.findViewById(R.id.about_watcher_text); + TextView aboutMe = view.findViewById(R.id.about_me_text); + TextView github = view.findViewById(R.id.github_text); + TextView donations = view.findViewById(R.id.donations_text); + TextView contact = view.findViewById(R.id.contact_text); + TextView bugs = view.findViewById(R.id.bugs_text); + + aboutWatcher.setText("Wiimmfi Watcher is an UNOFFICIAL application created for a school project that I have decided to turn into a full application. " + + "This application was made to provide an easy shortcut to the Wiimmfi website and display data in a mobile friendly way, since the official website doesn't have a mobile friendly version. " + + "Free and open source, you can watch your Wiimmfi Mario Kart Wii matches on your phone in a quick and easy way. " + + ""); + + aboutMe.setText("Hi there! My name is Bryson Steck. I am a student studying Computer Science. This is my first official application that I'm maintaining. " + + "This whole \"application on the Google Play Store\" thing is new to me, so please be patient as I am learning how to maintain something like this. " + + "I hope you enjoy!"); + + github.setClickable(true); + github.setMovementMethod(LinkMovementMethod.getInstance()); + + github.setText(R.string.github); + + donations.setText("Since this application is free and the code is open source, I do not receive income from maintaining this app. Because of that, I'd appreciate any donation in the following methods:\n\n" + + "PayPal: @bryzinga\n" + + "Venmo: @brysonsteck\n" + + "Bitcoin: 1Kbnp5JMTKd7a3Zs2WWm2JMCjfVb5tpcky\n" + + "Litecoin: LRboJVNzoJCjXHmwN6RQgyvYEQjjaFzEA7\n" + + "Dogecoin: DMx362YBEBYw1uDGetX3svdg8RypHsWTCS"); + + contact.setText("If you would like to get ahold of me for any reason unrelated to bug reports or this app in general, you can contact me through email at steck.bryson@gmail.com " + + "or on Discord at bryzinga#9971."); + + bugs.setClickable(true); + bugs.setMovementMethod(LinkMovementMethod.getInstance()); + + bugs.setText(R.string.bugs); + } + + @Override + public void onStop() { + super.onStop(); + aboutButton.setVisibility(View.VISIBLE); + toolbar.setTitle("Wiimmfi Watcher"); + } + @Override + public void onResume() { + super.onResume(); + aboutButton.setVisibility(View.INVISIBLE); + toolbar.setTitle("About Wiimmfi Watcher"); + } + +} diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/MainActivity.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java index 96f1511..c37aaf7 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/MainActivity.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java @@ -1,18 +1,14 @@ -package com.example.wiimmterfaceandroid; - +package me.brysonsteck.wiimmfiwatcher; +import android.os.Bundle; +import android.view.View; import androidx.appcompat.app.AppCompatActivity; import androidx.databinding.ObservableArrayList; -import androidx.fragment.app.FragmentContainerView; import androidx.room.Room; -import android.os.Bundle; - -import com.example.wiimmterfaceandroid.database.AppDatabase; -import com.example.wiimmterfaceandroid.model.FriendCode; - -import java.util.List; +import me.brysonsteck.wiimmfiwatcher.database.AppDatabase; +import me.brysonsteck.wiimmfiwatcher.model.FriendCode; public class MainActivity extends AppCompatActivity { ObservableArrayList<FriendCode> recentFCList = new ObservableArrayList<>(); @@ -21,20 +17,11 @@ 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(); - - + setContentView(R.layout.activity_main); + View aboutButton = findViewById(R.id.about_button); if (savedInstanceState == null) { + aboutButton.setVisibility(View.VISIBLE); getSupportFragmentManager().beginTransaction() .replace(R.id.friend_code_input_fragment, new WatchCodeFragment(), null) .setReorderingAllowed(true) @@ -42,6 +29,17 @@ public class MainActivity extends AppCompatActivity { } - setContentView(R.layout.activity_main); + + database = Room.databaseBuilder(this, AppDatabase.class, "friend-codes-db").build(); + + aboutButton.setOnClickListener((about) -> { + aboutButton.setVisibility(View.INVISIBLE); + getSupportFragmentManager().beginTransaction() + .replace(R.id.friend_code_input_fragment, new AboutFragment(), null) + .setReorderingAllowed(true) + .addToBackStack(null) + .commit(); + }); + } }
\ No newline at end of file diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/WatchCodeAdapter.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java index 6e7e69e..715dce8 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/WatchCodeAdapter.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java @@ -1,31 +1,31 @@ -package com.example.wiimmterfaceandroid; +package me.brysonsteck.wiimmfiwatcher; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.Button; import androidx.annotation.NonNull; import androidx.databinding.ObservableArrayList; import androidx.recyclerview.widget.RecyclerView; -import com.example.wiimmterfaceandroid.model.FriendCode; -import com.example.wiimmterfaceandroid.wiimmfi.WiimmfiActivity; import com.google.android.material.button.MaterialButton; +import java.util.ArrayList; + +import me.brysonsteck.wiimmfiwatcher.model.FriendCode; +import me.brysonsteck.wiimmfiwatcher.wiimmfi.WiimmfiActivity; + public class WatchCodeAdapter extends RecyclerView.Adapter<WatchCodeAdapter.ViewHolder>{ ObservableArrayList<FriendCode> entries; - OnFriendCodeClicked listener; Context context; - public interface OnFriendCodeClicked { - public void onClick(FriendCode entry); - } + ArrayList<String> recentCodes; public WatchCodeAdapter(Context context, ObservableArrayList<FriendCode> entries) { this.context = context; this.entries = entries; + this.recentCodes = new ArrayList<>(); } @NonNull @@ -37,16 +37,17 @@ public class WatchCodeAdapter extends RecyclerView.Adapter<WatchCodeAdapter.View @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { + String currentFC = entries.get(position).friendCode; MaterialButton fcButton = holder.itemView.findViewById(R.id.recent_friend_code_button); - FriendCode currentFC = entries.get(position); - fcButton.setText(currentFC.friendCode); + fcButton.setText(currentFC); fcButton.setOnClickListener(view -> { - Intent intent = new Intent(view.getContext(), WiimmfiActivity.class); - intent.putExtra("friendCode", currentFC.friendCode); - context.startActivity(intent); + Intent intent = new Intent(view.getContext(), WiimmfiActivity.class); + intent.putExtra("friendCode", currentFC); + context.startActivity(intent); }); } + @Override public int getItemCount() { return entries.size(); diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/WatchCodeFragment.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java index 6de02dc..c1ba705 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/WatchCodeFragment.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java @@ -1,4 +1,4 @@ -package com.example.wiimmterfaceandroid; +package me.brysonsteck.wiimmfiwatcher; import android.content.Intent; import android.os.Bundle; @@ -14,11 +14,12 @@ import androidx.lifecycle.ViewModelProvider; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import com.example.wiimmterfaceandroid.model.FriendCode; -import com.example.wiimmterfaceandroid.viewmodel.FriendCodeViewModel; -import com.example.wiimmterfaceandroid.wiimmfi.WiimmfiActivity; import com.google.android.material.textview.MaterialTextView; +import me.brysonsteck.wiimmfiwatcher.model.FriendCode; +import me.brysonsteck.wiimmfiwatcher.viewmodel.FriendCodeViewModel; +import me.brysonsteck.wiimmfiwatcher.wiimmfi.WiimmfiActivity; + public class WatchCodeFragment extends Fragment { public WatchCodeFragment() { @@ -82,7 +83,10 @@ public class WatchCodeFragment extends Fragment { } }); RecyclerView recyclerView = view.findViewById(R.id.recent_friend_codes_recycler_view); - recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); + LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext()); + linearLayoutManager.setReverseLayout(true); + linearLayoutManager.setStackFromEnd(true); + recyclerView.setLayoutManager(linearLayoutManager); recyclerView.setAdapter(adapter); Button watchButton = view.findViewById(R.id.watch_button); EditText friendCode = view.findViewById(R.id.friend_code_edit_text); @@ -97,9 +101,6 @@ public class WatchCodeFragment extends Fragment { } else { errorText.setText(""); viewModel.saveFriendCode("", friendCode.getText().toString()); -// FriendCodeObj friendCodeObj = new FriendCodeObj(); -// friendCodeObj.friendCode = friendCode.getText().toString(); -// database.getFriendCodeDao().insert(friendCodeObj); intent.putExtra("friendCode", friendCode.getText().toString()); startActivity(intent); } @@ -107,5 +108,6 @@ public class WatchCodeFragment extends Fragment { }); + } } diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/database/AppDatabase.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/AppDatabase.java index 0f01149..01884c2 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/database/AppDatabase.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/AppDatabase.java @@ -1,9 +1,9 @@ -package com.example.wiimmterfaceandroid.database; +package me.brysonsteck.wiimmfiwatcher.database; import androidx.room.Database; import androidx.room.RoomDatabase; -import com.example.wiimmterfaceandroid.model.FriendCode; +import me.brysonsteck.wiimmfiwatcher.model.FriendCode; @Database(entities = {FriendCode.class}, version=1) public abstract class AppDatabase extends RoomDatabase { diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/database/FriendCodeDao.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/FriendCodeDao.java index dbfb9c5..1b0788e 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/database/FriendCodeDao.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/FriendCodeDao.java @@ -1,4 +1,4 @@ -package com.example.wiimmterfaceandroid.database; +package me.brysonsteck.wiimmfiwatcher.database; import androidx.room.Dao; import androidx.room.Delete; @@ -6,10 +6,10 @@ import androidx.room.Insert; import androidx.room.Query; import androidx.room.Update; -import com.example.wiimmterfaceandroid.model.FriendCode; - import java.util.List; +import me.brysonsteck.wiimmfiwatcher.model.FriendCode; + @Dao public interface FriendCodeDao { @@ -27,4 +27,8 @@ public interface FriendCodeDao { @Delete public void delete(FriendCode friendCode); + + @Query("DELETE FROM friendcode") + public void nukeTable(); + } diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/model/FriendCode.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/model/FriendCode.java index 3aad0a1..5856a22 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/model/FriendCode.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/model/FriendCode.java @@ -1,4 +1,4 @@ -package com.example.wiimmterfaceandroid.model; +package me.brysonsteck.wiimmfiwatcher.model; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/viewmodel/FriendCodeViewModel.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/viewmodel/FriendCodeViewModel.java index c7bbe7d..25cdd64 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/viewmodel/FriendCodeViewModel.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/viewmodel/FriendCodeViewModel.java @@ -1,23 +1,15 @@ -package com.example.wiimmterfaceandroid.viewmodel; +package me.brysonsteck.wiimmfiwatcher.viewmodel; import android.app.Application; - -import androidx.lifecycle.AndroidViewModel; -import androidx.lifecycle.MutableLiveData; - -import com.example.wiimmterfaceandroid.database.AppDatabase; -import com.example.wiimmterfaceandroid.model.FriendCode; +import android.database.sqlite.SQLiteDatabase; import androidx.databinding.ObservableArrayList; import androidx.lifecycle.AndroidViewModel; import androidx.lifecycle.MutableLiveData; -import androidx.lifecycle.ViewModel; import androidx.room.Room; -import androidx.room.RoomDatabase; -import androidx.databinding.ObservableArrayList; - -import java.util.LinkedHashSet; +import me.brysonsteck.wiimmfiwatcher.database.AppDatabase; +import me.brysonsteck.wiimmfiwatcher.model.FriendCode; public class FriendCodeViewModel extends AndroidViewModel { ObservableArrayList<FriendCode> entries = new ObservableArrayList<>(); @@ -38,22 +30,17 @@ public class FriendCodeViewModel extends AndroidViewModel { }).start(); } - public void setCurrentEntry(FriendCode entry) { - currentEntry.postValue(entry); - } - - public MutableLiveData<FriendCode> getCurrentEntry() { - return currentEntry; - } - - public MutableLiveData<Boolean> getSaving() { - return saving; - } - public ObservableArrayList<FriendCode> getEntries() { return entries; } +// public boolean deleteAll() { +// for (FriendCode entry: entries) { +// db.getFriendCodeDao().nukeTable(); +// } +// return true; +// } + public void saveFriendCode(String name, String friendCode) { saving.setValue(true); new Thread(() -> { @@ -71,10 +58,10 @@ public class FriendCodeViewModel extends AndroidViewModel { }).start(); } - public void deleteEntry(FriendCode entry) { - new Thread(() -> { - db.getFriendCodeDao().delete(entry); - entries.remove(entry); - }).start(); - } +// public void deleteEntry(FriendCode entry) { +// new Thread(() -> { +// db.getFriendCodeDao().delete(entry); +// entries.remove(entry); +// }).start(); +// } } diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/Player.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/Player.java index 792f14f..fe9e072 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/Player.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/Player.java @@ -1,4 +1,4 @@ -package com.example.wiimmterfaceandroid.wiimmfi; +package me.brysonsteck.wiimmfiwatcher.wiimmfi; public class Player { String rosterNumber; diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/RoomAdapter.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/RoomAdapter.java index dfa51e7..c7a0f29 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/RoomAdapter.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/RoomAdapter.java @@ -1,4 +1,4 @@ -package com.example.wiimmterfaceandroid.wiimmfi; +package me.brysonsteck.wiimmfiwatcher.wiimmfi; import android.annotation.SuppressLint; import android.graphics.Color; @@ -6,28 +6,24 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; -import org.jsoup.*; -import org.jsoup.nodes.Document; -import org.jsoup.nodes.Element; -import org.jsoup.select.Elements; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; -import com.example.wiimmterfaceandroid.R; import com.google.android.material.card.MaterialCardView; -import com.google.android.material.color.MaterialColors; -import java.io.IOException; +import org.jsoup.*; + import java.util.ArrayList; -public class RoomAdapter extends RecyclerView.Adapter<RoomAdapter.ViewHolder>{ +import me.brysonsteck.wiimmfiwatcher.R; +public class RoomAdapter extends RecyclerView.Adapter<RoomAdapter.ViewHolder>{ String display; String playerLink; String header; ArrayList<Player> players; - boolean online = true; + public RoomAdapter (String display, String playerLink, String header, ArrayList<Player> players) { this.display = display; this.playerLink = playerLink; diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/RoomData.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/RoomData.java index 3799180..284b735 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/RoomData.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/RoomData.java @@ -1,4 +1,4 @@ -package com.example.wiimmterfaceandroid.wiimmfi; +package me.brysonsteck.wiimmfiwatcher.wiimmfi; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; @@ -14,7 +14,7 @@ public class RoomData { String friendCode; ArrayList<Player> players = new ArrayList<>(); - public RoomData (ArrayList<Player> players, String playerLink, String friendCode) { + public RoomData (ArrayList<Player> players, String friendCode) { this.friendCode = friendCode; getPlayerLink(); Document doc = null; @@ -24,7 +24,9 @@ public class RoomData { } else { try { - doc = Jsoup.connect("https://wiimmfi.de/" + this.playerLink).get(); + doc = Jsoup.connect("https://wiimmfi.de/" + this.playerLink) + .userAgent("Wiimmfi Watcher for Android (https://github.com/brysonsteck/wiimmfi-watcher) (UNDER DEVELOPMENT)") + .get(); } catch (IOException e) { e.printStackTrace(); } @@ -89,22 +91,20 @@ public class RoomData { public void getPlayerLink() { try { - Document doc = null; - - doc = Jsoup.connect("https://wiimmfi.de/stats/mkw").get(); + Document doc = Jsoup.connect("https://wiimmfi.de/stats/mkw") + .userAgent("Wiimmfi Watcher for Android (https://github.com/brysonsteck/wiimmfi-watcher) (Developer testing)") + .get(); Element table = doc.select("table").get(0); Elements rows = table.select("tr"); for (int i = 0; i < rows.size(); i++) { Element row = rows.get(i); Elements colPlayers = row.select("td"); - Elements colHeader = row.select("th"); if (colPlayers.size() > 0) { String data = colPlayers.get(0).select("a").toString(); -// System.out.println(data); if (data.contains(friendCode)) { System.out.println("Found friend code"); playerLink = data.split("\"")[3]; @@ -126,8 +126,7 @@ public class RoomData { public RoomData refresh() { players.clear(); roomHeader = ""; - RoomData returningData = new RoomData(players, playerLink, friendCode); - return returningData; + return new RoomData(players, friendCode); } } diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/RoomFragment.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/RoomFragment.java index 463c635..afb21d6 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/RoomFragment.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/RoomFragment.java @@ -1,4 +1,4 @@ -package com.example.wiimmterfaceandroid.wiimmfi; +package me.brysonsteck.wiimmfiwatcher.wiimmfi; import android.os.Bundle; import android.view.View; @@ -10,21 +10,22 @@ import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import com.example.wiimmterfaceandroid.R; import com.google.android.material.floatingactionbutton.FloatingActionButton; import java.util.ArrayList; +import me.brysonsteck.wiimmfiwatcher.R; + public class RoomFragment extends Fragment { String display; String header; String playerLink; ArrayList<Player> players; - RoomData roomData; + RoomData roomData; - public RoomFragment(String friendCode, String header, ArrayList<Player> players, String playerLink, String display) { + public RoomFragment(String friendCode, ArrayList<Player> players, String playerLink, String display) { super(R.layout.fragment_room); - this.roomData = new RoomData(players, playerLink, friendCode); + this.roomData = new RoomData(players, friendCode); this.header = roomData.getRoomHeader(); this.display = display; this.players = players; @@ -51,8 +52,6 @@ public class RoomFragment extends Fragment { roomData = roomData.refresh(); RoomData newRoomData = roomData.refresh(); players = roomData.getPlayers(); -// playerLink = roomData.getPlayerLink(); -// String otherPlayerLink = newRoomData.getPlayerLink(); header = newRoomData.getRoomHeader(); if (header == null) { header = "This player is not online, not inside a room or does not exist. Click the refresh button to try again, or click on the back button to enter a different friend code."; diff --git a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/WiimmfiActivity.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/WiimmfiActivity.java index 1d1101d..f3029af 100644 --- a/app/src/main/java/com/example/wiimmterfaceandroid/wiimmfi/WiimmfiActivity.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/wiimmfi/WiimmfiActivity.java @@ -1,27 +1,21 @@ -package com.example.wiimmterfaceandroid.wiimmfi; +package me.brysonsteck.wiimmfiwatcher.wiimmfi; import android.content.Intent; -import android.os.AsyncTask; import android.os.Bundle; import android.os.StrictMode; -import android.widget.TextView; - -import org.jsoup.*; -import org.jsoup.nodes.Document; -import org.jsoup.nodes.Element; -import org.jsoup.select.Elements; import androidx.appcompat.app.AppCompatActivity; import androidx.drawerlayout.widget.DrawerLayout; -import androidx.room.Room; -import com.example.wiimmterfaceandroid.R; import com.google.android.material.appbar.MaterialToolbar; import com.google.android.material.navigation.NavigationView; -import java.io.IOException; +import org.jsoup.*; + import java.util.ArrayList; +import me.brysonsteck.wiimmfiwatcher.R; + public class WiimmfiActivity extends AppCompatActivity { ArrayList<Player> players = new ArrayList<>(); final String[] playerLink = new String[1]; @@ -47,7 +41,7 @@ public class WiimmfiActivity extends AppCompatActivity { if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() - .replace(R.id.room_fragment, new RoomFragment(friendCode, roomHeader, players, playerLink[0], "fc"), null) + .replace(R.id.room_fragment, new RoomFragment(friendCode, players, playerLink[0], "fc"), null) .setReorderingAllowed(true) .commit(); } @@ -60,49 +54,49 @@ public class WiimmfiActivity extends AppCompatActivity { if (menuItem.getItemId() == R.id.friend_code) { players.clear(); getSupportFragmentManager().beginTransaction() - .replace(R.id.room_fragment, new RoomFragment(friendCode, roomHeader, players, playerLink[0], "fc"), null) + .replace(R.id.room_fragment, new RoomFragment(friendCode, players, playerLink[0], "fc"), null) .setReorderingAllowed(true) .commit(); } if (menuItem.getItemId() == R.id.roles) { players.clear(); getSupportFragmentManager().beginTransaction() - .replace(R.id.room_fragment, new RoomFragment(friendCode, roomHeader, players, playerLink[0], "roles"), null) + .replace(R.id.room_fragment, new RoomFragment(friendCode, players, playerLink[0], "roles"), null) .setReorderingAllowed(true) .commit(); } if (menuItem.getItemId() == R.id.login_regions) { players.clear(); getSupportFragmentManager().beginTransaction() - .replace(R.id.room_fragment, new RoomFragment(friendCode, roomHeader, players, playerLink[0], "login_regions"), null) + .replace(R.id.room_fragment, new RoomFragment(friendCode, players, playerLink[0], "login_regions"), null) .setReorderingAllowed(true) .commit(); } if (menuItem.getItemId() == R.id.room_match) { players.clear(); getSupportFragmentManager().beginTransaction() - .replace(R.id.room_fragment, new RoomFragment(friendCode, roomHeader, players, playerLink[0], "room_match"), null) + .replace(R.id.room_fragment, new RoomFragment(friendCode, players, playerLink[0], "room_match"), null) .setReorderingAllowed(true) .commit(); } if (menuItem.getItemId() == R.id.world) { players.clear(); getSupportFragmentManager().beginTransaction() - .replace(R.id.room_fragment, new RoomFragment(friendCode, roomHeader, players, playerLink[0], "world"), null) + .replace(R.id.room_fragment, new RoomFragment(friendCode, players, playerLink[0], "world"), null) .setReorderingAllowed(true) .commit(); } if (menuItem.getItemId() == R.id.conn_fail) { players.clear(); getSupportFragmentManager().beginTransaction() - .replace(R.id.room_fragment, new RoomFragment(friendCode, roomHeader, players, playerLink[0], "conn_fail"), null) + .replace(R.id.room_fragment, new RoomFragment(friendCode, players, playerLink[0], "conn_fail"), null) .setReorderingAllowed(true) .commit(); } if (menuItem.getItemId() == R.id.vr_br) { players.clear(); getSupportFragmentManager().beginTransaction() - .replace(R.id.room_fragment, new RoomFragment(friendCode, roomHeader, players, playerLink[0], "vr_br"), null) + .replace(R.id.room_fragment, new RoomFragment(friendCode, players, playerLink[0], "vr_br"), null) .setReorderingAllowed(true) .commit(); } diff --git a/app/src/main/res/drawable/ic_baseline_clear_all_24.xml b/app/src/main/res/drawable/ic_baseline_clear_all_24.xml new file mode 100644 index 0000000..54ca983 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_clear_all_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M5,13h14v-2L5,11v2zM3,17h14v-2L3,15v2zM7,7v2h14L21,7L7,7z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_watcher_icons_background.xml b/app/src/main/res/drawable/ic_watcher_icons_background.xml new file mode 100644 index 0000000..ca3826a --- /dev/null +++ b/app/src/main/res/drawable/ic_watcher_icons_background.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector + android:height="108dp" + android:width="108dp" + android:viewportHeight="108" + android:viewportWidth="108" + xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z"/> + <path android:fillColor="#00000000" android:pathData="M9,0L9,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,0L19,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M29,0L29,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M39,0L39,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M49,0L49,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M59,0L59,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M69,0L69,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M79,0L79,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M89,0L89,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M99,0L99,108" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,9L108,9" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,19L108,19" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,29L108,29" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,39L108,39" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,49L108,49" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,59L108,59" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,69L108,69" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,79L108,79" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,89L108,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M0,99L108,99" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,29L89,29" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,39L89,39" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,49L89,49" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,59L89,59" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,69L89,69" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M19,79L89,79" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M29,19L29,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M39,19L39,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M49,19L49,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M59,19L59,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M69,19L69,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> + <path android:fillColor="#00000000" android:pathData="M79,19L79,89" + android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> +</vector> diff --git a/app/src/main/res/layout/about_fragment.xml b/app/src/main/res/layout/about_fragment.xml new file mode 100644 index 0000000..ce55068 --- /dev/null +++ b/app/src/main/res/layout/about_fragment.xml @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="utf-8"?> +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="15dp" + android:paddingBottom="30dp"> + + <TextView + android:id="@+id/textView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="About Wiimmfi Watcher" + android:textSize="24sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/about_watcher_text" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:paddingBottom="15dp" + android:text="TextView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView" /> + + <TextView + android:id="@+id/textView5" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="About Me" + android:textSize="24sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/about_watcher_text" /> + + <TextView + android:id="@+id/about_me_text" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="TextView" + android:paddingBottom="15dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView5" /> + + <TextView + android:id="@+id/textView7" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="GitHub" + android:textSize="24sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/about_me_text" /> + + <TextView + android:id="@+id/github_text" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="TextView" + android:paddingBottom="15dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView7" /> + + <TextView + android:id="@+id/textView8" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="Donations" + android:textSize="24sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/github_text" /> + + <TextView + android:id="@+id/donations_text" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="TextView" + android:paddingBottom="15dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView8" /> + + <TextView + android:id="@+id/textView9" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="Contact" + android:textSize="24sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/donations_text" /> + + <TextView + android:id="@+id/contact_text" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="TextView" + android:paddingBottom="15dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView9" /> + + <TextView + android:id="@+id/bugs_text" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:paddingBottom="65dp" + android:text="TextView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView13" /> + + <TextView + android:id="@+id/textView13" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:text="Bugs?" + android:textSize="24sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/contact_text" /> + </androidx.constraintlayout.widget.ConstraintLayout> + </ScrollView>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 05b6e5b..1116b4b 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -27,7 +27,7 @@ android:background="@android:color/transparent" android:elevation="0dp" app:menu="@menu/top_app_bar" - app:title="Wiimmfi Friend Codes" /> + app:title="Wiimmfi Watcher" /> </com.google.android.material.appbar.AppBarLayout> @@ -44,6 +44,21 @@ android:hapticFeedbackEnabled="false" app:layout_constraintTop_toBottomOf="@+id/friend_code_input_fragment" /> +<!-- <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton--> +<!-- android:id="@+id/clear_button"--> +<!-- android:layout_width="wrap_content"--> +<!-- android:layout_height="wrap_content"--> +<!-- android:layout_gravity="bottom|right"--> +<!-- android:layout_margin="15dp"--> +<!-- android:foregroundTint="#FFFFFF"--> +<!-- android:text="Clear"--> +<!-- android:textColor="#FFFFFF"--> +<!-- app:backgroundTint="#1E88E5"--> +<!-- app:icon="@drawable/ic_baseline_clear_all_24"--> +<!-- app:iconTint="#FFFFFF"--> +<!-- app:layout_constraintBottom_toBottomOf="parent"--> +<!-- app:layout_constraintEnd_toEndOf="parent" />--> + <!-- Screen content --> <!-- Use app:layout_behavior="@string/appbar_scrolling_view_behavior" to fit below top app bar --> diff --git a/app/src/main/res/layout/friend_code_input_fragment.xml b/app/src/main/res/layout/friend_code_input_fragment.xml index 4421a65..0dcf568 100644 --- a/app/src/main/res/layout/friend_code_input_fragment.xml +++ b/app/src/main/res/layout/friend_code_input_fragment.xml @@ -56,9 +56,10 @@ <androidx.recyclerview.widget.RecyclerView android:id="@+id/recent_friend_codes_recycler_view" android:layout_width="match_parent" - android:layout_height="match_parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintTop_toBottomOf="@+id/textView3" - tools:layout_editor_absoluteX="15dp" /> + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView3" /> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/menu/top_app_bar.xml b/app/src/main/res/menu/top_app_bar.xml index 333c537..0b2e0aa 100644 --- a/app/src/main/res/menu/top_app_bar.xml +++ b/app/src/main/res/menu/top_app_bar.xml @@ -2,9 +2,10 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> <item - android:id="@+id/favorite" + android:id="@+id/about_button" android:icon="@drawable/ic_baseline_info_24" android:title="About" + android:visible="true" app:showAsAction="ifRoom" /> </menu>
\ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_watcher_icons.xml b/app/src/main/res/mipmap-anydpi-v26/ic_watcher_icons.xml new file mode 100644 index 0000000..e813a3f --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_watcher_icons.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_watcher_icons_background"/> + <foreground android:drawable="@mipmap/ic_watcher_icons_foreground"/> +</adaptive-icon>
\ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_watcher_icons_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_watcher_icons_round.xml new file mode 100644 index 0000000..e813a3f --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_watcher_icons_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_watcher_icons_background"/> + <foreground android:drawable="@mipmap/ic_watcher_icons_foreground"/> +</adaptive-icon>
\ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/wiimmterface_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/wiimmterface_launcher.xml deleted file mode 100644 index a4bb6d8..0000000 --- a/app/src/main/res/mipmap-anydpi-v26/wiimmterface_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> - <background android:drawable="@mipmap/wiimmterface_launcher_background"/> - <foreground android:drawable="@mipmap/wiimmterface_launcher_foreground"/> -</adaptive-icon>
\ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/wiimmterface_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/wiimmterface_launcher_round.xml deleted file mode 100644 index a4bb6d8..0000000 --- a/app/src/main/res/mipmap-anydpi-v26/wiimmterface_launcher_round.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> - <background android:drawable="@mipmap/wiimmterface_launcher_background"/> - <foreground android:drawable="@mipmap/wiimmterface_launcher_foreground"/> -</adaptive-icon>
\ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_watcher_icons.png b/app/src/main/res/mipmap-hdpi/ic_watcher_icons.png Binary files differnew file mode 100644 index 0000000..155a208 --- /dev/null +++ b/app/src/main/res/mipmap-hdpi/ic_watcher_icons.png diff --git a/app/src/main/res/mipmap-hdpi/ic_watcher_icons_foreground.png b/app/src/main/res/mipmap-hdpi/ic_watcher_icons_foreground.png Binary files differnew file mode 100644 index 0000000..fe9360c --- /dev/null +++ b/app/src/main/res/mipmap-hdpi/ic_watcher_icons_foreground.png diff --git a/app/src/main/res/mipmap-hdpi/ic_watcher_icons_round.png b/app/src/main/res/mipmap-hdpi/ic_watcher_icons_round.png Binary files differnew file mode 100644 index 0000000..5530efc --- /dev/null +++ b/app/src/main/res/mipmap-hdpi/ic_watcher_icons_round.png diff --git a/app/src/main/res/mipmap-hdpi/wiimmterface_launcher.png b/app/src/main/res/mipmap-hdpi/wiimmterface_launcher.png Binary files differdeleted file mode 100644 index ce2639b..0000000 --- a/app/src/main/res/mipmap-hdpi/wiimmterface_launcher.png +++ /dev/null diff --git a/app/src/main/res/mipmap-hdpi/wiimmterface_launcher_background.png b/app/src/main/res/mipmap-hdpi/wiimmterface_launcher_background.png Binary files differdeleted file mode 100644 index a35463a..0000000 --- a/app/src/main/res/mipmap-hdpi/wiimmterface_launcher_background.png +++ /dev/null diff --git a/app/src/main/res/mipmap-hdpi/wiimmterface_launcher_foreground.png b/app/src/main/res/mipmap-hdpi/wiimmterface_launcher_foreground.png Binary files differdeleted file mode 100644 index d6474db..0000000 --- a/app/src/main/res/mipmap-hdpi/wiimmterface_launcher_foreground.png +++ /dev/null diff --git a/app/src/main/res/mipmap-hdpi/wiimmterface_launcher_round.png b/app/src/main/res/mipmap-hdpi/wiimmterface_launcher_round.png Binary files differdeleted file mode 100644 index f9ec766..0000000 --- a/app/src/main/res/mipmap-hdpi/wiimmterface_launcher_round.png +++ /dev/null diff --git a/app/src/main/res/mipmap-mdpi/ic_watcher_icons.png b/app/src/main/res/mipmap-mdpi/ic_watcher_icons.png Binary files differnew file mode 100644 index 0000000..f7fd03e --- /dev/null +++ b/app/src/main/res/mipmap-mdpi/ic_watcher_icons.png diff --git a/app/src/main/res/mipmap-mdpi/ic_watcher_icons_foreground.png b/app/src/main/res/mipmap-mdpi/ic_watcher_icons_foreground.png Binary files differnew file mode 100644 index 0000000..605df09 --- /dev/null +++ b/app/src/main/res/mipmap-mdpi/ic_watcher_icons_foreground.png diff --git a/app/src/main/res/mipmap-mdpi/ic_watcher_icons_round.png b/app/src/main/res/mipmap-mdpi/ic_watcher_icons_round.png Binary files differnew file mode 100644 index 0000000..4161cb8 --- /dev/null +++ b/app/src/main/res/mipmap-mdpi/ic_watcher_icons_round.png diff --git a/app/src/main/res/mipmap-mdpi/wiimmterface_launcher.png b/app/src/main/res/mipmap-mdpi/wiimmterface_launcher.png Binary files differdeleted file mode 100644 index 784627c..0000000 --- a/app/src/main/res/mipmap-mdpi/wiimmterface_launcher.png +++ /dev/null diff --git a/app/src/main/res/mipmap-mdpi/wiimmterface_launcher_background.png b/app/src/main/res/mipmap-mdpi/wiimmterface_launcher_background.png Binary files differdeleted file mode 100644 index 9566638..0000000 --- a/app/src/main/res/mipmap-mdpi/wiimmterface_launcher_background.png +++ /dev/null diff --git a/app/src/main/res/mipmap-mdpi/wiimmterface_launcher_foreground.png b/app/src/main/res/mipmap-mdpi/wiimmterface_launcher_foreground.png Binary files differdeleted file mode 100644 index d35200b..0000000 --- a/app/src/main/res/mipmap-mdpi/wiimmterface_launcher_foreground.png +++ /dev/null diff --git a/app/src/main/res/mipmap-mdpi/wiimmterface_launcher_round.png b/app/src/main/res/mipmap-mdpi/wiimmterface_launcher_round.png Binary files differdeleted file mode 100644 index a339830..0000000 --- a/app/src/main/res/mipmap-mdpi/wiimmterface_launcher_round.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xhdpi/ic_watcher_icons.png b/app/src/main/res/mipmap-xhdpi/ic_watcher_icons.png Binary files differnew file mode 100644 index 0000000..9d7811c --- /dev/null +++ b/app/src/main/res/mipmap-xhdpi/ic_watcher_icons.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_watcher_icons_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_watcher_icons_foreground.png Binary files differnew file mode 100644 index 0000000..6c156f7 --- /dev/null +++ b/app/src/main/res/mipmap-xhdpi/ic_watcher_icons_foreground.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_watcher_icons_round.png b/app/src/main/res/mipmap-xhdpi/ic_watcher_icons_round.png Binary files differnew file mode 100644 index 0000000..6693089 --- /dev/null +++ b/app/src/main/res/mipmap-xhdpi/ic_watcher_icons_round.png diff --git a/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher.png b/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher.png Binary files differdeleted file mode 100644 index 04763a2..0000000 --- a/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher_background.png b/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher_background.png Binary files differdeleted file mode 100644 index 4ceed80..0000000 --- a/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher_background.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher_foreground.png b/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher_foreground.png Binary files differdeleted file mode 100644 index fd6b165..0000000 --- a/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher_foreground.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher_round.png b/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher_round.png Binary files differdeleted file mode 100644 index 4511570..0000000 --- a/app/src/main/res/mipmap-xhdpi/wiimmterface_launcher_round.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xxhdpi/ic_watcher_icons.png b/app/src/main/res/mipmap-xxhdpi/ic_watcher_icons.png Binary files differnew file mode 100644 index 0000000..1bafe3a --- /dev/null +++ b/app/src/main/res/mipmap-xxhdpi/ic_watcher_icons.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_watcher_icons_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_watcher_icons_foreground.png Binary files differnew file mode 100644 index 0000000..074ca58 --- /dev/null +++ b/app/src/main/res/mipmap-xxhdpi/ic_watcher_icons_foreground.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_watcher_icons_round.png b/app/src/main/res/mipmap-xxhdpi/ic_watcher_icons_round.png Binary files differnew file mode 100644 index 0000000..da6a227 --- /dev/null +++ b/app/src/main/res/mipmap-xxhdpi/ic_watcher_icons_round.png diff --git a/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher.png b/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher.png Binary files differdeleted file mode 100644 index 5dabe1d..0000000 --- a/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher_background.png b/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher_background.png Binary files differdeleted file mode 100644 index 64ca114..0000000 --- a/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher_background.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher_foreground.png b/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher_foreground.png Binary files differdeleted file mode 100644 index 2da86e4..0000000 --- a/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher_foreground.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher_round.png Binary files differdeleted file mode 100644 index b7b5e4c..0000000 --- a/app/src/main/res/mipmap-xxhdpi/wiimmterface_launcher_round.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_watcher_icons.png b/app/src/main/res/mipmap-xxxhdpi/ic_watcher_icons.png Binary files differnew file mode 100644 index 0000000..2e04328 --- /dev/null +++ b/app/src/main/res/mipmap-xxxhdpi/ic_watcher_icons.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_watcher_icons_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_watcher_icons_foreground.png Binary files differnew file mode 100644 index 0000000..329a488 --- /dev/null +++ b/app/src/main/res/mipmap-xxxhdpi/ic_watcher_icons_foreground.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_watcher_icons_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_watcher_icons_round.png Binary files differnew file mode 100644 index 0000000..4752fc7 --- /dev/null +++ b/app/src/main/res/mipmap-xxxhdpi/ic_watcher_icons_round.png diff --git a/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher.png b/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher.png Binary files differdeleted file mode 100644 index a413f9f..0000000 --- a/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher_background.png b/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher_background.png Binary files differdeleted file mode 100644 index 8b8fd76..0000000 --- a/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher_background.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher_foreground.png b/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher_foreground.png Binary files differdeleted file mode 100644 index 4e6dd6c..0000000 --- a/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher_foreground.png +++ /dev/null diff --git a/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher_round.png Binary files differdeleted file mode 100644 index 4bb5f6d..0000000 --- a/app/src/main/res/mipmap-xxxhdpi/wiimmterface_launcher_round.png +++ /dev/null diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index 93b7175..efb6bec 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -1,13 +1,13 @@ <resources xmlns:tools="http://schemas.android.com/tools"> <!-- Base application theme. --> - <style name="Theme.WiimmterfaceAndroid" parent="Theme.MaterialComponents.DayNight.NoActionBar"> + <style name="Theme.WiimmfiWatcher" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <!-- Primary brand color. --> <item name="colorPrimary">@color/purple_200</item> <item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorOnPrimary">@color/black</item> <!-- Secondary brand color. --> - <item name="colorSecondary">@color/teal_200</item> - <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorSecondary">@color/blue_200</item> + <item name="colorSecondaryVariant">@color/blue_200</item> <item name="colorOnSecondary">@color/black</item> <!-- Status bar color. --> <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index e3b20f7..f508026 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -3,8 +3,7 @@ <color name="purple_200">#FFBB86FC</color> <color name="purple_500">#FF6200EE</color> <color name="purple_700">#FF3700B3</color> - <color name="teal_200">#FF03DAC5</color> - <color name="teal_700">#FF018786</color> + <color name="blue_200">#42A5F5</color> <color name="black">#FF000000</color> <color name="white">#FFFFFFFF</color> <color name="blue_700">#1E88E5</color> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 276e54a..2a6f8a6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,3 +1,5 @@ <resources> <string name="app_name">Wiimmfi</string> + <string name="github">All of the code in this project is open source on my GitHub repository <a href='https://github.com/brysonsteck/wiimmfi-watcher/tree/master'>here.</a> You are free to use this code and expand upon it under the GNU General Public License.</string> + <string name="bugs">Speaking of bugs, did you find a bug? First, make sure that the issue you found is not listed on my <a href='https://github.com/brysonsteck/wiimmfi-watcher/blob/master/TODO.md'>todo list.</a> It\'s possible I\'m already aware of it or working on it. If your issue is not addressed on the todo list, then you can create an issue on my GitHub repository <a href='https://github.com/brysonsteck/wiimmfi-watcher/issues'>here.</a> If you don\'t know how to use GitHub, you can fill out this <a href='https://docs.google.com/forms/d/e/1FAIpQLSd6qCONAP2tsbHPgzu_CdZcHVHL5nx7q0XFqrVfExEc84kqUQ/viewform?usp=sf_link'>Google Form</a> instead.</string> </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 9932624..b166e7b 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -1,13 +1,13 @@ <resources xmlns:tools="http://schemas.android.com/tools"> <!-- Base application theme. --> - <style name="Theme.WiimmterfaceAndroid" parent="Theme.MaterialComponents.DayNight.NoActionBar"> + <style name="Theme.WiimmfiWatcher" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <!-- Primary brand color. --> <item name="colorPrimary">#1E88E5</item> <item name="colorPrimaryVariant">#0D47A1</item> <item name="colorOnPrimary">@color/white</item> <!-- Secondary brand color. --> - <item name="colorSecondary">@color/teal_200</item> - <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorSecondary">@color/blue_200</item> + <item name="colorSecondaryVariant">@color/blue_200</item> <item name="colorOnSecondary">@color/black</item> <!-- Status bar color. --> <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> diff --git a/app/src/main/wiimmterface_launcher-playstore.png b/app/src/main/wiimmterface_launcher-playstore.png Binary files differdeleted file mode 100644 index ccbea69..0000000 --- a/app/src/main/wiimmterface_launcher-playstore.png +++ /dev/null diff --git a/app/src/test/java/com/example/wiimmterfaceandroid/ExampleUnitTest.java b/app/src/test/java/me/brysonsteck/wiimmfiwatcher/ExampleUnitTest.java index 06e14d3..5c218bc 100644 --- a/app/src/test/java/com/example/wiimmterfaceandroid/ExampleUnitTest.java +++ b/app/src/test/java/me/brysonsteck/wiimmfiwatcher/ExampleUnitTest.java @@ -1,4 +1,4 @@ -package com.example.wiimmterfaceandroid; +package me.brysonsteck.wiimmfiwatcher; import org.junit.Test; diff --git a/build.gradle b/build.gradle index dfbc7c1..ec19a1f 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath "com.android.tools.build:gradle:4.1.2" + classpath "com.android.tools.build:gradle:4.1.3" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f9ad33a..d48eb54 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -#Wed Apr 14 23:20:43 MDT 2021 +#Sat May 08 14:23:18 MDT 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index 6a4e6c1..df7133c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ include ':app' -rootProject.name = "Wiimmterface Android"
\ No newline at end of file +rootProject.name = "Wiimmfi Watcher"
\ No newline at end of file diff --git a/wiimmfi watcher0.1.png b/wiimmfi watcher0.1.png Binary files differnew file mode 100644 index 0000000..2d32adc --- /dev/null +++ b/wiimmfi watcher0.1.png diff --git a/wiimmfi watcher0.2.png b/wiimmfi watcher0.2.png Binary files differnew file mode 100644 index 0000000..de43ee0 --- /dev/null +++ b/wiimmfi watcher0.2.png |