Files
keepass2android/src/keepass2android-app/Resources/layout/generate_password.xml

326 lines
13 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_container"
android:layout_width="fill_parent"
android:background="?android:attr/colorBackground"
android:layout_height="fill_parent">
<RelativeLayout
android:id="@+id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:baselineAligned="false">
<Button
android:id="@+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@android:string/cancel"
android:drawableLeft="@drawable/baseline_close_24"
style="@style/BottomBarButton" />
<Button
android:id="@+id/accept_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="@string/accept"
android:drawableLeft="@drawable/baseline_check_24"
style="@style/BottomBarButton" />
</RelativeLayout>
<ScrollView
android:id="@+id/ScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/bottom_bar"
android:layout_marginBottom="12dip"
android:layout_marginLeft="12dip"
android:layout_marginRight="12dip"
android:layout_marginTop="12dip"
android:layout_alignParentTop="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:id="@+id/password_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:singleLine="true"
android:typeface="monospace"
android:hint="@string/hint_generated_password" />
<Button
android:id="@+id/generate_password_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/generate_password" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/pb_password_strength"
android:layout_width="50dp"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:indeterminate="false"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/tv_password_strength"
android:paddingLeft="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="4dp"
android:paddingBottom="1dp"
android:paddingTop="8dp"
android:text="@string/password_generation_profile"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Spinner
android:id="@+id/spinner_password_generator_profile"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
/>
<ImageButton
android:id="@+id/btn_password_generator_profile_save"
android:layout_width="50dp"
android:layout_height="50dp"
android:scaleType="fitCenter"
android:src="@drawable/baseline_save_24"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
<ImageButton
android:id="@+id/btn_password_generator_profile_delete"
android:layout_width="50dp"
android:layout_height="50dp"
android:scaleType="fitCenter"
android:src="@drawable/baseline_close_24"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
</LinearLayout>
<Spinner
android:id="@+id/spinner_password_generator_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:layout_marginBottom="64dip"
android:entries="@array/PasswordGeneratorModes"
/>
<LinearLayout
android:id="@+id/passphraseOptions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/wordcountlayout">
<EditText
android:id="@+id/wordcount"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:singleLine="true"
android:text="7"
android:hint="@string/hint_wordcount" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/wordseparatorlayout">
<EditText
android:id="@+id/wordseparator"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:singleLine="true"
android:text=" "
android:hint="@string/hint_wordseparator" />
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="4dp"
android:paddingBottom="8dp"
android:text="@string/passphrase_capitalization"/>
<Spinner
android:id="@+id/spinner_password_generator_case_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="@array/PasswordGeneratorCaseModes"
/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:id="@+id/passwordOptions"
android:layout_height="wrap_content"
android:layout_width="match_parent">
<LinearLayout
android:orientation="horizontal"
android:id="@+id/pwd_buttons"
android:layout_height="wrap_content"
android:layout_width="match_parent">
<com.google.android.material.textfield.TextInputLayout
android:layout_height="wrap_content"
android:layout_width="50dp"
android:layout_weight="1"
android:id="@+id/lengthlayout">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/length"
android:singleLine="true"
android:text="12"
android:hint="@string/hint_length" />
</com.google.android.material.textfield.TextInputLayout>
<Button
style="@style/Widget.Material3.Button.TextButton"
android:id="@+id/btn_length6"
android:text="6"
android:layout_height="wrap_content"
android:layout_width="50sp"
/>
<Button
style="@style/Widget.Material3.Button.TextButton"
android:id="@+id/btn_length8"
android:text="8"
android:layout_height="wrap_content"
android:layout_width="50sp"
/>
<Button
style="@style/Widget.Material3.Button.TextButton"
android:id="@+id/btn_length12"
android:text="12"
android:layout_height="wrap_content"
android:layout_width="50sp"
/>
<Button
style="@style/Widget.Material3.Button.TextButton"
android:id="@+id/btn_length16"
android:text="16"
android:layout_height="wrap_content"
android:layout_width="50sp"
/>
<Button
style="@style/Widget.Material3.Button.TextButton"
android:id="@+id/btn_length24"
android:text="24"
android:layout_height="wrap_content"
android:layout_width="50sp"
/>
<Button
style="@style/Widget.Material3.Button.TextButton"
android:id="@+id/btn_length32"
android:text="32"
android:layout_width="50sp"
android:layout_height="wrap_content"
/>
</LinearLayout>
<CheckBox
android:id="@+id/cb_uppercase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/uppercase"
android:checked="true" />
<CheckBox
android:id="@+id/cb_lowercase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lowercase"
android:checked="true" />
<CheckBox
android:id="@+id/cb_digits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/digits"
android:checked="true"
android:layout_below="@id/cb_lowercase" />
<CheckBox
android:id="@+id/cb_minus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/minus"
android:layout_below="@id/cb_digits" />
<CheckBox
android:id="@+id/cb_underline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/underline"
android:layout_below="@id/cb_minus" />
<CheckBox
android:id="@+id/cb_space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/space"
android:layout_below="@id/cb_underline" />
<CheckBox
android:id="@+id/cb_specials"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/special"
android:layout_below="@id/cb_space" />
<CheckBox
android:id="@+id/cb_specials_extended"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/special_extended"
android:layout_below="@id/cb_specials" />
<CheckBox
android:id="@+id/cb_brackets"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/brackets"
android:layout_below="@id/cb_specials_extended" />
<CheckBox
android:id="@+id/cb_exclude_lookalike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/exclude_lookalike"
android:layout_below="@id/cb_brackets" />
<CheckBox
android:id="@+id/cb_at_least_one_from_each_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/at_least_one_from_each_group"
android:layout_below="@id/cb_exclude_lookalike" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>