Search in sources :

Example 1 with AppCompatEditText

use of androidx.appcompat.widget.AppCompatEditText in project J2ME-Loader by nikita36078.

the class TextFieldImpl method getView.

EditText getView(Context context, Item item) {
    if (textview == null) {
        textview = new AppCompatEditText(context);
        setMaxSize(maxSize);
        setConstraints(constraints);
        setString(text);
        textview.addTextChangedListener(new TextWatcher() {

            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
            }

            @Override
            public void afterTextChanged(Editable s) {
                text = s.toString();
            }
        });
        if (item != null) {
            textview.setOnFocusChangeListener((v, hasFocus) -> {
                if (!hasFocus)
                    item.notifyStateChanged();
            });
        } else {
            textview.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
            textview.setGravity(Gravity.TOP);
        }
    }
    return textview;
}
Also used : AppCompatEditText(androidx.appcompat.widget.AppCompatEditText) TextWatcher(android.text.TextWatcher) Editable(android.text.Editable) LinearLayout(android.widget.LinearLayout)

Example 2 with AppCompatEditText

use of androidx.appcompat.widget.AppCompatEditText in project AmazeFileManager by TeamAmaze.

the class WarnableTextInputValidatorTest method testValidate.

@Test
public void testValidate() {
    EditText textfield = new AppCompatEditText(context);
    WarnableTextInputLayout layout = new WarnableTextInputLayout(context, Robolectric.buildAttributeSet().build());
    Button button = new AppCompatButton(context);
    WarnableTextInputValidator.OnTextValidate validator = text -> ("Pass".equals(text)) ? new WarnableTextInputValidator.ReturnState(WarnableTextInputValidator.ReturnState.STATE_NORMAL, R.string.ok) : new WarnableTextInputValidator.ReturnState(WarnableTextInputValidator.ReturnState.STATE_ERROR, R.string.error);
    WarnableTextInputValidator target = new WarnableTextInputValidator(ApplicationProvider.getApplicationContext(), textfield, layout, button, validator);
    textfield.setText("");
    target.performClick();
    assertFalse(button.isEnabled());
    assertEquals(context.getString(R.string.error), layout.getError());
    textfield.setText("pass");
    target.performClick();
    assertFalse(button.isEnabled());
    assertEquals(context.getString(R.string.error), layout.getError());
    textfield.setText("Pass");
    target.performClick();
    assertTrue(button.isEnabled());
    assertNull(layout.getError());
}
Also used : AppCompatEditText(androidx.appcompat.widget.AppCompatEditText) EditText(android.widget.EditText) Context(android.content.Context) KITKAT(android.os.Build.VERSION_CODES.KITKAT) JELLY_BEAN(android.os.Build.VERSION_CODES.JELLY_BEAN) P(android.os.Build.VERSION_CODES.P) Robolectric(org.robolectric.Robolectric) RunWith(org.junit.runner.RunWith) Config(org.robolectric.annotation.Config) Assert.assertTrue(org.junit.Assert.assertTrue) AppCompatEditText(androidx.appcompat.widget.AppCompatEditText) Test(org.junit.Test) AppCompatButton(androidx.appcompat.widget.AppCompatButton) AndroidJUnit4(androidx.test.ext.junit.runners.AndroidJUnit4) ApplicationProvider(androidx.test.core.app.ApplicationProvider) Assert.assertNull(org.junit.Assert.assertNull) Assert.assertFalse(org.junit.Assert.assertFalse) Button(android.widget.Button) R(com.amaze.filemanager.R) Assert.assertEquals(org.junit.Assert.assertEquals) EditText(android.widget.EditText) Before(org.junit.Before) AppCompatEditText(androidx.appcompat.widget.AppCompatEditText) AppCompatButton(androidx.appcompat.widget.AppCompatButton) Button(android.widget.Button) AppCompatButton(androidx.appcompat.widget.AppCompatButton) Test(org.junit.Test)

Example 3 with AppCompatEditText

use of androidx.appcompat.widget.AppCompatEditText in project AmazeFileManager by TeamAmaze.

