大佬教程收集整理的这篇文章主要介绍了无法在软键盘上方显示 bottomSheetDialogFragment,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用与软输入键盘重叠的 BottomSheetDialogFragment
,因此我从这里尝试了许多现有的答案。像this。但没有什么对我有用。我希望整个布局显示在键盘上方或仅显示编辑文本。
这是我在 XML 文件中的设计结构。
<linearLayout xmlns:androID="http://scheR_984_11845@as.androID.com/apk/res/androID"
androID:layout_wIDth="match_parent"
androID:layout_height="match_parent"
xmlns:app="http://scheR_984_11845@as.androID.com/apk/res-auto"
xmlns:tools="http://scheR_984_11845@as.androID.com/tools"
androID:gravity="center_horizontal"
androID:orIEntation="vertical"
androID:ID="@+ID/bottomSheetRoot"
androID:BACkground="@androID:color/transparent"
tools:context=".fragments.JoinTeamFragment"
app:layou@R_607_11164@ehavior="@String/bottom_shee@R_607_11164@ehavior">
<androIDx.cardvIEw.Widget.CardVIEw>
<androIDx.core.Widget.nestedScrollVIEw>
<linearLayout>
<androIDx.appcompat.Widget.AppCompatTextVIEw
androID:ID="@+ID/join_dialog_description"/>
<androIDx.cardvIEw.Widget.CardVIEw>
<androIDx.appcompat.Widget.AppCompatTextVIEw
androID:ID="@+ID/msg_from_author_tv"/>
</androIDx.cardvIEw.Widget.CardVIEw>
<androIDx.appcompat.Widget.AppCompatTextVIEw
androID:ID="@+ID/join_dialog_instruction_msg"/>
<androIDx.appcompat.Widget.AppCompatEditText
androID:ID="@+ID/message_et_join_team"
androID:lines="5" />
<androIDx.appcompat.Widget.AppCompatTextVIEw
androID:ID="@+ID/join_message_tv_counter"/>
<linearLayout>
<androIDx.appcompat.Widget.AppCompatTextVIEw
androID:ID="@+ID/cancel_button_join"/>
<androIDx.appcompat.Widget.AppCompatbutton
androID:ID="@+ID/confirm_button_join"/>
</linearLayout>
</linearLayout>
</androIDx.core.Widget.nestedScrollVIEw>
</androIDx.cardvIEw.Widget.CardVIEw>
</linearLayout>
还有kt班
class JoinTeamFragment : BottomSheetDialogFragment() {
private var mListener: BottomSheetListener? = null
overrIDe fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceStatE)
setStyle(STYLE_norMAL,R.style.CustomBottomSheetDialogthemE)
}
overrIDe fun onCreateVIEw(inflater: LayoutInflater,container: VIEwGroup?,savedInstanceState: Bundle?): VIEw? {
val vIEw = inflater.inflate(R.layout.fragment_join_team,container,falsE)
{
}
interface BottomSheetListener
overrIDe fun onAttach(context:Context) {
super.onAttach(context)
try
{
mListener = context as BottomSheetListener
}
catch (e:ClassCastException) {
throw ClassCastException(("$context must implement BottomSheetListener"))
}
}
}
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的无法在软键盘上方显示 bottomSheetDialogFragment全部内容,希望文章能够帮你解决无法在软键盘上方显示 bottomSheetDialogFragment所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。