fixes for UI issues

* now tested on small screens (fixes for too large font/logo in FileSelect)
 * nav drawer in password screen scrollable
 * fixed FABs on Android 4.4
 * fixed issue with Filename dialog for HTTP/FTP
 * fixed wrong ID in entry_view_contents.xml

reverted notify icons
This commit is contained in:
Philipp Crocoll 2015-09-22 20:51:59 +02:00
parent bec0b33365
commit 3f740bd319
22 changed files with 164 additions and 116 deletions

View File

@ -718,7 +718,7 @@ namespace keepass2android
}
PopulateStandardText(Resource.Id.entry_comment, Resource.Id.entryfield_container_comment, PwDefs.NotesField);
RegisterTextPopup(FindViewById<RelativeLayout>(Resource.Id.comment_container),
FindViewById(Resource.Id.username_vdots), PwDefs.NotesField);
FindViewById(Resource.Id.comment_vdots), PwDefs.NotesField);
PopulateText(Resource.Id.entry_tags, Resource.Id.entryfield_container_tags, concatTags(Entry.Tags));
PopulateText(Resource.Id.entry_override_url, Resource.Id.entryfield_container_overrideurl, Entry.OverrideUrl);

View File

@ -109,7 +109,10 @@ namespace keepass2android
btn = new Button(_context);
btn.LayoutParameters = new GridView.LayoutParams((int)convertDpToPixel(90, _context), (int)convertDpToPixel(110, _context));
btn.SetBackgroundResource(Resource.Drawable.storagetype_button_bg);
btn.SetPadding(8,64,8,8);
btn.SetPadding((int)convertDpToPixel(4, _context),
(int)convertDpToPixel(20, _context),
(int)convertDpToPixel(4, _context),
(int)convertDpToPixel(4, _context));
btn.SetTextSize(ComplexUnitType.Sp, 11);
btn.SetTextColor(new Color(115, 115, 115));
btn.SetSingleLine(false);

View File

