Comments (4)
ChatView 继承自RelativeLayout
from panelswitchhelper.
@TracyEminem 布局写的有些问题。ChatView 还包含着 ConstraintLayout,最后才包含这 PanelSwitchLayout。PanelSwitchLayout 写在最外层,其他内容写在ContentContainer就好,ContentContainer能确保不抬起。
from panelswitchhelper.
按照你说的改了一下,发现还是存在这个问题。
<com.effective.android.panel.view.PanelSwitchLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/panel_switch_layout"
android:background="@drawable/theme_backgrand"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<com.effective.android.panel.view.ContentContainer
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
app:empty_view="@id/empty_view"
app:edit_view="@id/et_message"
android:id="@+id/content_view"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/item_toolbar"
android:id="@+id/toolbar"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_more"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/toolbar"
app:layout_constraintBottom_toBottomOf="@id/toolbar"
android:layout_marginRight="@dimen/margin"
android:id="@+id/iv_more"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<tracyeminem.com.peipei.ui.chat.JChat.ChatView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:id="@+id/chat_view"
>
<tracyeminem.com.peipei.ui.chat.JChat.DropDownListView
android:id="@+id/lv_chat"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="#00000000"
android:divider="@null"
android:fadingEdge="none"
android:fitsSystemWindows="true"
android:listSelector="#00000000"
android:scrollbarStyle="outsideOverlay"
android:scrollingCache="false"
android:smoothScrollbar="true"
android:transcriptMode="normal"/>
<com.effective.android.panel.view.EmptyView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/empty_view"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_gift"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_margin="@dimen/margin"
android:id="@+id/iv_gift"
/>
</tracyeminem.com.peipei.ui.chat.JChat.ChatView>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="44dp"
android:gravity="bottom"
>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@color/fifty_percent_white"
android:id="@+id/v_line"
/>
<ImageView
android:layout_width="23dp"
android:layout_height="23dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:id="@+id/iv_func"
android:layout_marginRight="@dimen/margin"
android:background="@drawable/icon_keyboard_add"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="@dimen/little_text"
android:text="发送"
android:id="@+id/tv_send"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginRight="10dp"
android:background="@drawable/shape_20white_rectangle_background"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:gravity="center"
android:visibility="invisible"
/>
<ImageView
android:layout_width="23dp"
android:layout_height="23dp"
app:layout_constraintRight_toLeftOf="@id/iv_func"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginRight="12dp"
android:id="@+id/iv_voice"
android:background="@drawable/icon_keyboard_voice"
/>
<ImageView
android:layout_width="23dp"
android:layout_height="23dp"
app:layout_constraintRight_toLeftOf="@id/iv_func"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginRight="12dp"
android:id="@+id/iv_keyboard"
android:visibility="invisible"
android:background="@drawable/icon_keyboard"
/>
<tracyeminem.com.peipei.ui.chat.JChat.RecordVoiceButton
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/iv_keyboard"
android:layout_marginRight="11dp"
android:layout_marginLeft="@dimen/margin"
android:background="@drawable/shape_20white_rectangle_background"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="7dp"
android:layout_marginBottom="7dp"
android:textColor="@color/white"
android:textSize="@dimen/little_text"
android:text="按住发语音"
android:id="@+id/tv_send_voice"
android:gravity="center"
android:visibility="invisible"
/>
<EditText
android:id="@+id/et_message"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginLeft="@dimen/margin"
android:layout_marginTop="7dp"
android:layout_marginRight="11dp"
android:paddingBottom="10dp"
android:background="@null"
android:hint="发消息"
android:maxLines="4"
android:minHeight="35dp"
android:textColor="@color/fifty_percent_white"
android:textColorHint="@color/fifty_percent_white"
android:textSize="@dimen/little_text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/iv_keyboard"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.effective.android.panel.view.ContentContainer>
<!-- 面板区域,仅能包含PanelView-->
<com.effective.android.panel.view.PanelContainer
android:id="@+id/panel_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 每一项面板 -->
<!-- panel_layout 用于指定面板该 ID 对应的布局 ,必须项-->
<!-- panel_trigger 用于用户点击该 ID 对应的 View 时切换到该面板 -->
<!-- panel_toggle 用于当该面板显示时 ,用户再次点击 panel_trigger 对应的 View 时是否回切输入法-->
<!-- <com.effective.android.panel.view.PanelView-->
<!-- android:id="@+id/panel_emotion"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- app:panel_layout="@layout/panel_emotion_layout"-->
<!-- app:panel_trigger="@id/emotion_btn" />-->
<com.effective.android.panel.view.PanelView
android:id="@+id/panel_addition"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:panel_layout="@layout/view_keyboard_funclayout"
app:panel_trigger="@id/iv_func" />
</com.effective.android.panel.view.PanelContainer>
</com.effective.android.panel.view.PanelSwitchLayout>
from panelswitchhelper.
搞定了,不是框架的问题,最后也没找到原因,重写了一遍就好了,有点迷。
from panelswitchhelper.
Related Issues (20)
- 无法调整表情面板的高度 HOT 2
- WindowInsetsAnimationCompat加一个标记可能更好一点 HOT 4
- 140版本升级152版本原有表情包的位置显示是透明的 HOT 3
- 如果输入框上面还有视图得话,列表偏移位置不准确 HOT 11
- 滑动的问题 HOT 2
- 在480*800分辨率,但屏幕特小的手机上
- PanelSwitchHelper同时存在于Activity和dialog时,导致Activity上的PanelSwitchHelper无法监听 HOT 3
- 打开键盘,退到桌面,再进来,点击输入框会导致面板无法关闭
- 自定义EditText 不弹出键盘 HOT 1
- 为什么你发的新版旧版就用不了了呢? HOT 1
- 列表item长按弹出popWindow
- 1.5.4版本依赖下载不下来,试了下1.5.3版本就可以正常下载 HOT 1
- 当采用今日头条的兼容适配方案时,底部的虚拟返回键会挡住部分输入框的布局。 HOT 5
- ViewPger2+Fragment切换时,PanelSwitchLayout中布局不显示 HOT 3
- 弹出软键盘时崩溃 HOT 1
- bug,崩溃 HOT 3
- [兼容性缺陷]华为mate20Pro弹出键盘页面展示异常 HOT 2
- 点击表情面板时,EditText焦点丢失,光标不显示 HOT 2
- 仿抖音评论弹窗效果
- 其他方案 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panelswitchhelper.