the class SmbConnectDialog method onCreateDialog.

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    final boolean edit = getArguments().getBoolean("edit", false);
    final String path = getArguments().getString("path");
    final String name = getArguments().getString("name");
    context = getActivity();
    emptyAddress = getString(R.string.cant_be_empty, getString(R.string.ip));
    emptyName = getString(R.string.cant_be_empty, getString(R.string.connection_name));
    invalidDomain = getString(R.string.invalid, getString(R.string.domain));
    invalidUsername = getString(R.string.invalid, getString(R.string.username).toLowerCase());
    if (getActivity() instanceof SmbConnectionListener) {
        smbConnectionListener = (SmbConnectionListener) getActivity();
    }
    final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
    final MaterialDialog.Builder ba3 = new MaterialDialog.Builder(context);
    ba3.title((R.string.smb_connection));
    ba3.autoDismiss(false);
    final View v2 = getActivity().getLayoutInflater().inflate(R.layout.smb_dialog, null);
    final TextInputLayout connectionTIL = v2.findViewById(R.id.connectionTIL);
    final TextInputLayout ipTIL = v2.findViewById(R.id.ipTIL);
    final TextInputLayout domainTIL = v2.findViewById(R.id.domainTIL);
    final TextInputLayout usernameTIL = v2.findViewById(R.id.usernameTIL);
    final TextInputLayout passwordTIL = v2.findViewById(R.id.passwordTIL);
    final AppCompatEditText conName = v2.findViewById(R.id.connectionET);
    ExtensionsKt.makeRequired(connectionTIL);
    ExtensionsKt.makeRequired(ipTIL);
    ExtensionsKt.makeRequired(usernameTIL);
    ExtensionsKt.makeRequired(passwordTIL);
    conName.addTextChangedListener(new SimpleTextWatcher() {

        @Override
        public void afterTextChanged(Editable s) {
            if (conName.getText().toString().length() == 0)
                connectionTIL.setError(emptyName);
            else
                connectionTIL.setError("");
        }
    });
    final AppCompatEditText ip = v2.findViewById(R.id.ipET);
    ip.addTextChangedListener(new SimpleTextWatcher() {

        @Override
        public void afterTextChanged(Editable s) {
            if (ip.getText().toString().length() == 0)
                ipTIL.setError(emptyAddress);
            else
                ipTIL.setError("");
        }
    });
    final AppCompatEditText share = v2.findViewById(R.id.shareET);
    final AppCompatEditText domain = v2.findViewById(R.id.domainET);
    domain.addTextChangedListener(new SimpleTextWatcher() {

        @Override
        public void afterTextChanged(Editable s) {
            if (domain.getText().toString().contains(";"))
                domainTIL.setError(invalidDomain);
            else
                domainTIL.setError("");
        }
    });
    final AppCompatEditText user = v2.findViewById(R.id.usernameET);
    user.addTextChangedListener(new SimpleTextWatcher() {

        @Override
        public void afterTextChanged(Editable s) {
            if (user.getText().toString().contains(":"))
                usernameTIL.setError(invalidUsername);
            else
                usernameTIL.setError("");
        }
    });
    int accentColor = ((ThemedActivity) getActivity()).getAccent();
    final AppCompatEditText pass = v2.findViewById(R.id.passwordET);
    final AppCompatCheckBox chkSmbAnonymous = v2.findViewById(R.id.chkSmbAnonymous);
    final AppCompatCheckBox chkSmbDisableIpcSignature = v2.findViewById(R.id.chkSmbDisableIpcSignature);
    TextView help = v2.findViewById(R.id.wanthelp);
    EditTextColorStateUtil.setTint(context, conName, accentColor);
    EditTextColorStateUtil.setTint(context, user, accentColor);
    EditTextColorStateUtil.setTint(context, pass, accentColor);
    Utils.setTint(context, chkSmbAnonymous, accentColor);
    help.setOnClickListener(v -> {
        int accentColor1 = ((ThemedActivity) getActivity()).getAccent();
        GeneralDialogCreation.showSMBHelpDialog(context, accentColor1);
    });
    chkSmbAnonymous.setOnClickListener(view -> {
        if (chkSmbAnonymous.isChecked()) {
            user.setEnabled(false);
            pass.setEnabled(false);
        } else {
            user.setEnabled(true);
            pass.setEnabled(true);
        }
    });
    if (edit) {
        String userp = "";
        String passp = "";
        String ipp = "";
        String domainp = "";
        String sharep = "";
        conName.setText(name);
        try {
            URL a = new URL(path);
            String userinfo = a.getUserInfo();
            if (userinfo != null) {
                String inf = URLDecoder.decode(userinfo, "UTF-8");
                int domainDelim = !inf.contains(";") ? 0 : inf.indexOf(';');
                domainp = inf.substring(0, domainDelim);
                if (domainp != null && domainp.length() > 0)
                    inf = inf.substring(domainDelim + 1);
                userp = inf.substring(0, inf.indexOf(":"));
                passp = inf.substring(inf.indexOf(":") + 1, inf.length());
                domain.setText(domainp);
                user.setText(userp);
                pass.setText(passp);
            } else {
                chkSmbAnonymous.setChecked(true);
            }
            ipp = a.getHost();
            sharep = a.getPath().replaceFirst("/", "").replaceAll("/$", "");
            ip.setText(ipp);
            share.setText(sharep);
            UrlQuerySanitizer sanitizer = new UrlQuerySanitizer(path);
            if (sanitizer.hasParameter(PARAM_DISABLE_IPC_SIGNING_CHECK)) {
                chkSmbDisableIpcSignature.setChecked(Boolean.parseBoolean(sanitizer.getValue(PARAM_DISABLE_IPC_SIGNING_CHECK)));
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
    } else if (path != null && path.length() > 0) {
        conName.setText(name);
        ip.setText(path);
        user.requestFocus();
    } else {
        conName.setText(R.string.smb_connection);
        conName.requestFocus();
    }
    ba3.customView(v2, true);
    ba3.theme(utilsProvider.getAppTheme().getMaterialDialogTheme());
    ba3.neutralText(R.string.cancel);
    ba3.positiveText(R.string.create);
    if (edit)
        ba3.negativeText(R.string.delete);
    ba3.positiveColor(accentColor).negativeColor(accentColor).neutralColor(accentColor);
    ba3.onPositive((dialog, which) -> {
        String[] s;
        String ipa = ip.getText().toString();
        String con_nam = conName.getText().toString();
        String sDomain = domain.getText().toString();
        String sShare = share.getText().toString();
        String username = user.getText().toString();
        TextInputLayout firstInvalidField = null;
        if (con_nam == null || con_nam.length() == 0) {
            connectionTIL.setError(emptyName);
            firstInvalidField = connectionTIL;
        }
        if (ipa == null || ipa.length() == 0) {
            ipTIL.setError(emptyAddress);
            if (firstInvalidField == null)
                firstInvalidField = ipTIL;
        }
        if (sDomain.contains(";")) {
            domainTIL.setError(invalidDomain);
            if (firstInvalidField == null)
                firstInvalidField = domainTIL;
        }
        if (username.contains(":")) {
            usernameTIL.setError(invalidUsername);
            if (firstInvalidField == null)
                firstInvalidField = usernameTIL;
        }
        if (firstInvalidField != null) {
            firstInvalidField.requestFocus();
            return;
        }
        SmbFile smbFile;
        String domaind = domain.getText().toString();
        if (chkSmbAnonymous.isChecked())
            smbFile = createSMBPath(new String[] { ipa, "", "", domaind, sShare }, true, false);
        else {
            String useraw = user.getText().toString();
            String useru = useraw.replaceAll(" ", "\\ ");
            String passp = pass.getText().toString();
            smbFile = createSMBPath(new String[] { ipa, useru, passp, domaind, sShare }, false, false);
        }
        if (smbFile == null)
            return;
        StringBuilder extraParams = new StringBuilder();
        if (chkSmbDisableIpcSignature.isChecked())
            extraParams.append(PARAM_DISABLE_IPC_SIGNING_CHECK).append('=').append(true);
        try {
            s = new String[] { conName.getText().toString(), SmbUtil.getSmbEncryptedPath(getActivity(), smbFile.getPath()) };
        } catch (GeneralSecurityException | IOException e) {
            e.printStackTrace();
            Toast.makeText(getActivity(), getString(R.string.error), Toast.LENGTH_LONG).show();
            return;
        }
        if (smbConnectionListener != null) {
            // encrypted path means path with encrypted pass
            String qs = extraParams.length() > 0 ? extraParams.insert(0, '?').toString() : "";
            smbConnectionListener.addConnection(edit, s[0], smbFile.getPath() + qs, s[1] + qs, name, path);
        }
        dismiss();
    });
    ba3.onNegative((dialog, which) -> {
        if (smbConnectionListener != null) {
            smbConnectionListener.deleteConnection(name, path);
        }
        dismiss();
    });
    ba3.onNeutral((dialog, which) -> dismiss());
    return ba3.build();
}
Also used : MalformedURLException(java.net.MalformedURLException) URL(java.net.URL) ThemedActivity(com.amaze.filemanager.ui.activities.superclasses.ThemedActivity) Editable(android.text.Editable) TextView(android.widget.TextView) TextInputLayout(com.google.android.material.textfield.TextInputLayout) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) SharedPreferences(android.content.SharedPreferences) GeneralSecurityException(java.security.GeneralSecurityException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) IOException(java.io.IOException) View(android.view.View) TextView(android.widget.TextView) AppCompatCheckBox(androidx.appcompat.widget.AppCompatCheckBox) SmbFile(jcifs.smb.SmbFile) AppCompatEditText(androidx.appcompat.widget.AppCompatEditText) SimpleTextWatcher(com.amaze.filemanager.utils.SimpleTextWatcher) UrlQuerySanitizer(android.net.UrlQuerySanitizer)

