kivy / python-for-android

Turn your Python application into an Android APK
https://python-for-android.readthedocs.io
MIT License
8.32k stars 1.84k forks source link

Full screen apps have significantly degraded performance #2148

Closed Whatnoww closed 4 years ago

Whatnoww commented 4 years ago

Versions

Description

When I use fullscreen in my buildozer spec file, performance is 30fps on my OnePlus 5.

buildozer.spec

Command:

buildozer android debug deploy run

Spec file:

[app]

# (str) Title of your application
title = Soundbar

# (str) Package name
package.name = nmeadesoundbar

# (str) Package domain (needed for android/ios packaging)
package.domain = org.nmeadesoundbar

# (str) Source code where the main.py live
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas,wav,zip

# (list) List of inclusions using pattern matching
#source.include_patterns = assets/*,images/*.png

# (list) Source files to exclude (let empty to not exclude anything)
#source.exclude_exts = spec

# (list) List of directory to exclude (let empty to not exclude anything)
#source.exclude_dirs = tests, bin

# (list) List of exclusions using pattern matching
#source.exclude_patterns = license,images/*/*.jpg

# (str) Application versioning (method 1)
version = 0.2

# (str) Application versioning (method 2)
# version.regex = __version__ = ['"](.*)['"]
# version.filename = %(source.dir)s/main.py

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy,5ed7a1335bd66c4365b666eccce049f27ebfc51b
requirements = python3,jnius,kivy==1.11.1

# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# requirements.source.kivy = ../../kivy

# (list) Garden requirements
#garden_requirements =

# (str) Presplash of the application
presplash.filename = %(source.dir)s/png/presplash.png

# (str) Icon of the application
icon.filename = %(source.dir)s/png/icon.png

# (str) Supported orientation (one of landscape, sensorLandscape, portrait or all)
orientation = portrait

# (list) List of service to declare
#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY

#
# OSX Specific
#

#
# author = © Copyright Info

# change the major version of python used by the app
osx.python_version = 3

# Kivy version to use
osx.kivy_version = 1.9.1

#
# Android specific
#

# (bool) Indicate if the application should be fullscreen or not
fullscreen = 1

# (string) Presplash background color (for new android toolchain)
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
# olive, purple, silver, teal.
android.presplash_color = #1d1d1d

# (list) Permissions
#android.permissions = INTERNET

# (int) Target Android API, should be as high as possible.
#android.api = 27

# (int) Minimum API your APK will support.
#android.minapi = 21

# (int) Android SDK version to use
#android.sdk = 20

# (str) Android NDK version to use
#android.ndk = 19b

# (int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.
#android.ndk_api = 21

# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True

# (str) Android NDK directory (if empty, it will be automatically downloaded.)
#android.ndk_path =

# (str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =

# (str) ANT directory (if empty, it will be automatically downloaded.)
#android.ant_path =

# (bool) If True, then skip trying to update the Android sdk
# This can be useful to avoid excess Internet downloads or save time
# when an update is due and you just want to test/build your package
# android.skip_update = False

# (bool) If True, then automatically accept SDK license
# agreements. This is intended for automation only. If set to False,
# the default, you will be shown the license when first running
# buildozer.
android.accept_sdk_license = True

# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity

# (str) Android app theme, default is ok for Kivy-based app
# android.apptheme = "@android:style/Theme.NoTitleBar"

# (list) Pattern to whitelist for the whole project
#android.whitelist =

# (str) Path to a custom whitelist file
#android.whitelist_src =

# (str) Path to a custom blacklist file
#android.blacklist_src =

# (list) List of Java .jar files to add to the libs so that pyjnius can access
# their classes. Don't add jars that you do not need, since extra jars can slow
# down the build process. Allows wildcards matching, for example:
# OUYA-ODK/libs/*.jar
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar

# (list) List of Java files to add to the android project (can be java or a
# directory containing the files)
#android.add_src =

