无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

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

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

2020-12-06 21:31 作者:乘著船  | 我要投稿

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


from BaseWindow import *

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

<LinearLayout

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:background="#7f3faf"

android:orientation="vertical"

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

<ScrollView? ?

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

? ? ? ? android:layout_height="50dp"

? ? ? ? android:layout_weight="1" >?

? ? <TextView

android:id="@+id/Title"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:textSize="10dp"

android:text="%s"

android:background="#af7f3f"

android:textColor="#ffffff"

android:textStyle="bold"

android:gravity="center"

/>

</ScrollView>

? ? <ListView

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

? ? ? ? android:layout_width="match_parent"

? ? ? ? android:layout_height="wrap_content"

? ? ? ? android:layout_weight="20"

? ? />

<Button

android:layout_width="fill_parent"

android:layout_height="50dp"

android:text="%s"

android:id="@+id/but_canc"

android:textSize="8dp"

android:background="#3faf7f"

android:textColor="#ffffff"

android:layout_weight="1"

android:gravity="center"/>

</LinearLayout>"""

class MainScreen(Layout):

? ? def on_show(self):

? ? ? ? v=self.views

? ? ? ? v.listview.set_listitems(self.List)

? ? ? ? v.listview.add_event(itemclick_EventHandler(v.listview,self.conf))

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

? ? def on_close(self):

? ? ? ? pass

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

? ? ? ? MainScreen.List=int(dummy['data']['position'])

? ? ? ? FullScreenWrapper2App.close_layout()

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

? ? ? ? MainScreen.List=None

? ? ? ? FullScreenWrapper2App.close_layout()

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

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

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

? ? MainScreen.List=List

? ? FullScreenWrapper2App.show_layout(MainScreen(XML%(Str2Xml(Title),Cancel),'Cmd'))

? ? FullScreenWrapper2App.eventloop()

? ? List=MainScreen.List

? ? del MainScreen.List

? ? return List

__all__=('ListCmd','droid')


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


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

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

視頻:BV1Pz4y1C7ds


作者:乘著船@Bilibili

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


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

分享到微博請(qǐng)遵守國(guó)家法律
仙居县| 临江市| 成武县| 太康县| 西贡区| 海林市| 汝州市| 泸州市| 灵石县| 进贤县| 万宁市| 噶尔县| 巴马| 河间市| 保靖县| 蒙自县| 通州区| 怀宁县| 子洲县| 台南市| 贡山| 历史| 平遥县| 禹州市| 仁寿县| 饶平县| 北流市| 临颍县| 内黄县| 新野县| 镇江市| 新巴尔虎左旗| 喀喇沁旗| 吕梁市| 黔南| 堆龙德庆县| 曲松县| 中方县| 慈利县| 开原市| 唐山市|