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 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <layout xmlns:android="http://schemas.android.com/apk/res/android" | 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 | <data> | 6 | <data> |
| 6 | 7 | ||
| @@ -32,6 +33,16 @@ | @@ -32,6 +33,16 @@ | ||
| 32 | app:imageUrl="@{activeInfo.getCoverImgUrl()}" /> | 33 | app:imageUrl="@{activeInfo.getCoverImgUrl()}" /> |
| 33 | 34 | ||
| 34 | <TextView | 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 | android:id="@+id/title" | 46 | android:id="@+id/title" |
| 36 | android:layout_width="match_parent" | 47 | android:layout_width="match_parent" |
| 37 | android:layout_height="wrap_content" | 48 | android:layout_height="wrap_content" |
app/src/main/res/values/strings.xml
| @@ -37,6 +37,9 @@ | @@ -37,6 +37,9 @@ | ||
| 37 | <string name="request_state_error">获取活动状态失败</string> | 37 | <string name="request_state_error">获取活动状态失败</string> |
| 38 | <string name="request_state_play_error">此活动状态无法播放</string> | 38 | <string name="request_state_play_error">此活动状态无法播放</string> |
| 39 | 39 | ||
| 40 | + <string name="ugc_live">直播</string> | ||
| 41 | + <string name="ugc_vod">回放</string> | ||
| 42 | + | ||
| 40 | <string name="verified_url" formatted="false">https://mobile.cnlive.com/CnliveMobile/web/review/review.jsp?sid=%s&plat=a&appId=%s </string> | 43 | <string name="verified_url" formatted="false">https://mobile.cnlive.com/CnliveMobile/web/review/review.jsp?sid=%s&plat=a&appId=%s </string> |
| 41 | <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> | 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 | </resources> | 45 | </resources> |