Change coloring (color title instead of whole list item).

This commit is contained in:
Felix Ableitner 2014-07-24 00:39:35 +02:00
parent 37ac4d2801
commit a4b84f9d15
3 changed files with 5 additions and 11 deletions

View file

@ -36,10 +36,4 @@ public class CertificateAdapterTest extends AndroidTestCase {
} }
} }
@SmallTest
public void testColors() {
assertNotSame(mCertificateAdapter.getView(0, null, null).getBackground(),
mCertificateAdapter.getView(1, null, null).getBackground());
}
} }

View file

@ -60,7 +60,7 @@ public class CertificateAdapter extends ArrayAdapter<Certificate> implements
}).start(); }).start();
} }
}); });
colorRes = R.color.background_system_certificate; colorRes = R.color.title_system_certificate;
} }
else { else {
button.setText(R.string.move_to_system); button.setText(R.string.move_to_system);
@ -76,9 +76,9 @@ public class CertificateAdapter extends ArrayAdapter<Certificate> implements
}).start(); }).start();
} }
}); });
colorRes = R.color.background_user_certificate; colorRes = R.color.title_user_certificate;
} }
convertView.setBackgroundColor(getContext().getResources().getColor(colorRes)); title.setTextColor(getContext().getResources().getColor(colorRes));
return convertView; return convertView;
} }

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="background_system_certificate">#ffe2f0b6</color> <color name="title_system_certificate">#ff7caf00</color>
<color name="background_user_certificate">#ffffcaca</color> <color name="title_user_certificate">#ffe21d1d</color>
</resources> </resources>