add:直播间新增私信悬浮窗

update:会话页面适配半屏模式
This commit is contained in:
2022-09-05 16:49:10 +08:00
parent b5cfb5abc1
commit 5bcbe7cd9a
22 changed files with 542 additions and 38 deletions

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:duration="300"
android:fromXScale="0.3"
android:fromYScale="0.3"
android:interpolator="@android:anim/accelerate_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="1.0"
android:toYScale="1.0" />
<alpha
android:duration="200"
android:fromAlpha="0.0"
android:toAlpha="1.0"
/>
</set>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:duration="300"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="0.3"
android:toYScale="0.3" />
<alpha
android:duration="200"
android:fromAlpha="1.0"
android:toAlpha="0.0"
/>
</set>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="42dp" android:height="48dp">
<shape android:shape="rectangle">
<solid android:color="#33ffffff" />
<corners android:topLeftRadius="100dp" android:topRightRadius="0dp" android:bottomLeftRadius="100dp" android:bottomRightRadius="0dp" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="15dp" android:height="15dp">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="#ffffffff" />
<solid android:color="#ffff4e4e" />
<corners android:radius="8dp" />
</shape>
</item>
</selector>

View File

@@ -20,8 +20,15 @@
android:layout_height="0.5dp"
android:background="@color/gray3" />
<com.yunbao.live.views.InputPanelViewHolder
android:id="@+id/input_panel"
<!--套一层Layout不然控件就透明了-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:background="@color/white"
android:layout_height="wrap_content">
<com.yunbao.live.views.InputPanelViewHolder
android:id="@+id/input_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:background="@color/white"
android:layout_height="match_parent">
<TextView
android:id="@+id/top_noback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="18dp"
android:layout_marginTop="8dp"
android:text="@string/message"
android:textColor="#ff161616"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:checked="true"
android:text="私聊浮标"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/chatRecyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/checkBox" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -10,8 +10,9 @@
android:paddingTop="15dp">
<LinearLayout
android:id="@+id/bannerLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="216dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:orientation="vertical">
@@ -693,6 +694,87 @@
android:src="@mipmap/icon_red_pack_4"
android:visibility="invisible" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/room_msg_layout"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentEnd="true"
android:layout_marginEnd="0dp"
android:background="@drawable/bg_live_room_msg">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/room_msg_user"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/room_msg_user_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:scaleType="centerInside"
android:src="@drawable/m_chu_xia"
app:riv_oval="true" />
<TextView
android:id="@+id/room_msg_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginTop="0dp"
android:background="@drawable/bg_room_msg_unread"
android:paddingStart="4dp"
android:paddingEnd="4dp"
android:text="1"
android:textColor="#FFFFFF"
android:textSize="10.5sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/room_msg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:layout_marginStart="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center"
app:srcCompat="@mipmap/icon_live_room_msg" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_marginTop="2dp"
android:text="@string/room_msg"
android:textColor="#99ffffff"
android:textSize="12sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout
android:id="@+id/chat_view"
android:layout_width="match_parent"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -10,4 +10,5 @@
<string name="views_rank">Viewers</string>
<string name="gurad_rank">Guard</string>
<string name="fans">Fans</string>
<string name="room_msg">News</string>
</resources>

View File

@@ -11,4 +11,5 @@
<string name="views_rank">觀眾</string>
<string name="gurad_rank">觀眾</string>
<string name="fans">粉絲</string>
<string name="room_msg">私信</string>
</resources>

View File

@@ -10,4 +10,16 @@
<item name="android:backgroundDimAmount">0.3</item>
<item name="windowActionBar">false</item>
</style>
<style name="DialogNotTitleActivity" parent="@style/Theme.AppCompat.Dialog">
<item name="android:windowFrame">@android:color/transparent</item><!--边框-->
<item name="android:windowIsFloating">true</item><!--是否浮如今activity之上-->
<item name="android:windowIsTranslucent">true</item><!--半透明-->
<item name="android:windowNoTitle">true</item><!--无标题-->
<item name="android:windowBackground">@android:color/transparent</item><!--背景透明-->
<item name="android:backgroundDimAmount">0.3</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:activityOpenEnterAnimation">@anim/anim_marquee_in</item>
<item name="android:activityOpenExitAnimation">@anim/anim_marquee_in</item>
</style>
</resources>