diff options
author | zeapo <mohamed@zenadi.com> | 2014-08-17 14:08:56 +0200 |
---|---|---|
committer | zeapo <mohamed@zenadi.com> | 2014-08-17 14:08:56 +0200 |
commit | 2c680cab593b6c58988e058c1c775fa9c1476b28 (patch) | |
tree | 1e0886e164bc7bb027a798c7dd2bea72ab932ff8 /app/src/main/java | |
parent | c2fb1a3ee2f4fa4721186df012f4a381d40f96af (diff) |
ui improvements and fixed a slight bug due to ui
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java index 2aaa0bf5..fb9442fb 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordAdapter.java @@ -58,24 +58,6 @@ 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); - - - View.OnClickListener onClickListener = new View.OnClickListener() { - @Override - public void onClick(View view) { - switch (view.getId()) { - case R.id.crypto_show_button: - activity.decryptPassword(pass); - break; - case R.id.crypto_delete_button: - activity.deletePassword(pass); - break; - } - } - }; - - ((ImageButton) rowView.findViewById(R.id.crypto_show_button)).setOnClickListener(onClickListener); - ((ImageButton) rowView.findViewById(R.id.crypto_delete_button)).setOnClickListener(onClickListener); } ViewHolder holder = (ViewHolder) rowView.getTag(); @@ -94,6 +76,24 @@ public class PasswordAdapter extends ArrayAdapter<PasswordItem>{ 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() { + @Override + public void onClick(View view) { + switch (view.getId()) { + case R.id.crypto_show_button: + activity.decryptPassword(pass); + break; + case R.id.crypto_delete_button: + activity.deletePassword(pass); + break; + } + } + }; + + ((ImageButton) rowView.findViewById(R.id.crypto_show_button)).setOnClickListener(onClickListener); + ((ImageButton) rowView.findViewById(R.id.crypto_delete_button)).setOnClickListener(onClickListener); } return rowView; |