Jacksgong / JKeyboardPanelSwitch

For resolve the layout conflict when keybord & panel are switching (Android键盘面板冲突 布局闪动处理方案)
Apache License 2.0
4.19k stars 684 forks source link

View.isInEditMode() #73

Open lyzyjoyo opened 6 years ago

lyzyjoyo commented 6 years ago

The following classes could not be instantiated: - cn.dreamtobe.kpswitch.widget.KPSwitchRootLinearLayout (Open Class, Show Exception, Clear Cache) Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE. If this is an unexpected error you can also try to build the project, then manually refresh the layout. Exception Details java.lang.ClassCastException: com.android.layoutlib.bridge.android.BridgeContext cannot be cast to android.app.Activity   at cn.dreamtobe.kpswitch.handler.KPSwitchRootLayoutHandler.(KPSwitchRootLayoutHandler.java:50)   at cn.dreamtobe.kpswitch.widget.KPSwitchRootLinearLayout.init(KPSwitchRootLinearLayout.java:68)   at cn.dreamtobe.kpswitch.widget.KPSwitchRootLinearLayout.(KPSwitchRootLinearLayout.java:52)   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)   at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:157)   at android.view.LayoutInflater.parseInclude(LayoutInflater.java:902)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:854)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)   at android.view.LayoutInflater.inflate(LayoutInflater.java:518)   at android.view.LayoutInflater.inflate(LayoutInflater.java:397)