YoKeyword / Fragmentation

[DEPRECATED] A powerful library that manage Fragment for Android
Apache License 2.0
9.72k stars 2.11k forks source link

edittext无法输入,第一次显示fragment是无法自动调出软键盘 #1242

Open luoruncai opened 4 years ago

luoruncai commented 4 years ago

Issues Guideline

我的gradle设置方式是:

implementation 'me.yokeyword:fragmentationx:1.0.2' implementation 'me.yokeyword:fragmentationx-swipeback:1.0.2' implementation 'me.yokeyword:eventbus-activity-scope:1.1.0' implementation 'org.greenrobot:eventbus:3.0.0'

Edittext无法输入,是在特定的情况下出现的: 1 正常的情况: 首先是acvitiy中,启用了一个LoginFragment,然后LoginFramgnet通过start()方法启动了RegisterFragment,在RegisterFramgent的xml文件中,有一个Edittext,这个Edittext点击后可以正常拉起软键盘,一切OK

2 异常情况: 首先还是一个activity,然后启用一了MainFragment,这个MainFrament中通过 loadMultipleRootFragment()方法加载了一个SettingFragment, 接着SettingFragment通过getParentFragment().startBrotherFragment(PersionFragment.newInstance());启动PersionFragment后, PersionFragment再通过start启动PersionUpdateFragment, 在PersionUpdateFragment有一个Edittext,刚刚打开PersionUpdateFragment时点击Edittext是无法拉起软件盘,表现异常。 刚刚开始我以为我的PersionUpdateFragment有问题,然后就在前面的LoginFramgnet通过start直接启动PersionUpdateFragment,发现PersionUpdateFragment中的Edittext表现又是正常的,所以我怀疑是框架还有问题。

大神麻烦看下。。。

Following information can help us to resolve the issue faster.

In addition, we do not accept issues unrelated to Fragmentation.

luoruncai commented 4 years ago

经过排查,终于发现问题点: 是 image

换成start的方法就可以了