From 1ed362fdcac42fd2c18d1b580c8e20196564ba47 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 30 May 2021 16:53:09 -0600 Subject: fixed about fragment license text error, added margins to watchcodesfragment --- app/build.gradle | 4 ++-- .../main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java | 3 +++ .../java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java | 7 +++++-- app/src/main/res/layout/room_fragment.xml | 8 +++++--- app/src/main/res/layout/watch_code_fragment.xml | 10 ++++++---- app/src/main/res/values/strings.xml | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d0d4a21..20b68a8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "me.brysonsteck.wiimmfiwatcher" minSdkVersion 19 targetSdkVersion 30 - versionCode 4 - versionName "1.1.2" + versionCode 5 + versionName "1.1.3" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java index e2c97db..7247e58 100644 --- a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java @@ -3,6 +3,8 @@ package me.brysonsteck.wiimmfiwatcher; import android.os.Build; import android.os.Bundle; import android.view.View; +import android.view.ViewGroup; +import android.view.WindowManager; import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; @@ -18,6 +20,7 @@ public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); View aboutButton = findViewById(R.id.about_button); if (savedInstanceState == null) { diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java index 1b285b9..a14e6f7 100644 --- a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java @@ -12,6 +12,9 @@ import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.core.view.OnApplyWindowInsetsListener; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; import androidx.databinding.ObservableList; import androidx.fragment.app.Fragment; import androidx.lifecycle.ViewModelProvider; @@ -77,7 +80,7 @@ public class WatchCodeFragment extends Fragment { @Override public void onItemRangeInserted(ObservableList sender, int positionStart, int itemCount) { getActivity().runOnUiThread(() -> { - adapter.notifyItemRangeInserted(positionStart, itemCount); + adapter.notifyItemRangeInserted(positionStart, itemCount); // this is the only method that seems to be called }); } @@ -101,8 +104,8 @@ public class WatchCodeFragment extends Fragment { linearLayoutManager.setStackFromEnd(true); recyclerView.setLayoutManager(linearLayoutManager); recyclerView.setAdapter(adapter); - EditText friendCode = view.findViewById(R.id.friend_code_edit_text); + EditText friendCode = view.findViewById(R.id.friend_code_edit_text); MaterialTextView errorText = view.findViewById(R.id.error_text); Button watchButton = view.findViewById(R.id.watch_button); watchButton.setOnClickListener(buttonClick -> { diff --git a/app/src/main/res/layout/room_fragment.xml b/app/src/main/res/layout/room_fragment.xml index 81f8419..bf49aa1 100644 --- a/app/src/main/res/layout/room_fragment.xml +++ b/app/src/main/res/layout/room_fragment.xml @@ -1,10 +1,11 @@ + android:foregroundTint="@color/white" + + > + app:layout_constraintTop_toBottomOf="@+id/room_header_text" + android:fitsSystemWindows="true"> diff --git a/app/src/main/res/layout/watch_code_fragment.xml b/app/src/main/res/layout/watch_code_fragment.xml index 7bfe60a..ab93298 100644 --- a/app/src/main/res/layout/watch_code_fragment.xml +++ b/app/src/main/res/layout/watch_code_fragment.xml @@ -1,12 +1,12 @@ + android:padding="15dp" + android:focusable="true" android:focusableInTouchMode="true"> + android:layout_height="match_parent" + android:layout_marginBottom="?android:attr/actionBarSize"> + android:orientation="vertical" + android:layout_marginBottom="?android:attr/actionBarSize"> 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 matches on your phone in a quick and easy way. All of the code in this project is open source on my GitHub repository here. You are free to use this code and expand upon it under the GNU General Public License (Version 3). Speaking of bugs, did you find a bug? Do you want to provide feedback on the app? I\'d love to hear it! First, make sure that the issue you found is not listed on my todo list. 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 here. If you don\'t know how to use GitHub, you can fill out this Google Form instead. - © Copyright 2021 Bryson Steck Wiimmfi Watcher is available under the GNU General Public License Version 3. You can view the license here. Wiimmfi Watcher is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Wiimmfi Watcher is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Wiimmfi Watcher. If not, see <https://www.gnu.org/licenses/>. + © Copyright 2021 Bryson Steck\n\nWiimmfi Watcher is available under the GNU General Public License Version 3. You can view the license here.\n\nWiimmfi Watcher is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nWiimmfi Watcher is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with Wiimmfi Watcher. If not, see <https://www.gnu.org/licenses/>. If you would like to get a hold 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. Watch -- cgit v1.2.3