mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-13 13:05:04 -05:00
Minor UI polishing
- don't display "last access" (always =current time) - don't display expires if entry doesn't expire - don't view file name in password screen when only one file has ever been opened
This commit is contained in:
parent
500bcfcce7
commit
fd45e68b2f
@ -20,7 +20,7 @@
|
|||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>False</Optimize>
|
<Optimize>False</Optimize>
|
||||||
<OutputPath>bin\Debug</OutputPath>
|
<OutputPath>bin\Debug</OutputPath>
|
||||||
<DefineConstants>DEBUG;EXCLUDE_TWOFISH;INCLUDE_KEYBOARD;EXCLUDE_KEYTRANSFORM;INCLUDE_FILECHOOSER;INCLUDE_JAVAFILESTORAGE</DefineConstants>
|
<DefineConstants>DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;EXCLUDE_KEYTRANSFORM;EXCLUDE_FILECHOOSER;EXCLUDE_JAVAFILESTORAGE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<ConsolePause>False</ConsolePause>
|
<ConsolePause>False</ConsolePause>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;EXCLUDE_TWOFISH;INCLUDE_KEYBOARD;EXCLUDE_KEYTRANSFORM;INCLUDE_FILECHOOSER;INCLUDE_JAVAFILESTORAGE</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;EXCLUDE_KEYTRANSFORM;EXCLUDE_FILECHOOSER;EXCLUDE_JAVAFILESTORAGE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -405,14 +405,19 @@ namespace keepass2android
|
|||||||
|
|
||||||
PopulateText(Resource.Id.entry_created, Resource.Id.entry_created_label, getDateTime(Entry.CreationTime));
|
PopulateText(Resource.Id.entry_created, Resource.Id.entry_created_label, getDateTime(Entry.CreationTime));
|
||||||
PopulateText(Resource.Id.entry_modified, Resource.Id.entry_modified_label, getDateTime(Entry.LastModificationTime));
|
PopulateText(Resource.Id.entry_modified, Resource.Id.entry_modified_label, getDateTime(Entry.LastModificationTime));
|
||||||
PopulateText(Resource.Id.entry_accessed, Resource.Id.entry_accessed_label, getDateTime(Entry.LastAccessTime));
|
|
||||||
|
|
||||||
if (Entry.Expires)
|
if (Entry.Expires)
|
||||||
{
|
{
|
||||||
|
FindViewById(Resource.Id.entry_expires).Visibility = ViewStates.Visible;
|
||||||
|
FindViewById(Resource.Id.entry_expires_label).Visibility = ViewStates.Visible;
|
||||||
|
|
||||||
PopulateText(Resource.Id.entry_expires, Resource.Id.entry_expires_label, getDateTime(Entry.ExpiryTime));
|
PopulateText(Resource.Id.entry_expires, Resource.Id.entry_expires_label, getDateTime(Entry.ExpiryTime));
|
||||||
} else
|
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
PopulateText(Resource.Id.entry_expires, Resource.Id.entry_expires_label, Resource.String.never);
|
FindViewById(Resource.Id.entry_expires).Visibility = ViewStates.Gone;
|
||||||
|
FindViewById(Resource.Id.entry_expires_label).Visibility = ViewStates.Gone;
|
||||||
}
|
}
|
||||||
PopulateText(Resource.Id.entry_comment, Resource.Id.entry_comment_label, Entry.Strings.ReadSafe(PwDefs.NotesField));
|
PopulateText(Resource.Id.entry_comment, Resource.Id.entry_comment_label, Entry.Strings.ReadSafe(PwDefs.NotesField));
|
||||||
|
|
||||||
|
@ -510,6 +510,14 @@ namespace keepass2android
|
|||||||
|
|
||||||
private void PopulateView() {
|
private void PopulateView() {
|
||||||
SetEditText(Resource.Id.filename, App.Kp2a.GetFileStorage(_ioConnection).GetDisplayName(_ioConnection));
|
SetEditText(Resource.Id.filename, App.Kp2a.GetFileStorage(_ioConnection).GetDisplayName(_ioConnection));
|
||||||
|
if (App.Kp2a.FileDbHelper.NumberOfRecentFiles() < 2)
|
||||||
|
{
|
||||||
|
FindViewById(Resource.Id.filename_group).Visibility = ViewStates.Gone;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FindViewById(Resource.Id.filename_group).Visibility = ViewStates.Visible;
|
||||||
|
}
|
||||||
SetEditText(Resource.Id.pass_keyfile, _keyFile);
|
SetEditText(Resource.Id.pass_keyfile, _keyFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6607
src/keepass2android/Resources/Resource.designer.cs
generated
6607
src/keepass2android/Resources/Resource.designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -149,19 +149,6 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/EntryItem" />
|
style="@style/EntryItem" />
|
||||||
<!-- Accessed -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/entry_accessed_label"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/entry_accessed"
|
|
||||||
style="@style/EntryFieldHeader"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/entry_accessed"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/EntryItem" />
|
|
||||||
<!-- Expires -->
|
<!-- Expires -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/entry_expires_label"
|
android:id="@+id/entry_expires_label"
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
android:layout_marginLeft="12dip"
|
android:layout_marginLeft="12dip"
|
||||||
android:layout_marginRight="12dip"
|
android:layout_marginRight="12dip"
|
||||||
android:layout_marginBottom="12dip">
|
android:layout_marginBottom="12dip">
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/filename_group"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/filename_label"
|
android:id="@+id/filename_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -40,11 +44,12 @@
|
|||||||
android:layout_below="@id/filenamescroll"
|
android:layout_below="@id/filenamescroll"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@android:drawable/divider_horizontal_dark" />
|
android:src="@android:drawable/divider_horizontal_dark" />
|
||||||
|
</RelativeLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/password_label"
|
android:id="@+id/password_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/divider2"
|
android:layout_below="@id/filename_group"
|
||||||
android:text="" />
|
android:text="" />
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/passwordLine"
|
android:id="@+id/passwordLine"
|
||||||
|
@ -138,19 +138,6 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/EntryItem" />
|
style="@style/EntryItem" />
|
||||||
<!-- Accessed -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/entry_accessed_label"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/entry_accessed"
|
|
||||||
style="@style/EntryFieldHeader"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/entry_accessed"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/EntryItem" />
|
|
||||||
<!-- Expires -->
|
<!-- Expires -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/entry_expires_label"
|
android:id="@+id/entry_expires_label"
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent">
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/filename_group"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/filename_label"
|
android:id="@+id/filename_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -36,11 +40,12 @@
|
|||||||
android:layout_below="@id/filenamescroll"
|
android:layout_below="@id/filenamescroll"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:src="@android:drawable/divider_horizontal_dark" />
|
android:src="@android:drawable/divider_horizontal_dark" />
|
||||||
|
</RelativeLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/password_label"
|
android:id="@+id/password_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/divider2"
|
android:layout_below="@id/filename_group"
|
||||||
android:text="" />
|
android:text="" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/toggle_password"
|
android:id="@+id/toggle_password"
|
||||||
|
@ -250,13 +250,19 @@ namespace keepass2android
|
|||||||
return keyfileFilename;
|
return keyfileFilename;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasRecentFiles() {
|
public bool HasRecentFiles()
|
||||||
|
{
|
||||||
|
return NumberOfRecentFiles() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int NumberOfRecentFiles()
|
||||||
|
{
|
||||||
ICursor cursor = FetchAllFiles();
|
ICursor cursor = FetchAllFiles();
|
||||||
|
|
||||||
bool hasRecent = cursor.Count > 0;
|
int numRecent = cursor.Count;
|
||||||
cursor.Close();
|
cursor.Close();
|
||||||
|
|
||||||
return hasRecent;
|
return numRecent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IOConnectionInfo CursorToIoc(ICursor cursor)
|
public IOConnectionInfo CursorToIoc(ICursor cursor)
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>False</Optimize>
|
<Optimize>False</Optimize>
|
||||||
<OutputPath>bin\Debug</OutputPath>
|
<OutputPath>bin\Debug</OutputPath>
|
||||||
<DefineConstants>DEBUG;EXCLUDE_TWOFISH;INCLUDE_KEYBOARD;EXCLUDE_KEYTRANSFORM;INCLUDE_FILECHOOSER;INCLUDE_JAVAFILESTORAGE</DefineConstants>
|
<DefineConstants>DEBUG;EXCLUDE_TWOFISH;EXCLUDE_KEYBOARD;EXCLUDE_KEYTRANSFORM;EXCLUDE_FILECHOOSER;EXCLUDE_JAVAFILESTORAGE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<ConsolePause>False</ConsolePause>
|
<ConsolePause>False</ConsolePause>
|
||||||
|
Loading…
Reference in New Issue
Block a user