最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

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

Android QPython3 SL4A 常用函數(shù):Dialog.py

2020-12-04 00:11 作者:乘著船  | 我要投稿

#需要android.py??https://www.bilibili.com/read/cv8679914


from android import droid,rsla,jsla


OK=('OK',)

YN=('Yes','No')

OC=('OK','Cancel')

YNC=('Yes','No','Cancel')

PNNS={'positive':1,'negative':-1,'neutral':0}

PNNt=tuple(PNNS)


def Which():#請忽略

? ? return PNNS[rsla("dialogGetResponse")['which']]


def ButtonText(button):#請忽略

? ? Lc=len(button)

? ? if Lc>2:jsla("dialogSetNeutralButtonText",button[2])

? ? if Lc>1:jsla("dialogSetNegativeButtonText",button[1])

? ? if Lc==0:button=OK

? ? jsla("dialogSetPositiveButtonText",button[0])


def Button(title='Prompt',message='Are you sure ?',button=YNC):#三鍵按鈕

? ? jsla("dialogCreateAlert",title, message)

? ? ButtonText(button)

? ? jsla("dialogShow")

? ? try:

? ? ? ? return Which()

? ? except:

? ? ? ? return 0


def ProgressCreate(title='標題',message='內(nèi)容', maxValue=100):#創(chuàng)建進度條

? ? jsla("dialogCreateHorizontalProgress",title,message,maxValue)

? ? jsla("dialogShow")

def ProgressSet(CurrentValue):#設置進度條當前值

? ? jsla('dialogSetCurrentProgress',CurrentValue)

def Progressmax(MaxValue):#設置進度條最大值

? ? jsla('dialogSetMaxProgress',MaxValue)

def ProgressDis():#關閉進度條

? ? jsla('dialogDismiss')


def SeekBar(Start=50,Max=100,Title='標題',Message='內(nèi)容',button=OC):#拖動條

? ? jsla("dialogCreateSeekBar",Start,Max,Title,"%s\n\n0 ~ %s"%(Message,Max))

? ? jsla("dialogSetPositiveButtonText",button[0])

? ? jsla("dialogSetNegativeButtonText",button[1])

? ? jsla("dialogShow")

? ? r=rsla("dialogGetResponse")

? ? try:

? ? ? ? if r['which']=='positive':

? ? ? ? ? ? return r['progress']

? ? except:

? ? ? ? pass


def SpinCreate(title='標題',message='內(nèi)容'):#創(chuàng)建轉圈

? jsla("dialogCreateSpinnerProgress",title, message)

? jsla("dialogShow")

SpinDis=ProgressDis#清除轉圈


def Login(title='Login',message=('Username','Password')):#登錄窗口

? ? u=rsla("dialogGetInput",title,message[0])

? ? if not u:

? ? ? ? return None,None

? ? p=rsla("dialogGetPassword",title,message[1])

? ? if not p:

? ? ? ? return None,None

? ? return u,p


def List(title='Which is your choose ?',list_=YNC):#列表選項

? ? jsla("dialogCreateAlert",title)

? ? jsla("dialogSetItems",list_)

? ? jsla("dialogShow")

? ? try:

? ? ? ? return rsla("dialogGetResponse")['item']

? ? except:

? ? ? ? return None


def Input(title="Value",message="Please enter a value :",default=""):#單行輸入窗口

? ? return rsla("dialogGetInput",title,message,default)


def Password(title="Password",message="Please enter password:"):#密碼輸入窗口

? ? return rsla("dialogGetPassword",title,message)


def setClip(Text):#設置剪貼板內(nèi)容

? ? jsla('setClipboard',Text)

def getClip():#獲取剪貼板內(nèi)容

? ? return rsla("getClipboard")


def Vibrate(millisecond=250):#振動

? ? jsla('vibrate',millisecond)

def Notify(title,message):#通知欄提示

? ? jsla('notify',title,message)

def Toast(message):#吐司提示框

? ? jsla('makeToast',message)

def Speak(message):#文字轉語音

? ? jsla('ttsSpeak',message)


作者:乘著船@Bilibili

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


Android QPython3 SL4A 常用函數(shù):Dialog.py的評論 (共 條)

分享到微博請遵守國家法律
嘉义县| 海晏县| 米脂县| 益阳市| 融水| 凤凰县| 名山县| 扎赉特旗| 九龙县| 尤溪县| 玛曲县| 赤水市| 武夷山市| 璧山县| 无为县| 庄浪县| 会昌县| 全南县| 青川县| 唐河县| 昌江| 萝北县| 高雄市| 金沙县| 克山县| 白河县| 田林县| 咸丰县| 三门县| 平远县| 九寨沟县| 大埔县| 郯城县| 额济纳旗| 工布江达县| 宁陵县| 信宜市| 读书| 莱阳市| 丹巴县| 尚义县|