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

歡迎光臨散文網(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的評論 (共 條)

分享到微博請遵守國家法律
德安县| 敦化市| 凤庆县| 浠水县| 临汾市| 泽州县| 饶阳县| 手机| 石嘴山市| 驻马店市| 祁门县| 江都市| 密山市| 台安县| 北辰区| 仁布县| 衡阳县| 绥化市| 龙胜| 西充县| 明溪县| 卢龙县| 合江县| 淮安市| 拜泉县| 康马县| 额尔古纳市| 镇宁| 克拉玛依市| 临桂县| 霍州市| 永新县| 巴楚县| 阜南县| 晋州市| 柳江县| 景洪市| 龙江县| 延吉市| 文成县| 湖北省|