如何解决如何使我的屏幕适合Android手机屏幕?
我正在创建一个加密消息的kivy-python应用程序。该应用程序的“开始”屏幕不适用于智能手机屏幕。我尝试更改其方向,但仍然无法正常工作。标签在电话屏幕上看起来不错,但是我的按钮重叠了。请帮助我解决此问题。
这是我在屏幕上显示的代码:-
<WelcomeScreen>:
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: 'back.png'
GridLayout:
oreintation: 'vertical'
padding: 20,20
spacing: 30,30
size: self.width,self.height
pos: self.pos
cols: 1
GridLayout:
cols: 1
Label:
text: 'Welcome to Friendcrypter'
font_size: '40sp'
bold: True
text_size: self.width,self.height
Label:
font_size: '30sp'
text_size: self.width,self.height
text: 'a way to send encrypted messages to your friends'
GridLayout:
cols: 3
rows: 1
Button:
text: "Dont have an account??? Signup here"
on_press: root.signup_page()
background_color: 1,1,0
opacity: 1 if self.state == 'normal' else 0.5
color: 0.1,0.7,1
bold: True
Button:
text: "Have an account? Login"
on_press: root.login_page()
background_color: 1,1
bold: True
Button:
text: 'help'
background_color: 1,1
bold: True
这是我的python代码:-
class WelcomeScreen(Screen):
def login_page(self):
self.manager.current = 'login_screen'
def signup_page(self):
self.manager.current = 'signup_screen'
请帮助我。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。