Update empty ui

pull/594/head
jhengazuki 3 months ago
parent 9ca4acc800
commit 762e741aa9
  1. 2
      app/src/leanback/res/layout/view_empty.xml
  2. 1
      app/src/mobile/java/com/fongmi/android/tv/ui/activity/HistoryActivity.java
  3. 1
      app/src/mobile/java/com/fongmi/android/tv/ui/activity/KeepActivity.java
  4. 5
      app/src/mobile/res/layout/activity_history.xml
  5. 5
      app/src/mobile/res/layout/activity_keep.xml
  6. 25
      app/src/mobile/res/layout/view_empty.xml

@ -8,7 +8,7 @@
<com.airbnb.lottie.LottieAnimationView
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_height="224dp"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/empty" />

@ -61,6 +61,7 @@ public class HistoryActivity extends BaseActivity implements HistoryAdapter.OnCl
private void getHistory() {
mAdapter.addAll(History.get());
mBinding.progressLayout.showContent(true, mAdapter.getItemCount());
}
private void onSync() {

@ -65,6 +65,7 @@ public class KeepActivity extends BaseActivity implements KeepAdapter.OnClickLis
private void getKeep() {
mAdapter.addAll(Keep.getVod());
mBinding.progressLayout.showContent(true, mAdapter.getItemCount());
}
private void onSync() {

@ -27,7 +27,8 @@
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
<com.fongmi.android.tv.ui.custom.ProgressLayout
android:id="@+id/progressLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -43,5 +44,5 @@
android:paddingBottom="8dp"
tools:listitem="@layout/adapter_vod" />
</FrameLayout>
</com.fongmi.android.tv.ui.custom.ProgressLayout>
</LinearLayout>

@ -27,7 +27,8 @@
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
<com.fongmi.android.tv.ui.custom.ProgressLayout
android:id="@+id/progressLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -43,5 +44,5 @@
android:paddingBottom="8dp"
tools:listitem="@layout/adapter_vod" />
</FrameLayout>
</com.fongmi.android.tv.ui.custom.ProgressLayout>
</LinearLayout>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:translationY="-40dp">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="160dp"
android:layout_height="180dp"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/empty" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/error_empty"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
Loading…
Cancel
Save