views:

76

answers:

0

I am a noob, and I am stuck on one problem.

I built a soft keyboard, which works fine in portrait orientation, but the GUI never appears in landscape orientation. My class extends InputMethodService. When I put exact same layout xml file in an activity, it displays perfectly well in both orientations. So, I think the problem lies in my (mis)use of the service lifecycle. Briefly, this is what I do for the various callbacks I have overridden:

onCreate:

inflate the view from the xml file. instantiate the new objects that I need

onInitializeInterface:

inflate the view from the xml file. add the listeners to all the active widgets in the view.

onCreateInputView:

return the view that was inflated in the above callbacks.

onStartInput:

just call the superclass I overrode

onDestroy:

just call the superclass I overrode

I would be very grateful if anyone could shed some light on this. Thank you.