Comments (11)
PanelSwitchLayout如果要足够的高的话,那他岂不是要把我原来的布局给包进去才行,不然这个布局会把我原来的布局给覆盖掉。。。。
不太理解你说的。PanelSwitchLayout 跟你的布局没有关系。
描述遇到问题的场景请说明(至少)
- 你的业务场景是什么,你的布局排版是什么
- 当前出现了什么问题
- 你期望得到的结果是什么
from panelswitchhelper.
` <com.effective.android.panel.view.PanelSwitchLayout
android:id="@+id/panel_switch_layout"
android:layout_width="match_parent"
android:layout_height="100dp"
android:orientation="vertical">
<com.effective.android.panel.view.ContentContainer
android:id="@+id/content_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
app:empty_view="@id/empty_view">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#ebebeb">
<View
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_input_layout"
android:gravity="bottom"
android:minHeight="@dimen/dp_50"
android:orientation="horizontal"
android:paddingBottom="@dimen/dp_7.5"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10">
<!-- 更多入口 -->
<ImageView
android:id="@+id/add_btn"
android:layout_width="@dimen/dp_35"
android:layout_height="@dimen/dp_35"
android:layout_marginRight="@dimen/dp_10"
android:src="@drawable/icon_add" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_35"
android:orientation="horizontal">
<!-- 表情入口 -->
<ImageView
android:id="@+id/emotion_btn"
android:layout_width="@dimen/dp_35"
android:layout_height="@dimen/dp_35"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:src="@drawable/selector_emotion_btn" />
<TextView
android:id="@+id/send"
android:layout_width="@dimen/dp_50"
android:layout_height="@dimen/dp_35"
android:background="@drawable/selector_send_btn"
android:gravity="center"
android:text="发送"
android:textColor="@color/send_btn_color"
android:textSize="@dimen/sp_15" />
<TextView
android:id="@+id/create_text"
android:layout_width="@dimen/dp_50"
android:layout_height="@dimen/dp_35"
android:background="@drawable/selector_send_btn"
android:gravity="center"
android:text="创建EditText"
android:layout_marginLeft="2dp"
android:textColor="@color/send_btn_color"
android:textSize="@dimen/sp_15" />
</LinearLayout>
</LinearLayout>
</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">
<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/panel_add_layout"
app:panel_trigger="@id/add_btn" />
</com.effective.android.panel.view.PanelContainer>
</com.effective.android.panel.view.PanelSwitchLayout>`
我把PanelSwitchLayout设置成100dp,不够大,然后panel_add_layout这个东西也不能完整显示出来,我的意思就是PanelSwitchLayout是不是得足够高,不然内容没法显示
from panelswitchhelper.
PanelSwitchLayout这个如果足够大的话又把我之前的布局给遮住了
from panelswitchhelper.
我的痛点在于不知道要设置PanelSwitchLayout为多高,我不可能设置他match_parent的,这样把其他布局全部给遮住了,除非我把其他的布局全部放到PanelSwitchLayout里面去,感觉不太好
from panelswitchhelper.
我的痛点在于不知道要设置PanelSwitchLayout为多高,我不可能设置他match_parent的,这样把其他布局全部给遮住了,除非我把其他的布局全部放到PanelSwitchLayout里面去,感觉不太好
你要理解整个框架的原理是什么。
PanelSwitchLayout一般都要包住其他布局的。而你的场景,实际上你的布局可以放到ContentContainer足以。什么需求都可以实现的
from panelswitchhelper.
我的痛点在于不知道要设置PanelSwitchLayout为多高,我不可能设置他match_parent的,这样把其他布局全部给遮住了,除非我把其他的布局全部放到PanelSwitchLayout里面去,感觉不太好
你要理解整个框架的原理是什么。
PanelSwitchLayout一般都要包住其他布局的。而你的场景,实际上你的布局可以放到ContentContainer足以。什么需求都可以实现的
我现在所有的都放在ContentContainer,弹出的面板还是那么一点点,还有如果弹出软键盘,软键盘上面显示不出我的布局,这问题可能出在哪里,我始终没搞明白为什么demo里面软键盘上面那个布局正好就在软键盘上面显示
from panelswitchhelper.
我的痛点在于不知道要设置PanelSwitchLayout为多高,我不可能设置他match_parent的,这样把其他布局全部给遮住了,除非我把其他的布局全部放到PanelSwitchLayout里面去,感觉不太好
你要理解整个框架的原理是什么。
PanelSwitchLayout一般都要包住其他布局的。而你的场景,实际上你的布局可以放到ContentContainer足以。什么需求都可以实现的我现在所有的都放在ContentContainer,弹出的面板还是那么一点点,还有如果弹出软键盘,软键盘上面显示不出我的布局,这问题可能出在哪里,我始终没搞明白为什么demo里面软键盘上面那个布局正好就在软键盘上面显示
ContentContainer 会自动变化高度,demo是软键盘上输入布局是固定的,输入布局上还有一个自使用高度的列表。ContentContainer 怎么变化,输入布局的高度都不会变化,会变化的是列表的高度。
建议看下 LinearLayout weight 属性的作用
from panelswitchhelper.
我的痛点在于不知道要设置PanelSwitchLayout为多高,我不可能设置他match_parent的,这样把其他布局全部给遮住了,除非我把其他的布局全部放到PanelSwitchLayout里面去,感觉不太好
你要理解整个框架的原理是什么。
PanelSwitchLayout一般都要包住其他布局的。而你的场景,实际上你的布局可以放到ContentContainer足以。什么需求都可以实现的我现在所有的都放在ContentContainer,弹出的面板还是那么一点点,还有如果弹出软键盘,软键盘上面显示不出我的布局,这问题可能出在哪里,我始终没搞明白为什么demo里面软键盘上面那个布局正好就在软键盘上面显示
ContentContainer 会自动变化高度,demo是软键盘上输入布局是固定的,输入布局上还有一个自使用高度的列表。ContentContainer 怎么变化,输入布局的高度都不会变化,会变化的是列表的高度。
建议看下 LinearLayout weight 属性的作用
我感觉是这个empty_view在作怪,我没有写这个empty_view。大概布局是这样子:
` <com.effective.android.panel.view.PanelSwitchLayout
android:id="@+id/panel_switch_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.effective.android.panel.view.ContentContainer
android:id="@+id/content_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/func_zone_color">`
</RelativeLayout>
<LinearLayout
android:id="@+id/text_panel_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
android:background="@color/func_zone_color"
android:gravity="bottom"
android:paddingBottom="10dp"
android:orientation="horizontal">
<ImageButton
android:id="@+id/text_edit_close"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="center"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:layout_alignParentLeft="true"
android:background="@mipmap/sticker_select_cancel"/>
</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">
<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/layout_color_panel"
app:panel_trigger="@id/key_board" />
</com.effective.android.panel.view.PanelContainer>
</com.effective.android.panel.view.PanelSwitchLayout>
基本上和你的布局一模一样,我都不知道什么情况
from panelswitchhelper.
感觉是代码的bug, onGlobalLayout在没有菜单栏的情况下判断是全屏,全屏情况下直接把那个panelContent的高度写到了prefernce里面去了,然后后面从里面取出来就取出这个数字,所以我感觉全屏模式下面那个计算是错误的,这个keyboardHeight的高度应该是不能这么计算, 但是要怎么算呢
from panelswitchhelper.
我用demo调试,都没有走setKeyBoardHeight,怎么getKeyBoardHeight却有正确值,这个值只有setKeyBoardHeight这个地方才有设置,真是太奇怪了
from panelswitchhelper.
我用demo调试,都没有走setKeyBoardHeight,怎么getKeyBoardHeight却有正确值,这个值只有setKeyBoardHeight这个地方才有设置,真是太奇怪了
Demo视频场景下提供了全屏的例子。另外,全屏分完全全屏和沉浸视图全屏。很多细节逻辑可以通过阅读源码解决。 getKeyBoardHeight 有值是因为任何设备都不能保证初始化的时候知道设备的输入法高度,初始化值是通过线上设备归纳得到的,只有第一次训练之后才能得到当前场景的输入法并智能兼容。
from panelswitchhelper.
Related Issues (20)
- 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
- 全屏视频播放的情景,输入框面板基于PopWindow实现,假如是点击外部的表情按钮唤起 面板,直接显示表情面板该怎样实现? HOT 1
- 使用 BaseDialogFragment 并设置高度后,底部输入框部分不展示,或者展示不全 HOT 3
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.