@ -97,32 +97,7 @@ namespace keepass2android
{
get { return App.Kp2a.GetDb().CanWrite && ((this.Group.ParentGroup != null) || App.Kp2a.GetDb().DatabaseFormat.CanHaveEntriesInRootGroup); }
}
/*TODO
public override bool OnCreateOptionsMenu(IMenu menu)
{
// Inflate the menu; this adds items to the action bar if it is present.
MenuInflater.Inflate(keepass2android.Resource.Menu.group, menu);
// Get the SearchView and set the searchable configuration
SearchManager searchManager = (SearchManager)GetSystemService(Context.SearchService);
var searchItem = menu.FindItem(keepass2android.Resource.Id.menu_search);
//SearchView searchView = (SearchView)Android.Support.V4.View.MenuItemCompat.GetActionView(searchItem);
var view = MenuItemCompat.GetActionView(searchItem);
var searchView = view.JavaCast<Android.Support.V7.Widget.SearchView>();
// searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
// Assumes current activity is the searchable activity
searchView.SetSearchableInfo(searchManager.GetSearchableInfo(ComponentName));
// searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default
return base.OnCreateOptionsMenu(menu);
}
*/
protected override void OnCreate (Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:background="@drawable/splash_bg_selector"
android:layout_height="fill_parent"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:gravity="center_horizontal"
android:fitsSystemWindows="true">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="center_vertical"
>
<ImageView
android:id="@+id/splashlogo"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/splashlogo" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Keepass2Android"
android:textSize="36dp"
android:fontFamily="sans-serif-light"
android:textColor="#fff" />
</LinearLayout>
<View
android:id="@+id/dividerTop"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="0"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="#d1e7f6" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
>
<Button
android:id="@+id/start_open_file"
android:text="@string/start_open_file"
android:layout_weight="0.5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/opendb"
android:layout_marginRight="16dp"
style="@style/SplashScreenButton" />
<Button
android:id="@+id/start_create"
android:text="@string/start_create"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_weight="0.5"
android:drawableLeft="@drawable/createnewdb"
style="@style/SplashScreenButton" />
</LinearLayout>
<View
android:id="@+id/dividerTop"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="0"
android:layout_marginTop="8dp"
android:layout_marginBottom="0dp"
android:background="#d1e7f6" />
<fragment
android:name="keepass2android.RecentFilesFragment"
android:id="@+id/recent_files"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
</LinearLayout>

View File

@ -170,7 +170,7 @@
</LinearLayout>
<!-- file attachments -->
<LinearLayout
android:id="@+id/entry_binaries_label"
android:id="@+id/entry_binaries_container"
style="@style/EntryEditSingleLine_container">
<ImageView
style="@style/EntryEditSingleLine_ImageView"

View File

@ -214,7 +214,7 @@
android:id="@+id/entry_comment"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/username_vdots"
android:layout_toLeftOf="@id/comment_vdots"
style="@style/EntryItem" />
</RelativeLayout>
</LinearLayout>

View File

@ -10,10 +10,10 @@
android:fitsSystemWindows="true">
<ImageView
android:id="@+id/splashlogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/splash_logo_width"
android:layout_height="@dimen/splash_logo_height"
android:layout_weight="0"
android:layout_marginTop="32dp"
android:layout_marginTop="@dimen/splash_logo_marginTop"
android:src="@drawable/splashlogo" />
<TextView
@ -21,7 +21,8 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="Keepass2Android"
android:textSize="38dp"
android:inputType="text"
android:textSize="@dimen/splash_fontsize"
android:fontFamily="sans-serif-light"
android:layout_marginBottom="8dp"
android:textColor="#fff" />

View File

@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:padding="16dp"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="fill_parent"
@ -11,13 +12,12 @@
android:id="@+id/label_open_by_filename"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?android:attr/listSeparatorTextViewStyle"
android:text="@string/enter_filename" />
<ImageButton
android:id="@+id/browse_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="?attr/ic_launcher_folder_small"
android:src="@drawable/ic_launcher_folder_small"
android:layout_alignParentRight="true"
android:layout_below="@id/label_open_by_filename" />
<EditText

View File

@ -69,23 +69,19 @@
android:id="@+id/fabAddNewGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|top"
android:layout_gravity="end|bottom|right"
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:visibility="gone"/>
<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:layout_gravity="end|bottom|right"
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:visibility="gone"/>
</android.support.design.widget.CoordinatorLayout>
</RelativeLayout>

View File

@ -325,8 +325,10 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/nav_header"
android:fitsSystemWindows="true">
<ScrollView
android:layout_height="match_parent"
android:layout_width="wrap_content">
<LinearLayout
android:id="@+id/navdrawercontents"
android:layout_height="match_parent"
@ -374,5 +376,6 @@
android:text="@string/menu_about"
style="@style/NavDrawerButton" />
</LinearLayout>
</ScrollView>
</android.support.design.widget.NavigationView>
</keepass2android.FixedDrawerLayout>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<!-- h540dp -->
<dimen name="splash_logo_width">105dp</dimen>
<dimen name="splash_logo_height">138dp</dimen>
<dimen name="splash_logo_marginTop">32dp</dimen>
</resources>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<dimen name="splash_fontsize">38dp</dimen>
</resources>

View File

@ -7,4 +7,11 @@
<dimen name="detail_backdrop_height">200dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="splash_logo_width">79dp</dimen>
<dimen name="splash_logo_height">104dp</dimen>
<dimen name="splash_logo_marginTop">16dp</dimen>
<dimen name="splash_fontsize">30dp</dimen>
</resources>

View File

@ -120,7 +120,6 @@ namespace keepass2android
//show results:
if (Group == null || (!Group.Entries.Any()))
{
//TODO
SetContentView(Resource.Layout.searchurlresults_empty);
}

View File

@ -188,7 +188,6 @@
<Compile Include="password\PasswordGenerator.cs" />
<Compile Include="views\EntrySection.cs" />
<Compile Include="views\EntryContentsView.cs" />
<Compile Include="views\GroupEmptyView.cs" />
<Compile Include="views\TextViewSelect.cs" />
<Compile Include="IconPickerActivity.cs" />
<Compile Include="LockingActivity.cs" />
@ -320,7 +319,9 @@
<AndroidResource Include="Resources\layout\entry_list_entry.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\layout\entry_section.xml" />
<AndroidResource Include="Resources\layout\entry_section.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\layout\entry_view.xml">
<SubType>Designer</SubType>
</AndroidResource>
@ -333,7 +334,9 @@
<AndroidResource Include="Resources\layout\file_selection.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\layout\file_selection_filename.xml" />
<AndroidResource Include="Resources\layout\file_selection_filename.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\layout\generate_password.xml">
<SubType>Designer</SubType>
</AndroidResource>
@ -658,7 +661,9 @@
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\fonts.xml" />
<AndroidResource Include="Resources\values\fonts.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_action_lock.png" />
@ -756,15 +761,6 @@
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_notify_keyboard.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_notify_loaded.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_notify_locked.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_notify_offline.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_plus.png" />
</ItemGroup>
@ -1278,4 +1274,24 @@
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\oktoberfest.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout-land\file_selection.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-mdpi\ic_notify_loaded.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-mdpi\ic_notify_locked.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-mdpi\ic_notify_offline.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values-w360dp\dimens.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values-h540dp\dimens.xml" />
</ItemGroup>
</Project>

View File

@ -1,57 +0,0 @@
/*
This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
Keepass2Android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Keepass2Android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Util;
namespace keepass2android.view
{
/*TODO Remove
public class GroupEmptyView : RelativeLayout {
public GroupEmptyView (IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)
{
}
public GroupEmptyView(Context context):base(context) {
InflateView();
}
public GroupEmptyView(Context context, IAttributeSet attrs):base(context, attrs) {
InflateView();
}
private void InflateView() {
LayoutInflater inflater = (LayoutInflater) Context.GetSystemService(Context.LayoutInflaterService);
inflater.Inflate(Resource.Layout.group_empty, this);
}
}
*/
}