ui improvements and fixed a slight bug due to ui
|
@ -58,6 +58,24 @@ public class PasswordAdapter extends ArrayAdapter<PasswordItem>{
|
|||
viewHolder.back_name = (TextView) rowView.findViewById(R.id.label_back);
|
||||
viewHolder.type = (TextView) rowView.findViewById(R.id.type);
|
||||
rowView.setTag(viewHolder);
|
||||
}
|
||||
|
||||
ViewHolder holder = (ViewHolder) rowView.getTag();
|
||||
|
||||
holder.name.setText(pass.toString());
|
||||
holder.back_name.setText(pass.toString());
|
||||
|
||||
if (pass.getType() == PasswordItem.TYPE_CATEGORY) {
|
||||
holder.name.setTextColor(this.activity.getResources().getColor(android.R.color.holo_blue_dark));
|
||||
holder.name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
|
||||
holder.type.setText("Category: ");
|
||||
} else {
|
||||
holder.type.setText("Password: ");
|
||||
holder.name.setTextColor(this.activity.getResources().getColor(android.R.color.holo_orange_dark));
|
||||
holder.name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));
|
||||
|
||||
holder.back_name.setTextColor(this.activity.getResources().getColor(android.R.color.white));
|
||||
holder.back_name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD_ITALIC));
|
||||
|
||||
|
||||
View.OnClickListener onClickListener = new View.OnClickListener() {
|
||||
|
@ -78,24 +96,6 @@ public class PasswordAdapter extends ArrayAdapter<PasswordItem>{
|
|||
((ImageButton) rowView.findViewById(R.id.crypto_delete_button)).setOnClickListener(onClickListener);
|
||||
}
|
||||
|
||||
ViewHolder holder = (ViewHolder) rowView.getTag();
|
||||
|
||||
holder.name.setText(pass.toString());
|
||||
holder.back_name.setText(pass.toString());
|
||||
|
||||
if (pass.getType() == PasswordItem.TYPE_CATEGORY) {
|
||||
holder.name.setTextColor(this.activity.getResources().getColor(android.R.color.holo_blue_dark));
|
||||
holder.name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
|
||||
holder.type.setText("Category: ");
|
||||
} else {
|
||||
holder.type.setText("Password: ");
|
||||
holder.name.setTextColor(this.activity.getResources().getColor(android.R.color.holo_orange_dark));
|
||||
holder.name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));
|
||||
|
||||
holder.back_name.setTextColor(this.activity.getResources().getColor(android.R.color.white));
|
||||
holder.back_name.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD_ITALIC));
|
||||
}
|
||||
|
||||
return rowView;
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 368 B |
BIN
app/src/main/res/drawable-hdpi/ico_eye.png
Normal file
After Width: | Height: | Size: 472 B |
BIN
app/src/main/res/drawable-hdpi/ico_sync.png
Normal file
After Width: | Height: | Size: 919 B |
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 266 B |
BIN
app/src/main/res/drawable-mdpi/ico_eye.png
Normal file
After Width: | Height: | Size: 291 B |
BIN
app/src/main/res/drawable-mdpi/ico_sync.png
Normal file
After Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 521 B |
BIN
app/src/main/res/drawable-xhdpi/ico_eye.png
Normal file
After Width: | Height: | Size: 624 B |
BIN
app/src/main/res/drawable-xhdpi/ico_sync.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 840 B |
BIN
app/src/main/res/drawable-xxhdpi/ico_eye.png
Normal file
After Width: | Height: | Size: 970 B |
BIN
app/src/main/res/drawable-xxhdpi/ico_sync.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -16,17 +16,4 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"></LinearLayout>
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ico_add"
|
||||
android:background="@drawable/oval"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:onClick="createPassword"
|
||||
android:layout_column="2"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignRight="@+id/main_layout"
|
||||
android:layout_alignEnd="@+id/main_layout" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:background="#eee">
|
||||
|
||||
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
tools:context="com.zeapo.pwdstore.crypto.PgpHandler">
|
||||
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context="com.zeapo.pwdstore.crypto.PgpHandler"
|
||||
android:background="#eee">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -45,21 +36,20 @@
|
|||
</LinearLayout>
|
||||
|
||||
|
||||
<ScrollView android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||
android:background="@drawable/rectangle"
|
||||
android:layout_weight="1">
|
||||
<LinearLayout
|
||||
android:id="@+id/crypto_container"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:background="@drawable/rectangle"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_row="2"
|
||||
android:layout_column="0">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/crypto_password_edit_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -87,18 +77,18 @@
|
|||
<EditText
|
||||
android:id="@+id/crypto_extra_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:enabled="true"
|
||||
android:visibility="visible"
|
||||
android:typeface="monospace"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_row="3"
|
||||
android:layout_column="0">
|
||||
android:layout_weight="0">
|
||||
<ImageButton
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -122,6 +112,5 @@
|
|||
android:layout_alignParentStart="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
</GridLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
|
@ -35,7 +35,7 @@
|
|||
android:id="@+id/crypto_show_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ico_key"
|
||||
android:src="@drawable/ico_eye"
|
||||
android:background="@drawable/blue_rectangle"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="8dp"
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".pwdstore" >
|
||||
|
||||
<item android:id="@+id/menu_add_password"
|
||||
android:icon="@drawable/ico_add"
|
||||
android:showAsAction="always"
|
||||
android:title="New password"/>
|
||||
|
||||
<!--<item android:id="@+id/menu_add_category"-->
|
||||
|
@ -15,7 +18,7 @@
|
|||
<item android:id="@+id/referesh"
|
||||
android:title="Refresh list"
|
||||
android:showAsAction="ifRoom"
|
||||
android:icon="@android:drawable/ic_popup_sync"/>
|
||||
android:icon="@drawable/ico_sync"/>
|
||||
|
||||
<item android:id="@+id/user_pref"
|
||||
android:title="Settings"
|
||||
|
|