Creating a SIGN-UP page using KIVYMD
Video Link on you tube - https://youtu.be/6yujEdnTtfQ
Following classes are required to create a sign-up page :-
1. MDApp - To create a App
2. MDScreen - To create a screen
3. MDCard - To create a Card
4. MDLabel - To create a Label
5. MDTextFieldRound - To take ID and Password Input from user
6. MDRoundFlatButton - To create a sign-up button
Note :-
First Create a Python file (extension .py) then, create a kivy file (.kv extension) name of kivy file should be same as app name.
App name is the name of the class that consist of build function and created by inheriting the MDApp class
Following is the code of SIGN-UP page
# Code of Python Program
from kivymd.app import MDApp
class Myapp(MDApp):
def build(self):
return
Myapp().run()
# Save it by .py extension
# Code of Kivy Program
MDScreen :
md_bg_color : [35/255,59/255,54/255,1]
MDCard :
orientation : 'vertical'
size_hint : None,None
size : 400,500
pos_hint : {"center_x":.5,"center_y":.5}
elevation : 15
md_bg_color : [35/255,49/255,48/255,1]
padding : 20
spacing : 30
MDLabel :
text : "SIGN-UP"
font_style : "Button"
font_size : 40
halign : "center"
size_hint_y : None
height : self.texture_size[1]
padding_y : 30
MDTextFieldRound :
hint_text : "username"
size_hint_x : None
icon_right : "account"
width : 270
font_size : 20
pos_hint : {"center_x":.5}
normal_color : [35/255,49/255,48/255,1]
color_active : [1,1,1,1]
MDTextFieldRound :
hint_text : "user-id"
size_hint_x : None
icon_right : "account"
width : 270
font_size : 20
pos_hint : {"center_x":.5}
normal_color : [35/255,49/255,48/255,1]
color_active : [1,1,1,1]
MDTextFieldRound :
hint_text : "password"
password : True
size_hint_x : None
icon_right : "eye-off"
width : 270
font_size : 20
pos_hint : {"center_x":.5}
normal_color : [35/255,49/255,48/255,1]
color_active : [1,1,1,1]
MDTextFieldRound :
hint_text : "confirm-password"
size_hint_x : None
password : True
icon_right : "eye-off"
width : 270
font_size : 20
pos_hint : {"center_x":.5}
normal_color : [35/255,49/255,48/255,1]
color_active : [1,1,1,1]
MDTextFieldRound :
hint_text : "mobile number"
size_hint_x : None
icon_right : "phone"
width : 270
font_size : 20
pos_hint : {"center_x":.5}
normal_color : [35/255,49/255,48/255,1]
color_active : [1,1,1,1]
MDRoundFlatButton :
text : "SIGN-UP"
font_size : 15
pos_hint : {"center_x":.5}
theme_text_color : "Custom"
text_color : [0,0,0,1]
# Save it by name Myapp.kv
Comments
Post a Comment