|
14 | 14 | </data> |
15 | 15 |
|
16 | 16 | <android.support.v7.widget.CardView |
17 | | - android:layout_width="match_parent" |
18 | 17 | android:id="@+id/code_card" |
| 18 | + android:layout_width="match_parent" |
| 19 | + android:layout_height="wrap_content" |
19 | 20 | android:layout_marginBottom="2dp" |
20 | 21 | android:layout_marginTop="2dp" |
21 | 22 | android:foreground="?android:attr/selectableItemBackground" |
22 | | - android:layout_height="wrap_content"> |
| 23 | + app:cardBackgroundColor="@{highlight ? theme.colorHighLight : 0}"> |
23 | 24 |
|
24 | 25 | <LinearLayout |
25 | 26 | android:layout_width="match_parent" |
26 | | - android:orientation="vertical" |
27 | 27 | android:layout_height="wrap_content" |
| 28 | + android:orientation="vertical" |
28 | 29 | android:weightSum="1"> |
29 | 30 |
|
30 | 31 | <RelativeLayout |
|
33 | 34 | android:layout_marginBottom="4dp"> |
34 | 35 |
|
35 | 36 | <ImageView |
| 37 | + android:id="@+id/code_usericon" |
36 | 38 | android:layout_width="@dimen/profile_pic_size" |
37 | 39 | android:layout_height="@dimen/profile_pic_size" |
38 | | - android:id="@+id/code_usericon" |
39 | | - android:src="@mipmap/ic_account_box_black" |
40 | 40 | android:layout_marginLeft="16dp" |
41 | | - android:layout_marginTop="5dp" /> |
| 41 | + android:layout_marginTop="5dp" |
| 42 | + android:src="@mipmap/ic_account_box_black" /> |
42 | 43 |
|
43 | 44 | <TextView |
| 45 | + android:id="@+id/code_username" |
44 | 46 | android:layout_width="wrap_content" |
45 | 47 | android:layout_height="wrap_content" |
46 | | - android:id="@+id/code_username" |
47 | | - android:text="Username" |
48 | | - android:textColor="@{highlight ? theme.colorAccent : 0xFF8C8C8C}" |
49 | 48 | android:layout_centerVertical="true" |
50 | | - android:layout_toRightOf="@+id/code_usericon" |
| 49 | + android:layout_marginLeft="15dp" |
51 | 50 | android:layout_toEndOf="@+id/code_usericon" |
52 | | - android:layout_marginLeft="15dp" /> |
| 51 | + android:layout_toRightOf="@+id/code_usericon" |
| 52 | + android:text="Username" |
| 53 | + android:textColor="@{highlight ? (int) @android:color/white : (int) @color/secondary_text_default_material_light}" /> |
53 | 54 |
|
54 | 55 | <TextView |
| 56 | + android:id="@+id/code_time" |
55 | 57 | android:layout_width="wrap_content" |
56 | 58 | android:layout_height="wrap_content" |
57 | | - android:id="@+id/code_time" |
58 | | - android:text="time" |
59 | | - android:textColor="@{highlight ? theme.colorAccent : 0xFF8C8C8C}" |
60 | | - android:layout_marginRight="16dp" |
61 | | - android:layout_centerVertical="true" |
62 | | - android:layout_alignParentRight="true" |
63 | 59 | android:layout_alignParentEnd="true" |
64 | | - android:layout_marginEnd="16dp" /> |
| 60 | + android:layout_alignParentRight="true" |
| 61 | + android:layout_centerVertical="true" |
| 62 | + android:layout_marginEnd="16dp" |
| 63 | + android:layout_marginRight="16dp" |
| 64 | + android:text="time" |
| 65 | + android:textColor="@{highlight ? (int) @android:color/white : (int) @color/secondary_text_default_material_light}" /> |
65 | 66 |
|
66 | 67 | </RelativeLayout> |
67 | 68 |
|
68 | 69 | <LinearLayout |
69 | 70 | android:layout_width="match_parent" |
70 | | - android:background="#dddd" |
71 | 71 | android:layout_height="1dp" |
72 | 72 | android:layout_marginLeft="10dp" |
73 | | - android:layout_marginRight="10dp"> |
| 73 | + android:layout_marginRight="10dp" |
| 74 | + android:background="#dddd"> |
74 | 75 |
|
75 | 76 | </LinearLayout> |
76 | 77 |
|
77 | 78 | <LinearLayout |
78 | 79 | android:layout_width="match_parent" |
79 | 80 | android:layout_height="match_parent" |
80 | | - android:orientation="vertical" |
81 | | - android:layout_marginBottom="3dp"> |
| 81 | + android:layout_marginBottom="3dp" |
| 82 | + android:orientation="vertical"> |
82 | 83 |
|
83 | 84 | <TextView |
| 85 | + android:id="@+id/code_title" |
84 | 86 | android:layout_width="wrap_content" |
85 | 87 | android:layout_height="wrap_content" |
86 | | - android:id="@+id/code_title" |
87 | | - android:textColor="@{highlight ? theme.colorAccent : theme.colorPrimaryDark}" |
88 | | - android:text="Title" |
89 | 88 | android:layout_marginLeft="16dp" |
| 89 | + android:text="Title" |
| 90 | + android:textColor="@{highlight ? (int) @android:color/white : theme.colorPrimaryDark}" |
90 | 91 | android:textSize="20dp" /> |
91 | 92 |
|
92 | 93 | <TextView |
| 94 | + android:id="@+id/code_subtitle" |
93 | 95 | android:layout_width="wrap_content" |
94 | 96 | android:layout_height="wrap_content" |
95 | | - android:text="subtitle" |
96 | | - android:id="@+id/code_subtitle" |
97 | | - android:layout_marginLeft="16dp" |
98 | | - android:textColor="@{highlight ? theme.colorAccent : 0xFF8C8C8C}" |
99 | 97 | android:layout_alignParentTop="true" |
100 | | - android:layout_toRightOf="@+id/code_title" |
| 98 | + android:layout_marginLeft="16dp" |
| 99 | + android:layout_marginTop="3dp" |
101 | 100 | android:layout_toEndOf="@+id/code_title" |
102 | | - android:layout_marginTop="3dp" /> |
| 101 | + android:layout_toRightOf="@+id/code_title" |
| 102 | + android:text="subtitle" |
| 103 | + android:textColor="@{highlight ? (int) @android:color/white : (int) @color/secondary_text_default_material_light}" /> |
103 | 104 | </LinearLayout> |
| 105 | + |
104 | 106 | <LinearLayout |
105 | 107 | android:layout_width="match_parent" |
106 | | - android:background="#dddd" |
107 | 108 | android:layout_height="1dp" |
| 109 | + android:layout_marginLeft="10dp" |
108 | 110 | android:layout_marginRight="10dp" |
109 | | - android:layout_marginLeft="10dp"> |
| 111 | + android:background="#dddd"> |
110 | 112 |
|
111 | 113 | </LinearLayout> |
| 114 | + |
112 | 115 | <RelativeLayout |
113 | 116 | android:layout_width="match_parent" |
114 | 117 | android:layout_height="wrap_content"> |
115 | 118 |
|
116 | 119 |
|
117 | 120 | <com.like.LikeButton |
118 | | - app:icon_type="heart" |
119 | | - app:icon_size="16dp" |
120 | 121 | android:id="@+id/code_like" |
121 | 122 | android:layout_width="wrap_content" |
122 | 123 | android:layout_height="wrap_content" |
123 | | - android:layout_alignParentTop="true" |
124 | 124 | android:layout_alignParentLeft="true" |
125 | 125 | android:layout_alignParentStart="true" |
| 126 | + android:layout_alignParentTop="true" |
126 | 127 | android:layout_marginLeft="16dp" |
127 | | - android:layout_marginStart="15dp" /> |
| 128 | + android:layout_marginStart="15dp" |
| 129 | + app:icon_size="16dp" |
| 130 | + app:icon_type="heart" /> |
128 | 131 |
|
129 | 132 | <TextView |
| 133 | + android:id="@+id/code_favoCount" |
130 | 134 | android:layout_width="wrap_content" |
131 | 135 | android:layout_height="wrap_content" |
132 | | - android:text="Favo_Count" |
133 | | - android:id="@+id/code_favoCount" |
134 | 136 | android:layout_centerVertical="true" |
135 | | - android:layout_toRightOf="@+id/code_like" |
| 137 | + android:layout_marginLeft="5dp" |
136 | 138 | android:layout_toEndOf="@+id/code_like" |
137 | | - android:layout_marginLeft="5dp" /> |
| 139 | + android:layout_toRightOf="@+id/code_like" |
| 140 | + android:text="Favo_Count" |
| 141 | + android:textColor="@{highlight ? (int) @android:color/white : (int) @color/secondary_text_default_material_light}" /> |
138 | 142 |
|
139 | 143 | <TextView |
| 144 | + android:id="@+id/code_replyCount" |
140 | 145 | android:layout_width="wrap_content" |
141 | 146 | android:layout_height="wrap_content" |
142 | | - android:text="reply_Count" |
143 | | - android:id="@+id/code_replyCount" |
144 | | - android:layout_alignTop="@+id/code_favoCount" |
145 | | - android:layout_alignParentRight="true" |
146 | 147 | android:layout_alignParentEnd="true" |
147 | | - android:layout_marginRight="16dp" |
| 148 | + android:layout_alignParentRight="true" |
| 149 | + android:layout_alignTop="@+id/code_favoCount" |
148 | 150 | android:layout_marginEnd="16dp" |
149 | | - android:layout_marginTop="14dp" /> |
| 151 | + android:layout_marginRight="16dp" |
| 152 | + android:layout_marginTop="14dp" |
| 153 | + android:textColor="@{highlight ? (int) @android:color/white : (int) @color/secondary_text_default_material_light}" /> |
| 154 | + android:text="reply_Count" /> |
150 | 155 | </RelativeLayout> |
151 | 156 | </LinearLayout> |
152 | 157 | </android.support.v7.widget.CardView> |
|
0 commit comments