Welcome to KivyMD Discussions! #1077
Replies: 28 comments 20 replies
-
Hello, I'm Derek, I'm sort of a beginner in Kivy and kivymd. I did not want to raise to an issue before being sure it was one but I think the MDTopAppBar is not working. I'm getting an error that it is an unknown class. I even copy pasted the code in the docs, same error. Kindly help me out |
Beta Was this translation helpful? Give feedback.
-
Hello. Just to talk of my ideas about the get_rgb() function of the MDColorPicker. Here is the function:
This code works perfect when provided a color of the rgba form(length=4). Here are my ideas:
I never wanted to create an issue, since (i thought) this is not really one. |
Beta Was this translation helpful? Give feedback.
-
1. Idea on the function kivy.utils.get_random_color():
My idea is to add an optional-parameter named 'exclude' or 'exclude_colors' which will avoid returning a specific color or a range of colors. 2. Why don't I make a PR instead showing the implementation?The return of the 3. Why am I having this idea?When using this function to obtain a random background color for a component(MDLabel, MD..Button), I noticed that after running the program several times(e.g through hot-reload), the Thanks for reading. Let me know how you guys find my idea...
|
Beta Was this translation helpful? Give feedback.
-
@ndonkoHenri No, I didn't have such a problem. Because I didn't use the |
Beta Was this translation helpful? Give feedback.
-
The main page doesnt provide a Button to create a new discussionm how can I write a new discussion? |
Beta Was this translation helpful? Give feedback.
-
Cant start discussion in Q&A |
Beta Was this translation helpful? Give feedback.
-
Hello! Can somebody else take a look at issue #1437 please? It has been closed, albeit hastily. While the matter may seem like an error on my part at first, I have looked at the related code and understood how they work before posting the issue. I have written more comments to detail the problem. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hello, Im experimenting a problem with the theming of my kvmd app. I dont know if this is the right channel, I hope you can help me. I have an app using screen manager, with a couple of screens (im leaving out that part of the code), and as you can see in the attached image, colours are not applying. I tried switching to dark theme and this works, but still color palettes dont work :( As far as i understand, there is no need to apply theme/colors in each screen/widgets from my kv file, right ? There is no mention of this in docs/ tutos... I did manage to change color of a button from the kv file for example, but i dont know what would be the point of themes if then i need to customize every widget/screen myself from the builder... i have kivy/ kivymd installed only in the virtual environment of my project, i tried uninstaling-reinstalling but still doesnt fix it. CODE >>>> import sqlite3 as sql
from kivymd.app import MDApp
from kivy.lang import Builder
from kivy.metrics import dp
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.properties import ObjectProperty
from kivymd.uix.datatables import MDDataTable
from kivy.uix.anchorlayout import AnchorLayout
class ViewMan(ScreenManager):
class LoginPage(Screen):
class MainPage(Screen):
class AdhesionPage(Screen):
class AdhApp(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Blue"
self.theme_cls.accent_palette = "DeepPurple"
return Builder.load_file("builder.kv")
if __name__ == '__main__':
AdhApp().run() |
Beta Was this translation helpful? Give feedback.
-
@ozymandiasgeist Judging by your screenshots, you are not using any KivyMD widget. Kivy is not KivyMD. Please read the documentation for the KivyMD library - https://kivymd.readthedocs.io/en/latest/getting-started/ |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm Neil. New to KivyMD but liking very much what I've been able to do with it so far. However I've hit a snag and I'm unsure on how to proceed. I'm trying to implement a drag and drop of ListItems within a ListView, basically allowing a user to manually sort the ListItems. Any help welcome! Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hey guys! First off, my apologies if this isn't the right channel to bring this up, but I came across an issue while tinkering with MD's code. The MDNavigationRaid module has a function that references a variable that doesn't exist in its docstrings. I tried to edit it on GitHub, but I couldn't find the files. However, I did notice that the latest module's docstrings have fixed this issue. Unfortunately, the website and PDF contents of v.1.1.1 still contain the error. Here's the issue I found: def set_radius(self, *args): And here's the fixed code (Already inside the module's docstring as said) def set_radius(self, *args): |
Beta Was this translation helpful? Give feedback.
-
Hi Guys, I was trying to create a I see that If it can be changed, I will raise a PR for the same, to make the |
Beta Was this translation helpful? Give feedback.
-
Since I can't open a new discussion, I'll ask here: In https://kivymd.readthedocs.io/en/1.1.1/components/navigationdrawer/#kivymd.uix.navigationdrawer.navigationdrawer.MDNavigationDrawer.type the demo shows a standard MDNavigationDrawer that opens and pushes the whole screen to the right. However I am unable to reproduce the same result. Is there any sample code for the demonstrated picture shown? |
Beta Was this translation helpful? Give feedback.
-
hello |
Beta Was this translation helpful? Give feedback.
-
Hi, i trying to add MDBottomNavigation into MDNavigationLayout and getting error: The MDNavigationLayout must contain only |
Beta Was this translation helpful? Give feedback.
-
Attach a minimal code example |
Beta Was this translation helpful? Give feedback.
-
If you would like to get an answer to your question quickly, please follow the following small terms: If you get an error in your code, please describe your question in one message and attach **MINIMUM CODE **. MINIMUM CODE is: Code in which there are no unnecessary imports, classes, functions, widgets that are not related to the reproduction of the error. KV string should be in the code, not in a separate file, for example: [imports]
KV = """
...
"""
class Test(MDApp):
def build(self):
return Builder.load_string(KV)
Test().run() If your code exceeds the allowed number of characters in one message, then this is not the MINIMUM CODE. Your code should run in three clicks: Copy/Paste/Run Before attaching the minimal code, describe how to interact with this code to reproduce the problem. Describe what this code does. Describe what this code does not do as you expect. Describe how you want this code to work. Why are these requirements: 1. When you refactor your code in accordance with all of the above, you will find the error yourself 90% of the time. 2. You respect the developers who will look at your code. They don't need to look for an error and dig into large code if your code is 50-100 lines long. 3. No need to attach screenshots of the code. No need to attach screenshots of logs. Attach text only. 4. You don't need to use the https://pastebin.com service to demonstrate your code 5. Additional information - https://discord.com/channels/566880874789076992/618108815774056488/739213696680853524 Thanks for reading! |
Beta Was this translation helpful? Give feedback.
-
hello, i have problem with pytesseract in kivymd for android.. I'm making an image to text application, how do you do pytesseract so that it works on Android?
in my code ps.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe' it can only be run on my laptop, how can I make it run on the pytesseract android? please help me |
Beta Was this translation helpful? Give feedback.
-
@mutiarakhatami Your question is not related to the KivyMD library |
Beta Was this translation helpful? Give feedback.
-
where is the mistake? writes: kivy.factory.FactoryException: Unknown class `from kivy.lang import Builder from kivymd.app import MDApp KV = ''' Menu item in the DrawerList list.:
:
Screen:
''' class ContentNavigationDrawer(BoxLayout): class ItemDrawer(OneLineIconListItem): class DrawerList(ThemableBehavior, MDList):
class TestNavigationDrawer(MDApp):
TestNavigationDrawer().run()` |
Beta Was this translation helpful? Give feedback.
-
Hello, I am new to KivyMD and have utilized GitHub to generate an APK file through Action. The APK creation was successful; however, upon attempting to open the app on my Android phone (running Android OS versions 12 and 13), it consistently crashes. Here are the versions of Kivy and KivyMD that I am currently using:
|
Beta Was this translation helpful? Give feedback.
-
See logs... |
Beta Was this translation helpful? Give feedback.
-
Use KivyMD from master branch |
Beta Was this translation helpful? Give feedback.
-
Hello ! For an application i want to have MDdatepicker that open only for selecting month , is it possible ? |
Beta Was this translation helpful? Give feedback.
-
Greetings! Not sure if this is the correct place for questions as I was unable to start a new discussion. I was wondering if MDDataTables will be supported in KivyMD 2 and forward? I am using the latest from master branch and do not find datatables in uix. I have an old project which relies on it and I work around this by copying the datatables' py and kv files from older version. It seems to work mostly fine, I had to adjust some theming cls attributes in the datatables.kv file due to API breaks. |
Beta Was this translation helpful? Give feedback.
-
Hello all, I have a question about how to show the Chinese word in KivyMD. I value your expertise and would be grateful for your guidance. Thank you. I already have the LabelBase.register(name="DroidSans", fn_regular="cc.ttf"). Do you know how I can make it work? Thank you. Here is the code: from kivymd.app import MDApp class TestApp(Screen): class SecondLayout(Screen, ThemeManager): class LayoutManager(ScreenManager): class MyApp(MDApp): if name == "main": Here is the KivyMD file: LayoutManager: :
|
Beta Was this translation helpful? Give feedback.
-
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
Beta Was this translation helpful? Give feedback.
All reactions