Ver Fonte

不发问题修复

徐勤民 há 2 meses atrás
pai
commit
194d27a6e7
38 ficheiros alterados com 368 adições e 146 exclusões
  1. 12 9
      app/src/main/AndroidManifest.xml
  2. 1 1
      app/src/main/java/com/xuqinmin/android/app/model/SuggestAnchorData.kt
  3. 1 0
      app/src/main/java/com/xuqinmin/android/app/ui/BlocklistActivity.kt
  4. 11 0
      app/src/main/java/com/xuqinmin/android/app/ui/ChatActivity.kt
  5. 15 11
      app/src/main/java/com/xuqinmin/android/app/ui/EditActivity.kt
  6. 2 0
      app/src/main/java/com/xuqinmin/android/app/ui/FeedbackActivity.kt
  7. 2 1
      app/src/main/java/com/xuqinmin/android/app/ui/FriendsActivity.kt
  8. 106 0
      app/src/main/java/com/xuqinmin/android/app/ui/StartActivity.kt
  9. 40 0
      app/src/main/java/com/xuqinmin/android/app/ui/fragment/MeFragment.kt
  10. 88 0
      app/src/main/java/com/xuqinmin/android/app/viewmodel/StartVM.kt
  11. 3 0
      app/src/main/java/com/xuqinmin/android/app/viewmodel/VMEdit.kt
  12. 1 1
      app/src/main/java/com/xuqinmin/android/app/viewmodel/VMSuggestAnchor.kt
  13. 11 11
      app/src/main/res/layout/activity_chat.xml
  14. 1 1
      app/src/main/res/layout/activity_edit.xml
  15. 40 0
      app/src/main/res/layout/activity_start.xml
  16. 17 15
      app/src/main/res/layout/dialog_report.xml
  17. 1 0
      app/src/main/res/layout/dialog_tags.xml
  18. 6 90
      app/src/main/res/layout/fragment_me.xml
  19. 2 0
      app/src/main/res/layout/item_friends.xml
  20. 1 0
      app/src/main/res/layout/item_suggest.xml
  21. 4 4
      app/src/main/res/layout/item_tag.xml
  22. BIN
      app/src/main/res/mipmap-hdpi/icon.png
  23. BIN
      app/src/main/res/mipmap-hdpi/start_bg.png
  24. BIN
      app/src/main/res/mipmap-hdpi/start_bg2.png
  25. BIN
      app/src/main/res/mipmap-mdpi/icon.png
  26. BIN
      app/src/main/res/mipmap-mdpi/start_bg.png
  27. BIN
      app/src/main/res/mipmap-mdpi/start_bg2.png
  28. BIN
      app/src/main/res/mipmap-xhdpi/icon.png
  29. BIN
      app/src/main/res/mipmap-xhdpi/start_bg.png
  30. BIN
      app/src/main/res/mipmap-xhdpi/start_bg2.png
  31. BIN
      app/src/main/res/mipmap-xxhdpi/icon.png
  32. BIN
      app/src/main/res/mipmap-xxhdpi/start_bg.png
  33. BIN
      app/src/main/res/mipmap-xxhdpi/start_bg2.png
  34. BIN
      app/src/main/res/mipmap-xxxhdpi/icon.png
  35. BIN
      app/src/main/res/mipmap-xxxhdpi/start_bg.png
  36. BIN
      app/src/main/res/mipmap-xxxhdpi/start_bg2.png
  37. 2 2
      config.gradle
  38. 1 0
      settings.gradle

+ 12 - 9
app/src/main/AndroidManifest.xml

@@ -34,6 +34,16 @@
         android:theme="@style/AppTheme"
         android:usesCleartextTraffic="true"
         tools:replace="android:label">
+        <activity
+            android:name=".ui.StartActivity"
+            android:exported="true"
+            android:screenOrientation="portrait">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
         <activity
             android:name=".ui.AboutActivity"
             android:exported="false" />
@@ -43,8 +53,7 @@
         <activity
             android:name=".ui.ChatActivity"
             android:exported="false"
-            android:windowSoftInputMode="adjustNothing"
-            />
+            android:windowSoftInputMode="adjustNothing" />
         <activity
             android:name=".ui.FeedbackActivity"
             android:exported="false" />
@@ -85,13 +94,7 @@
         <activity
             android:name=".ui.WelcomeActivity"
             android:exported="true"
-            android:screenOrientation="portrait">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
+            android:screenOrientation="portrait"/>
 
         <provider
             android:name="androidx.core.content.FileProvider"

+ 1 - 1
app/src/main/java/com/xuqinmin/android/app/model/SuggestAnchorData.kt

@@ -2,7 +2,7 @@ package com.xuqinmin.android.app.model
 
 
 data class SuggestAnchorData(
-    val userId: Int,
+    val userId: Int?,
     val num: Int,
     val size: Int,
 )

