Adjust oval style

pull/137/head
FongMi 2 years ago
parent 5f93a80006
commit fec8442c51
  1. 1
      app/src/leanback/java/com/fongmi/android/tv/Product.java
  2. 2
      app/src/leanback/res/drawable/shape_vod_oval_focused.xml
  3. 3
      app/src/leanback/res/layout/adapter_vod_oval.xml
  4. 1
      app/src/mobile/java/com/fongmi/android/tv/Product.java
  5. 2
      app/src/mobile/res/layout/adapter_vod_oval.xml

@ -27,6 +27,7 @@ public class Product {
public static int[] getSpec(int viewType) {
int column = getColumn(viewType);
int space = ResUtil.dp2px(48) + ResUtil.dp2px(16 * (column - 1));
if (viewType == ViewType.OVAL) space += ResUtil.dp2px(column * 16);
return getSpec(space, column, viewType);
}

@ -3,7 +3,7 @@
android:shape="oval">
<stroke
android:width="1.5dp"
android:width="2dp"
android:color="@color/white" />
</shape>

@ -12,6 +12,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/black_20"
android:layout_margin="8dp"
android:scaleType="center"
app:shapeAppearanceOverlay="@style/Vod.Circle"
tools:src="@drawable/ic_img_loading" />
@ -23,7 +24,7 @@
android:layout_below="@+id/image"
android:layout_alignStart="@+id/image"
android:layout_alignEnd="@+id/image"
android:layout_marginTop="12dp"
android:layout_marginTop="4dp"
android:ellipsize="marquee"
android:gravity="center"
android:singleLine="true"

@ -29,6 +29,7 @@ public class Product {
public static int[] getSpec(Context context, int viewType) {
int column = getColumn(viewType);
int space = ResUtil.dp2px(32) + ResUtil.dp2px(16 * (column - 1));
if (viewType == ViewType.OVAL) space += ResUtil.dp2px(column * 16);
return getSpec(context, space, column, viewType);
}

@ -10,6 +10,7 @@
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="@color/black_20"
android:foreground="@drawable/shape_vod_oval"
android:scaleType="center"
@ -23,7 +24,6 @@
android:layout_below="@+id/image"
android:layout_alignStart="@+id/image"
android:layout_alignEnd="@+id/image"
android:layout_marginTop="8dp"
android:gravity="center"
android:shadowColor="@color/grey_900"
android:shadowDx="0.5"

Loading…
Cancel
Save