Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
779a851
commit 1876772
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
from kivymd.tests.base_test import BaseTest | ||
|
||
|
||
class ListTest(BaseTest): | ||
def test_list_raw_app(self): | ||
import os | ||
|
||
from kivymd import images_path | ||
from kivymd.uix.list import ( | ||
IconLeftWidget, | ||
IconRightWidget, | ||
ImageLeftWidget, | ||
IRightBodyTouch, | ||
MDList, | ||
OneLineAvatarIconListItem, | ||
OneLineAvatarListItem, | ||
OneLineIconListItem, | ||
OneLineListItem, | ||
ThreeLineListItem, | ||
TwoLineListItem, | ||
) | ||
from kivymd.uix.screen import MDScreen | ||
from kivymd.uix.scrollview import MDScrollView | ||
from kivymd.uix.selectioncontrol import MDCheckbox | ||
|
||
class RightCheckbox(IRightBodyTouch, MDCheckbox): | ||
pass | ||
|
||
self.render( | ||
MDScreen( | ||
MDScrollView( | ||
MDList( | ||
OneLineListItem(text="Text"), | ||
TwoLineListItem( | ||
text="Text", secondary_text="secondary text" | ||
), | ||
ThreeLineListItem( | ||
text="Text", | ||
secondary_text="secondary text", | ||
tertiary_text="tertiary text", | ||
), | ||
OneLineAvatarListItem( | ||
ImageLeftWidget( | ||
source=os.path.join( | ||
images_path, "logo", "kivymd-icon-512.png" | ||
) | ||
), | ||
text="Text", | ||
), | ||
OneLineIconListItem( | ||
IconLeftWidget(icon="plus"), | ||
text="Text", | ||
), | ||
OneLineAvatarIconListItem( | ||
IconLeftWidget(icon="plus"), | ||
IconRightWidget(icon="minus"), | ||
text="Text", | ||
), | ||
OneLineAvatarIconListItem( | ||
IconLeftWidget(icon="plus"), | ||
RightCheckbox(), | ||
text="Text", | ||
), | ||
) | ||
) | ||
) | ||
) |