使用自定义键盘上方时,推观点 [英] Push view above when using custom Keyboard
问题描述
我创建了一个自定义的键盘为我的Android应用程序。我也禁用默认的Android键盘。我显示键盘作为酶活性的片段,它显示了良好
我只是不能让活动以推动上述键盘时显示出来。有什么办法,我能做到这一点?
XML文件
<的FrameLayout
机器人:ID =@ + ID / flKeyboard
机器人:layout_width =match_parent
机器人:layout_height =WRAP_CONTENT
机器人:layout_alignParentBottom =真/>
显示片段
FragmentTransaction英尺= getFragmentManager()调用BeginTransaction()。
ft.add(R.id.flKeyboard,新键盘())提交()。
我不知道这是否是正确的做法,但我已经使用了翻译动画,移动沿Y轴的看法。随着一些调整,它实际上看起来比默认的Android推越好。
I have created a custom keyboard for my android application. I have also disabled the default android keyboard. I display the keyboard as a fragment in the activity and it shows up well.
I only cannot get activity view to push above when the keyboard shows up. Is there any way that I could do this?
XML FILE
<FrameLayout
android:id="@+id/flKeyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
SHOW FRAGMENT
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.add(R.id.flKeyboard, new Keyboard()).commit();
I'm not sure if this is the correct way, but I've used a translate animation, to move the view along the Y-axis. With some tweaking , it actually looks better than the default android push.
这篇关于使用自定义键盘上方时,推观点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!