欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Android鍵盤(pán)開(kāi)發(fā)知識(shí)點(diǎn)總結(jié)-創(chuàng)新互聯(lián)

先廢話一下,說(shuō)說(shuō)開(kāi)發(fā)鍵盤(pán)的原因:像理財(cái)產(chǎn)品、銀行等app客戶端登錄時(shí),尤其是要輸入密碼時(shí),會(huì)屏蔽掉系統(tǒng)默認(rèn)輸入法,改為自己的輸入法!這個(gè)是考慮安全,以及防止被輸入法軟件記錄密碼等問(wèn)題!所以,安全性極高的app都會(huì)要求密碼等都用自己的輸入法,這就有開(kāi)發(fā)的需求 了!

創(chuàng)新新互聯(lián),憑借10余年的網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作經(jīng)驗(yàn),本著真心·誠(chéng)心服務(wù)的企業(yè)理念服務(wù)于成都中小企業(yè)設(shè)計(jì)網(wǎng)站有近千家案例。做網(wǎng)站建設(shè),選創(chuàng)新互聯(lián)。

言歸正傳:開(kāi)發(fā)這種軟件盤(pán),從什么地方開(kāi)始著手呢?

步驟1:

先看Android給我們提供的Demo


關(guān)于軟鍵盤(pán)的Demo,在以下目錄中能找到:


..\samples\android-22\legacy\SoftKeyboard

步驟二:鍵盤(pán)布局

從Demo中可以看出,鍵盤(pán)的開(kāi)發(fā)和界面開(kāi)發(fā)不一樣,雖然鍵盤(pán)也需要布局,但是卻不是用的布局文件,而是在xml目錄里的文件


先來(lái)看個(gè):

qwerty.xml文件:

<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
 android:keyWidth="10%p"
 android:horizontalGap="0px"
 android:verticalGap="0px"
 android:keyHeight="@dimen/key_height"
 >

 <Row>
  <Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left"/>
  <Key android:codes="119" android:keyLabel="w"/>
  <Key android:codes="101" android:keyLabel="e"/>
  <Key android:codes="114" android:keyLabel="r"/>
  <Key android:codes="116" android:keyLabel="t"/>
  <Key android:codes="121" android:keyLabel="y"/>
  <Key android:codes="117" android:keyLabel="u"/>
  <Key android:codes="105" android:keyLabel="i"/>
  <Key android:codes="111" android:keyLabel="o"/>
  <Key android:codes="112" android:keyLabel="p" android:keyEdgeFlags="right"/>
 </Row>

 <Row>
  <Key android:codes="97" android:keyLabel="a" android:horizontalGap="5%p" 
    android:keyEdgeFlags="left"/>
  <Key android:codes="115" android:keyLabel="s"/>
  <Key android:codes="100" android:keyLabel="d"/>
  <Key android:codes="102" android:keyLabel="f"/>
  <Key android:codes="103" android:keyLabel="g"/>
  <Key android:codes="104" android:keyLabel="h"/>
  <Key android:codes="106" android:keyLabel="j"/>
  <Key android:codes="107" android:keyLabel="k"/>
  <Key android:codes="108" android:keyLabel="l" android:keyEdgeFlags="right"/>
 </Row>

 <Row>
  <Key android:codes="-1" android:keyIcon="@drawable/sym_keyboard_shift" 
    android:keyWidth="15%p" android:isModifier="true"
    android:isSticky="true" android:keyEdgeFlags="left"/>
  <Key android:codes="122" android:keyLabel="z"/>
  <Key android:codes="120" android:keyLabel="x"/>
  <Key android:codes="99" android:keyLabel="c"/>
  <Key android:codes="118" android:keyLabel="v"/>
  <Key android:codes="98" android:keyLabel="b"/>
  <Key android:codes="110" android:keyLabel="n"/>
  <Key android:codes="109" android:keyLabel="m"/>
  <Key android:codes="-5" android:keyIcon="@drawable/sym_keyboard_delete" 
    android:keyWidth="15%p" android:keyEdgeFlags="right"
    android:isRepeatable="true"/>
 </Row>

 <Row android:rowEdgeFlags="bottom">
  <Key android:codes="-3" android:keyIcon="@drawable/sym_keyboard_done" 
    android:keyWidth="15%p" android:keyEdgeFlags="left"/>
  <Key android:codes="-2" android:keyLabel="123" android:keyWidth="10%p"/>
  <!--
   android:codes: -101 is not a framework-defined key code but a key code that is
   privately defined in com.example.android.softkeyboard.LatinKeyboardView.
  -->
  <Key android:codes="-101" android:keyIcon="@drawable/sym_keyboard_language_switch"
    android:keyWidth="10%p"/>
  <Key android:codes="32" android:keyIcon="@drawable/sym_keyboard_space" 
    android:keyWidth="30%p" android:isRepeatable="true"/>
  <Key android:codes="46,44" android:keyLabel=". ,"
    android:keyWidth="15%p"/>
  <Key android:codes="10" android:keyIcon="@drawable/sym_keyboard_return" 
    android:keyWidth="20%p" android:keyEdgeFlags="right"/>
 </Row>
</Keyboard>

分享題目:Android鍵盤(pán)開(kāi)發(fā)知識(shí)點(diǎn)總結(jié)-創(chuàng)新互聯(lián)
本文鏈接:http://www.chinadenli.net/article32/djdcpc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App開(kāi)發(fā)手機(jī)網(wǎng)站建設(shè)網(wǎng)頁(yè)設(shè)計(jì)公司關(guān)鍵詞優(yōu)化搜索引擎優(yōu)化Google

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司