# (list) Android AAR archives to add (currently works only with sdl2_gradle
# bootstrap)
#android.add_aars =

# (list) Gradle dependencies to add (currently works only with sdl2_gradle
# bootstrap)
#android.gradle_dependencies =

# (list) add java compile options
# this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option
# see https://developer.android.com/studio/write/java8-support for further information
# android.add_compile_options = "sourceCompatibility = 1.8", "targetCompatibility = 1.8"

# (list) Gradle repositories to add {can be necessary for some android.gradle_dependencies}
# please enclose in double quotes 
# e.g. android.gradle_repositories = "maven { url 'https://kotlin.bintray.com/ktor' }"
#android.add_gradle_repositories =

# (list) packaging options to add 
# see https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
# can be necessary to solve conflicts in gradle_dependencies
# please enclose in double quotes 
# e.g. android.add_packaging_options = "exclude 'META-INF/common.kotlin_module'", "exclude 'META-INF/*.kotlin_module'"
#android.add_gradle_repositories =

# (list) Java classes to add as activities to the manifest.
#android.add_activities = com.example.ExampleActivity

# (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled
#android.ouya.category = GAME

# (str) Filename of OUYA Console icon. It must be a 732x412 png image.
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png

# (str) XML file to include as an intent filters in <activity> tag
#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
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
#android.add_libs_arm64_v8a = libs/android-v8/*.so
#android.add_libs_x86 = libs/android-x86/*.so
#android.add_libs_mips = libs/android-mips/*.so

# (bool) Indicate whether the screen should stay on
# Don't forget to add the WAKE_LOCK permission if you set this to True
#android.wakelock = False

# (list) Android application meta-data to set (key=value format)
#android.meta_data =

# (list) Android library project to add (will be added in the
# project.properties automatically.)
#android.library_references =

# (list) Android shared libraries which will be added to AndroidManifest.xml using <uses-library> tag
#android.uses_library =

# (str) Android logcat filters to use
#android.logcat_filters = *:S python:D

# (bool) Copy library instead of making a libpymodules.so
#android.copy_libs = 1

# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
android.arch = armeabi-v7a

#
# Python for android (p4a) specific
#

# (str) python-for-android fork to use, defaults to upstream (kivy)
#p4a.fork = kivy

# (str) python-for-android branch to use, defaults to master
#p4a.branch = master

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#p4a.source_dir =

# (str) The directory in which python-for-android should look for your own build recipes (if any)
#p4a.local_recipes =

# (str) Filename to the hook for p4a
#p4a.hook =

# (str) Bootstrap to use for android builds
# p4a.bootstrap = sdl2

# (int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)
#p4a.port =

#
# iOS specific
#

# (str) Path to a custom kivy-ios folder
#ios.kivy_ios_dir = ../kivy-ios
# Alternately, specify the URL and branch of a git checkout:
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master

# Another platform dependency: ios-deploy
# Uncomment to use a custom checkout
#ios.ios_deploy_dir = ../ios_deploy
# Or specify URL and branch
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.7.0

# (str) Name of the certificate to use for signing the debug version
# Get a list of available identities: buildozer ios list_identities
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"

# (str) Name of the certificate to use for signing the release version
#ios.codesign.release = %(ios.codesign.debug)s

[buildozer]

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2

# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1

# (str) Path to build artifact storage, absolute or relative to spec file
# build_dir = ./.buildozer

# (str) Path to build output (i.e. .apk, .ipa) storage
# bin_dir = ./bin

#    -----------------------------------------------------------------------------
#    List as sections
#
#    You can define all the "list" as [section:key].
#    Each line will be considered as a option to the list.
#    Let's take [app] / source.exclude_patterns.
#    Instead of doing:
#
#[app]
#source.exclude_patterns = license,data/audio/*.wav,data/images/original/*
#
#    This can be translated into:
#
#[app:source.exclude_patterns]
#license
#data/audio/*.wav
#data/images/original/*
#

