【发布时间】:2021-06-22 19:47:49
【问题描述】:
PC端和手机端的区别如下: 个人电脑 - https://imgur.com/GzGHEjR 手机 - https://imgur.com/GqudNbt 我需要做什么才能完成这项工作?我是否需要每次都运行移动应用来进行更改?
kv 文件在这里(我不知道如何缩进):
FloatLayout:
canvas:
Color:
rgba: 66/255, 66/255, 66/255, 1
RoundedRectangle:
pos: (5, 5)
size: self.width -10, self.height -10
radius: [50]
MDLabel:
text: 'Amount'
bold: True
theme_text_color: 'Custom'
text_color: 1, 1, 1, 1
halign: 'center'
pos_hint: {'center_x':0.15, 'center_y':0.6}
MDTextFieldRound:
id: amount_text
text: '0'
size_hint: 0.15,0.05
pos_hint: {'center_x':0.20, 'center_y':0.53}
line_color: 76/255, 182/255, 172/255, 1
foreground_color: 1, 1, 1, 1
normal_color: 76/255, 182/255, 172/255, 1
MDLabel:
text: 'From'
bold: True
theme_text_color: 'Custom'
text_color: 1, 1, 1, 1
halign: 'center'
pos_hint: {'center_x': 0.38, 'center_y':0.6}
MDFillRoundFlatButton:
id: menu_button1
text: 'USD'
font_size: 20
pos_hint: {'center_x': 0.45, 'center_y': 0.53}
size_hint: 0.23, 0.05
md_bg_color: 76/255, 182/255, 172/255, 1
on_press: app.menu1.open()
MDLabel:
text: 'To'
bold: True
theme_text_color: 'Custom'
text_color: 1, 1, 1, 1
halign: 'center'
pos_hint: {'center_x': 0.72, 'center_y':0.6}
MDFillRoundFlatButton:
id: menu_button2
text: 'ILS'
font_size: 20
pos_hint: {'center_x': 0.8, 'center_y': 0.53}
size_hint: 0.23, 0.05
md_bg_color: 76/255, 182/255, 172/255, 1
on_press: app.menu2.open()
MDRaisedButton:
pos_hint: {'center_x': 0.62, 'center_y': 0.53}
size_hint: (None, None)
width: dp(2100)
md_bg_color: 66/255, 66/255, 66/255, 1
on_press: app.change()
Image:
source: 'convert.png'
MDFillRoundFlatButton:
text: 'Convert'
pos_hint: {'x':0.8, 'center_y':0.4}
md_bg_color: 100/255, 170/255, 210/255, 1
on_press: app.convert()
MDTextField:
text: '0'
id: result
pos_hint: {'center_x':0.5, 'center_y':0.3}
size_hint: 0.3, 0.2
font_size: 32
halign: 'center'
line_color_normal: 76/255, 182/255, 172/255, 1
readonly: True
看起来您的帖子主要是代码;请添加更多详细信息。
【问题讨论】: