使用自定义键盘上方时,推观点 [英] Push view above when using custom Keyboard

查看:182
本文介绍了使用自定义键盘上方时,推观点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个自定义的键盘为我的Andr​​oid应用程序。我也禁用默认的Andr​​oid键盘。我显示键盘作为酶活性的片段,它显示了良好

我只是不能让活动以推动上述键盘时显示出来。有什么办法,我能做到这一点?

XML文件

 <的FrameLayout
        机器人:ID =@ + ID / flKeyboard
        机器人:layout_width =match_parent
        机器人:layout_height =WRAP_CONTENT
        机器人:layout_alignParentBottom =真/>

显示片段

  FragmentTransaction英尺= getFragmentManager()调用BeginTransaction()。
    ft.add(R.id.flKeyboard,新键盘())提交()。


解决方案

我不知道这是否是正确的做法,但我已经使用了翻译动画,移动沿Y轴的看法。随着一些调整,它实际上看起来比默认的Andr​​oid推越好。

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