Example 4 with AppCompatEditText

use of androidx.appcompat.widget.AppCompatEditText in project MTweaks-KernelAdiutorMOD by morogoku.

the class SettingsFragment method editPasswordDialog.

private void editPasswordDialog(final String oldPass) {
    mOldPassword = oldPass;
    LinearLayout linearLayout = new LinearLayout(getActivity());
    linearLayout.setOrientation(LinearLayout.VERTICAL);
    linearLayout.setGravity(Gravity.CENTER);
    int padding = Math.round(getResources().getDimension(R.dimen.dialog_padding));
    linearLayout.setPadding(padding, padding, padding, padding);
    final AppCompatEditText oldPassword = new AppCompatEditText(getActivity());
    if (!oldPass.isEmpty()) {
        oldPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
        oldPassword.setHint(getString(R.string.old_password));
        linearLayout.addView(oldPassword);
    }
    final AppCompatEditText newPassword = new AppCompatEditText(getActivity());
    newPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
    newPassword.setHint(getString(R.string.new_password));
    linearLayout.addView(newPassword);
    final AppCompatEditText confirmNewPassword = new AppCompatEditText(getActivity());
    confirmNewPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
    confirmNewPassword.setHint(getString(R.string.confirm_new_password));
    linearLayout.addView(confirmNewPassword);
    new Dialog(getActivity()).setView(linearLayout).setNegativeButton(getString(R.string.cancel), (dialogInterface, i) -> {
    }).setPositiveButton(getString(R.string.ok), (dialogInterface, i) -> {
        if (!oldPass.isEmpty() && !oldPassword.getText().toString().equals(Utils.decodeString(oldPass))) {
            Utils.toast(getString(R.string.old_password_wrong), getActivity());
            return;
        }
        if (newPassword.getText().toString().isEmpty()) {
            Utils.toast(getString(R.string.password_empty), getActivity());
            return;
        }
        if (!newPassword.getText().toString().equals(confirmNewPassword.getText().toString())) {
            Utils.toast(getString(R.string.password_not_match), getActivity());
            return;
        }
        if (newPassword.getText().toString().length() > 32) {
            Utils.toast(getString(R.string.password_too_long), getActivity());
            return;
        }
        AppSettings.savePassword(Utils.encodeString(newPassword.getText().toString()), getActivity());
        if (mFingerprint != null) {
            mFingerprint.setEnabled(true);
        }
    }).setOnDismissListener(dialogInterface -> mOldPassword = null).show();
}
Also used : Context(android.content.Context) LinearLayout(android.widget.LinearLayout) Bundle(android.os.Bundle) AlertDialog(androidx.appcompat.app.AlertDialog) PreferenceCategory(androidx.preference.PreferenceCategory) Intent(android.content.Intent) PreferenceFragmentCompat(androidx.preference.PreferenceFragmentCompat) ArrayList(java.util.ArrayList) Themes(com.moro.mtweaks.utils.Themes) SuppressLint(android.annotation.SuppressLint) Dialog(com.moro.mtweaks.views.dialog.Dialog) Handler(android.os.Handler) PreferenceViewHolder(androidx.preference.PreferenceViewHolder) Fragment(androidx.fragment.app.Fragment) View(android.view.View) FingerprintManagerCompat(androidx.core.hardware.fingerprint.FingerprintManagerCompat) RecyclerView(androidx.recyclerview.widget.RecyclerView) Build(android.os.Build) ContextCompat(androidx.core.content.ContextCompat) AppUpdaterTask(com.moro.mtweaks.utils.AppUpdaterTask) Utils(com.moro.mtweaks.utils.Utils) MainActivity(com.moro.mtweaks.activities.MainActivity) PreferenceScreen(androidx.preference.PreferenceScreen) BorderCircleView(com.moro.mtweaks.views.BorderCircleView) AsyncTask(android.os.AsyncTask) LayoutInflater(android.view.LayoutInflater) SwitchPreferenceCompat(androidx.preference.SwitchPreferenceCompat) NavigationActivity(com.moro.mtweaks.activities.NavigationActivity) ProgressDialog(android.app.ProgressDialog) AppCompatEditText(androidx.appcompat.widget.AppCompatEditText) InputType(android.text.InputType) Messenger(android.os.Messenger) AppSettings(com.moro.mtweaks.utils.AppSettings) Preference(androidx.preference.Preference) ViewGroup(android.view.ViewGroup) ViewUtils(com.moro.mtweaks.utils.ViewUtils) ContextThemeWrapper(androidx.appcompat.view.ContextThemeWrapper) PreferenceGroupAdapter(androidx.preference.PreferenceGroupAdapter) Gravity(android.view.Gravity) ApplyOnBootService(com.moro.mtweaks.services.boot.ApplyOnBootService) RootUtils(com.moro.mtweaks.utils.root.RootUtils) R(com.moro.mtweaks.R) List(java.util.List) Message(android.os.Message) BannerResizerActivity(com.moro.mtweaks.activities.BannerResizerActivity) Resources(android.content.res.Resources) AppCompatEditText(androidx.appcompat.widget.AppCompatEditText) AlertDialog(androidx.appcompat.app.AlertDialog) Dialog(com.moro.mtweaks.views.dialog.Dialog) ProgressDialog(android.app.ProgressDialog) LinearLayout(android.widget.LinearLayout) SuppressLint(android.annotation.SuppressLint)

