diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-05-30 16:53:09 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-05-30 16:53:09 -0600 |
commit | 1ed362fdcac42fd2c18d1b580c8e20196564ba47 (patch) | |
tree | be3891c2d1a6c7308e2a7f8b4c95251c4a230754 /app/src/main/java/me/brysonsteck/wiimmfiwatcher | |
parent | 72da66ee0a0c4458f779581245d9ee3d9500f4cb (diff) | |
download | wiimmfi-watcher-1ed362fdcac42fd2c18d1b580c8e20196564ba47.tar wiimmfi-watcher-1ed362fdcac42fd2c18d1b580c8e20196564ba47.tar.gz wiimmfi-watcher-1ed362fdcac42fd2c18d1b580c8e20196564ba47.tar.bz2 |
fixed about fragment license text error, added margins to watchcodesfragment
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 -> { |