加入输入框布局+1
This commit is contained in:
parent
e120975f26
commit
2026845237
|
|
@ -3,6 +3,7 @@ package com.remax.visualnovel.ui.Chat
|
|||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.remax.visualnovel.R
|
||||
import com.remax.visualnovel.utils.spannablex.utils.dp
|
||||
import com.remax.visualnovel.widget.uitoken.view.UITokenEditView
|
||||
|
||||
|
||||
|
|
@ -12,7 +13,11 @@ class ChatEditView @JvmOverloads constructor(context: Context, attrs: AttributeS
|
|||
|
||||
init {
|
||||
setBackgroundResource(R.color.transparent)
|
||||
|
||||
setPadding(0, 12.dp, 0, 12.dp)
|
||||
}
|
||||
|
||||
|
||||
fun clearText() {
|
||||
setText("")
|
||||
}
|
||||
}
|
||||
|
|
@ -36,6 +36,10 @@ class InputPanel @JvmOverloads constructor(context: Context, attrs: AttributeSet
|
|||
ivChatModeSwitcher.setOnClickListener {
|
||||
switchMode(if (mMode == MODE_TEXT) MODE_VOICE else MODE_TEXT)
|
||||
}
|
||||
|
||||
ivChatSend.setOnClickListener {
|
||||
chatEditView.clearText()
|
||||
}
|
||||
}
|
||||
|
||||
switchMode(mMode)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import android.content.Context
|
|||
import android.util.AttributeSet
|
||||
import com.dylanc.viewbinding.nonreflection.inflate
|
||||
import android.view.View
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.view.animation.AccelerateInterpolator
|
||||
import android.view.animation.OvershootInterpolator
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.ImageView
|
||||
|
|
@ -131,7 +131,7 @@ class PopMenuIconView @JvmOverloads constructor(
|
|||
|
||||
AnimatorSet().apply {
|
||||
duration = 300
|
||||
interpolator = DecelerateInterpolator()
|
||||
interpolator = AccelerateInterpolator()
|
||||
playTogether(valueYAnim)
|
||||
addListener(object: Animator.AnimatorListener{
|
||||
override fun onAnimationCancel(animation: Animator) {
|
||||
|
|
|
|||
|
|
@ -44,11 +44,12 @@
|
|||
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||
android:id="@+id/iv_chat_mode_switcher"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/chat_voice_b"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:paddingHorizontal="@dimen/dp_12"
|
||||
android:padding="@dimen/dp_12"
|
||||
/>
|
||||
|
||||
|
|
@ -72,6 +73,9 @@
|
|||
android:id="@+id/chat_edit_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:clickable="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_chat_mode_switcher"
|
||||
|
|
@ -81,9 +85,9 @@
|
|||
android:hint="@string/type_msg_hint"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="@color/white"
|
||||
android:maxLines="8"
|
||||
/>
|
||||
|
||||
|
||||
</com.remax.visualnovel.widget.uitoken.view.UITokenConstraintLayout>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue