国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

Android QPython3 可視化-命令菜單:RadioCmd.py

2020-09-18 10:46 作者:乘著船  | 我要投稿

#需要BaseWindow.py??https://www.bilibili.com/read/cv8680125


from BaseWindow import *

RB="""

<RadioButton

? ? android:id="@+id/Radio%s"

? ? android:layout_width="fill_parent"

? ? android:layout_height="wrap_content"

? ? android:textSize="8dp"

? ? android:text="%s"

? ? android:background="#%s"

/>

"""

XML="""<?xml version="1.0" encoding="utf-8"?>

<LinearLayout

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:background="#3f7faf"

android:orientation="vertical"

xmlns:android="http://schemas.android.com/apk/res/android">

<LinearLayout

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="vertical"

android:layout_weight="20">

<ScrollView? ?

? ? ? ? android:layout_width="fill_parent"? ?

? ? ? ? android:layout_height="fill_parent" >?

<LinearLayout

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="vertical"

android:layout_weight="20">

? ? <TextView

android:id="@+id/Title"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:textSize="9dp"

android:text="%s"

android:textColor="#ffffff"

android:textStyle="bold"

android:layout_weight="1"

android:gravity="center"

/>

? ? <RadioGroup

? ? ? ? android:id="@+id/RadioGroup"

? ? ? ? android:layout_width="fill_parent"

? ? ? ? android:layout_height="fill_parent"

? ? ? ? android:orientation="vertical">

""","""

? ? </RadioGroup>

</LinearLayout>

</ScrollView>

? ? </LinearLayout>

<Button

android:layout_width="fill_parent"

android:layout_height="60dp"

android:text="%s"

android:id="@+id/but_canc"

android:textSize="8dp"

android:background="#007f00"

android:textColor="#ffffff"

android:layout_weight="1"

android:gravity="center"/>

</LinearLayout>"""

class MainScreen(Layout):

? ? def on_show(self):

? ? ? ? v=self.views

? ? ? ? for i in range(self.Count):

? ? ? ? ? ? c=v['Radio%s'%i]

? ? ? ? ? ? c.add_event(click_EventHandler(c,self.conf))

? ? ? ? i=v.but_canc
????????c=i.add_event
????????c(click_EventHandler(i,self.canc))
????????c(key_EventHandler('4',i,self.canc))

? ? def on_close(self):

? ? ? ? pass

? ? def conf(self,view,dummy):

? ? ? ? MainScreen.Text=int(dummy['data']['id'][5:])

? ? ? ? FullScreenWrapper2App.close_layout()

? ? def canc(self,view,dummy):

? ? ? ? MainScreen.Text=None

? ? ? ? FullScreenWrapper2App.close_layout()

cmColor=('3f3f7f','7f007f')

def RadioCmd(Title='',Radio=(),Cancel='取消'):#主函數(shù)

#命令按鈕組(標(biāo)題,命令按鈕文本組(命令按鈕0,命令按鈕1,……),取消按鈕文本)

#點(diǎn)擊“命令按鈕n”返回整數(shù)n,點(diǎn)擊“取消”返回None

? ? r=[XML[0]%Str2Xml(Title)];i=-1

? ? for i in range(len(Radio)):

? ? ? ? r.append(RB%(i,Str2Xml(Radio[i]),cmColor[i%2]))

? ? MainScreen.Count=i+1

? ? r.append(XML[1]%Cancel)

? ? r=''.join(r)

? ? FullScreenWrapper2App.show_layout(MainScreen(r,'Cmd'))

? ? FullScreenWrapper2App.eventloop()

? ? r=MainScreen.Text

? ? del MainScreen.Text

? ? return r

__all__=('RadioCmd','droid')


==========說(shuō)明===========


RadioCmd('標(biāo)題',('項(xiàng)目0','項(xiàng)目1','項(xiàng)目2'))

點(diǎn)擊“項(xiàng)目n”返回整數(shù)n,點(diǎn)擊“取消”返回None


作者:乘著船@Bilibili

更多文章+下載鏈接:https://www.bilibili.com/read/readlist/rl321663



Android QPython3 可視化-命令菜單:RadioCmd.py的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
通化县| 昂仁县| 曲麻莱县| 宜川县| 无为县| 忻州市| 西宁市| 华亭县| 仁怀市| 湛江市| 广丰县| 泰顺县| 新宾| 甘孜县| 宁国市| 鸡东县| 镇沅| 壤塘县| 池州市| 京山县| 柏乡县| 苍溪县| 咸丰县| 陵川县| 会同县| 行唐县| 那坡县| 晋中市| 泗阳县| 岑巩县| 杨浦区| 加查县| 辽阳县| 红安县| 疏勒县| 砀山县| 瓦房店市| 安阳县| 宾阳县| 瑞丽市| 昔阳县|