def __init__(self): Ui.DroidUi.__init__(self) self.layout = Ui.LinearLayout( Ui.ScrollView(self), background='@android:drawable/screen_background_dark_transparent', ) for name in NAMES: self.image(self.layout, name)
def __init__(self): Ui.DroidUi.__init__(self) self.layout = Ui.LinearLayout(Ui.ScrollView(self), ) for name in sorted(HTMLColor): color = HTMLColor[name] Ui.TextView( self.layout, layout_width=Ui.MATCH_PARENT, gravity=Ui.CENTER, text='%s: %s' % (name, color), textColor='#%06x' % (0xffffff - int(color[1:], 16), ), background=color, )
def __init__(self): self.about = Ui.TextView( Ui.ScrollView(padding='20dp', background='#ff000000'), text=self.about_text, ) self.game = Game() self.outer = Ui.LinearLayout( Ui.LinearLayout(background='#ff000000'), padding='30dp', background='#3500ffff', layout_height=Ui.FILL_PARENT, ) self.inner = Ui.LinearLayout(self.outer, gravity=Ui.CENTER) Ui.TextView( self.inner, text='Android Sudoku', textSize='20dip', layout_marginBottom='25dip', ) Ui.Button(self.inner, text='Continue', command=self.resume) Ui.Button(self.inner, text='New Game', command=self.play) Ui.Button(self.inner, text='About', command=self.about.mainloop) Ui.Button(self.inner, text='Exit', command=self.inner.quit)