449 lines
		
	
	
		
			23 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			449 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_width="fill_parent"
 | |
|     android:layout_height="fill_parent"
 | |
|     android:fitsSystemWindows="true">
 | |
| <!-- activity view -->
 | |
|     <keepass2android.MeasuringLinearLayout
 | |
|         android:layout_width="fill_parent"
 | |
|         android:layout_height="fill_parent"
 | |
|         android:orientation="vertical"
 | |
|         android:id="@+id/main_layout">
 | |
| 
 | |
|         
 | |
|         <androidx.coordinatorlayout.widget.CoordinatorLayout 
 | |
|                                                              android:id="@+id/main_content"
 | |
|                                                              android:layout_width="match_parent"
 | |
|                                                              android:layout_height="match_parent"
 | |
|                                                              android:layout_weight="1"
 | |
|                                                              android:fitsSystemWindows="true">
 | |
| 
 | |
|           <com.google.android.material.appbar.AppBarLayout
 | |
|             android:id="@+id/appbar"
 | |
|             android:layout_width="match_parent"
 | |
|             android:layout_height="@dimen/detail_backdrop_height"
 | |
|             android:fitsSystemWindows="true"
 | |
|             android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
 | |
| 
 | |
|             <com.google.android.material.appbar.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:expandedTitleMarginStart="48dp"
 | |
|               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:src="@drawable/toolbar_bg"
 | |
|                   app:layout_collapseMode="parallax" />
 | |
|                 <HorizontalScrollView
 | |
|                   android:layout_alignParentBottom="true"
 | |
|                             
 | |
|                   android:layout_marginBottom="0sp"
 | |
|                   android:layout_marginLeft="48dp"
 | |
|                   android:layout_marginRight="8dp"
 | |
|                   android:layout_width="wrap_content"
 | |
|                   android:layout_height="wrap_content">
 | |
|                            
 | |
|                   <TextView
 | |
|                     android:id="@+id/filename"
 | |
|                     android:layout_width="wrap_content"
 | |
|                     android:layout_height="wrap_content"
 | |
|                     
 | |
|                     android:singleLine="true"
 | |
|                     android:textSize="10sp"
 | |
|                     android:textColor="@color/md_theme_onSurface"
 | |
|                     android:text="/storage/emulated/0/keepass/keepass/database.kdbx" />
 | |
| 
 | |
|                 </HorizontalScrollView>
 | |
| 
 | |
| 
 | |
|               </RelativeLayout>
 | |
| 
 | |
|                 <androidx.appcompat.widget.Toolbar
 | |
|                   android:id="@+id/toolbar"
 | |
|                   android:layout_width="match_parent"
 | |
|                   android:layout_height="?attr/actionBarSize"
 | |
|                   app:layout_collapseMode="pin"/>
 | |
| 
 | |
|               </com.google.android.material.appbar.CollapsingToolbarLayout>
 | |
|             </com.google.android.material.appbar.AppBarLayout>
 | |
|             <androidx.core.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" />
 | |
|                     <LinearLayout
 | |
|                         android:orientation="horizontal"
 | |
|                         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:layout_weight="1"
 | |
|                                 android:fontFamily="sans-serif"
 | |
|                                 android:hint="@string/hint_login_pass"
 | |
|                               android:importantForAccessibility="no"/>
 | |
|                             <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/baseline_visibility_24"
 | |
|                                     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/baseline_fingerprint_24"
 | |
|                                     android:scaleType="fitXY"
 | |
|                                     android:background="?android:selectableItemBackground" />
 | |
|                             </LinearLayout>
 | |
|                         
 | |
|                     </LinearLayout>
 | |
|                     <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>
 | |
|                     
 | |
|                   <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"
 | |
|                       app:help_text="@string/help_quickunlock"
 | |
|                       app:title_text="@string/enable_quickunlock"
 | |
| 			          android:text="@string/help_quickunlock"
 | |
|                       />
 | |
|                   </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"
 | |
|                       
 | |
|                       app:help_text="@string/UseOfflineMode_Info"
 | |
|                       app:title_text="@string/UseOfflineMode"
 | |
| 			                android:text="@string/UseOfflineMode_Info"
 | |
|                       />
 | |
|                   </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" />
 | |
|                     <View
 | |
|                         android:id="@+id/spacing"
 | |
|                         android:layout_width="fill_parent"
 | |
|                         android:layout_height="300dp"
 | |
|                         android:background="#0000" />
 | |
|                 </LinearLayout>
 | |
|             </androidx.core.widget.NestedScrollView>
 | |
|         </androidx.coordinatorlayout.widget.CoordinatorLayout>
 | |
|    
 | |
|       <View
 | |
|         android:id="@+id/divider2"
 | |
|         android:layout_width="fill_parent"
 | |
|         android:layout_height="1dp"
 | |
|         android:layout_weight="0"
 | |
|         android:background="#b8b8b8" />
 | |
| 
 | |
|         <RelativeLayout
 | |
|             android:id="@+id/bottom_bar"
 | |
|             android:layout_width="match_parent"
 | |
|             android:layout_height="wrap_content"
 | |
|             android:layout_weight="0"
 | |
|             android:orientation="horizontal"            
 | |
|             >
 | |
|             <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>
 | |
|         
 | |
|          </keepass2android.MeasuringLinearLayout>
 | |
|     <com.google.android.material.navigation.NavigationView
 | |
|         android:id="@+id/navigation"
 | |
|         android:layout_width="match_parent"
 | |
|         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/baseline_file_open_24"
 | |
|                 style="@style/NavDrawerButton" />
 | |
|             <Button
 | |
|                 android:id="@+id/btn_nav_settings"
 | |
|                 android:drawableLeft="@drawable/baseline_settings_24"
 | |
|                 android:text="@string/menu_app_settings"
 | |
|                 style="@style/NavDrawerButton" />
 | |
|             <Button
 | |
|                 android:id="@+id/btn_nav_donate"
 | |
|                 android:drawableLeft="@drawable/donate_beer"
 | |
|                 android:text="@string/menu_donate"
 | |
|                 style="@style/NavDrawerButton" />
 | |
|             <Button
 | |
|                 android:id="@+id/btn_nav_about"
 | |
|                 android:drawableLeft="@drawable/baseline_info_24"
 | |
|                 android:text="@string/menu_about"
 | |
|                 style="@style/NavDrawerButton" />
 | |
|         </LinearLayout>
 | |
|         </ScrollView>
 | |
|     </com.google.android.material.navigation.NavigationView>
 | |
| </keepass2android.FixedDrawerLayout> | 
