mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-12-22 15:08:50 -05:00
implemented design improvements as suggested by Stefano
This commit is contained in:
parent
7d09a288d5
commit
b856e1ec15
@ -71,6 +71,10 @@ namespace MasterKeePlugin
|
||||
_showPassword = !_showPassword;
|
||||
MakePasswordMaskedOrVisible();
|
||||
};
|
||||
Android.Graphics.PorterDuff.Mode mMode = Android.Graphics.PorterDuff.Mode.SrcAtop;
|
||||
Android.Graphics.Color color = new Android.Graphics.Color (224, 224, 224);
|
||||
btnTogglePassword.SetColorFilter (color, mMode);
|
||||
|
||||
|
||||
FindViewById(Resource.Id.button_ok).Click += delegate(object sender, EventArgs args)
|
||||
{
|
||||
|
@ -144,7 +144,10 @@ namespace keepass2android
|
||||
_showPassword = !_showPassword;
|
||||
MakePasswordMaskedOrVisible();
|
||||
};
|
||||
|
||||
Android.Graphics.PorterDuff.Mode mMode = Android.Graphics.PorterDuff.Mode.SrcAtop;
|
||||
Android.Graphics.Color color = new Android.Graphics.Color (224, 224, 224);
|
||||
btnTogglePassword.SetColorFilter (color, mMode);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -249,6 +249,9 @@ namespace keepass2android
|
||||
State.ShowPassword = !State.ShowPassword;
|
||||
MakePasswordVisibleOrHidden();
|
||||
};
|
||||
Android.Graphics.PorterDuff.Mode mMode = Android.Graphics.PorterDuff.Mode.SrcAtop;
|
||||
Android.Graphics.Color color = new Android.Graphics.Color (189,189,189);
|
||||
btnTogglePassword.SetColorFilter (color, mMode);
|
||||
|
||||
|
||||
Button addButton = (Button) FindViewById(Resource.Id.add_advanced);
|
||||
|
@ -715,15 +715,17 @@ namespace keepass2android
|
||||
|
||||
ListView.ItemClick += (sender, args) => ((GroupListItemView) args.View).OnClick();
|
||||
|
||||
StyleScrollBars();
|
||||
StyleListView();
|
||||
|
||||
}
|
||||
|
||||
protected void StyleScrollBars()
|
||||
protected void StyleListView()
|
||||
{
|
||||
ListView lv = ListView;
|
||||
lv.ScrollBarStyle =ScrollbarStyles.InsideInset;
|
||||
lv.TextFilterEnabled = true;
|
||||
|
||||
lv.Divider = null;
|
||||
}
|
||||
|
||||
public bool OnActionItemClicked(ActionMode mode, IMenuItem item)
|
||||
|
@ -71,7 +71,7 @@ namespace keepass2android
|
||||
/// <summary>
|
||||
/// Launcher activity of Keepass2Android. This activity usually forwards to FileSelect but may show the revision dialog after installation or updates.
|
||||
/// </summary>
|
||||
[Activity(Label = AppNames.AppName, MainLauncher = true, Theme = "@style/MyTheme_ActionBar")]
|
||||
[Activity(Label = AppNames.AppName, MainLauncher = true, Theme = "@style/MyTheme_Blue")]
|
||||
public class KeePass : LifecycleDebugActivity
|
||||
{
|
||||
public const Result ExitNormal = Result.FirstUser;
|
||||
|
@ -38,6 +38,7 @@ using Android.Graphics;
|
||||
using Android.Support.Design.Widget;
|
||||
using Android.Support.V4.Widget;
|
||||
using Android.Support.V7.App;
|
||||
using Android.Util;
|
||||
using keepass2android;
|
||||
using KeePassLib.Keys;
|
||||
using KeePassLib.Serialization;
|
||||
@ -1003,6 +1004,9 @@ namespace keepass2android
|
||||
_showPassword = !_showPassword;
|
||||
MakePasswordMaskedOrVisible();
|
||||
};
|
||||
Android.Graphics.PorterDuff.Mode mMode = Android.Graphics.PorterDuff.Mode.SrcAtop;
|
||||
Color color = new Color (224, 224, 224);
|
||||
btnTogglePassword.SetColorFilter (color, mMode);
|
||||
}
|
||||
|
||||
private void InitializeKeyfileBrowseButton()
|
||||
|
@ -54,7 +54,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:theme="@style/MyTheme_Blue" android:name="keepass2android.PasswordActivity">
|
||||
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:theme="@style/MyTheme_Blue" android:name="keepass2android.PasswordActivity" android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter android:label="@string/app_name">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
@ -57,7 +57,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:theme="@style/MyTheme" android:name="keepass2android.PasswordActivity">
|
||||
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:theme="@style/MyTheme" android:name="keepass2android.PasswordActivity" android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter android:label="@string/app_name">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
@ -40,7 +40,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:theme="@style/MyTheme" android:name="keepass2android.PasswordActivity">
|
||||
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:theme="@style/MyTheme" android:name="keepass2android.PasswordActivity" android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter android:label="@string/app_name">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<item android:state_activated="true"
|
||||
android:drawable="@drawable/checked_drawable" />
|
||||
<item>
|
||||
<color android:color="#ffffffff" />
|
||||
<color android:color="#0000" />
|
||||
</item>
|
||||
</selector>
|
||||
<!--
|
||||
|
@ -1,303 +1,267 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/entry_scroll"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/entry_scroll"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Title -->
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageButton
|
||||
android:id="@+id/icon_button"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
android:layout_margin="0dp"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_alignParentRight="true"
|
||||
android:src="@drawable/ic00" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
android:id="@+id/entry_title"
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:hint="@string/hint_title"
|
||||
android:singleLine="true"
|
||||
android:capitalize="sentences"/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!--User-->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_username" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_user_name"
|
||||
android:hint="@string/hint_username"
|
||||
android:inputType="textEmailAddress"
|
||||
android:singleLine="true"/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
<!-- password-->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_password" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/entry_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingTop="0dp"
|
||||
android:singleLine="true"
|
||||
android:inputType="textPassword"
|
||||
android:hint="password" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<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">
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageButton
|
||||
android:id="@+id/toggle_password"
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_menu_view"
|
||||
android:background="?android:selectableItemBackground" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/generate_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:src="@drawable/ic_plus_button"
|
||||
android:background="?android:selectableItemBackground" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
android:id="@+id/icon_button"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
android:layout_margin="0dp"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_alignParentRight="true"
|
||||
android:src="@drawable/ic00" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
android:id="@+id/entry_title"
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:hint="@string/hint_title"
|
||||
android:singleLine="true"
|
||||
android:capitalize="sentences" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/entry_confpassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingTop="0dp"
|
||||
android:singleLine="true"
|
||||
android:inputType="textPassword"
|
||||
android:hint="confirm password" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- URL -->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_url" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_url"
|
||||
android:hint="@string/hint_url"
|
||||
android:inputType="textUri"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Comments -->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_comments" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_comment"
|
||||
android:hint="@string/hint_comment"
|
||||
android:inputType="textMultiLine"
|
||||
/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/entry_extras_label"
|
||||
<!--User-->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_extras" />
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_username" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_user_name"
|
||||
android:hint="@string/hint_username"
|
||||
android:inputType="textEmailAddress"
|
||||
android:singleLine="true" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
<!-- password-->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_password" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<!-- Extra strings -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
android:id="@+id/entry_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingTop="0dp"
|
||||
android:singleLine="true"
|
||||
android:inputType="textPassword"
|
||||
android:hint="password" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
<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:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:src="@drawable/ic_menu_view"
|
||||
android:background="?android:selectableItemBackground" />
|
||||
<ImageButton
|
||||
android:id="@+id/generate_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:src="@drawable/ic_plus_button"
|
||||
android:background="?android:selectableItemBackground" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<EditText
|
||||
android:id="@+id/entry_confpassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingTop="0dp"
|
||||
android:singleLine="true"
|
||||
android:inputType="textPassword"
|
||||
android:hint="confirm password" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- URL -->
|
||||
<LinearLayout
|
||||
android:id="@+id/advanced_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
<Button
|
||||
android:id="@+id/add_advanced"
|
||||
style="@style/EditEntryButton"
|
||||
android:layout_marginTop="-4dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_plus_button"
|
||||
android:text="@string/add_extra_string" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- file attachments -->
|
||||
<LinearLayout
|
||||
android:id="@+id/entry_binaries_label"
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_attachments" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- file attachments -->
|
||||
<TextView
|
||||
android:id="@+id/entry_binaries_label"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_binaries"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_url" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_url"
|
||||
android:hint="@string/hint_url"
|
||||
android:inputType="textUri"
|
||||
android:singleLine="true" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
<!-- Comments -->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_comments" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_comment"
|
||||
android:hint="@string/hint_comment"
|
||||
android:inputType="textMultiLine" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/entry_extras_label"
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_extras" />
|
||||
<LinearLayout
|
||||
android:id="@+id/binaries"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
android:orientation="vertical">
|
||||
<!-- Extra strings -->
|
||||
<LinearLayout
|
||||
android:id="@+id/advanced_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
<Button
|
||||
android:id="@+id/add_advanced"
|
||||
style="@style/EditEntryButton"
|
||||
android:layout_marginTop="-4dp"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_plus_button"
|
||||
android:text="@string/add_extra_string" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- Tags -->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_tags" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_tags"
|
||||
android:hint="@string/hint_tags"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Override URL -->
|
||||
<LinearLayout
|
||||
android:id="@+id/entry_override_url_container"
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_url" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_override_url"
|
||||
android:hint="@string/hint_override_url"
|
||||
android:inputType="textUri"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!--expires-->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:layout_width ="40dp"
|
||||
android:layout_height ="40dp"
|
||||
android:src="@drawable/ic_entry_expires" />
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/entry_group_name_label"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_expires"
|
||||
style="@style/EntryFieldHeader"
|
||||
android:layout_marginBottom="-4dp"
|
||||
/>
|
||||
|
||||
<!-- file attachments -->
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/entry_expires_checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="-8dp"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/entry_expires"
|
||||
android:layout_marginLeft="-4dip"
|
||||
android:layout_marginRight="12dip"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:id="@+id/entry_binaries_label"
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_attachments" />
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<!-- file attachments -->
|
||||
<TextView
|
||||
android:id="@+id/entry_binaries_label"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_binaries" />
|
||||
<LinearLayout
|
||||
android:id="@+id/binaries"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- Tags -->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_tags" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_tags"
|
||||
android:hint="@string/hint_tags"
|
||||
android:inputType="text"
|
||||
android:singleLine="true" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
<!-- Override URL -->
|
||||
<LinearLayout
|
||||
android:id="@+id/entry_override_url_container"
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:src="@drawable/ic_entry_url" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
style="@style/EntryEditSingleLine_TextInputLayout">
|
||||
<EditText
|
||||
style="@style/EntryEditSingleLine_EditText"
|
||||
android:id="@+id/entry_override_url"
|
||||
android:hint="@string/hint_override_url"
|
||||
android:inputType="textUri"
|
||||
android:singleLine="true" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
</LinearLayout>
|
||||
<!--expires-->
|
||||
<LinearLayout
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
style="@style/EntryEditSingleLine_ImageView"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_entry_expires" />
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/entry_group_name_label"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/entry_expires"
|
||||
style="@style/EntryFieldHeader"
|
||||
android:layout_marginBottom="-4dp" />
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<CheckBox
|
||||
android:id="@+id/entry_expires_checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="-8dp"
|
||||
android:layout_gravity="center_vertical" />
|
||||
<EditText
|
||||
android:id="@+id/entry_expires"
|
||||
android:layout_marginLeft="-4dip"
|
||||
android:layout_marginRight="12dip"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</ScrollView>
|
@ -1,26 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
<ScrollView
|
||||
android:id="@+id/entry_scroll"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fillViewport="true"
|
||||
android:scrollbarStyle="insideOverlay">
|
||||
<keepass2android.view.EntryContentsView
|
||||
android:id="@+id/entry_contents"
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
<ScrollView
|
||||
android:id="@+id/entry_scroll"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fillViewport="true"
|
||||
android:scrollbarStyle="insideOverlay">
|
||||
<keepass2android.view.EntryContentsView
|
||||
android:id="@+id/entry_contents"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
</ScrollView>
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/entry_edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
</ScrollView>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/entry_edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom|right"
|
||||
android:src="@drawable/ic_fab_edit" />
|
||||
android:layout_gravity="end|bottom|right"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@drawable/ic_fab_edit" />
|
||||
</android.support.design.widget.CoordinatorLayout>
|
@ -1,106 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout 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 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="#fff">
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="#fff">
|
||||
<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/insert_element"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:text="@string/insert_element_here"
|
||||
style="@style/BottomBarButton" />
|
||||
<Button
|
||||
android:id="@+id/cancel_insert_element"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="@string/cancel"
|
||||
style="@style/BottomBarButton" />
|
||||
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/insert_element"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:text="@string/insert_element_here"
|
||||
style="@style/BottomBarButton" />
|
||||
<Button
|
||||
android:id="@+id/cancel_insert_element"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="@string/cancel"
|
||||
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">
|
||||
<fragment
|
||||
android:name="keepass2android.GroupListFragment"
|
||||
android:id="@+id/list_fragment"
|
||||
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.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fabCancelAddNew"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom|right"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/ic_cross" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fabAddNew"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom|right"
|
||||
android:src="@drawable/ic_plus" />
|
||||
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fabAddNewGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|top"
|
||||
android:src="@drawable/ic_fab_folder"
|
||||
android:layout_marginBottom="72dp"
|
||||
android:visibility="gone"
|
||||
app:layout_anchor="@id/fabAddNew"
|
||||
app:layout_anchorGravity="bottom|right|end" />
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fabAddNewEntry"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|top"
|
||||
android:src="@drawable/ic_fab_entry"
|
||||
android:layout_marginBottom="144dp"
|
||||
android:visibility="gone"
|
||||
app:layout_anchor="@id/fabAddNew"
|
||||
app:layout_anchorGravity="bottom|right|end" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/nav_header" />
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/divider2"
|
||||
android:layout_below="@id/top"
|
||||
android:fitsSystemWindows="true">
|
||||
<fragment
|
||||
android:name="keepass2android.GroupListFragment"
|
||||
android:id="@+id/list_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fabCancelAddNew"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_gravity="end|bottom|right"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/ic_cross" />
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fabAddNew"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom|right"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@drawable/ic_plus" />
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fabAddNewGroup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|top"
|
||||
android:src="@drawable/ic_fab_folder"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="88dp"
|
||||
android:visibility="gone"
|
||||
app:layout_anchor="@id/fabAddNew"
|
||||
app:layout_anchorGravity="bottom|right|end" />
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fabAddNewEntry"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|top"
|
||||
android:src="@drawable/ic_fab_entry"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="160dp"
|
||||
android:visibility="gone"
|
||||
app:layout_anchor="@id/fabAddNew"
|
||||
app:layout_anchorGravity="bottom|right|end" />
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</RelativeLayout>
|
@ -24,7 +24,7 @@
|
||||
/>
|
||||
<item android:id="@+id/menu_toggle_pass"
|
||||
android:title="@string/show_password"
|
||||
android:icon="@android:drawable/ic_menu_view"
|
||||
android:icon="@drawable/ic_menu_view"
|
||||
app:showAsAction="ifRoom"
|
||||
/>
|
||||
<item android:id="@+id/menu_donate"
|
||||
|
@ -35,6 +35,9 @@
|
||||
|
||||
<string name="unknown_uri_scheme">Sorry! Keepass2Android cannot handle the returned URI %1$s. Please contact the developer!</string>
|
||||
|
||||
<string name="Entry_singular">One entry</string>
|
||||
<string name="Entry_plural">%1$d entries</string>
|
||||
|
||||
<string name="security_prefs">Security</string>
|
||||
<string name="display_prefs">Display</string>
|
||||
<string name="password_access_prefs">Password entry access</string>
|
||||
|
@ -99,7 +99,7 @@
|
||||
<item name="colorPrimaryDark">@color/appAccentColor</item>
|
||||
<!-- colorAccent is used as the default value for colorControlActivated
|
||||
which is used to tint widgets -->
|
||||
<item name="colorAccent">@color/appPrimaryColor</item>
|
||||
<item name="colorAccent">@color/appAccentColor</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
@ -137,6 +137,8 @@
|
||||
<Compile Include="icons\DrawableFactory.cs" />
|
||||
<Compile Include="icons\Icons.cs" />
|
||||
<Compile Include="KeeChallenge.cs" />
|
||||
<Compile Include="MainActivity.cs" />
|
||||
<Compile Include="MyRelativeLayout.cs" />
|
||||
<Compile Include="NfcOtpActivity.cs" />
|
||||
<Compile Include="pluginhost\PluginArrayAdapter.cs" />
|
||||
<Compile Include="pluginhost\PluginDatabase.cs" />
|
||||
@ -1276,4 +1278,9 @@
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable-xhdpi\oktoberfest.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\layout\Main.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -30,7 +30,7 @@ namespace keepass2android.view
|
||||
{
|
||||
private PwGroup _pwGroup;
|
||||
private readonly GroupBaseActivity _groupBaseActivity;
|
||||
private readonly TextView _textview;
|
||||
private readonly TextView _textview, _label;
|
||||
private int? _defaultTextColor;
|
||||
|
||||
private const int MenuOpen = Menu.First;
|
||||
@ -59,8 +59,8 @@ namespace keepass2android.view
|
||||
float size = PrefsUtil.GetListTextSize(act);
|
||||
_textview.TextSize = size;
|
||||
|
||||
TextView label = (TextView) gv.FindViewById(Resource.Id.group_label);
|
||||
label.TextSize = size-8;
|
||||
_label = (TextView) gv.FindViewById(Resource.Id.group_label);
|
||||
_label.TextSize = size-8;
|
||||
|
||||
PopulateView(gv, pw);
|
||||
|
||||
@ -88,7 +88,24 @@ namespace keepass2android.view
|
||||
else
|
||||
_textview.SetTextColor(new Color((int)_defaultTextColor));
|
||||
|
||||
|
||||
_label.Text = _groupBaseActivity.GetString (Resource.String.group)+" - ";
|
||||
uint numEntries = CountEntries (pw);
|
||||
if (numEntries == 1)
|
||||
_label.Text += Context.GetString (Resource.String.Entry_singular);
|
||||
else
|
||||
_label.Text += Context.GetString (Resource.String.Entry_plural, new Java.Lang.Object[] { numEntries });
|
||||
}
|
||||
|
||||
uint CountEntries(PwGroup g)
|
||||
{
|
||||
uint n = g.Entries.UCount;
|
||||
|
||||
foreach (PwGroup subgroup in g.Groups)
|
||||
{
|
||||
n += CountEntries(subgroup);
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
public void ConvertView(PwGroup pw) {
|
||||
|
Loading…
Reference in New Issue
Block a user