5: Test App¶
The app is ready to run, start it by clicking the green
play button in the toolbar.
Now that the app is up & running, we can interact with the layout from the activity.
PythonActivity/app/src/main/res/layout/activity_main.xml and add the following code:
android:id = "@+id/label"
PythonActivity/app/src/main/python/demo/chaquopy/pythonactivity/main_activity.py and add the following code:
label = self.findViewById(R.id.label) label.setText("Python Activity Loaded!")
Now when we run the app again, the label is updated by the activity: