2013-10-04 38 views

回答

0

您可以通過使用使用KeyboardView達致這:

KeyboardView kbd = new KeyboardView(context); 
kbd.setKeyboard(new Keyboard(this, R.xml.customlayout)); 

kbd.setOnKeyboardActionListener(new OnKeyboardActionListener() { 
    .... 
} 

現在你已經KD這是正常的視圖。

關於此的好處是R.xml.custom引用/res/xml/custom.xml,它在xml中定義鍵盤的佈局。有關此文件的更多信息,請看這裏:Keyboard,Keyboard.Row,Keyboard.Key

+0

:我只是想更改一個標籤 –

+0

,您不能只更改內置鍵盤上的單個按鍵,您必須定製鍵盤才能獲得所需的輸出 – Hamad

0

你應該有或者看看ImeActionLabel ImeActionId

<EditText android:id="@+id/some_edittext" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:imeOptions="actionSend"> 
</EditText> 

Read this answer for more details