aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/me/brysonsteck
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-05-24 11:20:01 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-05-24 11:20:01 -0600
commit3e5d90158996b919b6661c3cb9c9fc18ac951bfc (patch)
tree475b72e6d5d518eb34fb7b10fcc7699cd012a3a6 /app/src/main/java/me/brysonsteck
parent720adcf834005e6e871528a8997328e6134b88bf (diff)
downloadwiimmfi-watcher-3e5d90158996b919b6661c3cb9c9fc18ac951bfc.tar
wiimmfi-watcher-3e5d90158996b919b6661c3cb9c9fc18ac951bfc.tar.gz
wiimmfi-watcher-3e5d90158996b919b6661c3cb9c9fc18ac951bfc.tar.bz2
added spanish and portugese, experimenting with progress bars
Diffstat (limited to 'app/src/main/java/me/brysonsteck')
-rw-r--r--app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java5
-rw-r--r--app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java10
2 files changed, 7 insertions, 8 deletions
diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java
index bb7663c..e2c97db 100644
--- a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java
+++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/MainActivity.java
@@ -6,14 +6,11 @@ import android.view.View;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
-import androidx.databinding.ObservableArrayList;
import androidx.room.Room;
import me.brysonsteck.wiimmfiwatcher.database.AppDatabase;
-import me.brysonsteck.wiimmfiwatcher.model.FriendCode;
public class MainActivity extends AppCompatActivity {
- ObservableArrayList<FriendCode> recentFCList = new ObservableArrayList<>();
AppDatabase database;
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@@ -29,8 +26,6 @@ public class MainActivity extends AppCompatActivity {
.replace(R.id.friend_code_input_fragment, new WatchCodeFragment(), null)
.setReorderingAllowed(true)
.commit();
-
-
}
database = Room.databaseBuilder(this, AppDatabase.class, "friend-codes-db").build();
diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java
index 93165df..1b285b9 100644
--- a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java
+++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeFragment.java
@@ -1,15 +1,14 @@
package me.brysonsteck.wiimmfiwatcher;
import android.content.Intent;
-import android.content.res.Configuration;
-import android.graphics.Color;
import android.os.Bundle;
import android.transition.TransitionInflater;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
-import android.widget.LinearLayout;
+import android.widget.ProgressBar;
+import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -151,6 +150,11 @@ public class WatchCodeFragment extends Fragment {
errorText.setText("");
viewModel.saveFriendCode("", friendCode.getText().toString());
intent.putExtra("friendCode", friendCode.getText().toString());
+ ProgressBar p = view.findViewById(R.id.progressBar1);
+ if(p.getVisibility() != View.GONE){ // check if it is visible
+ p.setVisibility(View.GONE); // if not set it to visible
+ watchButton.setVisibility(View.VISIBLE); // use 1 or 2 as parameters.. arg0 is the view(your button) from the onclick listener
+ }
startActivity(intent);
}
}