#    -----------------------------------------------------------------------------
#    Profiles
#
#    You can extend section / key with a profile
#    For example, you want to deploy a demo version of your application without
#    HD content. You could first change the title to add "(demo)" in the name
#    and extend the excluded directories to remove the HD content.
#
#[app@demo]
#title = My Application (demo)
#
#[app:source.exclude_patterns@demo]
#images/hd/*
#
#    Then, invoke the command line with the "demo" profile:
#
#buildozer --profile demo android debug

Python Code

import time
import random
from random import seed
from random import randint
from kivy.app import App
from kivy.uix.screenmanager import ScreenManager, Screen, CardTransition, WipeTransition
from kivy.core.window import Window
from kivy.clock import Clock
from kivy.properties import StringProperty, NumericProperty, ObjectProperty
from kivy.utils import platform
from kivy.animation import Animation

Window.softinput_mode = 'below_target'
Window.keyboard_anim_args = {'d': 0.125, 't': 'in_out_quart'}
#Window.size = (536, 953)
#print(Window.size)

class Principal(Screen):
    redyx = NumericProperty(0)
    redyy = NumericProperty(0)
    greenx = NumericProperty(0)
    greeny = NumericProperty(0)
    backdropsrc = ObjectProperty(None)
    animtime = NumericProperty(99)

    def on_pre_enter(self, *args):
        import datetime
        d = datetime.date.today()
        month = int(d.strftime('%m'))
        if month == 11:
            self.backdropsrc = './png/snow.zip'
            self.animtime = 0.016
        if month == 12:
            self.backdropsrc = './png/snow.zip'
            self.animtime = 0.016
        if month == 1:
            self.backdropsrc = './png/snow.zip'
            self.animtime = 0.016
        if month == 2:
            self.backdropsrc = './png/snow.zip'
            self.animtime = 0.016

    def on_enter(self, *args):
        import threading
        threading.Thread(target=self.greenshell).start()
        threading.Thread(target=self.redshell).start()

    def redshell(self, *args):
        Animation.cancel_all(self, 'redyx', 'redyy')
        seed(time.time())
        valuex = float(random.uniform(-0.5, 1.5))
        valuey = float(random.uniform(-0.5, 1.5))
        redanim = Animation(redyx=(valuex), redyy=(valuey), duration=3)
        redanim.start(self)
        reloadred = Clock.create_trigger(self.redshell, 3)
        reloadred()

    def greenshell(self, *args):
        Animation.cancel_all(self, 'greenx', 'greeny')
        seed(time.time())
        valuexx1 = float(random.uniform(-0.2, 0))
        valuexx2 = float(random.uniform(1, 1.2))
        valueyy1 = float(random.uniform(-0.2, 0))
        valueyy2 = float(random.uniform(1, 1.2))
        y = str(randint(1,2))
        x = str(randint(1,2))
        resultx = 'valuexx'+ x
        resulty = 'valueyy'+ y
        greenanim = Animation(greenx=eval(resultx), greeny=eval(resulty), duration=5)
        greenanim.start(self)
        reloadgreen = Clock.create_trigger(self.greenshell, 5)
        reloadgreen()

    def play(self, directory, num):
        from kivy.core.audio import SoundLoader
        print(time.time())
        seed(time.time())
        # Good Times
        if num == 1:
            value = randint(1, 10)
        # Bad times
        if num == 2:
            value = randint(1, 6)
        # Item fruitbowl
        if num == 3:
            value = randint(1, 8)
        # Catchphrase
        if num == 4:
            value = randint(1, 11)
        # Oh baby!
        if num == 5:
            value = randint(1, 2)
        # Disbelief
        if num == 6:
            value = randint(1, 7)
        # Suprise
        if num == 7:
            value = randint(1, 3)
        # Let's go!
        if num == 8:
            value = randint(1, 5)
        # Wow!
        if num == 9:
            value = randint(1, 2)
        # Hey Troy!
        if num == 10:
            value = randint(1, 4)
        # Laugh
        if num == 11:
            value = randint(1, 5)
        # Random Noises
        if num == 12:
            value = randint(1, 3)
        # Random Frases
        if num == 13:
            value = randint(1, 3)
        # Bam! Shock Dodge!
        if num == 14:
            value = randint(1, 1)

        sound = SoundLoader.load(directory + str(value) + '.wav')
        if sound:
            leng = sound.length
            duration = float(leng)
            sound.play()
            Principal.soundstorage = sound
            Clock.schedule_once(unload, duration+0.01)

    soundstorage = ''

