smartcitizen
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
kivy_application_android_smart_citizen [2020/01/22 15:12] – [Widgets Kivy utilisés] serge | smartcitizen [2020/02/16 08:14] – [Ressources] serge | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== | + | ====== |
<WRAP center round box 60% centeralign> | <WRAP center round box 60% centeralign> | ||
**{{tagpage> | **{{tagpage> | ||
**[[http:// | **[[http:// | ||
+ | </ | ||
+ | <WRAP center round box 40% centeralign> | ||
+ | **[[les_pages_kivy_en_details|Les pages Kivy en détails]]** | ||
</ | </ | ||
- | =====ReSSources===== | + | <WRAP group> |
- | * **[[https:// | + | <WRAP third column> |
- | * **[[https:// | + | {{:: |
- | * **[[https:// | + | </ |
- | * **{{ :: | + | <WRAP third column> |
+ | {{:: | ||
+ | </ | ||
+ | |||
+ | <WRAP third column> | ||
+ | {{:: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | {{ : | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * | ||
+ | ===apk=== | ||
+ | **{{ :: | ||
+ | |||
+ | =====Les choses non réussies===== | ||
+ | * Créer les box du menu déroulant dans le main.py alors que ça marche dans [[taposc|TapOSC]] mais sans menu déroulant. | ||
+ | * Un simple label transparent au dessus d'un widget | ||
+ | |||
+ | =====Les difficultés rencontrées===== | ||
+ | ===L' | ||
+ | Exemple: la class A peut accéder à la variable self.toto de la class B,\\ | ||
+ | mais pas l' | ||
+ | |||
+ | Solution: Un Clock dans A actualise la valeur de B. | ||
+ | |||
+ | ===Création du graph dans le kv=== | ||
+ | * [[https:// | ||
+ | * | ||
+ | |||
+ | |||
=====Widgets Kivy utilisés===== | =====Widgets Kivy utilisés===== | ||
- | * **ScreenManager: | + | * **ScreenManager: |
- | * **ActionBar: | + | |
+ | ===Une barre de menu=== | ||
+ | * **ActionBar: | ||
* **ActionView: | * **ActionView: | ||
* **ActionPrevious: | * **ActionPrevious: | ||
Ligne 20: | Ligne 60: | ||
* **ActionButton: | * **ActionButton: | ||
* **ActionGroup: | * **ActionGroup: | ||
+ | |||
+ | ===Widgets classiques=== | ||
+ | [[kivy_liste_des_elements_graphiques# | ||
* **BoxLayout: | * **BoxLayout: | ||
* **GridLayout: | * **GridLayout: | ||
* **Button:** | * **Button:** | ||
* **Label:** | * **Label:** | ||
- | | + | |
+ | ===Une image en background=== | ||
+ | [[kivy_image_avec_alpha_sur_fond_blanc|Une image avec canal alpha sur un fond blanc dans un BoxLayout]] | ||
+ | | ||
* **Rectangle: | * **Rectangle: | ||
- | | + | |
+ | ===Menu glissant=== | ||
+ | | ||
+ | |||
+ | ===Affichage d' | ||
* **Popup: | * **Popup: | ||
+ | |||
+ | ===Une belle courbe=== | ||
* **[[kivy_garden|Kivy: | * **[[kivy_garden|Kivy: | ||
+ | |||
+ | =====buildozer.spec===== | ||
+ | <code python> | ||
+ | [app] | ||
+ | title = Smart Citizen | ||
+ | package.name = smartcitizen | ||
+ | package.domain = org.test | ||
+ | source.dir = . | ||
+ | source.include_exts = py, | ||
+ | source.exclude_dirs = old, bin, recherche, garden_graph_example | ||
+ | source.include_patterns = images/ | ||
+ | version.regex = __version__ = ['" | ||
+ | version.filename = %(source.dir)s/ | ||
+ | requirements = python3, | ||
+ | garden_requirements = graph | ||
+ | orientation = all | ||
+ | fullscreen = 1 | ||
+ | android.permissions = INTERNET | ||
+ | android.arch = armeabi-v7a | ||
+ | [buildozer] | ||
+ | log_level = 2 | ||
+ | warn_on_root = 1 | ||
+ | </ | ||
+ | |||
+ | =====Thread in Kivy===== | ||
+ | Pour stopper un thread à la fermeture de la fenêtre, le définir comme Salsa du démon | ||
+ | <code python> | ||
+ | thread_update = threading.Thread(target=self.update) | ||
+ | thread_update.setDaemon(True) | ||
+ | thread_update.start() | ||
+ | </ | ||
{{tag> | {{tag> |
smartcitizen.txt · Dernière modification : 2020/12/01 17:43 de serge