pref: 优化键盘高度检测

This commit is contained in:
HuanCheng65 2023-01-07 18:36:26 +08:00
parent 562364a7a1
commit 41f033eec6
No known key found for this signature in database
GPG Key ID: E9031EF91A805148
9 changed files with 261 additions and 228 deletions

View File

@ -227,7 +227,7 @@ dependencies {
implementation "com.squareup.retrofit2:converter-wire:$retrofit_version"
implementation 'com.google.code.gson:gson:2.10'
implementation "cn.dreamtobe.kpswitch:library:1.6.2"
implementation 'com.github.DSAppTeam:PanelSwitchHelper:v1.5.2'
implementation "org.litepal.android:kotlin:3.0.0"
implementation 'cn.jzvd:jiaozivideoplayer:7.7.2.3300'
implementation "com.jrummyapps:colorpicker:2.1.7"

View File

@ -301,6 +301,7 @@
<activity
android:name=".activities.ReplyActivity"
android:configChanges="screenSize|screenLayout|orientation|smallestScreenSize|keyboardHidden"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"
android:theme="@style/AppTheme.Floating" />
<activity
android:name=".activities.BlockListActivity"

View File

@ -13,9 +13,10 @@ import android.widget.ImageView
import android.widget.LinearLayout
import androidx.recyclerview.widget.RecyclerView
import butterknife.BindView
import cn.dreamtobe.kpswitch.util.KeyboardUtil
import com.alibaba.android.vlayout.DelegateAdapter
import com.alibaba.android.vlayout.VirtualLayoutManager
import com.effective.android.panel.utils.hideSoftInput
import com.effective.android.panel.utils.showSoftInput
import com.google.android.material.tabs.TabLayout
import com.google.android.material.textfield.TextInputLayout
import com.huanchengfly.tieba.post.R
@ -118,7 +119,7 @@ class NewSearchActivity : BaseActivity(), TabLayout.OnTabSelectedListener {
editText.setOnEditorActionListener { v, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
keyword = v.text.toString()
if (!keyword.isNullOrBlank()) KeyboardUtil.hideKeyboard(v)
if (!keyword.isNullOrBlank()) hideSoftInput()
return@setOnEditorActionListener true
}
return@setOnEditorActionListener false
@ -129,7 +130,7 @@ class NewSearchActivity : BaseActivity(), TabLayout.OnTabSelectedListener {
keyword = intent.getStringExtra(EXTRA_KEYWORD)
editText.post {
if (keyword.isNullOrBlank()) {
KeyboardUtil.showKeyboard(editText)
editText.showSoftInput()
}
}
}
@ -189,7 +190,7 @@ class NewSearchActivity : BaseActivity(), TabLayout.OnTabSelectedListener {
if (state == State.SEARCH) {
state = State.INPUT
invalidateState()
KeyboardUtil.showKeyboard(editText)
editText.showSoftInput()
} else {
finish()
}
@ -238,7 +239,7 @@ class NewSearchActivity : BaseActivity(), TabLayout.OnTabSelectedListener {
editText.apply {
setText(item.content)
clearFocus()
KeyboardUtil.hideKeyboard(this)
hideSoftInput()
}
keyword = item.content
}

View File

@ -19,7 +19,6 @@ import android.view.ViewGroup
import android.webkit.WebView
import android.widget.FrameLayout
import android.widget.GridView
import android.widget.RelativeLayout
import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher
import androidx.appcompat.widget.Toolbar
@ -28,10 +27,9 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager.widget.ViewPager
import butterknife.BindView
import cn.dreamtobe.kpswitch.util.KPSwitchConflictUtil
import cn.dreamtobe.kpswitch.util.KPSwitchConflictUtil.SubPanelAndTrigger
import cn.dreamtobe.kpswitch.util.KeyboardUtil
import cn.dreamtobe.kpswitch.widget.KPSwitchFSPanelFrameLayout
import com.effective.android.panel.PanelSwitchHelper
import com.effective.android.panel.utils.hideSoftInput
import com.effective.android.panel.view.panel.PanelView
import com.google.android.material.tabs.TabLayout
import com.huanchengfly.tieba.post.R
import com.huanchengfly.tieba.post.adapters.InsertPhotoAdapter
@ -49,24 +47,27 @@ import com.huanchengfly.tieba.post.models.ReplyInfoBean
import com.huanchengfly.tieba.post.models.database.Draft
import com.huanchengfly.tieba.post.toastShort
import com.huanchengfly.tieba.post.ui.widgets.edittext.widget.UndoableEditText
import com.huanchengfly.tieba.post.ui.widgets.theme.TintConstraintLayout
import com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
import com.huanchengfly.tieba.post.ui.widgets.theme.TintLinearLayout
import com.huanchengfly.tieba.post.utils.*
import org.litepal.LitePal.where
class ReplyActivity : BaseActivity(), View.OnClickListener,
InsertPhotoAdapter.PickMediasLauncherProvider {
@BindView(R.id.activity_reply_edit_text)
private var mHelper: PanelSwitchHelper? = null
@BindView(R.id.edit_text)
lateinit var editText: UndoableEditText
@BindView(R.id.activity_reply_panel_root)
lateinit var panelFrameLayout: KPSwitchFSPanelFrameLayout
@BindView(R.id.activity_reply_layout)
lateinit var rootLayout: TintLinearLayout
@BindView(R.id.activity_reply_emoticon)
lateinit var emoticonView: RelativeLayout
lateinit var emoticonView: PanelView
@BindView(R.id.activity_reply_insert_photo)
lateinit var insertImageView: FrameLayout
lateinit var insertImageView: PanelView
@BindView(R.id.activity_reply_edit_emoticon)
lateinit var emoticonBtn: TintImageView
@ -106,6 +107,52 @@ class ReplyActivity : BaseActivity(), View.OnClickListener,
insertPhotoAdapter.setFileList(photoInfoBeans)
}
override fun onStart() {
super.onStart()
if (mHelper == null) {
mHelper = PanelSwitchHelper.Builder(this)
.logTrack(true)
.build(false)
if (appPreferences.postOrReplyWarning) {
showDialog {
setTitle(R.string.title_dialog_reply_warning)
setMessage(R.string.message_dialog_reply_warning)
setNegativeButton(R.string.btn_cancel_reply) { _, _ ->
finish()
}
setNeutralButton(R.string.btn_continue_reply, null)
setPositiveButton(R.string.button_official_client_reply) { _, _ ->
val intent = Intent(ACTION_VIEW).setData(getDispatchUri())
val resolveInfos =
packageManager.queryIntentActivities(
intent,
PackageManager.MATCH_DEFAULT_ONLY
)
.filter { it.resolvePackageName != packageName }
try {
if (resolveInfos.isNotEmpty()) {
startActivity(intent)
} else {
toastShort(R.string.toast_official_client_not_install)
}
} catch (e: ActivityNotFoundException) {
toastShort(R.string.toast_official_client_not_install)
}
finish()
}
}
}
}
}
override fun onBackPressed() {
if (mHelper?.hookSystemBackByPanelSwitcher() == true) {
return
}
super.onBackPressed()
}
override fun getPickMediasLauncher(): ActivityResultLauncher<PickMediasRequest> =
pickMediasLauncher
@ -115,10 +162,9 @@ class ReplyActivity : BaseActivity(), View.OnClickListener,
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (ThemeUtil.THEME_TRANSLUCENT == ThemeUtil.getTheme()) {
val constraintLayout = findViewById<TintConstraintLayout>(R.id.activity_reply_layout)
constraintLayout.setBackgroundTintResId(0)
ThemeUtil.setTranslucentBackground(constraintLayout)
if (ThemeUtil.isTranslucentTheme()) {
rootLayout.setBackgroundTintResId(0)
ThemeUtil.setTranslucentBackground(rootLayout)
}
Util.setStatusBarTransparent(this)
val decor = window.decorView as ViewGroup
@ -129,30 +175,6 @@ class ReplyActivity : BaseActivity(), View.OnClickListener,
window.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
initData()
initView()
if (appPreferences.postOrReplyWarning) showDialog {
setTitle(R.string.title_dialog_reply_warning)
setMessage(R.string.message_dialog_reply_warning)
setNegativeButton(R.string.btn_cancel_reply) { _, _ ->
finish()
}
setNeutralButton(R.string.btn_continue_reply, null)
setPositiveButton(R.string.button_official_client_reply) { _, _ ->
val intent = Intent(ACTION_VIEW).setData(getDispatchUri())
val resolveInfos =
packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY)
.filter { it.resolvePackageName != packageName }
try {
if (resolveInfos.isNotEmpty()) {
startActivity(intent)
} else {
toastShort(R.string.toast_official_client_not_install)
}
} catch (e: ActivityNotFoundException) {
toastShort(R.string.toast_official_client_not_install)
}
finish()
}
}
}
private fun getDispatchUri(): Uri? {
@ -184,7 +206,6 @@ class ReplyActivity : BaseActivity(), View.OnClickListener,
override fun onPause() {
super.onPause()
panelFrameLayout.recordKeyboardStatus(window)
if (replyInfoBean != null && !replySuccess) {
Draft(
replyInfoBean!!.hash(),
@ -282,8 +303,9 @@ class ReplyActivity : BaseActivity(), View.OnClickListener,
}
})
mItemTouchHelper.attachToRecyclerView(insertView)
findViewById<View>(R.id.activity_reply_root).setOnClickListener(this)
findViewById<View>(R.id.activity_reply_layout).setOnClickListener(this)
findViewById<View>(R.id.content_view).setOnClickListener(this)
findViewById<View>(R.id.panel_container).setOnClickListener(this)
rootLayout.setOnClickListener(this)
toolbar.setNavigationIcon(R.drawable.ic_reply_toolbar_round_close)
if (replyInfoBean!!.pid == null && replyInfoBean!!.floorNum == null) {
insertImageBtn.visibility = View.VISIBLE
@ -452,13 +474,6 @@ class ReplyActivity : BaseActivity(), View.OnClickListener,
if (sendItem != null) sendItem!!.isEnabled = canSend()
}
})
KeyboardUtil.attach(this, panelFrameLayout)
KPSwitchConflictUtil.attach(
panelFrameLayout,
editText,
SubPanelAndTrigger(emoticonView, emoticonBtn),
SubPanelAndTrigger(insertImageView, insertImageBtn)
)
EmoticonUtil.GlobalOnItemClickManagerUtil.attachToEditText(editText)
}
@ -576,8 +591,8 @@ class ReplyActivity : BaseActivity(), View.OnClickListener,
finish()
}.doIfFailure {
if (loadingDialog != null) loadingDialog!!.cancel()
KeyboardUtil.hideKeyboard(panelFrameLayout)
showErrorSnackBar(panelFrameLayout, it)
hideSoftInput()
showErrorSnackBar(rootLayout, it)
}
}
}
@ -600,7 +615,7 @@ class ReplyActivity : BaseActivity(), View.OnClickListener,
override fun onClick(v: View) {
when (v.id) {
R.id.activity_reply_root -> finish()
R.id.content_view -> finish()
R.id.activity_reply_edit_undo -> editText.undo()
R.id.activity_reply_edit_redo -> editText.redo()
R.id.activity_reply_edit_clear -> editText.setText(null)

View File

@ -14,7 +14,8 @@ import androidx.appcompat.widget.ListPopupWindow
import androidx.core.widget.TextViewCompat
import androidx.recyclerview.widget.RecyclerView
import butterknife.BindView
import cn.dreamtobe.kpswitch.util.KeyboardUtil
import com.effective.android.panel.utils.hideSoftInput
import com.effective.android.panel.utils.showSoftInput
import com.google.android.material.textfield.TextInputLayout
import com.huanchengfly.tieba.post.R
import com.huanchengfly.tieba.post.adapters.SearchPostAdapter
@ -124,7 +125,7 @@ class SearchPostActivity : BaseActivity() {
editText.setText(keyword)
}
editText.post {
KeyboardUtil.showKeyboard(editText)
editText.showSoftInput()
}
}
@ -167,7 +168,7 @@ class SearchPostActivity : BaseActivity() {
override fun onBackPressed() {
if (state == State.SEARCH) {
state = State.INPUT
KeyboardUtil.showKeyboard(editText)
editText.showSoftInput()
} else {
finish()
}
@ -336,7 +337,7 @@ class SearchPostActivity : BaseActivity() {
editText.apply {
setText(item.content)
clearFocus()
KeyboardUtil.hideKeyboard(this)
hideSoftInput()
}
keyword = item.content
}

View File

@ -14,182 +14,164 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintConstraintLayout
android:id="@+id/activity_reply_layout"
<com.effective.android.panel.view.PanelSwitchLayout
android:id="@+id/panel_switch_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/bg_round"
app:backgroundTint="@color/default_color_background">
android:layout_height="match_parent"
android:orientation="vertical"
app:animationSpeed="standard">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
<com.effective.android.panel.view.content.FrameContentContainer
android:id="@+id/content_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:stateListAnimator="@animator/appbar_elevation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
android:layout_height="match_parent"
android:orientation="vertical"
app:edit_view="@id/edit_text">
<com.huanchengfly.tieba.post.ui.widgets.theme.TintToolbar
android:id="@+id/toolbar"
<com.huanchengfly.tieba.post.ui.widgets.theme.TintLinearLayout
android:id="@+id/activity_reply_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:activeItemTint="@color/default_color_primary"
app:itemTint="@color/default_color_text"
app:popupTheme="?attr/actionOverflowMenuStyle"
app:secondaryItemTint="@color/default_color_text_secondary"
app:title="@string/title_reply"
app:toolbarBackgroundTint="@color/transparent" />
</com.google.android.material.appbar.AppBarLayout>
android:layout_gravity="bottom"
android:background="@drawable/bg_round"
android:orientation="vertical"
app:backgroundTint="@color/default_color_background">
<com.huanchengfly.tieba.post.ui.widgets.theme.TintUndoableEditText
android:id="@+id/activity_reply_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:gravity="top|start"
android:hint="@string/tip_reply"
android:importantForAutofill="no"
android:inputType="textMultiLine|textImeMultiLine"
android:lines="5"
android:padding="12dp"
android:textSize="14sp"
app:hintTextColor="@color/default_color_text_secondary"
app:layout_constraintBottom_toTopOf="@+id/activity_reply_btn_bar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appbar"
app:textColor="@color/default_color_text"
tools:ignore="UnusedAttribute">
<requestFocus />
</com.huanchengfly.tieba.post.ui.widgets.theme.TintUndoableEditText>
<LinearLayout
android:id="@+id/activity_reply_btn_bar"
style="@style/Widget.AppCompat.ButtonBar"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:padding="8dp"
android:weightSum="8"
app:layout_constraintBottom_toTopOf="@+id/activity_reply_panel_root"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/activity_reply_edit_text"
app:layout_constraintVertical_bias="1.0"
app:layout_constraintVertical_chainStyle="packed">
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_emoticon"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:padding="4dp"
app:srcCompat="@drawable/ic_insert_emoticon"
app:tint="@color/text_color_selector" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_insert_photo"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:padding="4dp"
app:srcCompat="@drawable/ic_outline_insert_photo"
app:tint="@color/text_color_selector" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_undo"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="false"
android:padding="4dp"
android:src="@drawable/ic_outline_undo"
app:tint="@color/text_color_selector" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_redo"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="false"
android:padding="4dp"
android:src="@drawable/ic_outline_redo"
app:tint="@color/text_color_selector" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_clear"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="false"
android:padding="4dp"
android:src="@drawable/ic_outline_delete_forever"
app:tint="@color/text_color_selector" />
</LinearLayout>
<cn.dreamtobe.kpswitch.widget.KPSwitchFSPanelFrameLayout
android:id="@+id/activity_reply_panel_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/activity_reply_btn_bar"
app:layout_constraintVertical_bias="1.0">
<RelativeLayout
android:id="@+id/activity_reply_emoticon"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.viewpager.widget.ViewPager
android:id="@+id/activity_reply_emoticon_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/activity_reply_emoticon_tab"
android:layout_alignParentTop="true" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintTabLayout
android:id="@+id/activity_reply_emoticon_tab"
style="@style/Widget.TabLayout"
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
android:background="@color/transparent"
android:stateListAnimator="@animator/appbar_elevation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</RelativeLayout>
<com.huanchengfly.tieba.post.ui.widgets.theme.TintToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:activeItemTint="@color/default_color_primary"
app:itemTint="@color/default_color_text"
app:popupTheme="?attr/actionOverflowMenuStyle"
app:secondaryItemTint="@color/default_color_text_secondary"
app:title="@string/title_reply"
app:toolbarBackgroundTint="@color/transparent" />
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
<com.huanchengfly.tieba.post.ui.widgets.theme.TintUndoableEditText
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:gravity="top|start"
android:hint="@string/tip_reply"
android:importantForAutofill="no"
android:inputType="textMultiLine|textImeMultiLine"
android:lines="5"
android:padding="12dp"
android:textSize="14sp"
app:hintTextColor="@color/default_color_text_secondary"
app:textColor="@color/default_color_text"
tools:ignore="UnusedAttribute">
<requestFocus />
</com.huanchengfly.tieba.post.ui.widgets.theme.TintUndoableEditText>
<LinearLayout
android:id="@+id/activity_reply_btn_bar"
style="@style/Widget.AppCompat.ButtonBar"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:padding="8dp"
android:weightSum="8">
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_emoticon"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:padding="4dp"
app:srcCompat="@drawable/ic_insert_emoticon"
app:tint="@color/text_color_selector" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_insert_photo"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:padding="4dp"
app:srcCompat="@drawable/ic_outline_insert_photo"
app:tint="@color/text_color_selector" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_undo"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="false"
android:padding="4dp"
android:src="@drawable/ic_outline_undo"
app:tint="@color/text_color_selector" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_redo"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="false"
android:padding="4dp"
android:src="@drawable/ic_outline_redo"
app:tint="@color/text_color_selector" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintImageView
android:id="@+id/activity_reply_edit_clear"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="false"
android:padding="4dp"
android:src="@drawable/ic_outline_delete_forever"
app:tint="@color/text_color_selector" />
</LinearLayout>
</com.huanchengfly.tieba.post.ui.widgets.theme.TintLinearLayout>
</com.effective.android.panel.view.content.FrameContentContainer>
<com.effective.android.panel.view.panel.PanelContainer
android:id="@+id/panel_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.effective.android.panel.view.panel.PanelView
android:id="@+id/activity_reply_emoticon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:panel_layout="@layout/layout_panel_emoticon"
app:panel_trigger="@id/activity_reply_edit_emoticon" />
<com.effective.android.panel.view.panel.PanelView
android:id="@+id/activity_reply_insert_photo"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/activity_reply_insert_photo_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</cn.dreamtobe.kpswitch.widget.KPSwitchFSPanelFrameLayout>
</com.huanchengfly.tieba.post.ui.widgets.theme.TintConstraintLayout>
android:layout_height="wrap_content"
app:panel_layout="@layout/layout_panel_photo"
app:panel_trigger="@id/activity_reply_edit_insert_photo" />
</com.effective.android.panel.view.panel.PanelContainer>
</com.effective.android.panel.view.PanelSwitchLayout>
</FrameLayout>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<com.huanchengfly.tieba.post.ui.widgets.theme.TintRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:backgroundTint="@color/default_color_background">
<androidx.viewpager.widget.ViewPager
android:id="@+id/activity_reply_emoticon_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/activity_reply_emoticon_tab"
android:layout_alignParentTop="true" />
<com.huanchengfly.tieba.post.ui.widgets.theme.TintTabLayout
android:id="@+id/activity_reply_emoticon_tab"
style="@style/Widget.TabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</com.huanchengfly.tieba.post.ui.widgets.theme.TintRelativeLayout>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<com.huanchengfly.tieba.post.ui.widgets.theme.TintFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:backgroundTint="@color/default_color_background">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/activity_reply_insert_photo_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.huanchengfly.tieba.post.ui.widgets.theme.TintFrameLayout>

View File

@ -9,4 +9,4 @@ org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx2g -XX:+UseParallelGC -Dfile.encoding=UTF-8
org.gradle.parallel=true
#org.gradle.unsafe.configuration-cache=true
org.gradle.unsafe.configuration-cache=true