6 Commits c650cf775f ... 8cffdb2b89

Autor SHA1 Mensaje Fecha
  tongmengxiao 8cffdb2b89 feat: 商城 装扮api hace 6 meses
  tongmengxiao 77fbcacbc6 feat: version 1405 hace 6 meses
  tongmengxiao 84a350f39f feat:点九 hace 6 meses
  tongmengxiao 47a81bef15 feat: 本地化 hace 6 meses
  tongmengxiao 54166a6187 feat: 清除缓存 hace 6 meses
  tongmengxiao 2efe620ec6 feat: 私信个人信息&mine scoll hace 6 meses
Se han modificado 29 ficheros con 964 adiciones y 233 borrados
  1. 2 2
      app/build.gradle
  2. 16 0
      baseswago/src/main/java/com/swago/baseswago/UserVm.kt
  3. 13 0
      baseswago/src/main/java/com/swago/baseswago/inter/UserApi.kt
  4. 50 0
      baseswago/src/main/java/com/swago/baseswago/model/mine/StoreProductModel.kt
  5. 14 0
      baseswago/src/main/java/com/swago/baseswago/util/FileUtil.kt
  6. 61 0
      baseswago/src/main/java/com/swago/baseswago/util/NinePatchChunk.kt
  7. 1 1
      baseswago/src/main/java/com/swago/baseswago/util/SwagoInfo.kt
  8. 47 0
      baseswago/src/main/java/com/swago/glide.kt
  9. 5 0
      baseswago/src/main/res/drawable/shape_8c25cb_top_bottom_one_4.xml
  10. 5 0
      baseswago/src/main/res/values-ar/strings.xml
  11. 5 0
      baseswago/src/main/res/values-in/strings.xml
  12. 5 0
      baseswago/src/main/res/values-ms/strings.xml
  13. 5 0
      baseswago/src/main/res/values-zh/strings.xml
  14. 5 0
      baseswago/src/main/res/values/strings.xml
  15. 20 6
      home/src/main/java/com/swago/home/ChatDetailActivity.kt
  16. 2 2
      home/src/main/java/com/swago/home/MineFragment.kt
  17. 93 81
      home/src/main/res/layout/fragment_mine.xml
  18. 6 0
      user/src/main/java/com/swago/user/SettingActivity.kt
  19. 23 8
      user/src/main/java/com/swago/user/store/StoreBuyDialog.kt
  20. 14 3
      user/src/main/java/com/swago/user/store/StoreItemAdapter.kt
  21. 244 14
      user/src/main/java/com/swago/user/store/StoreListActivity.kt
  22. 0 6
      user/src/main/java/com/swago/user/store/StoreListBean.kt
  23. 0 39
      user/src/main/java/com/swago/user/store/StoreTypeAdapter.kt
  24. 54 0
      user/src/main/java/com/swago/user/vm/StoreVm.kt
  25. 13 2
      user/src/main/res/layout/activity_setting.xml
  26. 247 10
      user/src/main/res/layout/activity_store_list.xml
  27. 2 1
      user/src/main/res/layout/dialog_store_detail.xml
  28. 12 1
      user/src/main/res/layout/item_store.xml
  29. 0 57
      user/src/main/res/layout/item_type_store.xml

+ 2 - 2
app/build.gradle

@@ -15,8 +15,8 @@ android {
         applicationId "com.swago.app"
         minSdkVersion 21
         targetSdkVersion 33
-        versionCode 1404
-        versionName "1.4.0.4"
+        versionCode 1405
+        versionName "1.4.0.5"
         multiDexEnabled true
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 

+ 16 - 0
baseswago/src/main/java/com/swago/baseswago/UserVm.kt

@@ -11,6 +11,10 @@ import com.swago.baseswago.model.mine.LevelModel
 import com.swago.baseswago.model.mine.RoomBlack
 import com.swago.baseswago.model.mine.RoomBlackItem
 import com.swago.baseswago.util.*
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.withContext
 import okhttp3.MediaType.Companion.toMediaTypeOrNull
 import okhttp3.MultipartBody
 import okhttp3.RequestBody
@@ -313,4 +317,16 @@ class UserVm(application: Application) : BaseViewModel(application) {
         }
     }
 
+    fun clearCache(){
+        CoroutineScope(Dispatchers.Main).launch {
+            withContext(Dispatchers.IO){
+                FileUtil.clearCache(AppContext.getContext())
+            }
+            Toast.makeText(
+                AppContext.getContext(),
+                AppContext.getContext().resources.getString(R.string.clear_cache_success),
+                Toast.LENGTH_SHORT
+            ).show()
+        }
+    }
 }

+ 13 - 0
baseswago/src/main/java/com/swago/baseswago/inter/UserApi.kt

@@ -4,6 +4,7 @@ import com.swago.baseswago.model.*
 import com.swago.baseswago.model.mine.LevelModel
 import com.swago.baseswago.model.mine.RoomBlackBean
 import com.swago.baseswago.model.mine.RoomBlackModel
+import com.swago.baseswago.model.mine.StoreProductModel
 import com.swago.baseswago.model.mine.TaskModel
 import okhttp3.MultipartBody
 import retrofit2.http.*
@@ -126,4 +127,16 @@ interface UserApi {
     @POST("/v1/user/password/reset")
     suspend fun changePwd(@Field("old_password") old_password: String,@Field("password") password: String,@Field("repeat_password") repeat_password: String):Any
 
+    //商城列表
+    @POST("/v1/user/coin/product/list")
+    suspend fun getProductList(): StoreProductModel
+
+    @FormUrlEncoded
+    @POST("/v1/user/buy/product")
+    suspend fun buyProduct(@Field("product_id") product_id: Long):Any
+
+    @POST("/v1/user/exist/product/list")
+    suspend fun exitProductList():StoreProductModel
+
+
 }

+ 50 - 0
baseswago/src/main/java/com/swago/baseswago/model/mine/StoreProductModel.kt

@@ -0,0 +1,50 @@
+package com.swago.baseswago.model.mine
+
+import android.os.Parcel
+import android.os.Parcelable
+
+data class StoreProductModel(
+    val list: List<StoreItemBean>?
+)
+
+data class StoreItemBean (
+    val product_name: String?,
+    val product_url: String?,
+    val product_category: Int,
+    val product_coin: Long,
+    val id: Long,
+    val product_status: Int
+) :Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readInt(),
+        parcel.readLong(),
+        parcel.readLong(),
+        parcel.readInt()
+    )
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(product_name)
+        parcel.writeString(product_url)
+        parcel.writeInt(product_category)
+        parcel.writeLong(product_coin)
+        parcel.writeLong(id)
+        parcel.writeInt(product_status)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<StoreItemBean> {
+        override fun createFromParcel(parcel: Parcel): StoreItemBean {
+            return StoreItemBean(parcel)
+        }
+
+        override fun newArray(size: Int): Array<StoreItemBean?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+}

