TIWIPhoneRegion and Android

Hello,

IPhoneControls V2.1.0.0, Delphi XE2.

I am using an IPhoneRegion with an IPhoneStyle on a form. I have a couple of IPhoneEdits inside the region. These work fine on an iPhone. On an Android device however when clicking in one of the edits the on-screen keyboard pops up briefly but then disappears before you can type anything into it.

I have AutoClientAlignAtRuntime on for the region. I found that this is what is causing the problem.

Original implementation:

function TTIWIPhoneRegion.RenderHTML(AContext: TIWBaseComponentContext): TIWHTMLTag;
begin
  if AutoClientAlignAtRuntime then
    Align := alClient;

  BorderOptions.NumericWidth := 0;
  BorderOptions.Style := cbsNone;

  Result := inherited RenderHTML(AContext);
end;


If I change this to

function TTIWIPhoneRegion.RenderHTML(AContext: TIWBaseComponentContext): TIWHTMLTag;
begin
  if AutoClientAlignAtRuntime then
  begin
    Left := 0;
    Top := 0; //could also set width and height here but it works without doing so
  end;

  BorderOptions.NumericWidth := 0;
  BorderOptions.Style := cbsNone;

  Result := inherited RenderHTML(AContext);
end;


everything works as expected. Has anyone else experienced this or does anyone have any comments?

For the record, the device is a Huawei U8800, Android version is 2.3.5, browser is the stock browser.

Just to follow up, without setting the Width the controls don't change their width when rotating the device to landscape mode. So the best option I have come up with is to set Align to alClient for iPhones and for Andriod devices set Align to alNone and set Left and Top to 0.

This results in operation as expected for iPhones. On Android devices although the controls don't expand to fill the width of the screen in landscape orientation, at least the edit boxes are usable as the pop-up keyboard behaves as it should.

Hi,


I have not been able to reproduce this issue when tested with Android 4.0.
Have you tried testing this with a newer Android version?

If the problem persists, please provide a ready to run sample project that demonstrates the issue so I can further investigate this.

Thanks, I'll try.