+ 1 - 0
app/src/main/java/com/xuqinmin/android/app/ui/BlocklistActivity.kt

@@ -44,6 +44,7 @@ class BlocklistActivity :
                 clipToOutline = true
                 outlineProvider = CircleProvider
             }
+            holder.setImage(R.id.avatar, item.headImage)
 
             holder.setBackgroundColor(
                 R.id.status, when (item.online) {

+ 11 - 0
app/src/main/java/com/xuqinmin/android/app/ui/ChatActivity.kt

@@ -50,6 +50,7 @@ import com.xuqm.base.extensions.showMessage
 import com.xuqm.base.ui.BaseActivity
 import com.xuqm.sdhbwfu.core.common.TIME_FORMAT_DATE_ALL_2
 import com.xuqm.sdhbwfu.core.extensions.gone
+import com.xuqm.sdhbwfu.core.extensions.invisible
 import com.xuqm.sdhbwfu.core.extensions.linearLayoutManager
 import com.xuqm.sdhbwfu.core.extensions.linearLayoutManagerForHorizontal
 import com.xuqm.sdhbwfu.core.extensions.visible
@@ -239,6 +240,8 @@ class ChatActivity : BaseActivity<ActivityChatBinding>() {
             binding.startVideo2.gone()
             binding.msgStartVideo.gone()
             binding.more.gone()
+            binding.sendGift.gone()
+            binding.chatTop.gone()
         }
     }
 
@@ -276,6 +279,13 @@ class ChatActivity : BaseActivity<ActivityChatBinding>() {
         }
         vm.resultInfo.observe(this) {
             adapter1.setmDatas(it.labels)
+            if (it.labels.isEmpty()) {
+                binding.tags2.gone()
+                binding.line.gone()
+            } else {
+                binding.line.visible()
+                binding.tags2.visible()
+            }
         }
 
         binding.title.text = toUser?.nickname
@@ -286,6 +296,7 @@ class ChatActivity : BaseActivity<ActivityChatBinding>() {
 
         ImageHelper.load(binding.avatar, toUser?.avatar)
         ImageHelper.load(binding.avatar3, toUser?.avatar)
+        ImageHelper.load(binding.head, toUser?.avatar)
         val color = when (toUser?.online) {
             0 -> Color.parseColor("#FFB9BECC")
             1 -> Color.parseColor("#FF26D526")

+ 15 - 11
app/src/main/java/com/xuqinmin/android/app/ui/EditActivity.kt

@@ -102,14 +102,14 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
                 binding.birthday.text = value
             }
         }
-        binding.genderRoot.setOnClickListener {
-            AlertView(
-                "Choose Gender", "", "Cancel", arrayOf("Male", "Female"), null, mContext,
-                AlertView.Style.ActionSheet
-            ) { _, position ->
-                binding.gender.text = if (position == 0) "Male" else "Female"
-            }.show()
-        }
+//        binding.genderRoot.setOnClickListener {
+//            AlertView(
+//                "Gender(Unchangeable)", "", "Cancel", arrayOf("Male", "Female"), null, mContext,
+//                AlertView.Style.ActionSheet
+//            ) { _, position ->
+//                binding.gender.text = if (position == 0) "Male" else "Female"
+//            }.show()
+//        }
         binding.save.setOnClickListener {
             LoadingDialog.showDialog("")
             val g = binding.gender.text.toString()
@@ -170,8 +170,10 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
                 R.mipmap.avatar_upload,
                 it.headImage ?: R.mipmap.avatar_upload
             )
+            vm.setAvatar(it.headImage)
             binding.name.setText(it.nickname)
             binding.birthday.text = it.age
+            binding.signature.setText(it.signature)
             if (!it.country.isNullOrBlank()) {
                 country = it.country
                 binding.country.text = CountryHelper.getCountryName(it.country)
@@ -182,9 +184,11 @@ class EditActivity : BaseActivity<ActivityEditBinding>() {
 
         vm.status_sgin.observe(this) {
             LoadingDialog.dismissDialog()
-            it?.also {
-                ImageHelper.load(binding.avatar, it)
-            }
+            ImageHelper.load(
+                binding.avatar,
+                R.mipmap.avatar_upload,
+                it ?: R.mipmap.avatar_upload
+            )
         }
         vm.result.observe(this) {
             LoadingDialog.dismissDialog()

+ 2 - 0
app/src/main/java/com/xuqinmin/android/app/ui/FeedbackActivity.kt

@@ -2,6 +2,7 @@ package com.xuqinmin.android.app.ui
 
 import android.os.Bundle
 import androidx.activity.viewModels
+import com.xuqinmin.android.app.BuildConfig
 import com.xuqinmin.android.app.R
 import com.xuqinmin.android.app.databinding.ActivityFeedbackBinding
 import com.xuqinmin.android.app.viewmodel.VMFeedback
@@ -29,6 +30,7 @@ class FeedbackActivity : BaseActivity<ActivityFeedbackBinding>() {
             LoadingDialog.showDialog("")
             vm.feedback(t, binding.titleEmail.text.toString())
         }
+        binding.name.text = "${BuildConfig.APP_Name} Team"
     }
 
     override fun initData() {

+ 2 - 1
app/src/main/java/com/xuqinmin/android/app/ui/FriendsActivity.kt

@@ -61,6 +61,7 @@ class FriendsActivity :
                 clipToOutline = true
                 outlineProvider = CircleProvider
             }
+            holder.setImage(R.id.avatar, item.headImage)
 
             holder.setBackgroundColor(
                 R.id.status, when (item.online) {
@@ -71,7 +72,7 @@ class FriendsActivity :
             )
             holder.setBackgroundResource(
                 R.id.btn,
-                if (item.status == 0) R.drawable.bg_cfd4e0_25 else R.drawable.bg_ff02a7_25
+                if (item.status == 0) R.drawable.bg_ff02a7_25 else R.drawable.bg_cfd4e0_25
             )
             holder.setText(
                 R.id.btn, if (viewModel.type == 0) "Unfollow" else {

+ 106 - 0
app/src/main/java/com/xuqinmin/android/app/ui/StartActivity.kt

@@ -0,0 +1,106 @@
+package com.xuqinmin.android.app.ui;
+
+import android.content.Intent
+import android.os.Bundle
+import android.telephony.TelephonyManager
+import androidx.activity.viewModels
+import com.xuqinmin.android.app.MyApplication
+import com.xuqinmin.android.app.R
+import com.xuqinmin.android.app.common.DEVICE_ID
+import com.xuqinmin.android.app.common.GOOGLE_ID
+import com.xuqinmin.android.app.common.MCC
+import com.xuqinmin.android.app.databinding.ActivityStartBinding
+import com.xuqinmin.android.app.model.DataLogin
+import com.xuqinmin.android.app.viewmodel.StartVM
+import com.xuqm.base.common.AppManager
+import com.xuqm.base.common.DeviceUuidFactory
+import com.xuqm.base.common.GsonImplHelp
+import com.xuqm.base.common.SHARE_LOGIN_OBJ
+import com.xuqm.base.common.SHARE_UESR_ID
+import com.xuqm.base.common.SHARE_UESR_TOKEN
+import com.xuqm.base.common.ToolsHelper
+import com.xuqm.base.dialog.loading.LoadingDialog
+import com.xuqm.base.extensions.getStringForPreferences
+import com.xuqm.base.extensions.putInt
+import com.xuqm.base.extensions.putString
+import com.xuqm.base.extensions.showMessage
+import com.xuqm.base.ui.BaseActivity
+
+class StartActivity : BaseActivity<ActivityStartBinding>() {
+
+    override fun getLayoutId(): Int = R.layout.activity_start
+
+
+    override fun fullscreen(): Boolean = true
+
+    private val vm: StartVM by viewModels()
+    override fun initView(savedInstanceState: Bundle?) {
+        super.initView(savedInstanceState)
+        AppManager.getInstance().logout()
+    }
+
+    override fun initData() {
+        super.initData()
+        val telManager = getSystemService(TELEPHONY_SERVICE) as TelephonyManager
+        val simOperator = telManager.simOperator
+        putString(DEVICE_ID, DeviceUuidFactory(mContext).deviceUuid.toString())
+//            putString(DEVICE_ID, DeviceUuidFactory(mContext).deviceUuid.toString()+"test111_"+ Random(2).toString())
+        putString(
+            MCC, if (telManager.simState == TelephonyManager.SIM_STATE_READY) simOperator.substring(
+                0, 3
+            ) else "-1"
+        )
+
+        vm.result.observe(this) {
+            it?.also {
+                MyApplication.modelInit = it
+            }
+            val stringForPreferences = getStringForPreferences(SHARE_LOGIN_OBJ)
+            if (stringForPreferences.isNotEmpty()) {
+                LoadingDialog.showDialog("")
+                val googleId = getStringForPreferences(GOOGLE_ID)
+                vm.thirdLogin(
+                    DataLogin(
+                        getStringForPreferences(DEVICE_ID),
+                        if (ToolsHelper.isNull(googleId)) getStringForPreferences(DEVICE_ID) else googleId,
+                        if (ToolsHelper.isNull(googleId)) 0 else 2
+                    )
+                )
+            } else {
+                startActivity(Intent(mContext, WelcomeActivity::class.java))
+            }
+        }
+        vm.resultLogin.observe(this) {
+            LoadingDialog.dismissDialog()
+            if (it == null) {
+                "Login failed, please try again later.".showMessage()
+            } else {
+                MyApplication.modelHideIn = it
+                putString(SHARE_LOGIN_OBJ, GsonImplHelp.get().toJson(it))
+                putString(SHARE_UESR_TOKEN, it.token)
+                putInt(SHARE_UESR_ID, it.userId)
+                if (it.isInfo == 0) {
+                    startActivity(
+                        Intent(
+                            mContext, RegisterActivity::class.java
+                        )
+                    )
+                } else {
+                    goToMain()
+                }
+            }
+        }
+        vm.init()
+
+    }
+
+    private fun goToMain() {
+        startActivity(
+            Intent(
+                mContext, MainActivity::class.java
+            )
+        )
+        mContext.finish()
+    }
+
+}

+ 40 - 0
app/src/main/java/com/xuqinmin/android/app/ui/fragment/MeFragment.kt

@@ -1,12 +1,16 @@
 package com.xuqinmin.android.app.ui.fragment
 
 import android.content.Intent
+import android.graphics.Color
+import android.widget.LinearLayout
 import androidx.fragment.app.viewModels
 import com.oikawaii.library.outline.CircleProvider
+import com.oikawaii.library.outline.FilletProvider
 import com.xuqinmin.android.app.MyApplication
 import com.xuqinmin.android.app.R
 import com.xuqinmin.android.app.databinding.FragmentMeBinding
 import com.xuqinmin.android.app.model.Balance
+import com.xuqinmin.android.app.model.Label
 import com.xuqinmin.android.app.ui.BlocklistActivity
 import com.xuqinmin.android.app.ui.CoinStoreActivity
 import com.xuqinmin.android.app.ui.EditActivity
@@ -14,9 +18,17 @@ import com.xuqinmin.android.app.ui.FeedbackActivity
 import com.xuqinmin.android.app.ui.FriendsActivity
 import com.xuqinmin.android.app.ui.SettingActivity
 import com.xuqinmin.android.app.viewmodel.VMMe
+import com.xuqm.base.adapter.CommonAdapter
+import com.xuqm.base.adapter.ViewHolder
+import com.xuqm.base.common.DimensHelper
 import com.xuqm.base.common.ImageHelper
 import com.xuqm.base.extensions.showMessage
 import com.xuqm.base.ui.BaseFragment
+import com.xuqm.sdhbwfu.core.extensions.gone
+import com.xuqm.sdhbwfu.core.extensions.linearLayoutManagerForHorizontal
+import com.xuqm.sdhbwfu.core.extensions.loge
+import com.xuqm.sdhbwfu.core.extensions.visibility
+import com.xuqm.sdhbwfu.core.extensions.visible
 import org.greenrobot.eventbus.EventBus
 import org.greenrobot.eventbus.Subscribe
 import org.greenrobot.eventbus.ThreadMode
@@ -24,6 +36,7 @@ import org.greenrobot.eventbus.ThreadMode
 class MeFragment : BaseFragment<FragmentMeBinding>() {
     override fun getLayoutId(): Int = R.layout.fragment_me
     private val vm: VMMe by viewModels()
+//    private var labels: List<Label> = MyApplication.modelHideIn.labels
 
     override fun initView() {
         super.initView()
@@ -34,10 +47,15 @@ class MeFragment : BaseFragment<FragmentMeBinding>() {
         if (MyApplication.modelHideIn == null) {
             "Failed to obtain user information".showMessage()
         }
+        binding.list.adapter = adapter
+        binding.list.linearLayoutManagerForHorizontal(mContext,0)
 
         binding.add.setOnClickListener {
             mContext.startActivity(Intent(mContext, EditActivity::class.java))
         }
+        adapter.setItemClickListener { _, _, _ ->
+            mContext.startActivity(Intent(mContext, EditActivity::class.java))
+        }
         binding.avatar.setOnClickListener {
             mContext.startActivity(Intent(mContext, EditActivity::class.java))
         }
@@ -82,6 +100,14 @@ class MeFragment : BaseFragment<FragmentMeBinding>() {
             MyApplication.modelHideIn.headImage
         )
         binding.name.text = MyApplication.modelHideIn.nickname
+        if (MyApplication.modelHideIn.labels.isNullOrEmpty()){
+            binding.list.gone()
+            binding.add.visible()
+        }else{
+            binding.list.visible()
+            binding.add.gone()
+            adapter.setmDatas(MyApplication.modelHideIn.labels)
+        }
     }
 
     @Subscribe(threadMode = ThreadMode.MAIN)
@@ -107,4 +133,18 @@ class MeFragment : BaseFragment<FragmentMeBinding>() {
         }
 
     }
+    val adapter =
+        object : CommonAdapter<Label>(R.layout.item_tag, MyApplication.modelHideIn.labels) {
+            override fun convert(holder: ViewHolder, item: Label, position: Int) {
+                holder.setImage(R.id.icon, item.icon)
+                holder.setText(R.id.name, item.name)
+                holder.setTextColor(R.id.name, Color.parseColor("#ffffffff"))
+                holder.getView<LinearLayout>(R.id.root).apply {
+                    clipToOutline = true
+                    outlineProvider =
+                        object : FilletProvider(DimensHelper.pxToDp(mContext, 30).toFloat()) {}
+                }
+                holder.setBackgroundColor(R.id.root, Color.parseColor(item.color))
+            }
+        }
 }

+ 88 - 0
app/src/main/java/com/xuqinmin/android/app/viewmodel/StartVM.kt

@@ -0,0 +1,88 @@
+package com.xuqinmin.android.app.viewmodel
+
+import androidx.lifecycle.LiveData
+import androidx.lifecycle.MutableLiveData
+import com.xuqinmin.android.app.MyApplication
+import com.xuqinmin.android.app.common.DEVICE_ID
+import com.xuqinmin.android.app.model.DataInit
+import com.xuqinmin.android.app.model.DataLogin
+import com.xuqinmin.android.app.model.ModelHideIn
+import com.xuqinmin.android.app.model.ModelInit
+import com.xuqinmin.android.app.repository.Service
+import com.xuqinmin.android.app.repository.ServiceCommon
+import com.xuqm.base.common.AppManager
+import com.xuqm.base.di.manager.HttpManager
+import com.xuqm.base.extensions.getStringForPreferences
+import com.xuqm.base.extensions.loge
+import com.xuqm.base.extensions.showMessage
+import com.xuqm.sdhbwfu.core.extensions.ioMain
+import com.xuqm.sdhbwfu.core.extensions.subscribeBy
+import com.xuqm.sdhbwfu.core.viewModel.BaseViewModel
+import io.reactivex.android.schedulers.AndroidSchedulers
+import io.reactivex.schedulers.Schedulers
+
+class StartVM : BaseViewModel() {
+
+    private val _result = MutableLiveData<ModelInit>()
+    val result: LiveData<ModelInit> = _result
+
+    fun init() {
+        HttpManager.getApi(Service::class.java)
+            .init(DataInit(AppManager.getInstance().activity.getStringForPreferences(DEVICE_ID)))
+            .ioMain().subscribeBy({
+                "-----------------".loge()
+                _result.postValue(it)
+                it?.gifts.also { ite ->
+                    ite?.let {
+                        this.getGifts(ite)
+                    }
+                }
+                it?.country.also { ite ->
+                    ite?.let {
+                        this.getCountry(ite)
+                    }
+                }
+            }, {
+                _result.postValue(null)
+                showMessage(it)
+                "****************".loge()
+            }).adds()
+    }
+
+    private fun getGifts(url: String) {
+        HttpManager.getApi(MyApplication.appComponent1, ServiceCommon::class.java).getGifts(url)
+            .subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe({
+                it.loge()
+                MyApplication.giftModelList.clear()
+                MyApplication.giftModelList.addAll(it)
+            }, {
+                it.message?.loge()
+            }).adds()
+    }
+
+    private fun getCountry(url: String) {
+        HttpManager.getApi(MyApplication.appComponent1, ServiceCommon::class.java).getCountry(url)
+            .subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe({
+                it.loge()
+                MyApplication.country.clear()
+                it.Regions?.also { ite ->
+                    MyApplication.country.addAll(ite)
+                }
+            }, {
+                it.message?.loge()
+            }).adds()
+    }
+
+
+    private val _resultLogin = MutableLiveData<ModelHideIn>()
+    val resultLogin: LiveData<ModelHideIn> = _resultLogin
+
+    fun thirdLogin(data: DataLogin) {
+        data.loge()
+        HttpManager.getApi(Service::class.java).thirdLogin(data).ioMain().subscribeBy({
+            _resultLogin.postValue(it)
+        }, {
+            _resultLogin.postValue(null)
+        }).adds()
+    }
+}

+ 3 - 0
app/src/main/java/com/xuqinmin/android/app/viewmodel/VMEdit.kt

@@ -37,6 +37,9 @@ class VMEdit : BaseViewModel() {
                 _status_sgin.postValue(null)
             }).adds()
     }
+    fun setAvatar(url: String) {
+        _status_sgin.postValue(url)
+    }
 
     //签字图片上传
     fun signUpload(contentType: String, url: String, file: File) {

+ 1 - 1
app/src/main/java/com/xuqinmin/android/app/viewmodel/VMSuggestAnchor.kt

@@ -40,7 +40,7 @@ class VMSuggestAnchor : BaseListViewModel<HistoryModel>() {
 
     fun suggestAnchor(userId: Int) {
         add(HttpManager.getApi(Service::class.java)
-            .suggestAnchor(SuggestAnchorData(userId, 1, 9))
+            .suggestAnchor(SuggestAnchorData(null, 0, 9))
             .ioMain()
             .subscribeBy(
                 {

+ 11 - 11
app/src/main/res/layout/activity_chat.xml

@@ -73,7 +73,7 @@
             android:id="@+id/empty"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:visibility="visible"
+            android:visibility="gone"
             app:layout_constraintTop_toBottomOf="@+id/top">
 
             <ImageView
@@ -148,11 +148,11 @@
         <androidx.constraintlayout.widget.ConstraintLayout
             android:id="@+id/chat_top"
             android:layout_width="345dp"
-            android:layout_height="145dp"
+            android:layout_height="wrap_content"
             android:layout_marginTop="-14dp"
             android:background="@drawable/bg_tag_match"
             android:padding="15dp"
-            android:visibility="gone"
+            android:visibility="visible"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toBottomOf="@+id/top">
@@ -250,11 +250,13 @@
             android:background="@color/white"
             app:layout_constraintBottom_toBottomOf="parent" />
 
-        <androidx.constraintlayout.widget.ConstraintLayout
+        <LinearLayout
             android:id="@+id/toolbar"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:minHeight="80dp"
+            android:gravity="center_vertical"
+            android:paddingHorizontal="15dp"
             android:background="@color/white"
             android:paddingVertical="16dp"
             app:layout_constraintBottom_toTopOf="@+id/view">
@@ -262,17 +264,15 @@
             <ImageView
                 android:id="@+id/send_pic"
                 android:layout_width="44dp"
+                android:layout_marginEnd="10dp"
                 android:layout_height="44dp"
-                android:src="@mipmap/send_pic"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintEnd_toStartOf="@+id/send_gift"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
+                android:src="@mipmap/send_pic" />
 
             <ImageView
                 android:id="@+id/send_gift"
                 android:layout_width="44dp"
                 android:layout_height="44dp"
+                android:layout_marginEnd="10dp"
                 android:src="@mipmap/send_gift"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintEnd_toStartOf="@+id/view_send"
@@ -281,7 +281,7 @@
 
             <LinearLayout
                 android:id="@+id/view_send"
-                android:layout_width="237dp"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:background="@drawable/bg_cfd4e0_20"
                 android:gravity="center_vertical|end"
@@ -316,7 +316,7 @@
                     app:layout_constraintStart_toEndOf="@+id/send_pic"
                     app:layout_constraintTop_toTopOf="parent" />
             </LinearLayout>
-        </androidx.constraintlayout.widget.ConstraintLayout>
+        </LinearLayout>
 
         <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
             android:id="@+id/baseRefreshLayout"

+ 1 - 1
app/src/main/res/layout/activity_edit.xml

@@ -155,7 +155,7 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_centerVertical="true"
-                        android:text="Gender"
+                        android:text="Gender(Unchangeable)"
                         android:textColor="#ff222222"
                         android:textSize="18sp"
                         android:textStyle="bold" />

+ 40 - 0
app/src/main/res/layout/activity_start.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout>
+
+    <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:id="@+id/main"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        tools:context=".ui.StartActivity">
+
+        <ImageView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:scaleType="centerCrop"
+            android:src="@mipmap/start_bg"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <ImageView
+            android:id="@+id/bo"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:scaleType="centerCrop"
+            android:src="@mipmap/start_bg2"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintStart_toStartOf="parent" />
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="20dp"
+            android:scaleType="center"
+            android:src="@mipmap/icon"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/bo" />
+
+    </androidx.constraintlayout.widget.ConstraintLayout>
+</layout>

+ 17 - 15
app/src/main/res/layout/dialog_report.xml

@@ -43,6 +43,7 @@
                     android:layout_height="wrap_content"
                     android:button="@null"
                     android:drawableEnd="@drawable/bg_radio"
+                    android:paddingVertical="14dp"
                     android:gravity="center_vertical"
                     android:orientation="horizontal"
                     android:text="Contains sexual content"
@@ -52,13 +53,13 @@
                 <include
                     layout="@layout/view_line"
                     android:layout_width="match_parent"
-                    android:layout_height="1dp"
-                    android:layout_marginVertical="14dp" />
+                    android:layout_height="1dp" />
 
                 <RadioButton
                     android:id="@+id/links"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:paddingVertical="14dp"
                     android:button="@null"
                     android:drawableEnd="@drawable/bg_radio"
                     android:gravity="center_vertical"
@@ -70,8 +71,7 @@
                 <include
                     layout="@layout/view_line"
                     android:layout_width="match_parent"
-                    android:layout_height="1dp"
-                    android:layout_marginVertical="14dp" />
+                    android:layout_height="1dp" />
 
                 <RadioButton
                     android:id="@+id/not"
@@ -79,6 +79,7 @@
                     android:layout_height="wrap_content"
                     android:button="@null"
                     android:drawableEnd="@drawable/bg_radio"
+                    android:paddingVertical="14dp"
                     android:gravity="center_vertical"
                     android:orientation="horizontal"
                     android:text="Not real information"
@@ -88,14 +89,14 @@
                 <include
                     layout="@layout/view_line"
                     android:layout_width="match_parent"
-                    android:layout_height="1dp"
-                    android:layout_marginVertical="14dp" />
+                    android:layout_height="1dp" />
 
                 <RadioButton
                     android:id="@+id/behavior"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:button="@null"
+                    android:paddingVertical="14dp"
                     android:drawableEnd="@drawable/bg_radio"
                     android:gravity="center_vertical"
                     android:orientation="horizontal"
@@ -106,13 +107,13 @@
                 <include
                     layout="@layout/view_line"
                     android:layout_width="match_parent"
-                    android:layout_height="1dp"
-                    android:layout_marginVertical="14dp" />
+                    android:layout_height="1dp" />
 
                 <RadioButton
                     android:id="@+id/threat"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:paddingVertical="14dp"
                     android:button="@null"
                     android:drawableEnd="@drawable/bg_radio"
                     android:gravity="center_vertical"
@@ -124,8 +125,7 @@
                 <include
                     layout="@layout/view_line"
                     android:layout_width="match_parent"
-                    android:layout_height="1dp"
-                    android:layout_marginVertical="14dp" />
+                    android:layout_height="1dp" />
 
                 <RadioButton
                     android:id="@+id/other"
@@ -135,6 +135,7 @@
                     android:drawableEnd="@drawable/bg_radio"
                     android:gravity="center_vertical"
                     android:orientation="horizontal"
+                    android:paddingVertical="14dp"
                     android:text="Other violations"
                     android:textColor="#222222"
                     android:textSize="14sp" />
@@ -142,14 +143,12 @@
                 <include
                     layout="@layout/view_line"
                     android:layout_width="match_parent"
-                    android:layout_height="1dp"
-                    android:layout_marginVertical="14dp" />
+                    android:layout_height="1dp" />
             </RadioGroup>
 
             <androidx.constraintlayout.widget.ConstraintLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="5dp"
                 app:layout_constraintStart_toStartOf="parent"
                 app:layout_constraintTop_toBottomOf="@+id/group">
 
@@ -159,6 +158,7 @@
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
                     android:text="Cancle"
+                    android:paddingTop="20dp"
                     android:textColor="#05BCFF"
                     android:textSize="18sp"
                     android:textStyle="bold"
@@ -171,6 +171,7 @@
                     android:id="@+id/line"
                     android:layout_width="1dp"
                     android:layout_height="32dp"
+                    android:layout_marginTop="20dp"
                     android:layout_marginHorizontal="50dp"
                     android:background="#F8F8F8"
                     app:layout_constraintBottom_toBottomOf="parent"
@@ -180,8 +181,9 @@
 
                 <TextView
                     android:id="@+id/submit"
-                    android:layout_width="68dp"
-                    android:layout_height="22dp"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:paddingTop="20dp"
                     android:text="Submit"
                     android:textColor="#ffff02a7"
                     android:textSize="18sp"

+ 1 - 0
app/src/main/res/layout/dialog_tags.xml

@@ -28,6 +28,7 @@
             <androidx.recyclerview.widget.RecyclerView
                 android:id="@+id/list"
                 android:layout_width="match_parent"
+                android:layout_marginHorizontal="15dp"
                 android:layout_height="240dp"
                 android:layout_marginTop="20dp"
                 app:layout_constraintTop_toBottomOf="@+id/title" />

+ 6 - 90
app/src/main/res/layout/fragment_me.xml

@@ -63,99 +63,15 @@
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toBottomOf="@+id/name" />
-
-        <LinearLayout
-            android:id="@+id/tags"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/list"
+            android:layout_marginHorizontal="20dp"
             android:layout_marginTop="10dp"
-            android:orientation="horizontal"
-            android:visibility="gone"
+            android:layout_width="match_parent"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/name">
-
-            <LinearLayout
-                android:id="@+id/tage_1"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:background="@drawable/bg_tag_match_1"
-                android:gravity="center"
-                android:orientation="horizontal"
-                android:paddingVertical="6.5dp"
-                android:paddingStart="5dp"
-                android:paddingEnd="15dp">
-
-                <ImageView
-                    android:layout_width="20dp"
-                    android:layout_height="20dp"
-                    android:src="@mipmap/icon_bg_species" />
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="5dp"
-                    android:text="Reading"
-                    android:textColor="@color/white"
-                    android:textSize="14sp" />
-
-            </LinearLayout>
-
-            <LinearLayout
-                android:id="@+id/tage_2"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="10dp"
-                android:background="@drawable/bg_tag_match_2"
-                android:gravity="center"
-                android:orientation="horizontal"
-                android:paddingVertical="6.5dp"
-                android:paddingStart="5dp"
-                android:paddingEnd="15dp">
-
-                <ImageView
-                    android:layout_width="20dp"
-                    android:layout_height="20dp"
-                    android:src="@mipmap/icon_bg_species" />
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="5dp"
-                    android:text="Pet"
-                    android:textColor="@color/white"
-                    android:textSize="14sp" />
-
-            </LinearLayout>
-
-            <LinearLayout
-                android:id="@+id/tag_3"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="10dp"
-                android:layout_marginEnd="15dp"
-                android:background="@drawable/bg_tag_match_3"
-                android:gravity="center"
-                android:orientation="horizontal"
-                android:paddingVertical="6.5dp"
-                android:paddingStart="5dp"
-                android:paddingEnd="15dp">
-
-                <ImageView
-                    android:layout_width="20dp"
-                    android:layout_height="20dp"
-                    android:src="@mipmap/icon_bg_species" />
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="5dp"
-                    android:text="Movie"
-                    android:textColor="@color/white"
-                    android:textSize="14sp" />
-
-            </LinearLayout>
-        </LinearLayout>
+            app:layout_constraintTop_toBottomOf="@+id/name"
+            android:layout_height="wrap_content"/>
 
         <androidx.constraintlayout.widget.ConstraintLayout
             android:id="@+id/coins"

+ 2 - 0
app/src/main/res/layout/item_friends.xml

@@ -3,6 +3,8 @@
 
     <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
+        android:layout_marginBottom="10dp"
+        android:layout_marginHorizontal="15dp"
         android:layout_height="80dp"
         android:background="@drawable/bg_discover_tab">
 

+ 1 - 0
app/src/main/res/layout/item_suggest.xml

@@ -10,6 +10,7 @@
             android:layout_width="70dp"
             android:layout_height="70dp"
             android:src="@mipmap/temp"
+            android:scaleType="centerCrop"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toTopOf="parent" />

+ 4 - 4
app/src/main/res/layout/item_tag.xml

@@ -8,21 +8,21 @@
     android:orientation="horizontal"
     android:layout_marginEnd="10dp"
     android:layout_marginBottom="5dp"
-    android:paddingStart="10dp"
+    android:paddingStart="5dp"
     android:paddingVertical="5dp"
     android:paddingEnd="20dp">
 
     <ImageView
         android:id="@+id/icon"
-        android:layout_width="24dp"
-        android:layout_height="24dp"
+        android:layout_width="20dp"
+        android:layout_height="20dp"
         android:src="@mipmap/icon_tag_sports" />
 
     <TextView
         android:id="@+id/name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="10dp"
+        android:layout_marginStart="5dp"
         android:text="Sports"
         android:textColor="#999999"
         android:textSize="14sp" />

BIN
app/src/main/res/mipmap-hdpi/icon.png


BIN
app/src/main/res/mipmap-hdpi/start_bg.png


BIN
app/src/main/res/mipmap-hdpi/start_bg2.png


BIN
app/src/main/res/mipmap-mdpi/icon.png


BIN
app/src/main/res/mipmap-mdpi/start_bg.png


BIN
app/src/main/res/mipmap-mdpi/start_bg2.png


BIN
app/src/main/res/mipmap-xhdpi/icon.png


BIN
app/src/main/res/mipmap-xhdpi/start_bg.png


BIN
app/src/main/res/mipmap-xhdpi/start_bg2.png


BIN
app/src/main/res/mipmap-xxhdpi/icon.png


BIN
app/src/main/res/mipmap-xxhdpi/start_bg.png


BIN
app/src/main/res/mipmap-xxhdpi/start_bg2.png


BIN
app/src/main/res/mipmap-xxxhdpi/icon.png


BIN
app/src/main/res/mipmap-xxxhdpi/start_bg.png


BIN
app/src/main/res/mipmap-xxxhdpi/start_bg2.png


+ 2 - 2
config.gradle

@@ -25,9 +25,9 @@ ext {
     }
 
     androidx = [
-            appcompat               : 'androidx.appcompat:appcompat:1.1.0',
+            appcompat               : 'androidx.appcompat:appcompat:1.3.0',
             annotation              : 'androidx.annotation:annotation:1.1.0',
-            constraintlayout        : 'androidx.constraintlayout:constraintlayout:1.1.3',
+            constraintlayout        : 'androidx.constraintlayout:constraintlayout:2.0.4',
             recyclerview            : 'androidx.recyclerview:recyclerview:1.1.0',
             viewpager2              : 'androidx.viewpager2:viewpager2:1.0.0',
             material                : 'com.google.android.material:material:1.1.0',

+ 1 - 0
settings.gradle

@@ -1,3 +1,4 @@
 include ':app'
 include ':core'
+include ':base'
 rootProject.name = "AndroidPlatform"