红包直播间展示样式构建
This commit is contained in:
15
live/src/main/res/drawable/background_red_packet_select.xml
Normal file
15
live/src/main/res/drawable/background_red_packet_select.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="15dp" />
|
||||
<solid android:color="#FCC438" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_selected="false">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="15dp" />
|
||||
<stroke android:width="1dp" android:color="#FCC438" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="20dp" />
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="#FDCF46"
|
||||
android:startColor="#FFDB86" />
|
||||
</shape>
|
||||
@@ -701,14 +701,23 @@
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="76dp"
|
||||
android:layout_below="@+id/live_rank_pk"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:visibility="visible"
|
||||
app:delay_time="5000"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
<include
|
||||
android:id="@+id/red_packet"
|
||||
layout="@layout/view_red_packet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/live_rank_pk"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="15dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/btn_prize_pool_level"
|
||||
android:layout_width="70dp"
|
||||
@@ -745,7 +754,7 @@
|
||||
android:layout_below="@id/live_time"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginTop="-12dp"
|
||||
android:visibility="visible">
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_hot_gif"
|
||||
@@ -979,7 +988,7 @@
|
||||
android:background="@drawable/bg_live_gift_tip"
|
||||
android:gravity="center|left"
|
||||
android:orientation="horizontal">
|
||||
<!--盲盒头条-->
|
||||
<!--盲盒头条-->
|
||||
<View
|
||||
android:id="@+id/super_notice"
|
||||
android:layout_width="63dp"
|
||||
@@ -1305,13 +1314,13 @@
|
||||
android:layout_marginBottom="-30dp"
|
||||
android:background="@color/white"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<include
|
||||
android:id="@+id/vote_layout"
|
||||
layout="@layout/sim_live_room_vote"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
/>
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_pk_top"
|
||||
@@ -2078,7 +2087,6 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mic_view2"
|
||||
android:layout_width="40dp"
|
||||
@@ -2112,6 +2120,7 @@
|
||||
android:src="@mipmap/voice" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mic_view1"
|
||||
android:layout_width="40dp"
|
||||
@@ -2145,6 +2154,7 @@
|
||||
android:src="@mipmap/voice" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mic_view"
|
||||
android:layout_width="40dp"
|
||||
@@ -2203,8 +2213,8 @@
|
||||
android:layout_height="76dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="5dp"
|
||||
app:delay_time="5000"
|
||||
android:visibility="gone"
|
||||
app:delay_time="5000"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
|
||||
55
live/src/main/res/layout/view_red_packet.xml
Normal file
55
live/src/main/res/layout/view_red_packet.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="46dp"
|
||||
app:cardBackgroundColor="#70323232"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="5dp"
|
||||
android:text="倒計時04:59"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="27dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="6dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="10/200"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="待開紅包:4"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="51dp"
|
||||
android:src="@mipmap/icon_red_packet" />
|
||||
</FrameLayout>
|
||||
219
live/src/main/res/layout/view_send_red_packet.xml
Normal file
219
live/src/main/res/layout/view_send_red_packet.xml
Normal file
@@ -0,0 +1,219 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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:background="@mipmap/background_red_packet"
|
||||
android:backgroundTintMode="src_over">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="45dp"
|
||||
android:text="@string/save_popular_red_packets"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:src="@mipmap/icon_instructions" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="43dp"
|
||||
android:layout_marginTop="97dp"
|
||||
android:layout_marginEnd="49dp"
|
||||
app:cardBackgroundColor="#E82936"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="23dp"
|
||||
android:text="@string/amount"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/rill"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:inputType="number"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="@string/drill"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="43dp"
|
||||
android:layout_marginTop="149dp"
|
||||
android:layout_marginEnd="49dp"
|
||||
app:cardBackgroundColor="#E82936"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="23dp"
|
||||
android:text="@string/count"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/total"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:inputType="number"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="@string/live_send_gift_2"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="213dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="43dp"
|
||||
app:cardBackgroundColor="#E82936"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/conditions"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="22dp"
|
||||
android:layout_marginEnd="49dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/there_is_no"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/background_red_packet_select"
|
||||
android:gravity="center"
|
||||
android:text="@string/there_is_no"
|
||||
android:textColor="#FDD04A"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/following_anchor"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="end"
|
||||
android:background="@drawable/background_red_packet_select"
|
||||
android:gravity="center"
|
||||
android:text="@string/following_anchor"
|
||||
android:textColor="#FDD04A"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="43dp"
|
||||
android:layout_marginTop="266dp"
|
||||
android:layout_marginEnd="49dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/red_envelope_rill"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/red_envelope_rill"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/total_consumption_of_drill"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/total_consumption_of_drill"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<Button
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginBottom="34dp"
|
||||
android:background="@drawable/background_send_red_packet"
|
||||
android:text="@string/red_pack_6"
|
||||
android:textColor="#8F3B00"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginBottom="13dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/top_up_now" />
|
||||
</FrameLayout>
|
||||
BIN
live/src/main/res/mipmap-xhdpi/background_red_packet.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/background_red_packet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 260 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/icon_ellipse.png
Normal file
BIN
live/src/main/res/mipmap-xxxhdpi/icon_ellipse.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/icon_instructions.png
Normal file
BIN
live/src/main/res/mipmap-xxxhdpi/icon_instructions.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/icon_red_packet.png
Normal file
BIN
live/src/main/res/mipmap-xxxhdpi/icon_red_packet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Reference in New Issue
Block a user