diff --git a/app/build.gradle b/app/build.gradle
index 167a019aa..6b966dc7b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
- buildToolsVersion '26.0.2'
+ buildToolsVersion '27.0.3'
defaultConfig {
applicationId "io.treehouses.remote"
minSdkVersion 15
diff --git a/app/src/main/java/io/treehouses/remote/HotspotDialogFragment.java b/app/src/main/java/io/treehouses/remote/HotspotDialogFragment.java
index 0b3bdfea6..b1db4109c 100644
--- a/app/src/main/java/io/treehouses/remote/HotspotDialogFragment.java
+++ b/app/src/main/java/io/treehouses/remote/HotspotDialogFragment.java
@@ -10,6 +10,7 @@
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
+import android.widget.EditText;
/**
* Created by Terrence on 3/12/2018.
@@ -36,7 +37,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
// Build the dialog and set up the button click handlers
LayoutInflater inflater = getActivity().getLayoutInflater();
- View mView = inflater.inflate(R.layout.dialog_design,null);
+ View mView = inflater.inflate(R.layout.hotspot_dialog,null);
initLayoutView(mView);
final AlertDialog mDialog = getAlertDialog(mView);
@@ -48,6 +49,20 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
return mDialog;
}
+
+ @NonNull
+ @Override
+ protected void getListener(final AlertDialog mDialog) {
+ mDialog.setOnShowListener(new DialogInterface.OnShowListener() {
+ @Override
+ public void onShow(DialogInterface dialog) {
+ dialogButtonTrueOrFalse(mDialog, false);
+ mSSIDEditText.setError("Name your Hotspot");
+ }
+ });
+
+ }
+
}
diff --git a/app/src/main/java/io/treehouses/remote/WifiDialogFragment.java b/app/src/main/java/io/treehouses/remote/WifiDialogFragment.java
index b3ac178f4..b6d074531 100644
--- a/app/src/main/java/io/treehouses/remote/WifiDialogFragment.java
+++ b/app/src/main/java/io/treehouses/remote/WifiDialogFragment.java
@@ -130,7 +130,7 @@ public void afterTextChanged(Editable s) {}
});
}
- private void dialogButtonTrueOrFalse(AlertDialog mDialog, Boolean button){
+ public void dialogButtonTrueOrFalse(AlertDialog mDialog, Boolean button){
if (button){
mDialog.getButton(AlertDialog.BUTTON_POSITIVE).setClickable(true);
mDialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(true);
diff --git a/app/src/main/res/layout-large-land/hotspot_dialog.xml b/app/src/main/res/layout-large-land/hotspot_dialog.xml
new file mode 100644
index 000000000..083b93db3
--- /dev/null
+++ b/app/src/main/res/layout-large-land/hotspot_dialog.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-large/hotspot_dialog.xml b/app/src/main/res/layout-large/hotspot_dialog.xml
new file mode 100644
index 000000000..083b93db3
--- /dev/null
+++ b/app/src/main/res/layout-large/hotspot_dialog.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-small-land/hotspot_dialog.xml b/app/src/main/res/layout-small-land/hotspot_dialog.xml
new file mode 100644
index 000000000..083b93db3
--- /dev/null
+++ b/app/src/main/res/layout-small-land/hotspot_dialog.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-small/hotspot_dialog.xml b/app/src/main/res/layout-small/hotspot_dialog.xml
new file mode 100644
index 000000000..083b93db3
--- /dev/null
+++ b/app/src/main/res/layout-small/hotspot_dialog.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-xlarge-land/hotspot_dialog.xml b/app/src/main/res/layout-xlarge-land/hotspot_dialog.xml
new file mode 100644
index 000000000..083b93db3
--- /dev/null
+++ b/app/src/main/res/layout-xlarge-land/hotspot_dialog.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-xlarge/hotspot_dialog.xml b/app/src/main/res/layout-xlarge/hotspot_dialog.xml
new file mode 100644
index 000000000..083b93db3
--- /dev/null
+++ b/app/src/main/res/layout-xlarge/hotspot_dialog.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/hotspot_dialog.xml b/app/src/main/res/layout/hotspot_dialog.xml
new file mode 100644
index 000000000..083b93db3
--- /dev/null
+++ b/app/src/main/res/layout/hotspot_dialog.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 67838c3b0..c0dc61fed 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -73,6 +73,7 @@
Configure RPi\'s Wi-Fi setting
SSID
Password
+ Confirm Password
Type in the name of the network \nyou want to use
Password must have at least \neight characters.
Start configuring...
diff --git a/build.gradle b/build.gradle
index 7e01a0aa5..804e9f4c4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.0.1'
+ classpath 'com.android.tools.build:gradle:3.1.0'
// 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 fc9019ef7..aa93387f0 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Mon Jan 08 22:57:09 EST 2018
+#Mon Apr 02 14:47:19 CDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip