设为首页 加入收藏

TOP

[函數] Firemonkey Android 取得系统参数设定的字型大小
2017-10-10 12:05:05 】 浏览:7799
Tags:函數 Firemonkey Android 取得 系统 参数 设定 字型 大小

Android 系统参数设定内,可以设定字型大小:

 

可以透过下面代码来取得字型大小比例:

function FontScale: Single;
var Resources: JResources;
    Configuration: JConfiguration;
begin
     Result := 1;

     if TAndroidHelper.Context <> nil then
     begin
          Resources := TAndroidHelper.Context.getResources;
          if Resources <> nil then
          begin
               Configuration := Resources.getConfiguration;
               if Configuration <> nil then
                  Result := Configuration.fontScale;
          end;
     end;
end;

 

iOS 请参考:

Delphi 取得 iOS 辅助使用里的字型大小

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇php不使用copy()函数复制文件的方.. 下一篇取消StringGrid的自动滚动

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目