jayyu3333

Untitled

Jan 21st, 2022
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.95 KB | None | 0 0
  1. import os
  2. from kivymd.app import MDApp
  3. from kivy.lang import Builder
  4. from kivymd.uix.screen import MDScreen
  5. from kivy.uix.screenmanager import ScreenManager
  6. from kivy.core.window import Window
  7.  
  8.  
  9. KV=('''
  10.  
  11. <REGITRATION_Window>:
  12.    name:'regitration_window1'
  13.    FloatLayout:
  14.        BoxLayout:
  15.            orientation: 'vertical'
  16.            MDToolbar:
  17.                title: 'Registration'
  18.                elevation: 10
  19.                left_action_items: [['arrow-left', lambda x: app.change_screen('login_window1')]]
  20.                size_hint_y:None
  21.                    
  22.            ScrollView:
  23.                on_scroll_stop: False
  24.                bar_color:(0,0,255, 0.4)
  25.                bar_inactiv_color:(0, 0, 0.7, 0.4)
  26.                bar_margin:2
  27.                bar_width:25
  28.                do_scroll_x:True
  29.                do_scroll_y:True
  30.                scroll_type:['bars','content']
  31.              
  32.                MDList:
  33.                    size_hint:0.9,0.1
  34.                    padding:'20dp'
  35.                    MDLabel:
  36.                        text: 'Full Name'
  37.                        font_size: '15sp'
  38.                        height: self.texture_size[1] + dp(10)
  39.                        size_hint_y:None
  40.  
  41.                    MDTextFieldRound:
  42.                        hint_text: 'For Eg:- xxx yyy zzz'
  43.                        input_type:'text'
  44.                        size_hint_y:None
  45.                    
  46.                    MDLabel:
  47.                        text:'Email-ID'
  48.                        font_size: '15sp'
  49.                        height: self.texture_size[1] + dp(10)
  50.                        size_hint_y:None
  51.                        
  52.                    MDTextFieldRound:
  53.                        hint_text: 'For Eg:- [email protected]'
  54.                        input_type:'text'
  55.                        size_hint_y:None
  56.                        
  57.                    BoxLayout:
  58.                        orientation :'horizontal'
  59.                        size_hint_y:None
  60.                        size: self.size
  61.                        spacing:'-40dp'
  62.                        BoxLayout:
  63.                            orientation :'vertical'
  64.                            
  65.                            spacing:'-50dp'
  66.                            MDLabel:
  67.                                text: 'Country Code '
  68.                                font_size: '15sp'
  69.                                height: self.texture_size[1] + dp(10)
  70.                                        
  71.                            MDTextFieldRound:
  72.                                hint_text: 'For Eg:- +91'
  73.                                input_type:'number'
  74.                                size_hint:0.5,0.25
  75.                                    
  76.                        BoxLayout:
  77.                            orientation :'vertical'
  78.                            size_hint_y:None
  79.                            spacing:'-50dp'
  80.                            MDLabel:
  81.                                text: 'Mobile Number'
  82.                                font_size: '15sp'
  83.                                height: self.texture_size[1] + dp(10)
  84.                                
  85.                            MDTextFieldRound:
  86.                                hint_text: 'For Eg:- 987654321'
  87.                                input_type:'number'
  88.                                size_hint:1,0.25
  89.                                            
  90.                    MDLabel:
  91.                        text: 'Location'
  92.                        font_size: '15sp'
  93.                        height: self.texture_size[1] + dp(10)
  94.                        size_hint_y:None
  95.                        
  96.                        
  97.                    MDTextFieldRound:
  98.                        hint_text: 'For Eg:- kalyan'
  99.                        input_type:'text'
  100.                        size_hint_y:None
  101.                        
  102.  
  103.                
  104.                    MDLabel:
  105.                        text: 'Pin Code'
  106.                        font_size: '15sp'
  107.                        height: self.texture_size[1] + dp(10)
  108.                        size_hint_y:None
  109.  
  110.                            
  111.                        
  112.                    MDTextFieldRound:
  113.                        hint_text: 'For Eg:- 400050'
  114.                        input_type:'number'
  115.                        size_hint_y:None
  116.                        
  117.  
  118.                
  119.                    MDLabel:
  120.                        text: 'City/Town/Village'
  121.                        font_size: '15sp'
  122.                        height: self.texture_size[1] + dp(10)
  123.                        size_hint_y:None
  124.                        
  125.                    MDTextFieldRound:
  126.                        hint_text: 'For Eg:- Mumbai'
  127.                        input_type:'text'
  128.                        size_hint_y:None
  129.                    
  130.                        
  131.                    MDLabel:
  132.                        text: 'District/Taluka'
  133.                        font_size: '15sp'
  134.                        height: self.texture_size[1] + dp(10)
  135.                        size_hint_y:None
  136.                        
  137.                    MDTextFieldRound:
  138.                        hint_text: 'For Eg:- Mumbai'
  139.                        input_type:'text'
  140.                        size_hint_y:None
  141.                        
  142.                    MDLabel:
  143.                        text: 'State'
  144.                        font_size: '15sp'
  145.                        height: self.texture_size[1] + dp(10)
  146.                        size_hint_y:None
  147.                            
  148.                        
  149.                    MDTextFieldRound:
  150.                        hint_text: 'For Eg:- Maharashtra'
  151.                        input_type:'text'
  152.                        size_hint_y:None
  153.                        
  154.                    
  155.                
  156.                    MDLabel:
  157.                        text: 'Country'
  158.                        font_size: '15sp'
  159.                        height: self.texture_size[1] + dp(10)
  160.                        size_hint_y:None
  161.                            
  162.                        
  163.                    MDTextFieldRound:
  164.                        hint_text: 'For Eg:- India'
  165.                        input_type:'text'  
  166.                        size_hint_y:None
  167.                        
  168.  
  169.                
  170.                
  171.                    
  172.                    MDLabel:
  173.                        text: 'Password'
  174.                        font_size: '15sp'
  175.                        height: self.texture_size[1] + dp(10)
  176.                        size_hint_y:None
  177.                            
  178.                        
  179.                    MDTextFieldRound:
  180.                        id: field_password
  181.                        max_characters: 70          
  182.                        hint_text: 'For Eg:- Chennai@123'
  183.                    
  184.                    
  185.                    MDLabel:
  186.                        id: is_vallidPS
  187.                        #text: 'Vallidation'
  188.                        font_size: '7sp'
  189.                        height: self.texture_size[1] + dp(10)
  190.                        size_hint_y:None
  191.  
  192.                    MDLabel:
  193.                        text: 'Confirm Password'
  194.                        font_size: '15sp'
  195.                        height: self.texture_size[1] + dp(10)
  196.                        size_hint_y:None
  197.                                
  198.                    MDTextFieldRound:
  199.                        mode: "rectangle"
  200.                        id: field_confirmpassword
  201.                        max_characters: 70          
  202.                        hint_text: 'For Eg:- Chennai@123'
  203.                        password: True
  204.                        size_hint_y:None
  205.            
  206.                    MDLabel:
  207.                        id: is_vallidCP
  208.                        #text: 'Vallidation'
  209.                        font_size: '7sp'
  210.                        height: self.texture_size[1] + dp(10)
  211.                        size_hint_y:None
  212.                                
  213.                    MDBoxLayout:
  214.                        orientation :'horizontal'
  215.                        padding: '20dp'
  216.                        spacing: '50dp'
  217.                        halign:'center'
  218.                        valign:'center'
  219.                        size_hint_y:None
  220.                        
  221.                    
  222.                        MDLabel:
  223.                        MDFillRoundFlatButton:
  224.                            text:'REGISTER'
  225.                            on_press: app.vall()
  226.                                
  227.                        MDFillRoundFlatButton:
  228.                            text:'Cancel'
  229.                        MDLabel:  
  230.  
  231. WindowManager:
  232.  
  233.    REGITRATION_Window:
  234.  
  235.    ''')
  236.  
  237.  
  238. class REGITRATION_Window(MDScreen):
  239.     pass
  240.  
  241.  
  242. class WindowManager(ScreenManager):
  243.     pass
  244.  
  245.  
  246. class MainApp(MDApp):
  247.     def build(self):
  248.         return Builder.load_string(KV)
  249.  
  250.  
  251. if __name__ == '__main__':  
  252.     MainApp().run()
Advertisement
Add Comment
Please, Sign In to add comment