Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cz_012273
MyDelphi
提交
25621fad
MyDelphi
项目概览
cz_012273
/
MyDelphi
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MyDelphi
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
25621fad
编写于
4月 08, 2022
作者:
C
cz_012273
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
改用Speedbutton按钮,可带背景图(PNG格式)
上级
70df7193
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
1220 addition
and
69 deletion
+1220
-69
MainForm.fmx
MainForm.fmx
+1178
-22
MainForm.pas
MainForm.pas
+28
-26
MyDelphi.dproj
MyDelphi.dproj
+5
-5
mainform.LgXhdpiPh.fmx
mainform.LgXhdpiPh.fmx
+9
-16
未找到文件。
MainForm.fmx
浏览文件 @
25621fad
此差异已折叠。
点击以展开。
MainForm.pas
浏览文件 @
25621fad
...
@@ -14,8 +14,6 @@ type
...
@@ -14,8 +14,6 @@ type
HeaderLabel
:
TLabel
;
HeaderLabel
:
TLabel
;
ScaledLayout1
:
TScaledLayout
;
ScaledLayout1
:
TScaledLayout
;
Label2
:
TLabel
;
Label2
:
TLabel
;
Button2
:
TButton
;
Button1
:
TButton
;
Edit2
:
TEdit
;
Edit2
:
TEdit
;
Edit1
:
TEdit
;
Edit1
:
TEdit
;
Label1
:
TLabel
;
Label1
:
TLabel
;
...
@@ -26,8 +24,9 @@ type
...
@@ -26,8 +24,9 @@ type
Label3
:
TLabel
;
Label3
:
TLabel
;
RoundRect1
:
TRoundRect
;
RoundRect1
:
TRoundRect
;
RoundRect2
:
TRoundRect
;
RoundRect2
:
TRoundRect
;
procedure
Button1Click
(
Sender
:
TObject
);
SpeedButton1
:
TSpeedButton
;
procedure
Button2Click
(
Sender
:
TObject
);
StyleBook1
:
TStyleBook
;
SpeedButton2
:
TSpeedButton
;
procedure
Button3Click
(
Sender
:
TObject
);
procedure
Button3Click
(
Sender
:
TObject
);
procedure
Button4Click
(
Sender
:
TObject
);
procedure
Button4Click
(
Sender
:
TObject
);
procedure
Button5Click
(
Sender
:
TObject
);
procedure
Button5Click
(
Sender
:
TObject
);
...
@@ -36,6 +35,8 @@ type
...
@@ -36,6 +35,8 @@ type
procedure
DisplayRationale
(
Sender
:
TObject
;
const
APermissions
:
TArray
<
string
>;
const
APostRationaleProc
:
TProc
);
procedure
DisplayRationale
(
Sender
:
TObject
;
const
APermissions
:
TArray
<
string
>;
const
APostRationaleProc
:
TProc
);
procedure
ComboBox1Change
(
Sender
:
TObject
);
procedure
ComboBox1Change
(
Sender
:
TObject
);
procedure
FormShow
(
Sender
:
TObject
);
procedure
FormShow
(
Sender
:
TObject
);
procedure
SpeedButton1Click
(
Sender
:
TObject
);
procedure
SpeedButton2Click
(
Sender
:
TObject
);
private
private
{ Private declarations }
{ Private declarations }
...
@@ -61,28 +62,6 @@ uses
...
@@ -61,28 +62,6 @@ uses
var
var
urlstr
:
string
;
urlstr
:
string
;
procedure
TToolsForm
.
Button1Click
(
Sender
:
TObject
);
//确定按钮
var
Intent
:
JIntent
;
begin
if
edit1
.
text
=
'www.baidu.com'
then
urlstr
:=
edit1
.
text
+
'/s?&wd='
+
edit2
.
text
else
urlstr
:=
edit1
.
text
;
Intent
:=
TJIntent
.
JavaClass
.
init
(
TJIntent
.
JavaClass
.
ACTION_VIEW
,
TJnet_Uri
.
JavaClass
.
parse
(
StringToJString
(
'https://'
+
urlstr
)));
Intent
.
setPackage
(
StringToJString
(
'com.android.browser'
));
//设置包名;
TAndroidHelper
.
Activity
.
startActivity
(
Intent
);
end
;
procedure
TToolsForm
.
Button2Click
(
Sender
:
TObject
);
//清空按钮
begin
edit1
.
text
:=
''
;
edit2
.
text
:=
''
;
end
;
procedure
TToolsForm
.
Button3Click
(
Sender
:
TObject
);
//健康码
procedure
TToolsForm
.
Button3Click
(
Sender
:
TObject
);
//健康码
var
var
...
@@ -145,6 +124,29 @@ begin
...
@@ -145,6 +124,29 @@ begin
end
;
end
;
procedure
TToolsForm
.
SpeedButton1Click
(
Sender
:
TObject
);
var
Intent
:
JIntent
;
begin
if
edit1
.
text
=
'www.baidu.com'
then
urlstr
:=
edit1
.
text
+
'/s?&wd='
+
edit2
.
text
else
urlstr
:=
edit1
.
text
;
Intent
:=
TJIntent
.
JavaClass
.
init
(
TJIntent
.
JavaClass
.
ACTION_VIEW
,
TJnet_Uri
.
JavaClass
.
parse
(
StringToJString
(
'https://'
+
urlstr
)));
Intent
.
setPackage
(
StringToJString
(
'com.android.browser'
));
//设置包名;
TAndroidHelper
.
Activity
.
startActivity
(
Intent
);
end
;
procedure
TToolsForm
.
SpeedButton2Click
(
Sender
:
TObject
);
begin
edit1
.
text
:=
''
;
edit2
.
text
:=
''
;
end
;
procedure
RequestPermissionsResult
(
Sender
:
TObject
;
const
APermissions
:
TArray
<
string
>;
const
AGrantResults
:
TArray
<
TPermissionStatus
>);
procedure
RequestPermissionsResult
(
Sender
:
TObject
;
const
APermissions
:
TArray
<
string
>;
const
AGrantResults
:
TArray
<
TPermissionStatus
>);
begin
begin
...
...
MyDelphi.dproj
浏览文件 @
25621fad
...
@@ -342,23 +342,23 @@
...
@@ -342,23 +342,23 @@
<Overwrite>true</Overwrite>
<Overwrite>true</Overwrite>
</Platform>
</Platform>
</DeployFile>
</DeployFile>
<DeployFile LocalName="
Android64\Debug\colors.xml" Configuration="Debug" Class="Android_Colors
">
<DeployFile LocalName="
$(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png" Configuration="Debug" Class="Android_NotificationIcon24
">
<Platform Name="Android64">
<Platform Name="Android64">
<RemoteName>ic_notification.png</RemoteName>
<Overwrite>true</Overwrite>
<Overwrite>true</Overwrite>
</Platform>
</Platform>
</DeployFile>
</DeployFile>
<DeployFile LocalName="Android64\Debug\
styles.xml" Configuration="Debug" Class="AndroidSplashStyles
">
<DeployFile LocalName="Android64\Debug\
AndroidManifest.xml" Configuration="Debug" Class="ProjectAndroidManifest
">
<Platform Name="Android64">
<Platform Name="Android64">
<Overwrite>true</Overwrite>
<Overwrite>true</Overwrite>
</Platform>
</Platform>
</DeployFile>
</DeployFile>
<DeployFile LocalName="
$(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png" Configuration="Debug" Class="Android_NotificationIcon24
">
<DeployFile LocalName="
Android64\Debug\colors.xml" Configuration="Debug" Class="Android_Colors
">
<Platform Name="Android64">
<Platform Name="Android64">
<RemoteName>ic_notification.png</RemoteName>
<Overwrite>true</Overwrite>
<Overwrite>true</Overwrite>
</Platform>
</Platform>
</DeployFile>
</DeployFile>
<DeployFile LocalName="Android64\Debug\
AndroidManifest.xml" Configuration="Debug" Class="ProjectAndroidManifest
">
<DeployFile LocalName="Android64\Debug\
styles.xml" Configuration="Debug" Class="AndroidSplashStyles
">
<Platform Name="Android64">
<Platform Name="Android64">
<Overwrite>true</Overwrite>
<Overwrite>true</Overwrite>
</Platform>
</Platform>
...
...
mainform.LgXhdpiPh.fmx
浏览文件 @
25621fad
...
@@ -74,22 +74,6 @@ inherited ToolsForm_LgXhdpiPh: TToolsForm_LgXhdpiPh
...
@@ -74,22 +74,6 @@ inherited ToolsForm_LgXhdpiPh: TToolsForm_LgXhdpiPh
TextSettings.Font.Size = 24.000000000000000000
TextSettings.Font.Size = 24.000000000000000000
Text = #25628#32034':'
Text = #25628#32034':'
end
end
inherited Button2: TButton
StyledSettings = [Family]
Position.X = 256.000000000000000000
Position.Y = 208.000000000000000000
TextSettings.Font.Family = 'SimSun'
TextSettings.Font.Size = 24.000000000000000000
OnClick = Button2Click
end
inherited Button1: TButton
StyledSettings = [Family]
Position.X = 88.000000000000000000
Position.Y = 208.000000000000000000
TextSettings.Font.Family = 'SimSun'
TextSettings.Font.Size = 24.000000000000000000
OnClick = Button1Click
end
inherited Edit2: TEdit
inherited Edit2: TEdit
Position.Y = 144.000000000000000000
Position.Y = 144.000000000000000000
Size.Width = 306.000000000000000000
Size.Width = 306.000000000000000000
...
@@ -137,5 +121,14 @@ inherited ToolsForm_LgXhdpiPh: TToolsForm_LgXhdpiPh
...
@@ -137,5 +121,14 @@ inherited ToolsForm_LgXhdpiPh: TToolsForm_LgXhdpiPh
Position.Y = 8.000000000000000000
Position.Y = 8.000000000000000000
Text = #25910#34255':'
Text = #25910#34255':'
end
end
inherited SpeedButton1: TSpeedButton
Position.X = 88.000000000000000000
Position.Y = 216.000000000000000000
OnClick = SpeedButton1Click
end
inherited SpeedButton2: TSpeedButton
Position.X = 256.000000000000000000
Position.Y = 216.000000000000000000
end
end
end
end
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录