def unload(*args):
    Principal.soundstorage.stop()
    Principal.soundstorage.unload()

class Setting(Screen):
    pass

class WindowManager(ScreenManager):
    def __init__(self, **kwargs):
        super(WindowManager, self).__init__(**kwargs)
        Window.bind(on_keyboard=self.backpress)

    def backpress(self, window, key, *args):
        if key == 27:
            if self.current_screen.name == "principal":
                return False
            elif self.current_screen.name == "settings":
                pass
                return True

def loadapp(*args):
    screens = [Principal(name="principal"), Setting(name="settings")]
    for screen in screens:
        wm.add_widget(screen)
    wm.transition = WipeTransition()
    Clock.schedule_once(homescreen, 4)

def homescreen(*args):
    wm.current = 'principal'

class Loader(Screen):
    float = ObjectProperty(None)

    def on_enter(self, *args):
        print('on enter fired')
        anim = Animation(backdrop=(0.2, 0.2, 0.7, 1), duration=1)
        anim += Animation(sizing=(5000, 5000), posing=(2375), duration=1)
        anim += Animation(imgvis=(1, 1, 1, 1), imgsize=(1,1), duration=1)
        anim.start(self)
        Clock.schedule_once(loadapp, 0)

from kivy.lang import Builder
Builder.load_file('startup.kv')
wm = WindowManager()
wm.add_widget(Loader(name="loader"))

class Primary(App):

    def build(self):
        return wm

    def on_enter(self):
        if platform == "android":
            Clock.schedule_once(self.remove_android_splash)

    def remove_android_splash(self, *args):
        from jnius import autoclass
        activity = autoclass('org.kivy.android.PythonActivity').mActivity
        activity.removeLoadingScreen()

    def on_pause(self, *args):
        Animation.cancel_all()

    def on_resume(self, *args):
        Clock.schedule_once(Principal.greenshell, 0)
        Clock.schedule_once(Principal.redshell, 0)

if __name__ == "__main__":
    Primary().run()

KV code

WindowManager:
    Principal:
    Setting:

#: import threading threading

