Jump to content

Saphire Neil

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

1 Neutral
  1. Saphire Neil

    Delphi 12.2 TMEMO - indexoutofbounds

    Hello All, Just to add for completeness: To fix your code copy the files "FMX.Platform.UI.Android" & "FMX.Presentation.Android.Style" into your project folder. Open "FMX.Platform.UI.Android" and search for "procedure TTextServiceAndroid.InternalUpdateSelection;" Replace this procedure with the following: procedure TTextServiceAndroid.InternalUpdateSelection; var SelStart, SelEnd: Integer; begin if FTextView = nil then Exit; CalculateSelectionBounds(SelStart, SelEnd); // Fixes issue with enter key in TMemo - https://en.delphipraxis.net/topic/12197-delphi-122-tmemo-indexoutofbounds/?tab=comments#comment-95629 // This is the orginal code // if SelEnd - SelStart > 0 then // FTextView.setSelection(SelStart, SelEnd) // else // FTextView.setSelection(CaretPosition.X); if SelEnd - SelStart > 0 then FTextView.setSelection(SelStart, SelEnd) else if CaretPosition.X > JCharSequenceToStr(FTextView.getText).Length then FTextView.setSelection(JCharSequenceToStr(FTextView.getText).Length) else FTextView.setSelection(CaretPosition.X); end; The underlying issue is that when you press the enter key at the end of the line on a TMEMO "CaretPosition.X" is returning 1 character more than the length of the actual string in the memo. The fix just checks if "CaretPosition.X" is longer than the length and if it is it move the caret to the "Length".
  2. Saphire Neil

    The android app doesn't start at specific devices

    Hi Jaun, Thank you so much for coming back to me so quickly, I tested the above and that done the trick! I also spotted a problem with my release version, long story short, I forgot to tick the “Generate Android App Bundle file (arm + arm64) in the “Compiling” option with the target set to "Android Release 64bit", I ticked this and re-published my app and that sorted the release version. Thank you again. Neil
  3. Saphire Neil

    The android app doesn't start at specific devices

    Hi Juan, I have the same problem with an app I released to the PlayStore. I have also written a really simply app for testing which has one text object and one button on it. When run in the IDE with debug 64bit it just sits on the splash screen. The phone is a Samsung Xcover4, but I also have the same problem on Samsung A10 devices as well. I have attached my test project for information. Can you advise how you fixed the issue in more detail as I cannot figure it out. Thanks, Neil Projects.7z
×