mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-01 06:45:19 +00:00
suprress inflateParams lint error in dialogs
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.zeapo.pwdstore;
|
package com.zeapo.pwdstore;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.DialogFragment;
|
import android.app.DialogFragment;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
@@ -86,7 +87,7 @@ public class SshKeyGen extends AppCompatActivity {
|
|||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
LayoutInflater inflater = getActivity().getLayoutInflater();
|
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||||
final View v = inflater.inflate(R.layout.fragment_show_ssh_key, null);
|
@SuppressLint("InflateParams") final View v = inflater.inflate(R.layout.fragment_show_ssh_key, null);
|
||||||
builder.setView(v);
|
builder.setView(v);
|
||||||
|
|
||||||
TextView textView = (TextView) v.findViewById(R.id.public_key);
|
TextView textView = (TextView) v.findViewById(R.id.public_key);
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
package com.zeapo.pwdstore.autofill;
|
package com.zeapo.pwdstore.autofill;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.DialogFragment;
|
import android.app.DialogFragment;
|
||||||
@@ -43,7 +44,7 @@ public class AutofillFragment extends DialogFragment {
|
|||||||
final AutofillPreferenceActivity callingActivity = (AutofillPreferenceActivity) getActivity();
|
final AutofillPreferenceActivity callingActivity = (AutofillPreferenceActivity) getActivity();
|
||||||
LayoutInflater inflater = callingActivity.getLayoutInflater();
|
LayoutInflater inflater = callingActivity.getLayoutInflater();
|
||||||
|
|
||||||
final View view = inflater.inflate(R.layout.fragment_autofill, null);
|
@SuppressLint("InflateParams") final View view = inflater.inflate(R.layout.fragment_autofill, null);
|
||||||
|
|
||||||
builder.setView(view);
|
builder.setView(view);
|
||||||
|
|
||||||
@@ -174,10 +175,11 @@ public class AutofillFragment extends DialogFragment {
|
|||||||
|
|
||||||
String packageName = getArguments().getString("packageName", "");
|
String packageName = getArguments().getString("packageName", "");
|
||||||
if (isWeb) {
|
if (isWeb) {
|
||||||
packageName = ((EditText) dialog.findViewById(R.id.webURL)).getText().toString();
|
|
||||||
|
|
||||||
// handle some errors and don't dismiss the dialog
|
// handle some errors and don't dismiss the dialog
|
||||||
EditText webURL = (EditText) dialog.findViewById(R.id.webURL);
|
EditText webURL = (EditText) dialog.findViewById(R.id.webURL);
|
||||||
|
|
||||||
|
packageName = webURL.getText().toString();
|
||||||
|
|
||||||
if (packageName.equals("")) {
|
if (packageName.equals("")) {
|
||||||
webURL.setError("URL cannot be blank");
|
webURL.setError("URL cannot be blank");
|
||||||
return;
|
return;
|
||||||
|
@@ -37,7 +37,7 @@ public class pwgenDialogFragment extends DialogFragment {
|
|||||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
final Activity callingActivity = getActivity();
|
final Activity callingActivity = getActivity();
|
||||||
LayoutInflater inflater = callingActivity.getLayoutInflater();
|
LayoutInflater inflater = callingActivity.getLayoutInflater();
|
||||||
final View view = inflater.inflate(R.layout.fragment_pwgen, null);
|
@SuppressLint("InflateParams") final View view = inflater.inflate(R.layout.fragment_pwgen, null);
|
||||||
Typeface monoTypeface = Typeface.createFromAsset(callingActivity.getAssets(), "fonts/sourcecodepro.ttf");
|
Typeface monoTypeface = Typeface.createFromAsset(callingActivity.getAssets(), "fonts/sourcecodepro.ttf");
|
||||||
|
|
||||||
builder.setView(view);
|
builder.setView(view);
|
||||||
|
Reference in New Issue
Block a user