mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
New FileSystem screen
This commit is contained in:
@@ -135,21 +135,21 @@ public class FileSelectActivity extends StylishActivity implements
|
||||
setContentView(R.layout.file_selection);
|
||||
fileListTitle = findViewById(R.id.file_list_title);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
toolbar.setTitle(getString(R.string.app_name));
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
openFileNameView = (EditText) findViewById(R.id.file_filename);
|
||||
fileNameView = (FileNameView) findViewById(R.id.file_select);
|
||||
openFileNameView = findViewById(R.id.file_filename);
|
||||
fileNameView = findViewById(R.id.file_select);
|
||||
|
||||
// Set the initial value of the filename
|
||||
defaultPath = Environment.getExternalStorageDirectory().getAbsolutePath()
|
||||
+ getString(R.string.database_file_path_default)
|
||||
+ getString(R.string.database_file_name_default)
|
||||
+ getString(R.string.database_file_extension_default);
|
||||
openFileNameView.setHint(defaultPath);
|
||||
openFileNameView.setHint(R.string.open_link_database);
|
||||
|
||||
RecyclerView mListFiles = (RecyclerView) findViewById(R.id.file_list);
|
||||
RecyclerView mListFiles = findViewById(R.id.file_list);
|
||||
mListFiles.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
// To retrieve info for AutoFill
|
||||
|
||||
@@ -54,19 +54,12 @@ public class FileNameView extends RelativeLayout {
|
||||
warning = R.string.warning_unmounted;
|
||||
}
|
||||
|
||||
TextView tv = (TextView) findViewById(R.id.label_warning);
|
||||
TextView label = (TextView) findViewById(R.id.label_open_by_filename);
|
||||
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
|
||||
|
||||
TextView tv = findViewById(R.id.label_warning);
|
||||
if (warning != -1) {
|
||||
tv.setText(warning);
|
||||
tv.setVisibility(VISIBLE);
|
||||
|
||||
lp.addRule(RelativeLayout.BELOW, R.id.label_warning);
|
||||
} else {
|
||||
tv.setVisibility(INVISIBLE);
|
||||
}
|
||||
|
||||
label.setLayoutParams(lp);
|
||||
}
|
||||
}
|
||||
|
||||
5
app/src/main/res/drawable/ic_folder_open_white_24dp.xml
Normal file
5
app/src/main/res/drawable/ic_folder_open_white_24dp.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M20,6h-8l-2,-2L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8h16v10z"/>
|
||||
</vector>
|
||||
@@ -1,10 +0,0 @@
|
||||
<!-- drawable/folder_open.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z" />
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_send_white_24dp.xml
Normal file
5
app/src/main/res/drawable/ic_send_white_24dp.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FFFFFFFF" android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"/>
|
||||
</vector>
|
||||
@@ -45,10 +45,12 @@
|
||||
app:contentScrim="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
|
||||
|
||||
<com.keepassdroid.view.FileNameView android:id="@+id/file_select"
|
||||
<com.keepassdroid.view.FileNameView
|
||||
android:id="@+id/file_select"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"/>
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
@@ -62,17 +64,14 @@
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/open_database"
|
||||
android:id="@+id/browse_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
app:fabSize="mini"
|
||||
app:layout_anchor="@id/app_bar"
|
||||
app:layout_anchorGravity="bottom|end"
|
||||
android:src="@drawable/ic_open_folder_white_24dp" />
|
||||
android:src="@drawable/ic_folder_white_24dp"
|
||||
android:theme="?attr/whiteFab"
|
||||
app:useCompatPadding="true"
|
||||
app:layout_anchor="@+id/app_bar"
|
||||
app:layout_anchorGravity="end|bottom" />
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
@@ -86,11 +85,12 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView android:id="@+id/file_list_title"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:layout_marginStart="@dimen/default_margin"
|
||||
android:layout_marginRight="@dimen/default_margin"
|
||||
android:layout_marginEnd="@dimen/default_margin"
|
||||
android:layout_marginRight="72dp"
|
||||
android:layout_marginEnd="72dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/KeepassDXStyle.TextAppearance.Title"
|
||||
|
||||
@@ -31,51 +31,43 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:layout_marginStart="@dimen/default_margin"
|
||||
android:layout_marginRight="@dimen/default_margin"
|
||||
android:layout_marginEnd="@dimen/default_margin"
|
||||
android:layout_marginBottom="22dp">
|
||||
android:layout_marginBottom="@dimen/default_margin">
|
||||
|
||||
<TextView android:id="@+id/label_warning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView android:id="@+id/label_open_by_filename"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/KeepassDXStyle.TextAppearance.Inverse"
|
||||
android:text="@string/select_database_file"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:id="@+id/browse_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/file_filename"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@id/label_open_by_filename"
|
||||
android:src="@drawable/ic_folder_white_24dp"
|
||||
android:tint="?attr/colorAccentCompat" />
|
||||
android:visibility="gone" />
|
||||
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/file_filename"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/label_open_by_filename"
|
||||
android:inputType="textUri"
|
||||
android:textColor="?attr/textColorInverse"
|
||||
android:textColorHint="?attr/android:textColorHintInverse"
|
||||
android:layout_toLeftOf="@+id/open_database"
|
||||
android:layout_toStartOf="@+id/open_database"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_toRightOf="@+id/browse_button"
|
||||
android:layout_toEndOf="@+id/browse_button"
|
||||
android:maxLines="1" />
|
||||
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:id="@+id/open_database"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/file_filename"
|
||||
android:paddingBottom="8dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@drawable/ic_send_white_24dp"
|
||||
android:tint="?attr/colorAccent" />
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
<string name="no_results">Aucun résultat pour cette recherche.</string>
|
||||
<string name="no_url_handler">Impossible d\'ouvrir cette URL.</string>
|
||||
<string name="select_database_file">Sélectionner une base de données existante :</string>
|
||||
<string name="open_recent">Ouvrir une base de données récente :</string>
|
||||
<string name="open_recent">Bases de données récentes :</string>
|
||||
<string name="omitbackup_title">Ignorer les sauvegardes</string>
|
||||
<string name="omitbackup_summary">Ignorer le groupe Sauvegardes des résultats de recherche (uniquement pour .kdb)</string>
|
||||
<string name="progress_create">Création d\'une nouvelle base de données…</string>
|
||||
@@ -247,6 +247,7 @@
|
||||
<string name="allow_copy_password_title">Copie de mot de passe</string>
|
||||
<string name="allow_copy_password_summary">Autoriser la copie du mot de passe dans le presse-papiers.</string>
|
||||
<string name="warning_disabling_storage_access_framework">ATTENTION : désactiver cette fonctionnalité peut engendrer une impossibilité d\'ouvrir ou sauvegarder les bases de données</string>
|
||||
<string name="open_link_database">Lien du fichier Kdbx à ouvrir</string>
|
||||
|
||||
<string-array name="timeout_options">
|
||||
<item>5 secondes</item>
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
<attr name="textColorInverse" format="reference|color" />
|
||||
|
||||
<attr name="whiteFab" format="reference" />
|
||||
|
||||
<declare-styleable name="RoundsDialog">
|
||||
<attr name="description" format="string" />
|
||||
</declare-styleable>
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
<string name="no_results">No search results</string>
|
||||
<string name="no_url_handler">No handler for this url.</string>
|
||||
<string name="select_database_file">Select an existing database :</string>
|
||||
<string name="open_recent">Open a recent database :</string>
|
||||
<string name="open_recent">Recent databases :</string>
|
||||
<string name="omitbackup_title">Don\'t search backup entries</string>
|
||||
<string name="omitbackup_summary">Omit \'Backup\' group from search results (applies to .kdb only)</string>
|
||||
<string name="progress_create">Creating new database…</string>
|
||||
@@ -248,6 +248,7 @@
|
||||
<string name="allow_copy_password_title">Copy of password</string>
|
||||
<string name="allow_copy_password_summary">Allow the copy of the password to the clipboard.</string>
|
||||
<string name="warning_disabling_storage_access_framework">WARNING : disabling this feature may result in an inability to open or save the databases</string>
|
||||
<string name="open_link_database">Link of the Kdbx file to open</string>
|
||||
|
||||
<string-array name="timeout_options">
|
||||
<item>5 seconds</item>
|
||||
|
||||
@@ -65,6 +65,9 @@
|
||||
<!-- Toolbar -->
|
||||
<item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar</item>
|
||||
<item name="toolbarPopupAppearance">@style/KeepassDXStyle.Light.Toolbar.Popup</item>
|
||||
|
||||
<!-- White FAB -->
|
||||
<item name="whiteFab">@style/KeepassDXStyle.Fab.White</item>
|
||||
</style>
|
||||
<style name="KeepassDXStyle.Night.v21" parent="Theme.AppCompat">
|
||||
|
||||
@@ -115,6 +118,9 @@
|
||||
<!-- Toolbar -->
|
||||
<item name="toolbarAppearance">@style/KeepassDXStyle.Toolbar</item>
|
||||
<item name="toolbarPopupAppearance">@style/KeepassDXStyle.Night.Toolbar.Popup</item>
|
||||
|
||||
<!-- White FAB -->
|
||||
<item name="whiteFab">@style/KeepassDXStyle.Fab.White</item>
|
||||
</style>
|
||||
|
||||
<!-- Light Style -->
|
||||
@@ -224,6 +230,10 @@
|
||||
<style name="KeepassDXStyle.v21.Fab" parent="Theme.AppCompat" />
|
||||
<style name="KeepassDXStyle.Fab" parent="KeepassDXStyle.v21.Fab">
|
||||
</style>
|
||||
<style name="KeepassDXStyle.Fab.White" parent="KeepassDXStyle.v21.Fab">
|
||||
<item name="colorAccent">@color/white</item>
|
||||
<item name="tint">?attr/colorAccentCompat</item>
|
||||
</style>
|
||||
|
||||
<!-- Menu FAB -->
|
||||
<style name="KeepassDXStyle.v21.FabMenu" parent="KeepassDXStyle.TextAppearance.DefaultTextOnPrimary" />
|
||||
|
||||
Reference in New Issue
Block a user