435 lines
23 KiB
XML
435 lines
23 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<keepass2android.FixedDrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:id="@+id/drawer_layout"
|
|
android:layout_height="match_parent"
|
|
android:layout_width="match_parent"
|
|
android:fitsSystemWindows="true">
|
|
<!-- activity view -->
|
|
<keepass2android.MeasuringRelativeLayout
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="fill_parent"
|
|
android:id="@+id/relative_layout"
|
|
android:background="?activityBackgroundColor">
|
|
<LinearLayout
|
|
android:id="@+id/top"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:orientation="horizontal" />
|
|
<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/change_db"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentLeft="true"
|
|
android:text="@string/menu_change_db"
|
|
style="@style/BottomBarButton" />
|
|
<Button
|
|
android:id="@+id/pass_ok"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentRight="true"
|
|
android:text="@string/unlock_database_button"
|
|
style="@style/BottomBarButton" />
|
|
</RelativeLayout>
|
|
<View
|
|
android:id="@+id/divider2"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_above="@id/bottom_bar"
|
|
android:background="#b8b8b8" />
|
|
<android.support.design.widget.CoordinatorLayout
|
|
android:id="@+id/main_content"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_above="@id/divider2"
|
|
android:layout_below="@id/top"
|
|
android:fitsSystemWindows="true">
|
|
<android.support.design.widget.AppBarLayout
|
|
android:id="@+id/appbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="@dimen/detail_backdrop_height"
|
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
|
android:fitsSystemWindows="true">
|
|
<android.support.design.widget.CollapsingToolbarLayout
|
|
android:id="@+id/collapsing_toolbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
|
android:fitsSystemWindows="true"
|
|
app:contentScrim="?attr/colorAccent"
|
|
app:expandedTitleMarginStart="16dp"
|
|
app:expandedTitleMarginEnd="24dp"
|
|
app:expandedTitleMarginBottom="20sp">
|
|
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="fill_parent"
|
|
android:fitsSystemWindows="true"
|
|
android:layout_height="fill_parent">
|
|
<ImageView
|
|
android:id="@+id/backdrop"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:scaleType="centerCrop"
|
|
android:fitsSystemWindows="true"
|
|
android:src="@drawable/toolbar_bg"
|
|
app:layout_collapseMode="parallax" />
|
|
<TextView
|
|
android:id="@+id/filename"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentBottom="true"
|
|
android:layout_marginBottom="4sp"
|
|
android:layout_marginLeft="16dp"
|
|
android:textSize="10sp"
|
|
android:text="/storage/emulated/0/keepass/keepass/database.kdbx" />
|
|
</RelativeLayout>
|
|
<android.support.v7.widget.Toolbar
|
|
android:id="@+id/mytoolbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="?attr/actionBarSize"
|
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
|
app:titleTextStyle="@style/MyTitleTextStyle"
|
|
app:layout_collapseMode="pin" />
|
|
</android.support.design.widget.CollapsingToolbarLayout>
|
|
</android.support.design.widget.AppBarLayout>
|
|
<android.support.v4.widget.NestedScrollView
|
|
android:id="@+id/scrollview"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:paddingLeft="12dp"
|
|
android:paddingRight="16dp"
|
|
android:paddingTop="16dp">
|
|
<TextView
|
|
android:id="@+id/password_label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textSize="12sp"
|
|
android:layout_marginLeft="4dp"
|
|
android:text="@string/master_key_type" />
|
|
<Spinner
|
|
android:id="@+id/password_mode_spinner"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="-4dp"
|
|
android:entries="@array/password_modes" />
|
|
<View
|
|
android:id="@+id/line_below_spinner"
|
|
android:background="#e0e0e0ff"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="1dip"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginLeft="4dp"
|
|
android:layout_centerVertical="true" />
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textSize="12sp"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_marginLeft="4dp"
|
|
android:text="@string/hint_login_pass" />
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
<EditText
|
|
android:id="@+id/password_edit"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="32dp"
|
|
android:paddingTop="2dp"
|
|
android:singleLine="true"
|
|
android:inputType="textPassword"
|
|
android:fontFamily="sans-serif"
|
|
android:hint="@string/hint_login_pass" />
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:paddingBottom="12dp"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_alignParentBottom="true"
|
|
android:orientation="horizontal">
|
|
<ImageButton
|
|
android:id="@+id/toggle_password"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentBottom="true"
|
|
android:src="@drawable/ic_menu_view"
|
|
android:background="?android:selectableItemBackground" />
|
|
|
|
<ImageButton
|
|
android:id="@+id/fingerprintbtn"
|
|
android:layout_width="20dp"
|
|
android:layout_height="20dp"
|
|
android:layout_margin="4dp"
|
|
android:layout_alignParentBottom="true"
|
|
android:src="@drawable/ic_fp_40px"
|
|
android:scaleType="fitXY"
|
|
android:background="?android:selectableItemBackground" />
|
|
</LinearLayout>
|
|
</RelativeLayout>
|
|
</RelativeLayout>
|
|
<LinearLayout
|
|
android:id="@+id/keyfileLine"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:baselineAligned="false"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:id="@+id/keyfile_heading"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/keyfile_heading" />
|
|
<LinearLayout
|
|
android:orientation="horizontal"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content">
|
|
<ImageView
|
|
android:id="@+id/filestorage_logo"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:src="@drawable/ic_storage_file"
|
|
android:padding="5dp" />
|
|
<TextView
|
|
android:id="@+id/filestorage_label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:text="Local file (TODO!)"
|
|
android:textSize="16dp" />
|
|
</LinearLayout>
|
|
<TextView
|
|
android:id="@+id/label_keyfilename"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="[path]"
|
|
android:layout_marginLeft="16dp" />
|
|
<Button
|
|
android:id="@+id/btn_change_location"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="16dp"
|
|
android:text="@string/button_change_location"
|
|
style="@style/TextAppearance_SubElement" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:id="@+id/otpView"
|
|
android:layout_marginLeft="12dip"
|
|
android:layout_marginRight="12dip"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
<LinearLayout
|
|
android:id="@+id/otpInitView"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
<Button
|
|
android:id="@+id/init_otp"
|
|
android:text="@string/init_otp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
<TextView
|
|
android:id="@+id/otps_pending"
|
|
android:text="@string/otps_pending"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:id="@+id/otpEntry"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone"
|
|
android:orientation="vertical">
|
|
<TextView
|
|
android:id="@+id/otp_expl"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/otp_explanation" />
|
|
<EditText
|
|
android:id="@+id/otp1"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="93317749"
|
|
android:singleLine="true" />
|
|
<EditText
|
|
android:id="@+id/otp2"
|
|
android:text="54719327"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true" />
|
|
<EditText
|
|
android:id="@+id/otp3"
|
|
android:text="49844651"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true" />
|
|
<EditText
|
|
android:id="@+id/otp4"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true" />
|
|
<EditText
|
|
android:id="@+id/otp5"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true" />
|
|
<EditText
|
|
android:id="@+id/otp6"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:id="@+id/otpSecretLine"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:orientation="horizontal">
|
|
<EditText
|
|
android:id="@+id/pass_otpsecret"
|
|
android:layout_width="0px"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true"
|
|
android:layout_weight="1"
|
|
android:hint="@string/otpsecret_hint" />
|
|
<Spinner
|
|
android:id="@+id/otpsecret_format_spinner"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
</LinearLayout>
|
|
<Button
|
|
android:id="@+id/kill_app"
|
|
android:text="@string/kill_app_label"
|
|
android:layout_width="fill_parent"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_height="wrap_content" />
|
|
<LinearLayout
|
|
android:id="@+id/enable_quickunlock_container"
|
|
android:orientation="horizontal"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<CheckBox
|
|
android:id="@+id/enable_quickunlock"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:text="@string/enable_quickunlock" />
|
|
<keepass2android.views.Kp2aShortHelpView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/TextAppearance_Help_Dense"
|
|
android:textColor="@color/light_gray"
|
|
app:help_text="@string/help_quickunlock"
|
|
app:title_text="@string/enable_quickunlock"
|
|
android:text="@string/help_quickunlock"
|
|
android:background="?android:attr/selectableItemBackground"/>
|
|
</LinearLayout>
|
|
<LinearLayout
|
|
android:id="@+id/work_offline_container"
|
|
android:orientation="horizontal"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<CheckBox
|
|
android:id="@+id/work_offline"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:text="@string/UseOfflineMode" />
|
|
<keepass2android.views.Kp2aShortHelpView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
style="@style/TextAppearance_Help_Dense"
|
|
android:textColor="@color/light_gray"
|
|
app:help_text="@string/UseOfflineMode_Info"
|
|
app:title_text="@string/UseOfflineMode"
|
|
android:text="@string/UseOfflineMode_Info"
|
|
android:background="?android:attr/selectableItemBackground"/>
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:id="@+id/spacing"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="200dp"
|
|
android:background="#0000" />
|
|
</LinearLayout>
|
|
</android.support.v4.widget.NestedScrollView>
|
|
</android.support.design.widget.CoordinatorLayout>
|
|
</keepass2android.MeasuringRelativeLayout>
|
|
<android.support.design.widget.NavigationView
|
|
android:id="@+id/navigation"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="start"
|
|
android:fitsSystemWindows="true">
|
|
<ScrollView
|
|
android:layout_height="match_parent"
|
|
android:layout_width="wrap_content">
|
|
<LinearLayout
|
|
android:id="@+id/navdrawercontents"
|
|
android:layout_height="match_parent"
|
|
android:layout_width="wrap_content"
|
|
android:layout_gravity="start"
|
|
android:fitsSystemWindows="true"
|
|
android:orientation="vertical">
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="192dp">
|
|
<ImageView
|
|
android:id="@+id/navheader_bg"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:scaleType="centerCrop"
|
|
android:src="@drawable/navheader_bg" />
|
|
<TextView
|
|
android:id="@+id/nav_app_name"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/app_name"
|
|
android:textSize="16dp"
|
|
android:layout_margin="16dp"
|
|
android:textColor="#fff"
|
|
android:layout_alignParentBottom="true"
|
|
android:layout_marginBottom="16dp" />
|
|
</RelativeLayout>
|
|
<Button
|
|
android:id="@+id/btn_nav_change_db"
|
|
android:text="@string/menu_change_db"
|
|
android:drawableLeft="@drawable/ic_nav_changedb_grey"
|
|
style="@style/NavDrawerButton" />
|
|
<Button
|
|
android:id="@+id/btn_nav_settings"
|
|
android:drawableLeft="@drawable/ic_nav_settings_grey"
|
|
android:text="@string/menu_app_settings"
|
|
style="@style/NavDrawerButton" />
|
|
<Button
|
|
android:id="@+id/btn_nav_donate"
|
|
android:drawableLeft="@drawable/ic_nav_donate_grey"
|
|
android:text="@string/menu_donate"
|
|
style="@style/NavDrawerButton" />
|
|
<Button
|
|
android:id="@+id/btn_nav_about"
|
|
android:drawableLeft="@drawable/ic_nav_about_grey"
|
|
android:text="@string/menu_about"
|
|
style="@style/NavDrawerButton" />
|
|
</LinearLayout>
|
|
</ScrollView>
|
|
</android.support.design.widget.NavigationView>
|
|
</keepass2android.FixedDrawerLayout> |