Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dynamic_gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brady James Garvin
dynamic_gui
Commits
6a465378
Commit
6a465378
authored
5 years ago
by
Brady James Garvin
Browse files
Options
Downloads
Patches
Plain Diff
Updated codebase for the 2019 VM (and improved comments).
parent
33a1ef09
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.buildozer
+1
-0
1 addition, 0 deletions
.buildozer
.gitignore
+0
-1
0 additions, 1 deletion
.gitignore
buildozer.spec
+15
-6
15 additions, 6 deletions
buildozer.spec
demo.kv
+3
-3
3 additions, 3 deletions
demo.kv
main.py
+5
-6
5 additions, 6 deletions
main.py
with
24 additions
and
16 deletions
.buildozer
0 → 120000
+
1
−
0
View file @
6a465378
/home/cse/.buildozer_share
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.gitignore
+
0
−
1
View file @
6a465378
...
@@ -2,5 +2,4 @@
...
@@ -2,5 +2,4 @@
*.pyo
*.pyo
.idea
.idea
.buildozer
bin
bin
This diff is collapsed.
Click to expand it.
buildozer.spec
+
15
−
6
View file @
6a465378
...
@@ -36,7 +36,7 @@ version = 1.0
...
@@ -36,7 +36,7 @@ version = 1.0
# (list) Application requirements
# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
# comma separated e.g. requirements = sqlite3,kivy
requirements = kivy
requirements =
python3,
kivy
# (str) Custom source folders for requirements
# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# Sets custom source for any requirements with recipes
...
@@ -88,16 +88,16 @@ fullscreen = 0
...
@@ -88,16 +88,16 @@ fullscreen = 0
#android.permissions = INTERNET
#android.permissions = INTERNET
# (int) Android API to use
# (int) Android API to use
#
android.api = 1
9
android.api =
2
1
# (int) Minimum API required
# (int) Minimum API required
#
android.minapi =
9
android.minapi =
21
# (int) Android SDK version to use
# (int) Android SDK version to use
#android.sdk = 20
#android.sdk = 20
# (str) Android NDK version to use
# (str) Android NDK version to use
#
android.ndk =
9
c
android.ndk =
17
c
# (bool) Use --private data storage (True) or --dir public storage (False)
# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True
#android.private_storage = True
...
@@ -146,8 +146,11 @@ fullscreen = 0
...
@@ -146,8 +146,11 @@ fullscreen = 0
# bootstrap)
# bootstrap)
#android.gradle_dependencies =
#android.gradle_dependencies =
# (list) Java classes to add as activities to the manifest.
#android.add_activites = com.example.ExampleActivity
# (str) python-for-android branch to use, defaults to stable
# (str) python-for-android branch to use, defaults to stable
#
p4a.branch =
stable
p4a.branch =
master
# (str) OUYA Console category. Should be one of GAME or APP
# (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled
# If you leave this blank, OUYA support will not be enabled
...
@@ -159,6 +162,9 @@ fullscreen = 0
...
@@ -159,6 +162,9 @@ fullscreen = 0
# (str) XML file to include as an intent filters in <activity> tag
# (str) XML file to include as an intent filters in <activity> tag
#android.manifest.intent_filters =
#android.manifest.intent_filters =
# (str) launchMode to set for the main activity
#android.manifest.launch_mode = standard
# (list) Android additional libraries to copy into libs/armeabi
# (list) Android additional libraries to copy into libs/armeabi
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
...
@@ -201,6 +207,9 @@ android.arch = armeabi-v7a
...
@@ -201,6 +207,9 @@ android.arch = armeabi-v7a
# (str) Bootstrap to use for android builds
# (str) Bootstrap to use for android builds
# p4a.bootstrap = sdl2
# p4a.bootstrap = sdl2
# (int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)
#p4a.port =
#
#
# iOS specific
# iOS specific
...
@@ -220,7 +229,7 @@ android.arch = armeabi-v7a
...
@@ -220,7 +229,7 @@ android.arch = armeabi-v7a
[buildozer]
[buildozer]
# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level =
2
log_level =
1
# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1
warn_on_root = 1
...
...
This diff is collapsed.
Click to expand it.
demo.kv
+
3
−
3
View file @
6a465378
...
@@ -3,7 +3,7 @@ BoxLayout:
...
@@ -3,7 +3,7 @@ BoxLayout:
BoxLayout:
BoxLayout:
id: fields
id: fields
orientation: 'vertical'
orientation: 'vertical'
size_hint: (1, 6)
size_hint: (1
.0
, 6
.0
)
BoxLayout:
BoxLayout:
orientation: 'horizontal'
orientation: 'horizontal'
Button:
Button:
...
@@ -17,9 +17,9 @@ BoxLayout:
...
@@ -17,9 +17,9 @@ BoxLayout:
on_press: app.print_total()
on_press: app.print_total()
<Field>:
<Field>:
orientation: 'horizontal' # Field is a kind of BoxLayout
orientation: 'horizontal' # Field is a kind of BoxLayout
.
Label:
Label:
text: root.label_text #
R
efers to a property
declared in
the Field
class
text: root.label_text #
In a subwidget's Kv, `root.…` r
efers to a property
of
the Field
widget.
TextInput:
TextInput:
id: input
id: input
multiline: False
multiline: False
...
...
This diff is collapsed.
Click to expand it.
main.py
+
5
−
6
View file @
6a465378
...
@@ -10,23 +10,22 @@ class Field(BoxLayout):
...
@@ -10,23 +10,22 @@ class Field(BoxLayout):
class
DemoApp
(
App
):
class
DemoApp
(
App
):
def
add_field
(
self
):
def
add_field
(
self
):
container
=
self
.
root
.
ids
.
fields
container
=
self
.
root
.
ids
.
fields
new_label_text
=
'
Field #{index}:
'
.
format
(
index
=
len
(
container
.
children
))
container
.
add_widget
(
Field
(
label_text
=
f
'
Field #
{
len
(
container
.
children
)
}
:
'
))
container
.
add_widget
(
Field
(
label_text
=
new_label_text
))
def
remove_field
(
self
):
def
remove_field
(
self
):
container
=
self
.
root
.
ids
.
fields
container
=
self
.
root
.
ids
.
fields
if
len
(
container
.
children
)
>
0
:
if
len
(
container
.
children
)
>
0
:
container
.
remove_widget
(
container
.
children
[
0
])
#
c
hildren are indexed in reverse display order
container
.
remove_widget
(
container
.
children
[
0
])
#
C
hildren are indexed in reverse display order
.
def
print_total
(
self
):
def
print_total
(
self
):
container
=
self
.
root
.
ids
.
fields
container
=
self
.
root
.
ids
.
fields
total
=
0
total
=
0
for
field
in
container
.
children
:
for
field
in
container
.
children
:
try
:
try
:
total
+=
float
(
field
.
ids
.
input
.
text
)
# refer to a subwidget by
id
total
+=
float
(
field
.
ids
.
input
.
text
)
#
`widget.ids.…` can be used to
refer to a subwidget by
ID.
except
ValueError
:
except
ValueError
:
pass
#
i
gnore non-numeric values
pass
#
I
gnore non-numeric values
.
print
(
'
Total of fields
\'
numeric values: {total}
'
.
format
(
total
=
total
)
)
print
(
f
'
Total of fields
\'
numeric values:
{
total
}
'
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment