Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Kivy – Material design Icon button

  • Difficulty Level : Expert
  • Last Updated : 24 Feb, 2021

Kivy is a platform-independent GUI tool in Python. It can run on Android, IOS, Linux and Windows, etc. This is the only GUI library from python which can independently run on an android device even we can use it on Raspberry pi also.  It is an open-source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps. Its graphic engine is built over OpenGL ES 2 and has fast graphics pipeline. 

In this article, we will develop a GUI window using kivy framework of python, and we will add material design icon buttons of different sizes on this window.


  • Import required modules.
  • Create an App class.
  • Add Buttons.
  • Return layout.
  • Run an instance of the class.



# importing mdapp from kivymd framework
from import MDApp
# importing builder from kivy
from kivy.lang import Builder
# this is the main class which
# will render the whole application
class uiApp(MDApp):
    # method which will render our application
    def build(self):
        return Builder.load_string("""
        # name of mdicon
        pos_hint: {"center_x": .5, "center_y": .5}
        user_font_size: "64sp"
        # bgcolor of iconbutton
        # custom image as mdicon
        pos_hint: {"center_x": .5, "center_y": .5}
        user_font_size: "16sp"
        pos_hint: {"center_x": .5, "center_y": .5}
# running the application


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!