Fixed text-field rendering bug no Android

This commit is contained in:
Mark Qvist 2025-11-22 10:56:45 +01:00
parent 6edc6e3771
commit d854a2d93d

View file

@ -306,6 +306,7 @@ from kivymd.font_definitions import theme_font_styles
from kivymd.theming import ThemableBehavior
from kivymd.uix.behaviors import DeclarativeBehavior
from kivymd.uix.label import MDIcon
from kivy.utils import platform
with open(
os.path.join(uix_path, "textfield", "textfield.kv"), encoding="utf-8"
@ -1483,7 +1484,8 @@ class MDTextField(
Animation(_hint_y=y, duration=0.2, t="out_quad").start(self)
if self.mode == "rectangle":
if not self.icon_left:
_hint_x = x
if platform == "android": _hint_x = x+dp(7)
else: _hint_x = x
else:
if y == dp(10):
_hint_x = dp(-4)