<Principal>
    name: "principal"
    backdropsrc: './png/fulltransparent.png'

    redyx: -0.5
    redyy: -0.5
    greenx: -0.5
    greeny: 0
    animtime: 99

    canvas.before:
        Color:
            rgba: 0.14, 0, 0.23, 1
        Rectangle:
            size: self.size
            pos: self.pos

    FloatLayout:

        Image:
            source: './png/redshell.png'
            mipmap: True
            size_hint_x: .1
            height: self.width*1
            pos_hint: {"center_x": root.redyx, "center_y": root.redyy}

        Image:
            source: './png/greenshell.png'
            mipmap: True
            size_hint_x: .1
            height: self.width*1
            pos_hint: {"center_x": root.greenx, "center_y": root.greeny}

        Image:
            id: backdrop
            source: root.backdropsrc
            anim_delay: root.animtime
            size_hint_x: 1
            size_hint_y: 1
            keep_ratio: False
            allow_stretch: True
            pos_hint: {"x": 0, "y": 0}

        Opaque:
            text: "The Nmeade Soundboard"
            bold: True
            size_hint: 1, .08
            pos_hint: {"x": 0, "y": 0.92}
            background_color: 0.35,0.11,0.51,1
            font_size: dp(20)
            color: 0.9,0.9,0.9,1

        ScrollView:
            size_hint: 1, .92
            pos_hint: {"x": 0, "bottom": 0}
            do_scroll_x: False
            do_scroll_y: True
            bar_color: (0,0,0,0)

            GridLayout:
                cols: 1
                padding: 0
                pos_hint: {"x": 0, "bottom": 0}
                size_hint: 1, None
                height: self.minimum_height

                GridLayout:
                    cols: 2
                    spacing: dp(40)
                    padding: dp(20)
                    size_hint: 1, None
                    height: self.minimum_height

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/good/goodtimes', 1)).start()
                        Image:
                            source: './png/good.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Good Times'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/bad/badtimes', 2)).start()
                        Image:
                            source: './png/bad.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Bad Times'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/fruit/fruit', 3)).start()
                        Image:
                            source: './png/redshell.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Item Fruitbowl'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/catch/catch', 4)).start()
                        Image:
                            source: './png/catch.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Catchphrases'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/baby/baby', 5)).start()
                        Image:
                            source: './png/chupete.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Oh baby!'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/disbelief/disbelief', 6)).start()
                        Image:
                            source: './png/disbelief.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Disbelief'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/suprise/suprise', 7)).start()
                        Image:
                            source: './png/suprise.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Suprise'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/letsgo/letsgo', 8)).start()
                        Image:
                            source: './png/go.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: "Let's go!"
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/wow/wow', 9)).start()
                        Image:
                            source: './png/wow.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Wow!'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/heytroy/heytroy', 10)).start()
                        Image:
                            source: './png/hey.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/3.8))
                            height: self.parent.height*0.8
                            width: self.height*0.8
                        Description:
                            text: 'Hey Troy!'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/laugh/laugh', 11)).start()
                        Image:
                            source: './png/laugh.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Laugh'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/rannoise/random', 12)).start()
                        Image:
                            source: './png/random.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Random Noises'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/ranfrase/ranfrase', 13)).start()
                        Image:
                            source: './png/random.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Random Frases'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

                    RoundButton:
                        text: ""
                        size_hint: .3, None
                        height: self.width*1
                        on_release:
                            threading.Thread(root.play('./audio/shock/shock', 14)).start()
                        Image:
                            source: './png/shock.png'
                            mipmap: True
                            pos: self.parent.x + ((self.parent.width-self.width)/2), self.parent.y + ((self.parent.height-(self.parent.height)*3/4))
                            height: self.parent.height*0.75
                            width: self.height*0.75
                        Description:
                            text: 'Shock Dodge!'
                            height: self.parent.height/4
                            width: self.parent.width
                            pos: self.parent.x, self.parent.y

<Settings>:

    FloatLayout:

<RoundButton@Button>
    background_color: (0,0,0,0)
    background_normal: ''
    bg_color: (0.14,0.40,0.42,1)
    canvas.before:
        Color:
            rgba: self.bg_color
        RoundedRectangle:
            size: self.size
            pos: self.pos
            radius: [dp(10)]

