diff options
Diffstat (limited to 'app/src/main/java/me/brysonsteck/wiimmfiwatcher')
-rw-r--r-- | app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java | 3 | ||||
-rw-r--r-- | app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java | 7 |
2 files changed, 8 insertions, 2 deletions
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<FriendCode> 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 -> { |