Android: How to get the size of font you set (Example Code)

Here is an example code to get the size of your font on Android

 

Example Codes:

procedure TForm10.Button1Click(Sender: TObject);
var
  Configuration: JConfiguration;
  CurrentNightMode: Integer;
begin
  Configuration := TAndroidHelper.Context.GetResources.getConfiguration;

  Text1.Text:=Configuration.fontScale.ToString;

end;
1
uses Androidapi.JNI.GraphicsContentViewText, Androidapi.Helpers

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *