Commit 796eae6b0d4a271993b6c99ad8130bd7ecc726ad
1 parent
a0c67993
直播列表添加状态标签
Showing
2 changed files
with
15 additions
and
1 deletions
app/src/main/res/layout/layout_item_active_video_list.xml
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | 2 | <layout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | - xmlns:app="http://schemas.android.com/apk/res-auto"> | |
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | |
| 4 | + xmlns:tools="http://schemas.android.com/tools"> | |
| 4 | 5 | |
| 5 | 6 | <data> |
| 6 | 7 | |
| ... | ... | @@ -32,6 +33,16 @@ |
| 32 | 33 | app:imageUrl="@{activeInfo.getCoverImgUrl()}" /> |
| 33 | 34 | |
| 34 | 35 | <TextView |
| 36 | + android:layout_width="wrap_content" | |
| 37 | + android:layout_height="wrap_content" | |
| 38 | + android:text="@{activeInfo.getActivityStatus() == 1 ? @string/ugc_live : @string/ugc_vod}" | |
| 39 | + android:background="#60494747" | |
| 40 | + android:layout_alignParentRight="true" | |
| 41 | + android:padding="3dp" | |
| 42 | + android:textColor="@{activeInfo.getActivityStatus() == 1 ? @android:color/holo_red_light : @android:color/white}" | |
| 43 | + tools:text="直播"/> | |
| 44 | + | |
| 45 | + <TextView | |
| 35 | 46 | android:id="@+id/title" |
| 36 | 47 | android:layout_width="match_parent" |
| 37 | 48 | android:layout_height="wrap_content" | ... | ... |
app/src/main/res/values/strings.xml
| ... | ... | @@ -37,6 +37,9 @@ |
| 37 | 37 | <string name="request_state_error">获取活动状态失败</string> |
| 38 | 38 | <string name="request_state_play_error">此活动状态无法播放</string> |
| 39 | 39 | |
| 40 | + <string name="ugc_live">直播</string> | |
| 41 | + <string name="ugc_vod">回放</string> | |
| 42 | + | |
| 40 | 43 | <string name="verified_url" formatted="false">https://mobile.cnlive.com/CnliveMobile/web/review/review.jsp?sid=%s&plat=a&appId=%s </string> |
| 41 | 44 | <string name="debug_verified_url" formatted="false">https://mobile.cnlive.com/CnliveMobile/web/review/review.jsp?sid=%s&plat=a&appId=%s&type=0 </string> |
| 42 | 45 | </resources> | ... | ... |