+ 14 - 0
baseswago/src/main/java/com/swago/baseswago/util/FileUtil.kt

@@ -1,5 +1,6 @@
 package com.swago.baseswago.util
 
+import android.app.Application
 import java.io.*
 import java.lang.Exception
 import java.util.*
@@ -99,4 +100,17 @@ object FileUtil {
         }
     }
 
+    fun clearCache(context : Application){
+        deleteFile(File(AppContext.getContext().cacheDir.absolutePath))
+        deleteFile(File(AppContext.getContext().filesDir.absolutePath))
+        val externalFile = context.getExternalFilesDir("")
+        if (externalFile != null){
+            deleteFile(File(externalFile.absolutePath))
+        }
+        val externalCache = context.externalCacheDir
+        if (externalCache != null){
+            deleteFile(File(externalCache.absolutePath))
+        }
+    }
+
 }

+ 61 - 0
baseswago/src/main/java/com/swago/baseswago/util/NinePatchChunk.kt

@@ -0,0 +1,61 @@
+package com.swago.baseswago.util
+
+import android.graphics.Rect
+import java.nio.ByteBuffer
+import java.nio.ByteOrder
+
+class NinePatchChunk {
+    companion object {
+        const val NO_COLOR = 0x00000001
+        const val TRANSPARENT_COLOR = 0x00000000
+
+        private fun readIntArray(data: IntArray, buffer: ByteBuffer) {
+            for (i in data.indices) {
+                data[i] = buffer.int
+            }
+        }
+
+        private fun checkDivCount(length: Int) {
+            if (length == 0 || length and 0x01 != 0) {
+                throw RuntimeException("invalid nine-patch: $length")
+            }
+        }
+
+        fun deserialize(data: ByteArray): NinePatchChunk? {
+            val byteBuffer = ByteBuffer.wrap(data).order(ByteOrder.nativeOrder())
+
+            if (byteBuffer.get() == 0.toByte()) return null // is not serialized
+
+            val chunk = NinePatchChunk()
+            chunk.mDivX = IntArray(byteBuffer.get().toInt())
+            chunk.mDivY = IntArray(byteBuffer.get().toInt())
+            chunk.mColor = IntArray(byteBuffer.get().toInt())
+
+            checkDivCount(chunk.mDivX.size)
+            checkDivCount(chunk.mDivY.size)
+
+            // skip 8 bytes
+            byteBuffer.int
+            byteBuffer.int
+
+            chunk.mPaddings.left = byteBuffer.int
+            chunk.mPaddings.right = byteBuffer.int
+            chunk.mPaddings.top = byteBuffer.int
+            chunk.mPaddings.bottom = byteBuffer.int
+
+            // skip 4 bytes
+            byteBuffer.int
+
+            readIntArray(chunk.mDivX, byteBuffer)
+            readIntArray(chunk.mDivY, byteBuffer)
+            readIntArray(chunk.mColor, byteBuffer)
+
+            return chunk
+        }
+    }
+
+    val mPaddings = Rect()
+    lateinit var mDivX: IntArray
+    lateinit var mDivY: IntArray
+    lateinit var mColor: IntArray
+}

+ 1 - 1
baseswago/src/main/java/com/swago/baseswago/util/SwagoInfo.kt

