token-import: add ui for pin change and unlock
This commit is contained in:
31
OpenKeychain/src/main/res/layout/admin_pin_dialog.xml
Normal file
31
OpenKeychain/src/main/res/layout/admin_pin_dialog.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="24dp"
|
||||
tools:showIn="@layout/fake_dialog">
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/token_hint_admin_pin"
|
||||
android:id="@+id/admin_pin_current"
|
||||
android:inputType="numberPassword|textVisiblePassword" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/token_hint_new_pin"
|
||||
android:id="@+id/pin_new"
|
||||
android:inputType="numberPassword|textVisiblePassword" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/token_hint_new_pin_repeat"
|
||||
android:id="@+id/pin_new_repeat"
|
||||
android:inputType="numberPassword|textVisiblePassword" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -50,7 +50,7 @@
|
||||
android:inAnimation="@anim/fade_in_delayed"
|
||||
android:outAnimation="@anim/fade_out"
|
||||
android:clipChildren="false"
|
||||
custom:initialView="04">
|
||||
custom:initialView="05">
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
@@ -233,7 +233,7 @@
|
||||
android:textColor="@color/card_view_button"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:text="Unlock using admin pin"
|
||||
android:text="@string/token_action_unlock"
|
||||
android:padding="0dp"
|
||||
android:minHeight="0dp"
|
||||
/>
|
||||
@@ -265,6 +265,81 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/token_layout_locked_hard">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?listPreferredItemHeight"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Token is locked!"
|
||||
style="?android:textAppearanceLarge"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:id="@+id/button_unlock_impossible"
|
||||
android:background="?selectableItemBackground"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:tint="@color/md_grey_400"
|
||||
android:id="@+id/button_unlock_drawable_2"
|
||||
android:src="@drawable/ic_vpn_key_grey_24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@+id/button_unlock_drawable_2"
|
||||
android:layout_toRightOf="@+id/button_unlock_drawable_2"
|
||||
android:id="@+id/button_unlock_title_2"
|
||||
android:textColor="@color/md_grey_400"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/token_action_unlock"
|
||||
android:padding="0dp"
|
||||
android:minHeight="0dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@+id/button_unlock_drawable_2"
|
||||
android:layout_toRightOf="@+id/button_unlock_drawable_2"
|
||||
android:layout_below="@+id/button_unlock_title_2"
|
||||
android:textColor="@color/md_grey_400"
|
||||
android:text="@string/token_unlock_attempts_none"
|
||||
style="?android:textAppearanceSmall"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/button_reset_token_5"
|
||||
android:drawableLeft="@drawable/ic_bomb_24dp"
|
||||
android:drawableStart="@drawable/ic_bomb_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:textColor="@color/android_red_dark"
|
||||
android:text="@string/token_status_reset"
|
||||
style="?borderlessButtonStyle"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
16
OpenKeychain/src/main/res/layout/fake_dialog.xml
Normal file
16
OpenKeychain/src/main/res/layout/fake_dialog.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<include layout="@layout/admin_pin_dialog" />
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -10,7 +10,7 @@
|
||||
android:measureAllChildren="false"
|
||||
android:minHeight="?listPreferredItemHeightSmall"
|
||||
android:outAnimation="@anim/fade_out"
|
||||
custom:initialView="3"
|
||||
custom:initialView="4"
|
||||
tools:showIn="@layout/security_token_operation_activity">
|
||||
|
||||
<LinearLayout
|
||||
@@ -126,4 +126,34 @@
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<ScrollView
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/security_token_activity_4_error_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Medium"
|
||||
android:textColor="@color/android_red_dark"
|
||||
tools:text="Error text" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/security_token_activity_4_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Back" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator>
|
||||
|
||||
Reference in New Issue
Block a user