mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-20 17:11:32 -08:00
Layout updates
This commit is contained in:
1 parent
31d5596fd5
commit
75fa83477a
12 files changed
+104
-73
No files matched your search
+19
-10
@@ -38,33 +38,42 @@
|
||||
<data android:pathPattern=".*\\.kdbx" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.keepassdroid.GroupActivityV3" android:configChanges="orientation|keyboardHidden">
|
||||
<activity android:name="com.keepassdroid.GroupActivityV3" android:configChanges="orientation|keyboardHidden"
|
||||
android:theme="@android:style/Theme.NoTitleBar">
|
||||
<!-- This metadata entry causes .app.SearchQueryResults to be the default context -->
|
||||
<!-- whenever the user invokes search while in this Activity. -->
|
||||
<meta-data android:name="android.app.default_searchable"
|
||||
android:value="com.keepassdroid.search.SearchResults" />
|
||||
</activity>
|
||||
<activity android:name="com.keepassdroid.GroupActivityV4" android:configChanges="orientation|keyboardHidden">
|
||||
<activity android:name="com.keepassdroid.GroupActivityV4" android:configChanges="orientation|keyboardHidden"
|
||||
android:theme="@android:style/Theme.NoTitleBar">
|
||||
<!-- This metadata entry causes .app.SearchQueryResults to be the default context -->
|
||||
<!-- whenever the user invokes search while in this Activity. -->
|
||||
<meta-data android:name="android.app.default_searchable"
|
||||
android:value="com.keepassdroid.search.SearchResults" />
|
||||
</activity>
|
||||
<activity android:name="com.keepassdroid.EntryActivity"></activity>
|
||||
<activity android:name="com.keepassdroid.EntryActivityV4"></activity>
|
||||
<activity android:name="com.keepassdroid.LockingActivity"></activity>
|
||||
<activity android:name="com.keepassdroid.EntryEditActivity" android:configChanges="orientation|keyboardHidden"></activity>
|
||||
<activity android:name="com.keepassdroid.EntryActivity"
|
||||
android:theme="@android:style/Theme.NoTitleBar"></activity>
|
||||
<activity android:name="com.keepassdroid.EntryActivityV4"
|
||||
android:theme="@android:style/Theme.NoTitleBar"></activity>
|
||||
<activity android:name="com.keepassdroid.LockingActivity"
|
||||
android:theme="@android:style/Theme.NoTitleBar"></activity>
|
||||
<activity android:name="com.keepassdroid.EntryEditActivity" android:configChanges="orientation|keyboardHidden"
|
||||
android:theme="@android:style/Theme.NoTitleBar"></activity>
|
||||
<activity android:name="com.keepassdroid.GroupEditActivity" android:theme="@android:style/Theme.Dialog"></activity>
|
||||
<activity android:name="com.keepassdroid.IconPickerActivity"></activity>
|
||||
<activity android:name="com.keepassdroid.search.SearchResults" android:launchMode="standard">
|
||||
<activity android:name="com.keepassdroid.IconPickerActivity" android:theme="@android:style/Theme.NoTitleBar"></activity>
|
||||
<activity android:name="com.keepassdroid.search.SearchResults" android:launchMode="standard"
|
||||
android:theme="@android:style/Theme.NoTitleBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
|
||||
</activity>
|
||||
<activity android:name="com.keepassdroid.settings.AppSettingsActivity"></activity>
|
||||
<activity android:name="com.keepassdroid.GeneratePasswordActivity"></activity>
|
||||
<activity android:name="com.keepassdroid.settings.AppSettingsActivity"
|
||||
android:theme="@android:style/Theme.NoTitleBar"></activity>
|
||||
<activity android:name="com.keepassdroid.GeneratePasswordActivity"
|
||||
android:theme="@android:style/Theme.NoTitleBar"></activity>
|
||||
<service android:name="com.keepassdroid.services.TimeoutService"></service>
|
||||
<meta-data android:name="com.a0soft.gphone.aTrackDog.webURL" android:value="http://keepassdroid.com" />
|
||||
</application>
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:stretchColumns="1">
|
||||
<TableRow android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
<ImageView android:id="@+id/entry_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
+21
-20
@@ -21,28 +21,29 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<!-- Title -->
|
||||
<TextView android:id="@+id/entry_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
<RelativeLayout android:id="@+id/title_block"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@id/entry_icon"
|
||||
android:minHeight="32dp"
|
||||
style="@style/ElementTextTitle"/>
|
||||
<ImageView android:id="@+id/entry_icon"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic99_blank"/>
|
||||
<ImageView android:id="@+id/entry_divider1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/entry_title"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@android:drawable/divider_horizontal_dark"/>
|
||||
android:padding="2dp"
|
||||
style="@style/WhiteOnBlack">
|
||||
<TextView android:id="@+id/entry_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@id/entry_icon"
|
||||
android:minHeight="32dp"
|
||||
style="@style/ElementTextTitle"/>
|
||||
<ImageView android:id="@+id/entry_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic99_blank"
|
||||
style="@style/WhiteOnBlack"/>
|
||||
</RelativeLayout>
|
||||
<Button android:id="@+id/entry_edit"
|
||||
android:text="@string/menu_edit"
|
||||
android:layout_width="100sp"
|
||||
@@ -59,7 +60,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_above="@id/entry_divider2"
|
||||
android:layout_below="@id/entry_divider1">
|
||||
android:layout_below="@id/title_block">
|
||||
<TableLayout android:id="@+id/entry_table"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_width="wrap_content">
|
||||
|
||||
@@ -21,33 +21,34 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<!-- Title -->
|
||||
<TextView android:id="@+id/entry_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
<RelativeLayout android:id="@+id/title_block"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@id/entry_icon"
|
||||
android:minHeight="32dp"
|
||||
style="@style/ElementTextTitle"/>
|
||||
<ImageView android:id="@+id/entry_icon"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic99_blank"/>
|
||||
<ImageView android:id="@+id/entry_divider1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/entry_title"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@android:drawable/divider_horizontal_dark"/>
|
||||
android:padding="2dp"
|
||||
style="@style/WhiteOnBlack">
|
||||
<TextView android:id="@+id/entry_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@id/entry_icon"
|
||||
android:minHeight="32dp"
|
||||
style="@style/ElementTextTitle"/>
|
||||
<ImageView android:id="@+id/entry_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic99_blank"
|
||||
style="@style/WhiteOnBlack"/>
|
||||
</RelativeLayout>
|
||||
<ScrollView android:id="@+id/entry_scroll"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_below="@id/entry_divider1">
|
||||
android:layout_below="@id/title_block">
|
||||
<TableLayout android:id="@+id/entry_table"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_width="wrap_content">
|
||||
|
||||
+14
-17
@@ -18,28 +18,25 @@
|
||||
along with KeePassDroid. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView android:id="@+id/group_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:text="@string/current_group"
|
||||
android:textStyle="bold"/>
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="2sp"
|
||||
style="@style/WhiteOnBlack">
|
||||
<TextView android:id="@+id/group_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/group_title"
|
||||
android:layout_toRightOf="@id/group_title"
|
||||
android:layout_marginLeft="3sp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/root"
|
||||
style="@style/GroupTextSmall"
|
||||
style="@style/WhiteOnBlack"
|
||||
/>
|
||||
<ImageView android:id="@+id/divider1"
|
||||
android:layout_width="fill_parent"
|
||||
<ImageView android:id="@+id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/group_title"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="fitXY"
|
||||
android:tint="@color/blue_highlight"
|
||||
android:src="@android:drawable/divider_horizontal_dark"/>
|
||||
android:src="@drawable/ic99_blank"
|
||||
style="@style/WhiteOnBlack"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
@@ -22,6 +22,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:stretchColumns="1">
|
||||
<TableRow android:layout_width="fill_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView android:id="@+id/group_icon"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -32,6 +33,8 @@
|
||||
<TextView android:id="@+id/group_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
style="@style/GroupTextLarge"/>
|
||||
<View/>
|
||||
<TextView android:id="@+id/group_label"
|
||||
|
||||
@@ -22,4 +22,5 @@
|
||||
<color name="group">#ffffff</color>
|
||||
<color name="icon_background">#555555</color>
|
||||
<color name="icon_text">#000000</color>
|
||||
<color name="group_header_background">#888888</color>
|
||||
</resources>
|
||||
@@ -39,10 +39,15 @@
|
||||
<style name="ElementTextLarge">
|
||||
<item name="@android:textSize">28sp</item>
|
||||
</style>
|
||||
<style name="ElementTextTitle" parent="ElementText">
|
||||
<item name="@android:textColor">@color/group</item>
|
||||
</style>
|
||||
<style name="GroupLabel">
|
||||
<item name="@android:textSize">20sp</item>
|
||||
</style>
|
||||
<style name="WhiteOnBlack">
|
||||
<item name="@android:background">#666666</item>
|
||||
<item name="@android:textColor">@android:color/primary_text_dark</item>
|
||||
<item name="@android:textSize">20sp</item>
|
||||
</style>
|
||||
<style name="ElementTextTitle" parent="WhiteOnBlack">
|
||||
<item name="@android:textColor">@color/group</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -156,6 +156,7 @@ public abstract class GroupActivity extends GroupBaseActivity {
|
||||
}
|
||||
|
||||
setGroupTitle();
|
||||
setGroupIcon();
|
||||
|
||||
setListAdapter(new PwListAdapter(this, mGroup));
|
||||
registerForContextMenu(getListView());
|
||||
|
||||
@@ -30,6 +30,7 @@ import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
@@ -133,6 +134,13 @@ public abstract class GroupBaseActivity extends LockCloseListActivity {
|
||||
}
|
||||
}
|
||||
|
||||
protected void setGroupIcon() {
|
||||
if (mGroup != null) {
|
||||
ImageView iv = (ImageView) findViewById(R.id.icon);
|
||||
App.getDB().drawFactory.assignDrawableTo(iv, getResources(), mGroup.getIcon());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
|
||||
@@ -72,6 +72,11 @@ public class DrawableFactory {
|
||||
}
|
||||
|
||||
public Drawable getIconDrawable(Resources res, PwIconCustom icon) {
|
||||
initBlank(res);
|
||||
if (icon == null) {
|
||||
return blank;
|
||||
}
|
||||
|
||||
Drawable draw = customIconMap.get(icon.uuid);
|
||||
|
||||
if (draw == null) {
|
||||
@@ -79,8 +84,6 @@ public class DrawableFactory {
|
||||
|
||||
// Could not understand custom icon
|
||||
if (bitmap == null) {
|
||||
initBlank(res);
|
||||
|
||||
return blank;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user