Example 5 with AppCompatEditText

use of androidx.appcompat.widget.AppCompatEditText in project MTweaks-KernelAdiutorMOD by morogoku.

the class SettingsFragment method deletePasswordDialog.

private void deletePasswordDialog(final String password) {
    if (password.isEmpty()) {
        Utils.toast(getString(R.string.set_password_first), getActivity());
        return;
    }
    mDeletePassword = password;
    LinearLayout linearLayout = new LinearLayout(getActivity());
    linearLayout.setOrientation(LinearLayout.VERTICAL);
    linearLayout.setGravity(Gravity.CENTER);
    int padding = Math.round(getResources().getDimension(R.dimen.dialog_padding));
    linearLayout.setPadding(padding, padding, padding, padding);
    final AppCompatEditText mPassword = new AppCompatEditText(getActivity());
    mPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
    mPassword.setHint(getString(R.string.password));
    linearLayout.addView(mPassword);
    new Dialog(getActivity()).setView(linearLayout).setPositiveButton(getString(R.string.ok), (dialogInterface, i) -> {
        if (!mPassword.getText().toString().equals(Utils.decodeString(password))) {
            Utils.toast(getString(R.string.password_wrong), getActivity());
            return;
        }
        AppSettings.resetPassword(getActivity());
        if (mFingerprint != null) {
            mFingerprint.setEnabled(false);
        }
    }).setOnDismissListener(dialogInterface -> mDeletePassword = null).show();
}
Also used : Context(android.content.Context) LinearLayout(android.widget.LinearLayout) Bundle(android.os.Bundle) AlertDialog(androidx.appcompat.app.AlertDialog) PreferenceCategory(androidx.preference.PreferenceCategory) Intent(android.content.Intent) PreferenceFragmentCompat(androidx.preference.PreferenceFragmentCompat) ArrayList(java.util.ArrayList) Themes(com.moro.mtweaks.utils.Themes) SuppressLint(android.annotation.SuppressLint) Dialog(com.moro.mtweaks.views.dialog.Dialog) Handler(android.os.Handler) PreferenceViewHolder(androidx.preference.PreferenceViewHolder) Fragment(androidx.fragment.app.Fragment) View(android.view.View) FingerprintManagerCompat(androidx.core.hardware.fingerprint.FingerprintManagerCompat) RecyclerView(androidx.recyclerview.widget.RecyclerView) Build(android.os.Build) ContextCompat(androidx.core.content.ContextCompat) AppUpdaterTask(com.moro.mtweaks.utils.AppUpdaterTask) Utils(com.moro.mtweaks.utils.Utils) MainActivity(com.moro.mtweaks.activities.MainActivity) PreferenceScreen(androidx.preference.PreferenceScreen) BorderCircleView(com.moro.mtweaks.views.BorderCircleView) AsyncTask(android.os.AsyncTask) LayoutInflater(android.view.LayoutInflater) SwitchPreferenceCompat(androidx.preference.SwitchPreferenceCompat) NavigationActivity(com.moro.mtweaks.activities.NavigationActivity) ProgressDialog(android.app.ProgressDialog) AppCompatEditText(androidx.appcompat.widget.AppCompatEditText) InputType(android.text.InputType) Messenger(android.os.Messenger) AppSettings(com.moro.mtweaks.utils.AppSettings) Preference(androidx.preference.Preference) ViewGroup(android.view.ViewGroup) ViewUtils(com.moro.mtweaks.utils.ViewUtils) ContextThemeWrapper(androidx.appcompat.view.ContextThemeWrapper) PreferenceGroupAdapter(androidx.preference.PreferenceGroupAdapter) Gravity(android.view.Gravity) ApplyOnBootService(com.moro.mtweaks.services.boot.ApplyOnBootService) RootUtils(com.moro.mtweaks.utils.root.RootUtils) R(com.moro.mtweaks.R) List(java.util.List) Message(android.os.Message) BannerResizerActivity(com.moro.mtweaks.activities.BannerResizerActivity) Resources(android.content.res.Resources) AppCompatEditText(androidx.appcompat.widget.AppCompatEditText) AlertDialog(androidx.appcompat.app.AlertDialog) Dialog(com.moro.mtweaks.views.dialog.Dialog) ProgressDialog(android.app.ProgressDialog) LinearLayout(android.widget.LinearLayout) SuppressLint(android.annotation.SuppressLint)

Aggregations

AppCompatEditText (androidx.appcompat.widget.AppCompatEditText)10 Context (android.content.Context)6 View (android.view.View)5 LinearLayout (android.widget.LinearLayout)5 Editable (android.text.Editable)4 Gravity (android.view.Gravity)4 ViewGroup (android.view.ViewGroup)4 Fragment (androidx.fragment.app.Fragment)4 R (com.moro.mtweaks.R)4 Dialog (com.moro.mtweaks.views.dialog.Dialog)4 AlertDialog (androidx.appcompat.app.AlertDialog)3 SuppressLint (android.annotation.SuppressLint)2 ProgressDialog (android.app.ProgressDialog)2 DialogInterface (android.content.DialogInterface)2 Intent (android.content.Intent)2 Resources (android.content.res.Resources)2 AsyncTask (android.os.AsyncTask)2 Build (android.os.Build)2 Bundle (android.os.Bundle)2 Handler (android.os.Handler)2