Change coloring (color title instead of whole list item).
This commit is contained in:
parent
37ac4d2801
commit
a4b84f9d15
3 changed files with 5 additions and 11 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class CertificateAdapter extends ArrayAdapter<Certificate> implements
|
|||
}).start();
|
||||
}
|
||||
});
|
||||
colorRes = R.color.background_system_certificate;
|
||||
colorRes = R.color.title_system_certificate;
|
||||
}
|
||||
else {
|
||||
button.setText(R.string.move_to_system);
|
||||
|
@ -76,9 +76,9 @@ public class CertificateAdapter extends ArrayAdapter<Certificate> implements
|
|||
}).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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="background_system_certificate">#ffe2f0b6</color>
|
||||
<color name="background_user_certificate">#ffffcaca</color>
|
||||
<color name="title_system_certificate">#ff7caf00</color>
|
||||
<color name="title_user_certificate">#ffe21d1d</color>
|
||||
</resources>
|
||||
|
|
Reference in a new issue