• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

pydelhi/pydelhi_mobile: Mobile App for PyDelhi

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

pydelhi/pydelhi_mobile

开源软件地址(OpenSource Url):

https://github.com/pydelhi/pydelhi_mobile

开源编程语言(OpenSource Language):

Python 99.6%

开源软件介绍(OpenSource Introduction):

PyDelhi Conf 2017 Application

Mobile App for PyDelhi Conf 2017

Alt text

Kivy Installation:

Make sure you build the theme before using the app.

  • Make sure you have pillow installed. pip install pillow --user
  • Paste/change the image in PyDelhiConf/tools/theming
  • Change your directory to PyDelhiConf
  • Run command make theming

To test install kivy and run the following::

$ python pydelhiconf/main.py -m screen:droid2,portrait -m inspector

Help on screens

This command will aggregate all the png images in your file to one atlas from which the images are loaded.

to make apk prefer linux

  1. Install buildozer: pip install buildozer
  2. Edit the buildozer.spec to specify if you have android ndk and sdk, if not they will be automatically be downloaded by the next step.
  3. Connect your mobile, enable usb debugging, Then goto pydelhiconf folder and type make apk

Link to a existing vm that can be re-used will be added for convenience.

to make ipa for ios **

  1. Install XCode with latest updates & latest command line tools
  2. pip install buildozer
  3. goto the app folder and do buildozer init
  4. edit the buildoze.spec and add details for ios
  5. run buildozer ios debug

How to add a screen

Step 1: Create a new file, add the following Template for a clean Screen

'''Module XYZ:
This is the documentation for the Module that explains the
main usecase of this Module and details it's usage.
'''

from kivy.uix.screenmanager import Screen
from kivy.lang import Builder

class ScreenSponsor(Screen):
    '''This is the documentation for the Screen that explains
    the main usecase of this Screen and details it's usage.
    '''

    # Here we define the UI of this screen.
    Builder.load_string('''
name: 'ScreenSponsor' # your Widgets here, we just use 2 buttons in boxlayout as demo BoxLayout Button Button ''')

Take special note of the names::

The `name: ScreenSponsor`, in this same as the class name `class ScreenSponsor(...)`.

Step 2: Save the file as screensponsor.py in the folder <PyDelhiConf/pydelhiconf/uix/screens>. Take note to name the file same as the class name, in our case ScreenSponsor in lowercase with .py appended at end.

That's it. Now to load this screen::

Button:
	on_release:
        app.load_screen('ScreenSponsor', manager=app.navigation_manager)

manager= is a optional parameter, which specifies which ScreenManager to load this screen in. If it is omitted this screen will be loaded into the main Screen Manager Which is responsobile for loading StartupScreen and NavigationScreen.

*** Enjoy ***




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap