五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網 會員登陸 & 注冊

Android QPython3 可視化-長文本:LongText.py

2020-09-17 00:55 作者:乘著船  | 我要投稿

#需要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="#ff0E4200"

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">

? ? <EditText

android:id="@+id/editTitle"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:textSize="8dp"

android:text=""

android:textColor="#ff0000"

android:layout_weight="1"

android:gravity="center"

/>

<EditText

android:id="@+id/editText"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:textSize="8dp"

android:text=""

android:textColor="#0000ff"

android:layout_weight="1"

/>

</LinearLayout>

</ScrollView>

? ? </LinearLayout>

<LinearLayout

android:layout_width="fill_parent"

android:layout_height="100dp"

android:orientation="horizontal"

android:layout_weight="8">

<Button

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:text="%s"

android:id="@+id/but_conf"

android:textSize="8dp"

android:background="#007f7f"

android:textColor="#ffffffff"

android:layout_weight="1"

android:gravity="center"/>

<Button

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:text="%s"

android:id="@+id/but_copy"

android:textSize="8dp"

android:background="#7f7f00"

android:textColor="#ffffffff"

android:layout_weight="1"

android:gravity="center"/>

<Button

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:text="%s"

android:id="@+id/but_canc"

android:textSize="8dp"

android:background="#7f007f"

android:textColor="#ffffffff"

android:layout_weight="1"

android:gravity="center"/>

</LinearLayout>

</LinearLayout>"""

class MainScreen(Layout):

? ? def on_show(self):

? ? ? ? self.views.but_conf.add_event(click_EventHandler(self.views.but_conf,self.conf))

? ? ? ? self.views.but_copy.add_event(click_EventHandler(self.views.but_copy,self.copy))

? ? ? ? self.views.but_canc.add_event(click_EventHandler(self.views.but_canc,self.canc))

? ? ? ? self.views.editText.text=self.Text

? ? ? ? self.views.editTitle.text=self.Title

? ? def on_close(self):

? ? ? ? pass

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

? ? ? ? droid.setClipboard(self.views.editText.text)

? ? ? ? droid.makeToast("文本已復制")

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

? ? ? ? MainScreen.Text=self.views.editText.text

? ? ? ? FullScreenWrapper2App.close_layout()

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

? ? ? ? MainScreen.Text=None

? ? ? ? FullScreenWrapper2App.close_layout()

def LongText(Title='',Text='',button=CCC):#主函數

#長文本(標題,多行文本,(確認按鈕文本,復制按鈕文本,取消按鈕文本))

#按“確認”返回“多行文本”內容,按“取消”返回None。

? ? MainScreen.Title=Title

? ? MainScreen.Text=Text

? ? FullScreenWrapper2App.show_layout(MainScreen(XML%tuple(button),'Long'))

? ? FullScreenWrapper2App.eventloop()

? ? i=MainScreen.Text

? ? del MainScreen.Title,MainScreen.Text

? ? return i

__all__=('LongText','droid')


==========說明==========


LongText('標題','多行\(zhòng)n內容')

按“確認”返回:多行\(zhòng)n內容。


作者:乘著船@Bilibili

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



Android QPython3 可視化-長文本:LongText.py的評論 (共 條)

分享到微博請遵守國家法律
门头沟区| 永丰县| 唐河县| 海晏县| 连城县| 白城市| 通渭县| 东至县| 邢台市| 获嘉县| 南木林县| 赤水市| 乌鲁木齐县| 福安市| 南昌市| 巴东县| 墨玉县| 自贡市| 义马市| 休宁县| 黄骅市| 博白县| 双城市| 左云县| 黄山市| 浦县| 杭锦后旗| 名山县| 奉化市| 方城县| 淮安市| 西城区| 金堂县| 合江县| 镇雄县| 东兰县| 清苑县| 贡觉县| 高密市| 漳浦县| 永康市|