#: import Factory kivy.factory.Factory
<Logout@ModalView>:
    size_hint: .8, .3
    auto_dismiss: False
    background: './png/fulltransparent.png'
    canvas:
        Color:
            rgba: 0.15,0.15,0.15,0
        RoundedRectangle:
            size: self.size
            pos: self.pos

    GridLayout:
        cols: 1
        size_hint: 1, None
        height: self.minimum_height
        canvas:
            Color:
                rgba: .15, .15, .15, 1
            RoundedRectangle:
                pos: self.pos
                size: self.size
                radius: [dp(20)]

        GridLayout:
            cols: 1
            size_hint: 1, None
            height: self.minimum_height
            canvas:
                Color:
                    rgba: .22, .22, .22, 1
                RoundedRectangle:
                    pos: self.pos
                    size: self.size
                    radius: [dp(20), dp(20), 0, 0]

            Label:
                text:'Salir?'
                size_hint: 1, None
                height: self.width*.1

        GridLayout:
            cols: 1
            size_hint:1, None
            height: self.minimum_height

            Label:
                text:''
                size_hint: 1, None
                height: self.width*.05

        GridLayout:
            cols: 1
            size_hint: 1, None
            height: self.minimum_height

            Label:
                text: 'Seguro que quieres salir?\nSe borraran los datos no guardados'
                size_hint: 1, None
                height: self.width*.1
                halign: 'center'

        GridLayout:
            cols: 1
            size_hint:1, None
            height: self.minimum_height

            Label:
                text:''
                size_hint: 1, None
                height: self.width*.1

        GridLayout:
            cols: 5
            size_hint: 1, None
            height: self.minimum_height

            Label:
                text: ''
                size_hint: .05, 1

            RoundButton:
                text: 'Salir'
                size_hint: .425, None
                height: self.width*.3
                on_release:
                    root.dismiss()
                    root.goout()

            Label:
                text: ''
                size_hint: .05, 1

            RoundButton:
                text: 'Volver'
                size_hint: .425, 1
                on_release:
                    root.dismiss()

            Label:
                text: ''
                size_hint: .05, 1

        GridLayout:
            cols: 1
            size_hint:1, None
            height: self.minimum_height

            Label:
                text:''
                size_hint: 1, None
                height: self.width*.05

#: import ew kivy.uix.effectwidget
<Blur@EffectWidget>
    effects: ew.HorizontalBlurEffect(size=4), ew.VerticalBlurEffect(size=4)

<Opaque@Label>
    background_color: 1, 1, 1, 1
    canvas.before:
        Color:
            rgba: root.background_color
        Rectangle:
            size: self.size
            pos: self.pos

<Description@Label>
    background_color: (1,1,1,1)
    bg_color: (0.0,0.25,0.28,1)
    canvas.before:
        Color:
            rgba: self.bg_color
        RoundedRectangle:
            size: self.size
            pos: self.pos
            radius: [dp(0), dp(0), dp(10), dp(10)]

Just wanted to let you all know since this didn't happen in previous versions of Kivy, which worked just as well when the status bar was hidden.

An solution for this is obviously to not use full screen apps but that's suboptimal for obvious reasons.

AndreMiras commented 4 years ago

Thanks for the report. Theses issues are hard to debug. What I can recommend is to give Kivy==2.0.0rc1 a try see if it helps

Whatnoww commented 4 years ago

@AndreMiras

Hi, thanks for replying. I'll try that out immediately.

Whatnoww commented 4 years ago

@AndreMiras It does seem to be fixed now. All the background animations run perfectly at 60fps. The only issue is that scrolling through the ScrollView is insanely laggy if you are dragging it with your finger, but if you fling it and let it move on it's own it's 60fps. Is this a known issue? Even removing everything running in the background, it runs at 30fps when dragging all the way.

AndreMiras commented 4 years ago

Great news, thanks for the update. Regarding the scroll lag, not an issue I'm aware of. Try look through the existing bug if you find any. For regressions it's usually easy enough to spot the commit introducing the regression by trying building your app with different from different commits until you found when the issue appears/disappears. You should spot it relatively quick with a dichotomic search

Whatnoww commented 4 years ago

@AndreMiras Thanks again. I'll definitely do that. I'm assuming you just copy the commit versions, Thanks again, I appreciate the patience since I'm still very new to all of this.

AndreMiras commented 4 years ago

Yes exactly for the commit, basically for instance current last commit you would have kivy==108a915 in your requirements. I would recommend to always clean between two builds. Also maybe you want to simplify your test scenario to make it as simple as possible with very few dependency. That way you iterate faster

Whatnoww commented 4 years ago

@AndreMiras Thank you so much! I'll open an issue once I can pinpoint the change.