Archived
Enhanced looks of program list activity by adjusting text size/colour.
This commit is contained in:
1 parent
1d388f0dff
commit
db8a20f56a
3 files changed
+26
-5
No files matched your search
@@ -2,7 +2,9 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="3px"
|
||||
android:paddingBottom="3px">
|
||||
|
||||
<TextView android:id="@+id/event_list_row_text"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -21,8 +21,27 @@
|
||||
<item name="android:textColor">#cccccc</item>
|
||||
</style>
|
||||
|
||||
<style name="ListItemTextEvenTilte" parent="@style/ListItemTextEven">
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
||||
<style name="ListItemTextEvenDate" parent="@style/ListItemTextEven">
|
||||
<item name="android:textSize">9sp</item>
|
||||
<item name="android:textColor">#aaaaaa</item>
|
||||
</style>
|
||||
|
||||
|
||||
<color name="ListItemBackgroundOdd">#000000</color>
|
||||
<style name="ListItemTextOdd" parent="@android:style/TextAppearance">
|
||||
<item name="android:textColor">#cccccc</item>
|
||||
</style>
|
||||
|
||||
<style name="ListItemTextOddTilte" parent="@style/ListItemTextOdd">
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
||||
<style name="ListItemTextOddDate" parent="@style/ListItemTextOdd">
|
||||
<item name="android:textSize">9sp</item>
|
||||
<item name="android:textColor">#aaaaaa</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -119,12 +119,12 @@ public class ProgramListActivity extends BaseDnsActivity {
|
||||
/* Apply styles: */
|
||||
if (position % 2 == 0) {
|
||||
row.setBackgroundResource(R.color.ListItemBackgroundEven);
|
||||
titleView.setTextAppearance(ProgramListActivity.this, R.style.ListItemTextEven);
|
||||
dateView.setTextAppearance(ProgramListActivity.this, R.style.ListItemTextEven);
|
||||
titleView.setTextAppearance(ProgramListActivity.this, R.style.ListItemTextEvenTilte);
|
||||
dateView.setTextAppearance(ProgramListActivity.this, R.style.ListItemTextEvenDate);
|
||||
} else {
|
||||
row.setBackgroundResource(R.color.ListItemBackgroundOdd);
|
||||
titleView.setTextAppearance(ProgramListActivity.this, R.style.ListItemTextOdd);
|
||||
dateView.setTextAppearance(ProgramListActivity.this, R.style.ListItemTextOdd);
|
||||
titleView.setTextAppearance(ProgramListActivity.this, R.style.ListItemTextOddTilte);
|
||||
dateView.setTextAppearance(ProgramListActivity.this, R.style.ListItemTextOddDate);
|
||||
}
|
||||
|
||||
return row;
|
||||
|
||||
Reference in new issue
Block a user