@@ -14,7 +14,7 @@ import java.util.*
  *description:
  */
 object SwagoInfo {
-    var key = "MTQwMzQ1Njc4OWFiY2RlZzAxNTQzMjY3ODlhZGNkZWY="
+    var key = "MTQwMzQ1Njc4OWFiY2RlZzAxNTRzZGhzb3NqZGNkZWY="
     private var versionCode = ""
     private var languageCode = "en"
     var languageId = 0

+ 47 - 0
baseswago/src/main/java/com/swago/glide.kt

@@ -1,6 +1,12 @@
 package com.swago
 
+import android.app.Activity
 import android.content.Context
+import android.graphics.Bitmap
+import android.graphics.BitmapFactory
+import android.graphics.NinePatch
+import android.graphics.drawable.Drawable
+import android.graphics.drawable.NinePatchDrawable
 import android.os.Build
 import android.text.BidiFormatter
 import android.text.TextDirectionHeuristics
@@ -9,8 +15,14 @@ import androidx.annotation.DrawableRes
 import androidx.annotation.RequiresApi
 import com.bumptech.glide.Glide
 import com.bumptech.glide.request.RequestOptions
+import com.bumptech.glide.request.target.CustomTarget
+import com.bumptech.glide.request.transition.Transition
 import com.swago.baseswago.R
 import jp.wasabeef.glide.transformations.BlurTransformation
+import java.io.File
+import java.io.FileInputStream
+import java.io.FileNotFoundException
+import java.io.IOException
 import java.util.*
 
 /**
@@ -72,4 +84,39 @@ fun CharSequence.formatAr(): CharSequence {
         this,
         TextDirectionHeuristics.LOCALE
     )
+}
+
+fun loadDian9Tu(context: Context, imageView: ImageView, url: String){
+    if (context is Activity){
+        if (context.isDestroyed)
+            return
+    }
+    Glide.with(context)
+        .asFile()
+        .load(url)
+        .into(object : CustomTarget<File>() {
+            override fun onResourceReady(resource: File, transition: Transition<in File>?) {
+                try {
+                    FileInputStream(resource).use { inputStream ->
+                        val bitmap = BitmapFactory.decodeStream(inputStream)
+                        imageView.setNinePatchImage(context , bitmap)
+                    }
+                } catch (e: FileNotFoundException) {
+                    e.printStackTrace()
+                } catch (e: IOException) {
+                    e.printStackTrace()
+                }
+            }
+
+            override fun onLoadCleared(placeholder: Drawable?) {
+
+            }
+        })
+}
+
+fun ImageView.setNinePatchImage(context: Context, bitmap: Bitmap) {
+    val chunk = bitmap.ninePatchChunk
+    val ninePatch = NinePatch(bitmap, chunk, null)
+    val ninePatchDrawable = NinePatchDrawable(context.resources, ninePatch)
+    this.setImageDrawable(ninePatchDrawable)
 }

+ 5 - 0
baseswago/src/main/res/drawable/shape_8c25cb_top_bottom_one_4.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#8C25CB"/>
+    <corners android:topLeftRadius="4dp"  android:bottomRightRadius="4dp"/>
+</shape>

+ 5 - 0
baseswago/src/main/res/values-ar/strings.xml

@@ -308,4 +308,9 @@
     <string name="loading">تحميل...</string>
     <string name="modify_success">حفظ بنجاح</string>
     <string name="Password_rooms_do_not_count_as_hours">أوقات غرفة القفل لم يتم احتسابها في المدة</string>
+    <string name="clear_cache">مسح ذاكرة التخزين المؤقت</string>
+    <string name="clear_cache_success">مسح ذاكرة التخزين المؤقت بنجاح</string>
+    <string name="dress_up">إرتد ملابس</string>
+    <string name="mall">مجمع تجاري</string>
+    <string name="buy_it_now">اشتر الآن</string>
 </resources>

+ 5 - 0
baseswago/src/main/res/values-in/strings.xml

@@ -312,4 +312,9 @@
     <string name="loading">loading...</string>
     <string name="modify_success">Berhasil dimodifikasi</string>
     <string name="Password_rooms_do_not_count_as_hours">Ruang kata sandi tidak tambah durasi</string>
+    <string name="clear_cache">Bersihkan cache</string>
+    <string name="clear_cache_success">Hapus sukses</string>
+    <string name="dress_up">Berpakaian</string>
+    <string name="mall">Toko</string>
+    <string name="buy_it_now">Beli sekarang</string>
 </resources>

+ 5 - 0
baseswago/src/main/res/values-ms/strings.xml

@@ -309,4 +309,9 @@
     <string name="loading">loading...</string>
     <string name="modify_success">Berhasil dimodifikasi</string>
     <string name="Password_rooms_do_not_count_as_hours">Ruang kata sandi tidak tambah durasi</string>
+    <string name="clear_cache">Bersihkan cache</string>
+    <string name="clear_cache_success">Hapus sukses</string>
+    <string name="dress_up">Berpakaian</string>
+    <string name="mall">Toko</string>
+    <string name="buy_it_now">Beli sekarang</string>
 </resources>

+ 5 - 0
baseswago/src/main/res/values-zh/strings.xml

@@ -308,4 +308,9 @@
     <string name="loading">loading...</string>
     <string name="modify_success">修改成功</string>
     <string name="Password_rooms_do_not_count_as_hours">密码房不计入时长</string>
+    <string name="clear_cache">清除缓存</string>
+    <string name="clear_cache_success">清除成功</string>
+    <string name="dress_up">装扮</string>
+    <string name="mall">商城</string>
+    <string name="buy_it_now">立即购买</string>
 </resources>

+ 5 - 0
baseswago/src/main/res/values/strings.xml

@@ -330,4 +330,9 @@
     <string name="loading">loading...</string>
     <string name="modify_success">Modify success</string>
     <string name="Password_rooms_do_not_count_as_hours">Lock room times didn\'t count into</string>
+    <string name="clear_cache">clear cache</string>
+    <string name="clear_cache_success">Clearance successful</string>
+    <string name="dress_up">Dress up</string>
+    <string name="mall">Mall</string>
+    <string name="buy_it_now">Buy it now</string>
 </resources>

+ 20 - 6
home/src/main/java/com/swago/home/ChatDetailActivity.kt

@@ -88,13 +88,27 @@ class ChatDetailActivity  : BaseXActivity<ActivityChatDetailBinding>() {
             }
 
             override fun onUserIconClick(view: View?, position: Int, messageInfo: MessageInfo?) {
-                UserInfo.getUserInfo()?.let {
-                    PersonDataDFragment.newInstance(it.id,
-                        isAnchor = false,
-                        inRoom = false,
-                        isMessage = true
-                    ).show(supportFragmentManager,"PersonDataDFragment")
+                when(view?.id){
+                    R.id.left_user_icon_view ->{
+                        messageInfo?.let {
+                            PersonDataDFragment.newInstance(messageInfo.fromUser,
+                                isAnchor = false,
+                                inRoom = false,
+                                isMessage = true
+                            ).show(supportFragmentManager,"PersonDataDFragment")
+                        }
+                    }
+                    R.id.right_user_icon_view ->{
+                        UserInfo.getUserInfo()?.let {
+                            PersonDataDFragment.newInstance(it.id,
+                                isAnchor = false,
+                                inRoom = false,
+                                isMessage = true
+                            ).show(supportFragmentManager,"PersonDataDFragment")
+                        }
+                    }
                 }
+
             }
         })
     }

+ 2 - 2
home/src/main/java/com/swago/home/MineFragment.kt

@@ -142,13 +142,13 @@ class MineFragment : BaseXFragment<FragmentMineBinding>() {
 
         binding.tvXStore.setOnClickListener(object :NoDoubleClickListener(){
             override fun onClick() {
-                ARouter.getInstance().build(ARouteConstant.User.storeList).navigation()
+                ARouter.getInstance().build(ARouteConstant.User.storeList).withInt("type",1).navigation()
             }
         })
 
         binding.tvXoutfit.setOnClickListener(object :NoDoubleClickListener(){
             override fun onClick() {
-                ARouter.getInstance().build(ARouteConstant.User.storeList).navigation()
+                ARouter.getInstance().build(ARouteConstant.User.storeList).withInt("type",2).navigation()
             }
         })
 

+ 93 - 81
home/src/main/res/layout/fragment_mine.xml

@@ -286,6 +286,7 @@
             android:text="@string/level"
             android:textColor="#131B23"
             android:textSize="12dp"
+            android:gravity="center"
             android:layout_marginTop="12dp"
             app:layout_constraintEnd_toStartOf="@+id/tvXTopUp"
             app:layout_constraintStart_toStartOf="parent"
@@ -300,6 +301,7 @@
             android:text="@string/top_up"
             android:textColor="#131B23"
             android:textSize="12dp"
+            android:gravity="center"
             android:layout_marginTop="12dp"
             app:layout_constraintEnd_toStartOf="@+id/tvXWithdrawal"
             app:layout_constraintStart_toEndOf="@+id/tvXLevel"
@@ -314,6 +316,7 @@
             android:text="@string/withdrawal"
             android:textColor="#131B23"
             android:textSize="12dp"
+            android:gravity="center"
             android:layout_marginTop="12dp"
             android:visibility="gone"
             app:layout_constraintEnd_toStartOf="@+id/tvXTaskCenter"
@@ -329,6 +332,7 @@
             android:text="@string/task_center"
             android:textColor="#131B23"
             android:textSize="12dp"
+            android:gravity="center"
             android:layout_marginTop="12dp"
             app:layout_constraintStart_toEndOf="@+id/tvXWithdrawal"
             app:layout_constraintEnd_toStartOf="@+id/tvXStore"
@@ -340,10 +344,11 @@
             android:layout_height="wrap_content"
             android:drawableTop="@mipmap/icon_my_store"
             android:drawablePadding="2dp"
-            android:text="@string/task_center"
+            android:text="@string/mall"
             android:textColor="#131B23"
             android:textSize="12dp"
             android:layout_marginTop="12dp"
+            android:gravity="center"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toEndOf="@+id/tvXTaskCenter"
             app:layout_constraintTop_toTopOf="parent" />
@@ -354,9 +359,10 @@
             android:layout_height="wrap_content"
             android:drawableTop="@mipmap/icon_my_outfit"
             android:drawablePadding="2dp"
-            android:text="@string/level"
+            android:text="@string/dress_up"
             android:textColor="#131B23"
             android:textSize="12dp"
+            android:gravity="center"
             android:layout_marginTop="12dp"
             android:layout_marginBottom="12dp"
             app:layout_constraintBottom_toBottomOf="parent"
@@ -366,91 +372,97 @@
 
     </androidx.constraintlayout.widget.ConstraintLayout>
 
-
-    <LinearLayout
+    <ScrollView
         android:layout_width="match_parent"
         android:layout_height="0dp"
-        android:layout_marginTop="20dp"
-        android:orientation="vertical"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/frameLayout">
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvBlackList"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:drawableStart="@mipmap/icon_mine_black"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/blacklist"
-            android:textColor="#000"
-            android:textSize="16dp" />
-
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvRoomManager"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:drawableStart="@mipmap/icon_mine_room_manager"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/room_manager"
-            android:textColor="#000"
-            android:textSize="16dp" />
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvCustomService"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:drawableStart="@mipmap/icon_mine_custom"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/contact_service"
-            android:textColor="#000"
-            android:textSize="16dp" />
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvModifyPassword"
+        <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:drawableStart="@mipmap/ic_modify_pwd"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/change_password"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:textColor="#000"
-            android:textSize="16dp" />
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvSetting"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:drawableStart="@mipmap/icon_mine_setting"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/app_settings"
-            android:textColor="#000"
-            android:textSize="16dp" />
+            android:layout_height="wrap_content"
+            android:layout_marginTop="20dp"
+            android:orientation="vertical">
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvBlackList"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:drawableStart="@mipmap/icon_mine_black"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/blacklist"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvRoomManager"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:visibility="gone"
+                tools:visibility="visible"
+                android:drawableStart="@mipmap/icon_mine_room_manager"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/room_manager"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvCustomService"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:drawableStart="@mipmap/icon_mine_custom"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/contact_service"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvModifyPassword"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:drawableStart="@mipmap/ic_modify_pwd"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/change_password"
+                android:visibility="gone"
+                tools:visibility="visible"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvSetting"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:drawableStart="@mipmap/icon_mine_setting"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/app_settings"
+                android:textColor="#000"
+                android:textSize="16dp"
+                android:layout_marginBottom="@dimen/dp_10"/>
+
+
+        </LinearLayout>
+    </ScrollView>
 
 
-    </LinearLayout>
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 6 - 0
user/src/main/java/com/swago/user/SettingActivity.kt

@@ -55,6 +55,12 @@ class SettingActivity : BaseXActivity<ActivitySettingBinding>() {
                 userVm.logout()
             }
         })
+
+        binding.tvClearCache.setOnClickListener(object : NoDoubleClickListener() {
+            override fun onClick() {
+                userVm.clearCache()
+            }
+        })
     }
 
     override fun initLiveData() {

+ 23 - 8
user/src/main/java/com/swago/user/store/StoreBuyDialog.kt

@@ -3,18 +3,24 @@ package com.swago.user.store
 import android.os.Bundle
 import android.view.Gravity
 import android.view.View
+import androidx.activity.viewModels
+import androidx.fragment.app.viewModels
 import com.opensource.svgaplayer.SVGADrawable
 import com.opensource.svgaplayer.SVGAParser
 import com.opensource.svgaplayer.SVGAVideoEntity
 import com.swago.baseswago.dialog.BaseXDFragment
+import com.swago.baseswago.model.mine.StoreItemBean
+import com.swago.baseswago.util.NoDoubleClickListener
 import com.swago.user.databinding.DialogStoreDetailBinding
+import com.swago.user.vm.StoreVm
 import java.io.File
 import java.net.URL
 
 class StoreBuyDialog : BaseXDFragment<DialogStoreDetailBinding>(){
+    private val storeVm by viewModels<StoreVm>()
 
     private var svgaParser: SVGAParser? = null
-    var svgaString: String ?= null
+    var storeBean: StoreItemBean ?= null
     init {
         setGravity(Gravity.BOTTOM)
         setDimAmount(0.5f)
@@ -22,10 +28,10 @@ class StoreBuyDialog : BaseXDFragment<DialogStoreDetailBinding>(){
     }
 
     companion object{
-        fun newInstance(): StoreBuyDialog {
+        fun newInstance(bean: StoreItemBean): StoreBuyDialog {
             val dialog = StoreBuyDialog()
             val bundle = Bundle()
-//            bundle.putString("svgaString",svgaString)
+            bundle.putParcelable("data" , bean)
             dialog.arguments = bundle
             return dialog
         }
@@ -34,12 +40,14 @@ class StoreBuyDialog : BaseXDFragment<DialogStoreDetailBinding>(){
 
     override fun initOther() {
         svgaParser = SVGAParser(activity)
-//        arguments?.let {
-//            svgaString = it.getString("svgaString")
-//        }
-        svgaString?.let {
+        arguments?.let {
+            storeBean = it.getParcelable("data")
+        }
+        storeBean?.let {
+            binding.tvName.text = it.product_name
+            binding.tvCoin.text = "${it.product_coin}"
             svgaParser?.let { svgaParser ->
-                svgaParser.decodeFromURL(URL(it), object : SVGAParser.ParseCompletion{
+                svgaParser.decodeFromURL(URL(it.product_url), object : SVGAParser.ParseCompletion{
                     override fun onComplete(videoItem: SVGAVideoEntity) {
                         val drawable = SVGADrawable(videoItem)
                         binding.svgContent.setImageDrawable(drawable)
@@ -69,6 +77,13 @@ class StoreBuyDialog : BaseXDFragment<DialogStoreDetailBinding>(){
     }
 
     override fun initLiveData() {
+        binding.tvBuy.setOnClickListener(object: NoDoubleClickListener(){
+            override fun onClick() {
+                storeBean?.let {
+                    storeVm.buyProduct(it.id)
+                }
 
+            }
+        })
     }
 }

+ 14 - 3
user/src/main/java/com/swago/user/store/StoreItemAdapter.kt

@@ -1,14 +1,25 @@
 package com.swago.user.store
 
+import android.view.View
+import com.bumptech.glide.Glide
 import com.chad.library.adapter.base.BaseQuickAdapter
 import com.chad.library.adapter.base.BaseViewHolder
+import com.swago.baseswago.model.mine.StoreItemBean
+import com.swago.loadUrl
 import com.swago.user.R
+import de.hdodenhof.circleimageview.CircleImageView
 
-class StoreItemAdapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_store, arrayListOf())  {
-    override fun convert(helper: BaseViewHolder?, item: String?) {
+class StoreItemAdapter(private val type: Int) : BaseQuickAdapter<StoreItemBean, BaseViewHolder>(R.layout.item_store, arrayListOf())  {
+
+    override fun convert(helper: BaseViewHolder?, item: StoreItemBean?) {
         helper?.apply {
+            setVisible(R.id.tvUsing , type != 1)
+            setVisible(R.id.tv_coin , type == 1)
+
             item?.let {
-                setText(R.id.tv_name ,item)
+                setText(R.id.tv_name ,item.product_name)
+                setText(R.id.tv_coin ,"${item.product_coin}")
+                itemView.findViewById<CircleImageView>(R.id.iv_svg).loadUrl(mContext,item.product_url?: "")
             }
 
         }

+ 244 - 14
user/src/main/java/com/swago/user/store/StoreListActivity.kt

@@ -1,13 +1,25 @@
 package com.swago.user.store
 
 import android.graphics.Color
+import android.view.View
+import androidx.activity.viewModels
+import androidx.fragment.app.viewModels
+import androidx.recyclerview.widget.GridLayoutManager
 import androidx.recyclerview.widget.LinearLayoutManager
+import com.alibaba.android.arouter.facade.annotation.Autowired
 import com.alibaba.android.arouter.facade.annotation.Route
+import com.alibaba.android.arouter.launcher.ARouter
 import com.swago.baseswago.activity.BaseXActivity
 import com.swago.baseswago.constant.ARouteConstant
+import com.swago.baseswago.model.live.audio.PositionBean
+import com.swago.baseswago.model.mine.StoreItemBean
+import com.swago.baseswago.util.AppContext
 import com.swago.user.R
 import com.swago.user.databinding.ActivityStoreListBinding
+import com.swago.user.vm.StoreVm
 import com.swago.user.vm.TaskVm
+import com.zy.multistatepage.state.EmptyState
+import java.util.concurrent.CopyOnWriteArrayList
 
 /**
  *@date 2022/2/26 13:37
@@ -15,36 +27,254 @@ import com.swago.user.vm.TaskVm
  */
 @Route(path = ARouteConstant.User.storeList)
 class StoreListActivity : BaseXActivity<ActivityStoreListBinding>() {
+    private val storeVm by viewModels<StoreVm>()
 
-    val adapter by lazy {
-        StoreTypeAdapter()
+    @Autowired(required = true)
+    @JvmField
+    var type: Int = 1
+    /**
+     * 入场特效
+     * */
+    private val enterList by lazy {
+        ArrayList<StoreItemBean>()
     }
 
+    val enterAdapter by lazy {
+        StoreItemAdapter(type)
+    }
+
+    var isEnterExpanded: Boolean = false
+
+    /**
+     * 头像框
+     * */
+    private val avatarList by lazy {
+        ArrayList<StoreItemBean>()
+    }
+
+    private val avatarAdapter by lazy {
+        StoreItemAdapter(type)
+    }
+
+    var isAvatarExpanded: Boolean = false
+
+
+    /**
+     * 徽章
+     * */
+    private val badgeList by lazy {
+        ArrayList<StoreItemBean>()
+    }
+
+    private val badgeAdapter by lazy {
+        StoreItemAdapter(type)
+    }
+
+    var isBadgeExpanded: Boolean = false
+
+    /**
+     * 聊天气泡
+     * */
+    private val bubbleList by lazy {
+        ArrayList<StoreItemBean>()
+    }
+
+    private val bubbleAdapter by lazy {
+        StoreItemAdapter(type)
+    }
+
+    var isBubbleExpanded: Boolean = false
+
     override fun loadData() {
+        if (type == 1){
+            storeVm.getProductList()
+        } else {
+            storeVm.getExitProductList()
+        }
+
     }
 
     override fun initOther() {
+        ARouter.getInstance().inject(this)
         setBackView(binding.toolbar.ivBack)
         binding.toolbar.ivBack.setImageResource(R.mipmap.back_white)
         binding.toolbar.tvTitle.setTextColor(Color.parseColor("#FFFFFF"))
-        binding.toolbar.tvTitle.text =
-            "Store"
+        if (type == 1){
+            binding.toolbar.tvTitle.text =
+                AppContext.getContext().resources.getString(R.string.mall)
+        } else {
+            binding.toolbar.tvTitle.text =
+                AppContext.getContext().resources.getString(R.string.dress_up)
+            binding.tvEnterMore.visibility = View.GONE
+            binding.ivEnterMore.visibility = View.GONE
+
+            binding.tvAvatarMore.visibility = View.GONE
+            binding.ivAvatarMore.visibility = View.GONE
+
+            binding.tvBadgeMore.visibility = View.GONE
+            binding.ivBadgeMore.visibility = View.GONE
+
+            binding.tvBubbleMore.visibility = View.GONE
+            binding.ivBubbleMore.visibility = View.GONE
+        }
     }
 
     override fun initLiveData() {
-        binding.swagoRv.layoutManager = LinearLayoutManager(this)
-        adapter.setNewData(arrayListOf(StoreListBean("dfg", false), StoreListBean("fsdfds", false)))
-        binding.swagoRv.adapter = adapter
-        adapter.setOnItemChildClickListener { _, view, positon ->
-            when (view?.id) {
-                R.id.clMore -> {
-                    adapter.data[positon].isExpanded = !adapter.data[positon].isExpanded
-                    adapter.notifyItemChanged(positon)
+        binding.rvEnter.layoutManager = GridLayoutManager(this, 3)
+        binding.rvEnter.adapter = enterAdapter
+
+        binding.rvAvatar.layoutManager = GridLayoutManager(this, 3)
+        binding.rvAvatar.adapter = avatarAdapter
+
+        binding.rvBadge.layoutManager = GridLayoutManager(this, 3)
+        binding.rvBadge.adapter = badgeAdapter
+
+        binding.rvBubble.layoutManager = GridLayoutManager(this, 3)
+        binding.rvBubble.adapter = bubbleAdapter
+
+        storeVm.storeProductData.observe(this){
+            if (it.isNullOrEmpty()){
+                binding.clEmpty.visibility = View.VISIBLE
+            } else {
+                it.forEach { item ->
+                    when (item.product_category){
+                        1 -> {
+                            enterList.add(item)
+                        }
+                        2 -> {
+                            avatarList.add(item)
+                        }
+                        3 -> {
+                            badgeList.add(item)
+                        }
+                        4 -> {
+                            bubbleList.add(item)
+                        }
+                    }
                 }
+                if (enterList.isNotEmpty()){
+                    binding.clEnterMore.visibility = View.VISIBLE
+                    enterAdapter.setNewData(enterList.subList(0, enterList.size.coerceAtMost(3)))
+                }
+                if (avatarList.isNotEmpty()){
+                    binding.clAvatarMore.visibility = View.VISIBLE
+                    avatarAdapter.setNewData(avatarList.subList(0, avatarList.size.coerceAtMost(3)))
+                }
+                if (badgeList.isNotEmpty()){
+                    binding.clBadgeMore.visibility = View.VISIBLE
+                    badgeAdapter.setNewData(badgeList.subList(0, badgeList.size.coerceAtMost(3)))
+                }
+                if (bubbleList.isNotEmpty()){
+                    binding.clBubbleMore.visibility = View.VISIBLE
+                    bubbleAdapter.setNewData(bubbleList.subList(0, bubbleList.size.coerceAtMost(3)))
+                }
+
+            }
+
+
+        }
+
+        storeVm.exitProductData.observe(this){
+            if (it.isNullOrEmpty()){
+                binding.clEmpty.visibility = View.VISIBLE
+            } else {
+                it.forEach { item ->
+                    when (item.product_category){
+                        1 -> {
+                            enterList.add(item)
+                        }
+                        2 -> {
+                            avatarList.add(item)
+                        }
+                        3 -> {
+                            badgeList.add(item)
+                        }
+                        4 -> {
+                            bubbleList.add(item)
+                        }
+                    }
+                }
+                if (enterList.isNotEmpty()){
+                    binding.clEnterMore.visibility = View.VISIBLE
+                    enterAdapter.setNewData(enterList)
+                }
+                if (avatarList.isNotEmpty()){
+                    binding.clAvatarMore.visibility = View.VISIBLE
+                    avatarAdapter.setNewData(avatarList)
+                }
+                if (badgeList.isNotEmpty()){
+                    binding.clBadgeMore.visibility = View.VISIBLE
+                    badgeAdapter.setNewData(badgeList)
+                }
+                if (bubbleList.isNotEmpty()){
+                    binding.clBubbleMore.visibility = View.VISIBLE
+                    bubbleAdapter.setNewData(bubbleList)
+                }
+            }
+
+        }
+
+        binding.clEnterMore.setOnClickListener {
+            if (type == 2)
+                return@setOnClickListener
+            if (isEnterExpanded) {
+                enterAdapter.setNewData(enterList)
+                binding.tvEnterMore.text = "Show Less"
+                binding.ivEnterMore.setImageResource(R.mipmap.ic_show_less)
+            } else {
+                enterAdapter.setNewData(enterList.subList(0, enterList.size.coerceAtMost(3)))
+                binding.tvEnterMore.text = "Show More"
+                binding.ivEnterMore.setImageResource(R.mipmap.ic_show_more)
+            }
+            isEnterExpanded = !isEnterExpanded
+        }
+
+        binding.clAvatarMore.setOnClickListener {
+            if (type == 2)
+                return@setOnClickListener
+            if (isAvatarExpanded) {
+                avatarAdapter.setNewData(avatarList)
+                binding.tvAvatarMore.text = "Show Less"
+                binding.ivAvatarMore.setImageResource(R.mipmap.ic_show_less)
+            } else {
+                avatarAdapter.setNewData(avatarList.subList(0, avatarList.size.coerceAtMost(3)))
+                binding.tvAvatarMore.text = "Show More"
+                binding.ivAvatarMore.setImageResource(R.mipmap.ic_show_more)
+            }
+            isAvatarExpanded = !isAvatarExpanded
+        }
+
+        binding.clBadgeMore.setOnClickListener {
+            if (type == 2)
+                return@setOnClickListener
+            if (isBadgeExpanded) {
+                badgeAdapter.setNewData(badgeList)
+                binding.tvBadgeMore.text = "Show Less"
+                binding.ivBadgeMore.setImageResource(R.mipmap.ic_show_less)
+            } else {
+                badgeAdapter.setNewData(badgeList.subList(0, badgeList.size.coerceAtMost(3)))
+                binding.tvBadgeMore.text = "Show More"
+                binding.ivBadgeMore.setImageResource(R.mipmap.ic_show_more)
+            }
+            isBadgeExpanded = !isBadgeExpanded
+        }
+
+        binding.clBubbleMore.setOnClickListener {
+            if (type == 2)
+                return@setOnClickListener
+            if (isBubbleExpanded) {
+                bubbleAdapter.setNewData(bubbleList)
+                binding.tvBubbleMore.text = "Show Less"
+                binding.ivBubbleMore.setImageResource(R.mipmap.ic_show_less)
+            } else {
+                bubbleAdapter.setNewData(bubbleList.subList(0, bubbleList.size.coerceAtMost(3)))
+                binding.tvBubbleMore.text = "Show More"
+                binding.ivBubbleMore.setImageResource(R.mipmap.ic_show_more)
             }
+            isBubbleExpanded = !isBubbleExpanded
         }
-        adapter.itemClickFun = { typeItem, position ->
-            StoreBuyDialog.newInstance().show(supportFragmentManager ,"StoreBuyDialog")
+        enterAdapter.setOnItemClickListener { _, _, position ->
+            StoreBuyDialog.newInstance(enterAdapter.data[position]).show(supportFragmentManager ,"StoreBuyDialog")
         }
     }
 

+ 0 - 6
user/src/main/java/com/swago/user/store/StoreListBean.kt

@@ -1,6 +0,0 @@
-package com.swago.user.store
-
-data class StoreListBean(
-    val name: String,
-    var isExpanded: Boolean
-)

+ 0 - 39
user/src/main/java/com/swago/user/store/StoreTypeAdapter.kt

@@ -1,39 +0,0 @@
-package com.swago.user.store
-
-import androidx.recyclerview.widget.GridLayoutManager
-import androidx.recyclerview.widget.RecyclerView
-import com.chad.library.adapter.base.BaseQuickAdapter
-import com.chad.library.adapter.base.BaseViewHolder
-import com.swago.user.R
-
-class StoreTypeAdapter: BaseQuickAdapter<StoreListBean, BaseViewHolder>(R.layout.item_type_store, arrayListOf())  {
-    var itemClickFun: ((typeItem: StoreListBean , position:Int) -> Unit)? = null
-
-    override fun convert(helper: BaseViewHolder?, item: StoreListBean?) {
-        val itemAdapter = StoreItemAdapter()
-        val array = arrayListOf("ds", "ferg","dfdg","dfdg")
-        helper?.apply {
-            item?.let {
-                setText(R.id.tvType ,item.name)
-                if (item.isExpanded){
-                    itemAdapter.setNewData(array)
-                    setText(R.id.tvMore ,"Show Less")
-                    setImageResource(R.id.ivMore , R.mipmap.ic_show_less)
-                } else {
-                    itemAdapter.setNewData(array.subList(0 , array.size.coerceAtMost(3)))
-                    setText(R.id.tvMore ,"Show More")
-                    setImageResource(R.id.ivMore , R.mipmap.ic_show_more)
-                }
-                val recyclerView = itemView.findViewById<RecyclerView>(R.id.rvType)
-                recyclerView.layoutManager = GridLayoutManager(mContext, 3)
-                recyclerView.adapter = itemAdapter
-                addOnClickListener(R.id.clMore)
-                itemAdapter.setOnItemClickListener { _, _, postion ->
-                    itemClickFun?.invoke(item,postion)
-                }
-            }
-
-
-        }
-    }
-}

+ 54 - 0
user/src/main/java/com/swago/user/vm/StoreVm.kt

@@ -0,0 +1,54 @@
+package com.swago.user.vm
+
+import android.app.Application
+import androidx.lifecycle.MutableLiveData
+import com.swago.baseswago.inter.ApiManager
+import com.swago.baseswago.model.mine.StoreItemBean
+import com.swago.baseswago.model.mine.TaskModel
+import com.swago.baseswago.util.ActivityManagerUtil
+import com.swago.baseswago.util.BaseViewModel
+import com.swago.baseswago.util.SwagoLoading
+
+class StoreVm(application: Application) : BaseViewModel(application){
+
+    val storeProductData by lazy {
+        MutableLiveData<List<StoreItemBean>?>()
+    }
+
+    fun getProductList(){
+        requestData2 {
+            requestData {
+                val data = ApiManager.userApi.getProductList()
+                storeProductData.value  = data.list
+            }
+            requestError {
+                storeProductData.value = null
+            }
+        }
+    }
+
+    fun buyProduct(productId:Long){
+        requestData2 (){
+            requestData {
+                ApiManager.userApi.buyProduct(productId)
+            }
+
+        }
+    }
+
+    val exitProductData by lazy {
+        MutableLiveData<List<StoreItemBean>?>()
+    }
+
+    fun getExitProductList(){
+        requestData2 {
+            requestData {
+                val data = ApiManager.userApi.exitProductList()
+                exitProductData.value  = data.list
+            }
+            requestError {
+                exitProductData.value = null
+            }
+        }
+    }
+}

+ 13 - 2
user/src/main/res/layout/activity_setting.xml

@@ -52,10 +52,21 @@
             android:layout_width="match_parent"
             android:layout_height="60dp"/>
 
+        <com.swago.baseswago.cusview.MediumTextView
+            android:id="@+id/tvClearCache"
+            app:layout_constraintTop_toBottomOf="@+id/tvUserPrivacy"
+            android:gravity="center_vertical"
+            android:padding="20dp"
+            android:textSize="16dp"
+            android:textColor="@color/black"
+            android:drawableEnd="@mipmap/more_small"
+            android:text="@string/clear_cache"
+            android:layout_width="match_parent"
+            android:layout_height="60dp"/>
 
         <com.swago.baseswago.cusview.MediumTextView
             android:id="@+id/tvCurrentVersion"
-            app:layout_constraintTop_toBottomOf="@+id/tvUserPrivacy"
+            app:layout_constraintTop_toBottomOf="@+id/tvClearCache"
             android:gravity="center_vertical"
             android:padding="20dp"
             android:textSize="16dp"
@@ -70,7 +81,7 @@
 
         <com.swago.baseswago.cusview.RegularTextView
             android:id="@+id/tvVersion"
-            app:layout_constraintTop_toBottomOf="@+id/tvUserPrivacy"
+            app:layout_constraintTop_toBottomOf="@+id/tvClearCache"
             android:gravity="center_vertical"
             android:padding="20dp"
             android:textSize="16dp"

+ 247 - 10
user/src/main/res/layout/activity_store_list.xml

@@ -4,6 +4,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="#030417"
+    xmlns:tools="http://schemas.android.com/tools"
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <ImageView
@@ -20,17 +21,253 @@
         android:layout_marginTop="25dp"
         app:layout_constraintTop_toTopOf="parent" />
 
-    <FrameLayout
-        app:layout_constraintTop_toTopOf="parent"
-        app:layout_constraintBottom_toBottomOf="parent"
-        android:layout_marginTop="81dp"
+    <androidx.core.widget.NestedScrollView
         android:layout_width="match_parent"
-        android:layout_height="0dp">
-
-        <androidx.recyclerview.widget.RecyclerView
-            android:id="@+id/swagoRv"
+        android:layout_height="0dp"
+        android:layout_marginTop="81dp"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent">
+        <androidx.constraintlayout.widget.ConstraintLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent" />
+            android:layout_height="match_parent"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent">
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/clEnterMore"
+                android:layout_width="match_parent"
+                android:layout_height="43dp"
+                android:visibility="gone"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <com.swago.baseswago.cusview.BoldTextView
+                    android:id="@+id/tvEnterType"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="16dp"
+                    android:textColor="#fff"
+                    android:textSize="@dimen/sp_16"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="入场特效" />
+
+                <com.swago.baseswago.cusview.MediumTextView
+                    android:id="@+id/tvEnterMore"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="2dp"
+                    android:drawablePadding="2dp"
+                    android:textColor="#99ffffff"
+                    android:textSize="12sp"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toStartOf="@+id/ivEnterMore"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="Show Less" />
+                <ImageView
+                    android:id="@+id/ivEnterMore"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    android:src="@mipmap/ic_show_more"
+                    android:layout_marginEnd="16dp"/>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/rvEnter"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="8dp"
+                android:layout_marginEnd="8dp"
+                app:layout_constraintTop_toBottomOf="@+id/clEnterMore"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"/>
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/clAvatarMore"
+                android:layout_width="match_parent"
+                android:layout_height="43dp"
+                android:visibility="gone"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/rvEnter">
+
+                <com.swago.baseswago.cusview.BoldTextView
+                    android:id="@+id/tvAvatarType"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="16dp"
+                    android:textColor="#fff"
+                    android:textSize="@dimen/sp_16"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="头像框" />
 
-    </FrameLayout>
+                <com.swago.baseswago.cusview.MediumTextView
+                    android:id="@+id/tvAvatarMore"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="2dp"
+                    android:drawablePadding="2dp"
+                    android:textColor="#99ffffff"
+                    android:textSize="12sp"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toStartOf="@+id/ivAvatarMore"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="Show Less" />
+                <ImageView
+                    android:id="@+id/ivAvatarMore"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    android:src="@mipmap/ic_show_more"
+                    android:layout_marginEnd="16dp"/>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/rvAvatar"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="8dp"
+                android:layout_marginEnd="8dp"
+                app:layout_constraintTop_toBottomOf="@+id/clAvatarMore"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"/>
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/clBadgeMore"
+                android:layout_width="match_parent"
+                android:layout_height="43dp"
+                android:visibility="gone"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/rvAvatar">
+
+                <com.swago.baseswago.cusview.BoldTextView
+                    android:id="@+id/tvBadgeType"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="16dp"
+                    android:textColor="#fff"
+                    android:textSize="@dimen/sp_16"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="徽章" />
+
+                <com.swago.baseswago.cusview.MediumTextView
+                    android:id="@+id/tvBadgeMore"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="2dp"
+                    android:drawablePadding="2dp"
+                    android:textColor="#99ffffff"
+                    android:textSize="12sp"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toStartOf="@+id/ivBadgeMore"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="Show Less" />
+                <ImageView
+                    android:id="@+id/ivBadgeMore"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    android:src="@mipmap/ic_show_more"
+                    android:layout_marginEnd="16dp"/>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/rvBadge"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="8dp"
+                android:layout_marginEnd="8dp"
+                app:layout_constraintTop_toBottomOf="@+id/clBadgeMore"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"/>
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/clBubbleMore"
+                android:layout_width="match_parent"
+                android:layout_height="43dp"
+                android:visibility="gone"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/rvBadge">
+
+                <com.swago.baseswago.cusview.BoldTextView
+                    android:id="@+id/tvBubbleType"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="16dp"
+                    android:textColor="#fff"
+                    android:textSize="@dimen/sp_16"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="聊天气泡" />
+
+                <com.swago.baseswago.cusview.MediumTextView
+                    android:id="@+id/tvBubbleMore"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="2dp"
+                    android:drawablePadding="2dp"
+                    android:textColor="#99ffffff"
+                    android:textSize="12sp"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toStartOf="@+id/ivBubbleMore"
+                    app:layout_constraintTop_toTopOf="parent"
+                    android:text="Show Less" />
+                <ImageView
+                    android:id="@+id/ivBubbleMore"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    android:src="@mipmap/ic_show_more"
+                    android:layout_marginEnd="16dp"/>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/rvBubble"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="8dp"
+                android:layout_marginEnd="8dp"
+                app:layout_constraintTop_toBottomOf="@+id/clBubbleMore"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"/>
+        </androidx.constraintlayout.widget.ConstraintLayout>
+    </androidx.core.widget.NestedScrollView>
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/clEmpty"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_marginTop="81dp"
+        android:visibility="gone"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent">
+        <ImageView
+            android:id="@+id/ivEmpty"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@mipmap/state_error_empty"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent" />
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="14sp"
+            android:textColor="@color/_ffffff"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/ivEmpty"
+            android:text="@string/There_is_nothing_here"
+            android:layout_marginTop="@dimen/dp_4"/>
+    </androidx.constraintlayout.widget.ConstraintLayout>
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 2 - 1
user/src/main/res/layout/dialog_store_detail.xml

@@ -52,6 +52,7 @@
                 tools:text="fgg" />
 
             <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvBuy"
                 android:layout_width="match_parent"
                 android:layout_height="44dp"
                 android:layout_marginStart="17dp"
@@ -59,7 +60,7 @@
                 android:layout_marginEnd="17dp"
                 android:background="@drawable/shape_9b20fc_20"
                 android:gravity="center"
-                android:text="Buy Now"
+                android:text="@string/buy_it_now"
                 android:textColor="@color/_ffffff"
                 android:textSize="@dimen/sp_16"
                 app:layout_constraintTop_toBottomOf="@+id/tv_coin" />

+ 12 - 1
user/src/main/res/layout/item_store.xml

@@ -15,7 +15,6 @@
         android:background="@drawable/shape_0fffffff_4"
         app:layout_constraintDimensionRatio="h,52:66"
         app:layout_constraintTop_toTopOf="parent">
-
         <ImageView
             android:id="@+id/iv_svg"
             android:layout_width="90dp"
@@ -50,6 +49,18 @@
             android:drawableStart="@mipmap/ic_coin_store"
             android:textSize="10sp"
             android:textColor="#A3FFFFFF"/>
+        <TextView
+            android:id="@+id/tvUsing"
+            android:layout_width="51dp"
+            android:layout_height="18dp"
+            android:textSize="@dimen/sp_12"
+            android:textColor="@color/_ffffff"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintLeft_toLeftOf="parent"
+            android:text="Using"
+            android:gravity="center"
+            android:visibility="gone"
+            android:background="@drawable/shape_8c25cb_top_bottom_one_4"/>
     </androidx.constraintlayout.widget.ConstraintLayout>
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 57
user/src/main/res/layout/item_type_store.xml

@@ -1,57 +0,0 @@
-<?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"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content">
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/clMore"
-        android:layout_width="match_parent"
-        android:layout_height="43dp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent">
-
-        <com.swago.baseswago.cusview.BoldTextView
-            android:id="@+id/tvType"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="16dp"
-            android:textColor="#fff"
-            android:textSize="@dimen/sp_16"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            tools:text="Enter" />
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvMore"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginEnd="2dp"
-            android:drawablePadding="2dp"
-            android:textColor="#99ffffff"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toStartOf="@+id/ivMore"
-            app:layout_constraintTop_toTopOf="parent"
-            android:text="Show Less" />
-        <ImageView
-            android:id="@+id/ivMore"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent"
-            android:src="@mipmap/ic_show_more"
-            android:layout_marginEnd="16dp"/>
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/rvType"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="4dp"
-        android:layout_marginEnd="4dp"
-        app:layout_constraintTop_toBottomOf="@+id/clMore"/>
-</androidx.constraintlayout.widget.ConstraintLayout>