|
@@ -3,6 +3,8 @@ package com.xplora.xpsettings.Activity;
|
|
|
import android.annotation.SuppressLint;
|
|
|
import android.content.Intent;
|
|
|
import android.os.Bundle;
|
|
|
+import android.view.KeyEvent;
|
|
|
+import android.view.View;
|
|
|
import android.view.Window;
|
|
|
import android.widget.EditText;
|
|
|
import android.widget.FrameLayout;
|
|
@@ -22,6 +24,16 @@ public class WifiLoginActivity extends BaseActivity {
|
|
|
setContentView(R.layout.activity_wifi_login);
|
|
|
password = findViewById(R.id.password);
|
|
|
password.requestFocus();
|
|
|
+ password.setOnKeyListener(new View.OnKeyListener() {
|
|
|
+ @Override
|
|
|
+ public boolean onKey(View v, int keyCode, KeyEvent event) {
|
|
|
+ if (event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
|
|
|
+ showWiFi();
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
check = findViewById(R.id.check);
|
|
|
check.setOnClickListener(view -> {
|
|
|
Intent intent = new Intent();
|
|
@@ -32,4 +44,13 @@ public class WifiLoginActivity extends BaseActivity {
|
|
|
finish();
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ private void showWiFi() {
|
|
|
+ Intent intent = new Intent();
|
|
|
+ intent.putExtra("ssid", getIntent().getStringExtra("ssid"));
|
|
|
+ intent.putExtra("bssid", getIntent().getStringExtra("bssid"));
|
|
|
+ intent.putExtra("password", password.getText().toString().trim());
|
|
|
+ setResult(-1, intent);
|
|
|
+ finish();
|
|
|
+ }
|
|
|
}
|