{"id":291266,"date":"2018-10-24T11:05:02","date_gmt":"2018-10-24T07:05:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=291266"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=291266","title":{"rendered":"\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 python kivy \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430 \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u041e\u0442 \u043a\u043e\u0434\u0430 \u0438 \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f .apk \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f Android"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_v\/x6\/mo\/_vx6morzoupmocmtvgtfmmla5xs.jpeg\"><\/div>\n<p>  \u0418\u0437\u0443\u0447\u0430\u044e\u00a0python <a href=\"https:\/\/kivy.org\">kivy<\/a> \u0438 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u0432\u043e\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u0435. \u0420\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0432 kivy. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 100 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430. <\/p>\n<p>  \u0426\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430 <s>\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/s>:<\/p>\n<p>  1)\u00a0 \u0418\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044b\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439 \u0432 \u043f\u0438\u0442\u0430\u043d\u0438\u0438. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c\u00a0 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0431\u043b\u044e\u0434\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u043e.\u00a0 <\/p>\n<p>  2) \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u0431\u043b\u044e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u043b, \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u0431\u044b\u043b \u0438 \u0433\u043e\u0434\u0430\u043c\u0438 \u043a \u043d\u0438\u043c \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u043e\u043c\u043d\u0438\u043b. \u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u0431\u044b\u0432\u0430\u0435\u0442.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h2><font color=\"#cc0000\">\u0418\u043d\u0442\u0440\u043e<\/font><\/h2>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043d\u0435 \u0447\u0438\u0442\u0430\u0442\u044c, \u0432 \u0438\u043d\u0442\u0440\u043e \u0432\u0441\u044f\u043a\u0430\u044f \u043b\u0438\u0440\u0438\u043a\u0430. <\/p>\n<p>  \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0436\u0438\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0435, \u0432 \u043e\u0434\u043d\u043e\u0439 \u0433\u043e\u0441\u0442\u0438\u043d\u0438\u0446\u0435, \u0433\u0434\u0435 \u043a\u043e\u0440\u043c\u0438\u043b\u0438 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u044f\u0439\u0446\u0430\u043c\u0438 \u043d\u0430 \u0437\u0430\u0432\u0442\u0440\u0430\u043a \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u043c, \u0442\u0430\u043a \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0447\u0430\u043b \u0447\u0435\u0441\u0430\u0442\u044c\u0441\u044f. \u041e\u0431\u0440\u0430\u0449\u0430\u043b\u0441\u044f \u0437\u0430 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u043e\u0439 \u043f\u043e\u043c\u043e\u0449\u044c\u044e, \u0445\u043e\u0442\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0438\u0447\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043d\u0435 \u0441\u0442\u0440\u0430\u0434\u0430\u043b. \u041d\u0430\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0433\u043e\u0440\u044c\u043a\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0440\u0435\u0448\u0438\u043b \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439 \u0432 \u0435\u0434\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0443\u0441\u043f\u0435\u0432\u0430\u043b\u043e \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0435 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u043c\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u043e\u043f\u044b\u0442, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e, \u0431\u0435\u0437 \u043d\u0430\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b \u0431\u0435\u0437 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043e\u0432\u0441\u044f\u043d\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0435\u0441\u0442\u044c \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043b\u0435\u0442.<\/p>\n<h2><font color=\"#cc0000\">\u0421\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b<\/font><\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ub\/o4\/l2\/ubo4l2ajlvsmzdaaqoiohlje7vw.png\"><\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u043c\u043e\u0439 \u0440\u0430\u0446\u0438\u043e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 50 \u0431\u043b\u044e\u0434.\u00a0 \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0435\u043b \u043e\u043c\u043b\u0435\u0442. \u041d\u0430\u0436\u0438\u043c\u0430\u044e \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443, \u0438 \u043e\u043c\u043b\u0435\u0442 \u0441\u0442\u0430\u043b \u043d\u0430 50 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0430 \u043f\u0435\u0440\u0435\u0434 \u043d\u0438\u043c \u0441\u0442\u043e\u044f\u0442 49 \u0431\u043b\u044e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u044a\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u044f\u0442\u044c \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043e\u043c\u043b\u0435\u0442\u0430. \u0412\u043e\u0442 \u0438 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. (\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430\u0445 \u0431\u043b\u044e\u0434\u0430 \u043d\u0430\u0433\u0435\u043d\u0435\u0440\u0435\u043d\u043d\u044b\u0435, \u0432\u0441\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b, \u043a \u043c\u043e\u0435\u043c\u0443 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u0430\u0446\u0438\u043e\u043d\u0443 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435).<\/p>\n<h2><font color=\"#cc0000\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f<\/font><\/h2>\n<pre><code class=\"python\">from kivy.app import App from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.uix.screenmanager import ScreenManager, Screen from kivy.uix.recycleview import RecycleView from kivy.uix.gridlayout import GridLayout from kivy.core.window import Window from kivy.config import ConfigParser from kivy.uix.textinput import TextInput from kivy.uix.label import Label from kivy.metrics import dp from datetime import datetime import os import ast import time   class MenuScreen(Screen):     def __init__(self, **kw):         super(MenuScreen, self).__init__(**kw)         box = BoxLayout(orientation='vertical')         box.add_widget(Button(text='\u0414\u043d\u0435\u0432\u043d\u0438\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f', on_press=lambda x:                               set_screen('list_food')))         box.add_widget(Button(text='\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u044e\u0434\u043e \u0432 \u0434\u043d\u0435\u0432\u043d\u0438\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f',                               on_press=lambda x: set_screen('add_food')))         self.add_widget(box)   class SortedListFood(Screen):     def __init__(self, **kw):         super(SortedListFood, self).__init__(**kw)      def on_enter(self):  # \u0411\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430          self.layout = GridLayout(cols=1, spacing=10, size_hint_y=None)         self.layout.bind(minimum_height=self.layout.setter('height'))         back_button = Button(text='&lt; \u041d\u0430\u0437\u0430\u0434 \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e',                              on_press=lambda x: set_screen('menu'),                              size_hint_y=None, height=dp(40))         self.layout.add_widget(back_button)         root = RecycleView(size_hint=(1, None), size=(Window.width,                                                       Window.height))         root.add_widget(self.layout)         self.add_widget(root)          dic_foods = ast.literal_eval(             App.get_running_app().config.get('General', 'user_data'))          for f, d in sorted(dic_foods.items(), key=lambda x: x[1]):             fd = f.decode('u8') + ' ' + (datetime.fromtimestamp(d).strftime('%Y-%m-%d'))             btn = Button(text=fd, size_hint_y=None, height=dp(40))             self.layout.add_widget(btn)      def on_leave(self):  # \u0411\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430          self.layout.clear_widgets()  # \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a   class AddFood(Screen):      def buttonClicked(self, btn1):         if not self.txt1.text:             return         self.app = App.get_running_app()         self.app.user_data = ast.literal_eval(             self.app.config.get('General', 'user_data'))         self.app.user_data[self.txt1.text.encode('u8')] = int(time.time())          self.app.config.set('General', 'user_data', self.app.user_data)         self.app.config.write()          text = \"\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0431\u043b\u044e\u0434\u043e:  \" + self.txt1.text         self.result.text = text         self.txt1.text = ''      def __init__(self, **kw):         super(AddFood, self).__init__(**kw)         box = BoxLayout(orientation='vertical')         back_button = Button(text='&lt; \u041d\u0430\u0437\u0430\u0434 \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e', on_press=lambda x:                              set_screen('menu'), size_hint_y=None, height=dp(40))         box.add_widget(back_button)         self.txt1 = TextInput(text='', multiline=False, height=dp(40),                               size_hint_y=None, hint_text=\"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u043b\u044e\u0434\u0430\")         box.add_widget(self.txt1)         btn1 = Button(text=\"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u044e\u0434\u043e\", size_hint_y=None, height=dp(40))         btn1.bind(on_press=self.buttonClicked)         box.add_widget(btn1)         self.result = Label(text='')         box.add_widget(self.result)         self.add_widget(box)   def set_screen(name_screen):     sm.current = name_screen   sm = ScreenManager() sm.add_widget(MenuScreen(name='menu')) sm.add_widget(SortedListFood(name='list_food')) sm.add_widget(AddFood(name='add_food'))   class FoodOptionsApp(App):     def __init__(self, **kvargs):         super(FoodOptionsApp, self).__init__(**kvargs)         self.config = ConfigParser()      def build_config(self, config):         config.adddefaultsection('General')         config.setdefault('General', 'user_data', '{}')      def set_value_from_config(self):         self.config.read(os.path.join(self.directory, '%(appname)s.ini'))         self.user_data = ast.literal_eval(self.config.get(             'General', 'user_data'))      def get_application_config(self):         return super(FoodOptionsApp, self).get_application_config(             '{}\/%(appname)s.ini'.format(self.directory))      def build(self):         return sm   if __name__ == '__main__':     FoodOptionsApp().run()  <\/code><\/pre>\n<p>  \u042f \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b kv \u0444\u0430\u0439\u043b\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u0434 \u0434\u0430\u043d \u0432 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445, \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 python. \u0412\u0441\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0433\u043e\u043b\u043e\u043c python. \u0412 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u0445 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0438 python \u043a\u043e\u0434\u0430, \u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0443 \u043a \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0444\u0438\u0448\u043a\u0430\u043c Kivy.<br \/>  \u041f\u043e\u0435\u0445\u0430\u043b\u0438:   <\/p>\n<ul>\n<li>\n<pre><code class=\"python\">class MenuScreen(Screen):<\/code><\/pre>\n<p>\u041a\u043b\u0430\u0441\u0441 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 StartScreen. \u0418 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 <a href=\"https:\/\/kivy.org\/doc\/stable\/api-kivy.uix.screenmanager.html\">kivy \u043c\u043e\u0434\u0443\u043b\u044c Screen<\/a>. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 3-\u0445 \u043e\u043a\u043e\u043d, \u0432\u043e\u0442 \u044d\u0442\u0438 \u043e\u043a\u043e\u0448\u043a\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f <\/li>\n<li>\n<pre><code class=\"python\">box = BoxLayout(orientation='vertical')<\/code><\/pre>\n<p> <a href=\"https:\/\/kivy.org\/doc\/stable\/api-kivy.uix.boxlayout.html\">BoxLayout<\/a> \u0434\u0435\u043b\u0438\u0442 \u044d\u043a\u0440\u0430\u043d \u043d\u0430 \u0440\u0430\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b orientation=&#8217;vertical&#8217;, \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e<\/li>\n<li>\n<pre><code class=\"python\">Button(text='\u0414\u043d\u0435\u0432\u043d\u0438\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f',  on_press=lambda x: set_screen('list_food')) <\/code><\/pre>\n<p>  <a href=\"https:\/\/kivy.org\/doc\/stable\/api-kivy.uix.button.html\">Button<\/a> \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0438, \u0432 on_press \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438.   <\/li>\n<li>\n<pre><code class=\"python\">.add_widget()<\/code><\/pre>\n<p> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u0441\u043b\u043e\u0438 \u0438 \u0432 \u043e\u043a\u043d\u0430<\/li>\n<li>\n<pre><code class=\"python\">self.layout = GridLayout(cols=1, spacing=10, size_hint_y=None)<\/code><\/pre>\n<p>  <a href=\"https:\/\/kivy.org\/doc\/stable\/api-kivy.uix.gridlayout.html\">Grid Layout<\/a> \u0447\u0435\u043c-\u0442\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0442\u0435\u0433 table \u0432 html, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f cols \u2014 \u043a\u043e\u043b-\u0432\u043e \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0438\u043b\u0438 rows \u2014 \u043a\u043e\u043b-\u0432\u043e \u0441\u0442\u0440\u043e\u043a. <br \/>  \u041c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0438\u043b\u0438 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.<br \/>  \u042d\u043a\u0440\u0430\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u043e\u0442\u0441\u0435\u043a\u043e\u0432.   <\/li>\n<li>\n<pre><code class=\"python\">root = RecycleView(size_hint=(1, None), size=(Window.width,                                                       Window.height))<\/code><\/pre>\n<p>  <a href=\"https:\/\/kivy.org\/doc\/stable\/api-kivy.uix.recycleview.html\">RecycleView<\/a> \u2014 \u043c\u043e\u0434\u0443\u043b\u044c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0430 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c RecycleView \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0441\u0442\u0440\u043e\u0438\u0442 \u0441\u043a\u0440\u043e\u043b\u044b \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u044b \u0438 \u0432\u044b\u0441\u043e\u0442\u044b. \u0418 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e. \u0410 \u0435\u0441\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/kivy.org\/doc\/stable\/api-kivy.uix.scrollview.html\">ScrollView<\/a>, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c RecycleView  <\/li>\n<li>\n<pre><code class=\"python\">config.get('General', 'user_data')<\/code><\/pre>\n<p> \u2014 \u0432 \u043a\u043e\u0434\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u042f \u043f\u0440\u043e\u0441\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0440\u043e\u0434\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 <a href=\"https:\/\/kivy.org\/doc\/stable\/api-kivy.config.html\">Config kivy<\/a>. \u041d\u0443, \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u044b\u0441\u044f\u0447 \u0431\u043b\u044e\u0434, \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0433\u043e\u0440\u043e\u0434\u0438\u0442\u044c \u043e\u0433\u043e\u0440\u043e\u0434 \u0441 sqlite \u0438 \u0447\u0435\u043c-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c. \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0438\u043a\u0435. \u0425\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b\u0438\u043a \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435, \u0447\u0442\u043e \u0438 \u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c self.directory \u043a\u0430\u043a \u0432 \u043c\u043e\u0435\u043c \u043a\u043e\u0434\u0435, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c self.user_data_dir, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b\u0438\u043a \u043d\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u043b\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u0445. <\/li>\n<\/ul>\n<h2><font color=\"#cc0000\">\u0417\u0430\u043f\u0443\u0441\u043a \u043d\u0430 windows &amp; linux &amp; macos<\/font><\/h2>\n<p>  \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043e\u043a \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439:  <\/p>\n<ol>\n<li>\u0421\u0442\u0430\u0432\u0438\u043c python3<\/li>\n<li><a href=\"https:\/\/kivy.org\/doc\/stable\/installation\/installation.html\">\u0421\u0442\u0430\u0432\u0438\u043c kivy<\/a><\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b main.py \u0438 \u0432\u0442\u044b\u043a\u0430\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434<\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439\n<pre><code class=\"python\">python3 main.py<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<h2><font color=\"#cc0000\">\u0421\u0431\u043e\u0440\u043a\u0430 apk \u0444\u0430\u0439\u043b\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0441 \u0430\u043d\u0434\u0440\u043e\u0438\u0434<\/font><\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 python. \u041a\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0441 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u043e\u043c? \u0420\u0430\u043d\u044c\u0448\u0435 \u044d\u0442\u043e \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0443\u0434\u0440\u0435\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u0438 \u0442\u0430\u043d\u0446\u0435\u0432 \u0441 \u0431\u0443\u0431\u043d\u043e\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. <br \/>  \u0412\u043e\u0442 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f:<\/p>\n<ol>\n<li>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 kivy, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0436\u0435 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e. <a href=\"https:\/\/github.com\/Zen-CODE\/kivybits\/blob\/master\/KivyCompleteVM\/ReadMe.txt\">https:\/\/github.com\/Zen-CODE\/kivybits\/blob\/master\/KivyCompleteVM\/ReadMe.txt<\/a>. \u041f\u0430\u0440\u043e\u043b\u044c: kivy  <\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0435 \u0432 Virtual Box. <\/li>\n<li>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:\n<pre><code class=\"bash\"># \u0421\u0442\u0430\u0432\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e python-for-android cd \/home\/kivy\/Repos rm -fr python-for-android\/ git clone https:\/\/github.com\/kivy\/python-for-android.git cd ~ mkdir Project cd Project git clone https:\/\/github.com\/Alexmod\/FoodOptions.git cd FoodOptions buildozer android debug # \u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u044d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u043b\u0433\u043e \u0442\u044f\u043d\u0443\u0442\u044c 100500 \u0432\u0441\u044f\u043a\u0438\u0445  \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, # \u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0430\u0437\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0437\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.  <\/code><\/pre>\n<p>  <\/li>\n<li>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0430\u043f\u043a\u0443 bin \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0432 bin \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0444\u0430\u0439\u043b foodoptions-0.1-debug.apk, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c<\/li>\n<\/ol>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/co\/nq\/la\/conqla41ldeuegbg4lwlbqztwqc.png\"><\/div>\n<p>  <b>\u041a\u0430\u043a \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c apk \u0444\u0430\u0439\u043b \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d?<\/b><br \/>  \u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u043f\u043e \u043f\u043e\u0447\u0442\u0435, \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c, \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0438 \u0442.\u0434., \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d.<br \/>  \u041d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e.<br \/>  \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c USB-\u043a\u0430\u0431\u0435\u043b\u0435\u043c. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0432\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d. <br \/>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c adb:  <\/p>\n<pre><code class=\"bash\">sudo apt install adb<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 bin \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443  <\/p>\n<pre><code class=\"bash\">adb install -r foodoptions-0.1-debug.apk <\/code><\/pre>\n<p>  \u0418 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043c\u0438\u043d\u0443\u0442\u043a\u0443 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0443\u0432\u0438\u0434\u0438\u043c<br \/>  Success \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.   <\/p>\n<pre><code class=\"bash\">kivy@kivy-complete:~\/Project\/FoodOptions\/bin$ adb install -r foodoptions-0.1-debug.apk  342 KB\/s (10083019 bytes in 28.730s) Success kivy@kivy-complete:~\/Project\/FoodOptions\/bin$  <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u0434\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043e\u0448\u0438\u0431\u043e\u043a  <\/p>\n<pre><code class=\"bash\">adb logcat| grep python<\/code><\/pre>\n<p>  <b>\u0420\u0443\u0441\u0441\u043a\u043e\u0435 \u0438\u043c\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/b><br \/>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e-\u0440\u0443\u0441\u0441\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab\u0414\u043d\u0435\u0432\u043d\u0438\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f\u00bb, \u0442\u043e \u043d\u0430\u0434\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code>.buildozer\/android\/platform\/build\/dists\/foodoptions\/templates\/strings.tmpl.xml <\/code><\/pre>\n<p>  \u0412 \u0442\u0435\u0433 appName \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u044d\u0442\u0430 \u043f\u0430\u043f\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 buildozer android debug. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0444\u0430\u0439\u043b \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u0442\u0435, \u0432\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u043d\u0430\u0437\u0430\u0434 \u0432 \u043f\u0430\u043f\u043a\u0443 FoodOptions \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 buildozer android debug \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e. \u0424\u0430\u0439\u043b \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043f\u043e-\u043d\u043e\u0432\u043e\u0439. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0438\u043c\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c. <\/p>\n<p>  <b>\u041e \u0444\u0430\u0439\u043b\u0435 buildozer.spec<\/b><br \/>  \u0412\u043e\u0442 \u043c\u043e\u0439 \u0444\u0430\u0439\u043b \u0441 \u0433\u0438\u0442\u0445\u0430\u0431\u0430: <a href=\"https:\/\/github.com\/Alexmod\/FoodOptions\/blob\/master\/buildozer.spec\">buildozer.spec<\/a><br \/>  \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 buildozer-\u0443, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442. <br \/>  \u0422\u0430\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439. <br \/>  \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u043e \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<pre><code class=\"bash\">cd \/tmp buildozer init <\/code><\/pre>\n<p>  \u0411\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b buildozer.spec \u0441 \u043a\u0443\u0447\u0435\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0438 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439. <br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0432\u043e\u044e \u0438\u043a\u043e\u043d\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 <br \/>  \u0432 \u0441\u0442\u0440\u043e\u043a\u0435  <\/p>\n<pre><code class=\"bash\">icon.filename = %(source.dir)s\/data\/icon.png<\/code><\/pre>\n<p>  \u0441\u0432\u043e\u0439 \u0444\u0430\u0439\u043b \u0441 \u0438\u043a\u043e\u043d\u043a\u043e\u0439. \u0418 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u0441 \u0432\u0430\u0448\u0435\u0439 \u0438\u043a\u043e\u043d\u043a\u043e\u0439. <br \/>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 python, \u0442\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 requirements = <br \/>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u0440\u0430\u0441\u0441\u043a\u0430\u0437 \u043e \u0444\u0430\u0439\u043b\u0435 buildozer.spec \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0430 \u0442\u043e \u0438 \u0434\u0432\u0435.<\/p>\n<p>  <b>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Google Play<\/b><br \/>  \u041d\u0430\u0434\u043e \u0437\u0430\u0440\u0435\u0433\u0430\u0442\u044c\u0441\u044f, \u043f\u0440\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u0438.<br \/>  \u0418 \u0434\u0430\u043b\u044c\u0448\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c  <\/p>\n<pre><code class=\"bash\">sudo apt install zipalign buildozer android release jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore \/path\/keystore bin\/apk-unsigned.apk apkname zipalign -v 4 bin\/apk-apkname-unsigned.apk bin\/apk-apkname-release.apk<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b apk-apkname-release.apk \u0437\u0430\u043b\u0438\u0432\u0430\u0442\u044c \u0432 Google Play.<\/p>\n<h2><font color=\"#cc0000\">\u0421\u0441\u044b\u043b\u043a\u0438<\/font><\/h2>\n<p>  <\/p>\n<ul>\n<li> <a href=\"https:\/\/www.youtube.com\/playlist?list=PLvoBekrlHDgT2t0PH1J1VT_Bk2ziEAWMs\">\u0412\u0438\u0434\u0435\u043e-\u0443\u0440\u043e\u043a\u0438 \u043f\u043e kivy \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435<\/a>. \u041b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c<\/li>\n<li>\u0421\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043f\u0440\u043e kivy \u043e\u0442 <a href=\"https:\/\/habr.com\/users\/heattheatr\/\" class=\"user_link\">HeaTTheatR<\/a> (\u0438 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0435\u043c\u0443 \u0437\u0430 \u043f\u043e\u043c\u043e\u0449\u044c!)<\/li>\n<\/ul>\n<p>  \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043b\u044e\u0431\u043e\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 python, \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<ol>\n<li><a href=\"https:\/\/github.com\/HeaTTheatR\/KivyMD\">\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d<\/a>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043b\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435<\/li>\n<li><a href=\"https:\/\/kivy.org\/doc\/stable\/guide\/lang.html\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c kv-\u0444\u0430\u0439\u043b\u044b<\/a>, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0441\u0442\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u043b\u0435\u0433\u043a\u0438\u043c. \u042f \u0431\u044b \u043f\u0440\u0438\u0432\u0435\u043b \u0442\u0430\u043a\u0443\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044e: \u0442\u0435 \u043a\u0442\u043e \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0435\u0431\u0435 \u043a\u043e\u0434 \u0431\u0435\u0437 html \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u043e\u0432 \u0438 \u0441 html \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430\u043c\u0438. \u0412\u044b\u043d\u043e\u0441 \u0432 kv-\u0444\u0430\u0439\u043b\u044b \u043a\u043d\u043e\u043f\u043e\u043a, \u0441\u043b\u043e\u0435\u0432 \u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u2014 \u044d\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 jinja2 \u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430. \u041b\u043e\u0433\u0438\u043a\u0430 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432 .py \u0444\u0430\u0439\u043b\u0430\u0445, \u0430 \u0444\u0435\u043d\u0435\u0447\u043a\u0438 \u2014 \u0432 kv-\u0444\u0430\u0439\u043b\u0430\u0445.<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u0430\u043b\u043e\u0440\u0438\u0439, \u0431\u0435\u043b\u043a\u0430, \u0443\u0433\u043b\u0435\u0432\u043e\u0434\u043e\u0432, \u0436\u0438\u0440\u043e\u0432 (\u0411\u0416\u0423)<\/li>\n<li><a href=\"https:\/\/github.com\/kivy\/plyer\/tree\/master\/examples\/camera\/basic\">\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u044e\u0434\u0430<\/a><\/li>\n<\/ol>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/426269\/\"> https:\/\/habr.com\/post\/426269\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_v\/x6\/mo\/_vx6morzoupmocmtvgtfmmla5xs.jpeg\"><\/div>\n<p>  \u0418\u0437\u0443\u0447\u0430\u044e\u00a0python <a href=\"https:\/\/kivy.org\">kivy<\/a> \u0438 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u0432\u043e\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u0435. \u0420\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0432 kivy. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 100 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430. <\/p>\n<p>  \u0426\u0435\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430 <s>\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/s>:<\/p>\n<p>  1)\u00a0 \u0418\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044b\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439 \u0432 \u043f\u0438\u0442\u0430\u043d\u0438\u0438. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c\u00a0 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0431\u043b\u044e\u0434\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u043e.\u00a0 <\/p>\n<p>  2) \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u0431\u043b\u044e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u043b, \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u0431\u044b\u043b \u0438 \u0433\u043e\u0434\u0430\u043c\u0438 \u043a \u043d\u0438\u043c \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u043e\u043c\u043d\u0438\u043b. \u0423 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0435 \u0431\u044b\u0432\u0430\u0435\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-291266","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=291266"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291266\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=291266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=291266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=291266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}