release
jhengazuki 8 months ago
parent c5ecfedb83
commit ea124c2dae
  1. 2
      app/src/leanback/java/com/fongmi/android/tv/ui/adapter/KeepAdapter.java
  2. 2
      app/src/leanback/java/com/fongmi/android/tv/ui/holder/VodRectHolder.java
  3. 2
      app/src/leanback/java/com/fongmi/android/tv/ui/presenter/HistoryPresenter.java
  4. 2
      app/src/leanback/res/drawable/shape_vod_name.xml
  5. 29
      app/src/leanback/res/layout/adapter_vod.xml
  6. 23
      app/src/leanback/res/layout/adapter_vod_rect.xml

@ -77,7 +77,7 @@ public class KeepAdapter extends RecyclerView.Adapter<KeepAdapter.ViewHolder> {
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
ViewHolder holder = new ViewHolder(AdapterVodBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
holder.binding.getRoot().getLayoutParams().width = width;
holder.binding.getRoot().getLayoutParams().height = height;
holder.binding.image.getLayoutParams().height = height;
return holder;
}

@ -20,8 +20,8 @@ public class VodRectHolder extends BaseVodHolder {
}
public VodRectHolder size(int[] size) {
binding.image.getLayoutParams().height = size[1];
binding.getRoot().getLayoutParams().width = size[0];
binding.getRoot().getLayoutParams().height = size[1];
return this;
}

@ -52,7 +52,7 @@ public class HistoryPresenter extends Presenter {
public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent) {
ViewHolder holder = new ViewHolder(AdapterVodBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
holder.binding.getRoot().getLayoutParams().width = width;
holder.binding.getRoot().getLayoutParams().height = height;
holder.binding.image.getLayoutParams().height = height;
return holder;
}

@ -6,6 +6,6 @@
android:bottomLeftRadius="8dp"
android:bottomRightRadius="8dp" />
<solid android:color="@color/black_60" />
<solid android:color="@color/black_30" />
</shape>

@ -2,22 +2,27 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true">
android:focusableInTouchMode="true"
android:foreground="@drawable/selector_vod">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="80dp"
android:background="@color/black_20"
app:shapeAppearanceOverlay="@style/Vod.Grid.Large" />
app:shapeAppearanceOverlay="@style/Vod.Grid" />
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/delete"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/image"
android:layout_alignTop="@+id/image"
android:layout_alignEnd="@+id/image"
android:layout_alignBottom="@+id/name"
android:background="@color/black_50"
android:scaleType="center"
android:src="@drawable/ic_vod_delete"
@ -65,7 +70,9 @@
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_below="@+id/image"
android:layout_alignStart="@+id/image"
android:layout_alignEnd="@+id/image"
android:background="@drawable/shape_vod_name"
android:ellipsize="marquee"
android:gravity="center"
@ -75,10 +82,4 @@
android:textSize="16sp"
tools:text="蜘蛛人" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/selector_vod"
android:duplicateParentState="true" />
</RelativeLayout>

@ -2,17 +2,18 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true">
android:focusableInTouchMode="true"
android:foreground="@drawable/selector_vod">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="80dp"
android:background="@color/black_20"
app:shapeAppearanceOverlay="@style/Vod.Grid.Large" />
app:shapeAppearanceOverlay="@style/Vod.Grid" />
<TextView
android:id="@+id/year"
@ -52,9 +53,11 @@
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_below="@+id/image"
android:layout_alignStart="@+id/image"
android:layout_alignEnd="@+id/image"
android:background="@drawable/shape_vod_name"
android:ellipsize="marquee"
android:gravity="center"
@ -64,10 +67,4 @@
android:textSize="16sp"
tools:text="蜘蛛人" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/selector_vod"
android:duplicateParentState="true" />
</RelativeLayout>
Loading…
Cancel
Save