bg,bubble 等UI调整
This commit is contained in:
parent
4a072ac2ce
commit
456fa95f25
|
|
@ -1,9 +1,11 @@
|
|||
package com.remax.visualnovel.ui.chat.ui.expandableSelector
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.drake.brv.annotaion.DividerOrientation
|
||||
import com.drake.brv.utils.bindingAdapter
|
||||
|
|
@ -33,6 +35,7 @@ class ExpandBackgroundSubView @JvmOverloads constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
private fun initRv(itemsRv: RecyclerView) {
|
||||
itemsRv.grid(3)
|
||||
.divider {
|
||||
|
|
@ -55,9 +58,12 @@ class ExpandBackgroundSubView @JvmOverloads constructor(
|
|||
val item = getModel<ChatBackground>()
|
||||
with(getBinding<LayoutItemSettingBackgroundBinding>()) {
|
||||
if (!item.imgUrl.isNullOrEmpty()) {
|
||||
ivBackgroundSrc.load(item.imgUrl)
|
||||
//ivBackgroundSrc.load(item.imgUrl)
|
||||
}
|
||||
ivDel.visibility = if (item.deletable) VISIBLE else GONE
|
||||
|
||||
ivUpload.isVisible = item.isUploadLocalItem
|
||||
ivBackgroundSrc.isVisible = !item.isUploadLocalItem
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.drake.brv.annotaion.DividerOrientation
|
||||
import com.drake.brv.utils.bindingAdapter
|
||||
|
|
@ -61,10 +62,11 @@ class ExpandBubbleSubView @JvmOverloads constructor(
|
|||
val item = getModel<ChatBubble>()
|
||||
with(getBinding<LayoutItemSettingBubbleBinding>()) {
|
||||
if (!item.imgUrl.isNullOrEmpty()) {
|
||||
ivBubble.load(item.imgUrl)
|
||||
//ivBubble.load(item.imgUrl)
|
||||
}
|
||||
|
||||
ivBubbleName.text = item.name
|
||||
//selectedBg.isVisible = item.select
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ data class CustomViewToken(
|
|||
|
||||
|
||||
//---------------------- New added -----------------------
|
||||
var advBgColor:Int = Color.WHITE,
|
||||
var advBgColor:Int = Color.TRANSPARENT,
|
||||
var advRadius:Float = 0F,
|
||||
var advTopLeftRadius:Float = 0F,
|
||||
var advTopRightRadius:Float = 0F,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle"
|
||||
>
|
||||
<size
|
||||
android:width="20dp"
|
||||
android:height="15dp"
|
||||
/>
|
||||
<corners
|
||||
android:topLeftRadius="5dp"
|
||||
android:topRightRadius="0dp"
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="10dp" />
|
||||
|
||||
<solid android:color="#ff0066ff" />
|
||||
</shape>
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:textColor="@color/chat_setting_ai_model_recommend_color"/>
|
||||
android:textColor="@color/blue_6f"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,16 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_10">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
<com.remax.visualnovel.widget.roundedimageview.RoundedImageView
|
||||
android:id="@+id/iv_background_src"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/img_1"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/selectBg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/selectBg"
|
||||
app:layout_constraintStart_toStartOf="@+id/selectBg"
|
||||
|
|
@ -25,8 +27,9 @@
|
|||
app:layout_constraintDimensionRatio="h,87:116"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:radiusToken="@string/radius_l"
|
||||
app:strokeColorToken="@string/color_primary_normal"
|
||||
app:strokeWidthToken="@string/border_m"
|
||||
app:advStrokeWidth="@dimen/dp_5"
|
||||
app:advStrokeColor="@color/blue_6f"
|
||||
app:advRadius="@dimen/dp_10"
|
||||
/>
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||
|
|
@ -42,4 +45,26 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_upload"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/icon_upload_image"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_selected_indi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/setting_bg_selected_indi"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -4,33 +4,23 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
app:advBgColor="@color/setting_bubble_bg_color"
|
||||
app:advRadius="@dimen/dp_10" >
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenFrameLayout
|
||||
android:id="@+id/selectBg"
|
||||
android:id="@+id/selectedBg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:backgroundColorToken="@string/color_surface_element_normal"
|
||||
app:layout_constraintDimensionRatio="h,87:100"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:radiusToken="@string/radius_l"
|
||||
app:strokeColorToken="@string/color_txt_tertiary_normal"
|
||||
app:strokeWidthToken="@string/border_l"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:advStrokeColor="@color/setting_bubble_bg_selected_color"
|
||||
app:layout_constraintDimensionRatio="w,110:87"
|
||||
app:advStrokeWidth="@dimen/dp_5"
|
||||
app:advRadius="@dimen/dp_10"
|
||||
/>
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenTextView
|
||||
android:id="@+id/iv_bubble_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="top"
|
||||
android:text="@string/default_txt"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/selectBg"
|
||||
android:textColor="@color/chat_setting_ai_model_recommend_color" />
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||
android:id="@+id/iv_bubble"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -42,22 +32,6 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenTextView
|
||||
android:id="@+id/iv_lock_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="top"
|
||||
android:text="@string/unlocked"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="italic"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||
android:id="@+id/iv_left_top"
|
||||
android:layout_width="@dimen/dp_25"
|
||||
|
|
@ -69,17 +43,46 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||
android:id="@+id/iv_lock_indicator"
|
||||
android:layout_width="@dimen/dp_25"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:src="@mipmap/chat_vip_str"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenTextView
|
||||
android:id="@+id/iv_lock_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:gravity="top"
|
||||
android:text="0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="italic"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_left_top"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||
android:id="@+id/iv_lock_indicator"
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:src="@drawable/sound_item_unselected"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenTextView
|
||||
android:id="@+id/iv_bubble_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="top"
|
||||
android:text="@string/default_txt"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:textColor="@color/blue_6f" />
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,13 @@
|
|||
android:padding="@dimen/dp_12" >
|
||||
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||
<com.remax.visualnovel.widget.roundedimageview.RoundedImageView
|
||||
android:id="@+id/iv_actor_avatar"
|
||||
android:layout_width="@dimen/dp_25"
|
||||
android:layout_width="@dimen/dp_26"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
app:riv_corner_radius="@dimen/dp_13"
|
||||
android:src="@mipmap/temp_bg"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
|
|
@ -203,7 +203,7 @@
|
|||
<color name="glo_color_switchview_stroke">#ff020025</color>
|
||||
|
||||
<color name="chat_setting_ai_model_des_color">#ff9494c3</color>
|
||||
<color name="chat_setting_ai_model_recommend_color">#ff0066ff</color>
|
||||
<color name="blue_6f">#ff0066ff</color>
|
||||
|
||||
<color name="chat_setting_divider_color">#ffececf9</color>
|
||||
|
||||
|
|
@ -215,9 +215,11 @@
|
|||
|
||||
<!-- Font seekbar -->
|
||||
<color name="seekbar_color">#ffa4a8b7</color>
|
||||
|
||||
<color name="chat_setting_sex_radio_bg">#ff241e2f</color>
|
||||
|
||||
<color name="setting_bubble_bg_color">#ff4d3e6b</color>
|
||||
<color name="setting_bubble_bg_selected_color">#ff312645</color>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue