Password length in settings #3

This commit is contained in:
J-Jamet committed 2017-11-29 20:42:01 +01:00
1 parent b1804a94b6
commit b6721b32e7
33 files changed
+78 -46

No files matched your search

@@ -26,9 +26,15 @@ import android.preference.PreferenceManager;
import com.kunzisoft.keepass.R;
public class PrefsUtil {
public static float getListTextSize(Context ctx) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
return Float.parseFloat(prefs.getString(ctx.getString(R.string.list_size_key), ctx.getString(R.string.list_size_default)));
}
public static int getDefaultPasswordLength(Context ctx) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
return prefs.getInt(ctx.getString(R.string.password_length_key),
Integer.parseInt(ctx.getString(R.string.default_password_length)));
}
}