Skip to content

v3.2.6

Compare
Choose a tag to compare
@chenBingX chenBingX released this 17 Jan 15:41
  • Support for setting 'Network Image' in XML for StateDrawable and StateDrawable2

In XML, use a 'Network Image' as a background image

<com.coorchice.library.SuperTextView
  android:id="@+id/stv_40"
  android:layout_width="150dp"
  android:layout_height="150dp"
  android:layout_gravity="center_horizontal"
  android:layout_marginTop="16dp"
  android:gravity="bottom|center"
  android:paddingBottom="1dp"
  android:text="网络背景图"
  android:textColor="#000"
  android:textSize="14sp"
  app:stv_corner="10dp"
  app:stv_isShowState="true"
  app:stv_drawableAsBackground="true"
  app:stv_solid="#f1f1f1"
  app:stv_state_drawable="https://gw.alicdn.com/imgextra/i3/O1CN01suhAFr1cXQX49D2xp_!!6000000003610-0-tps-468-466.jpg" />

In XML, set the 'Network Image' for StateDrawable2

<com.coorchice.library.SuperTextView
  android:id="@+id/stv_41"
  android:layout_width="350dp"
  android:layout_height="100dp"
  android:layout_gravity="center_horizontal"
  android:layout_marginTop="30dp"
  android:paddingLeft="116dp"
  android:paddingTop="30dp"
  android:text="StateDrawable2 网络图"
  android:textColor="@color/black"
  android:textSize="14sp"
  app:stv_corner="50dp"
  app:stv_isShowState2="true"
  app:stv_left_bottom_corner="true"
  app:stv_left_top_corner="true"
  app:stv_solid="#f1f1f1"
  app:stv_state_drawable2="https://gw.alicdn.com/imgextra/i3/O1CN01XPmcmt1vJfKcQ8o6O_!!6000000006152-0-tps-500-500.jpg"
  app:stv_state_drawable2_height="100dp"
  app:stv_state_drawable2_mode="left"
  app:stv_state_drawable2_width="100dp"/>