2013-05-20 41 views
-2

在我的應用程序登錄屏幕,我需要改變默認的鍵盤最後一個箭頭,而不是像旁邊一些文字,這樣做是有可能的Android?如果有人知道你能回答這個問題。如何將默認鍵盤下一個箭頭更改爲鍵盤中的自定義名稱?

+0

搜索所以你問的問題,這麼多的問題之前,已經有http://stackoverflow.com/questions/14100482/how-to-change-the-softkeyboard-enter-button-text-in-android –

+0

我已經嘗試一個但直到我不能得到下一個,而不是鍵盤 – user2372490

+0

中的箭頭在哪個設備上測試?我得到了像摩托羅拉Atrix –

回答

2

您可以使用機器人:imeActionLabel = 「YourText」機器人:imeOptions = 「actionNext」 的EditText

下面

屬性是示例代碼

  <EditText 
       android:id="@+id/edit_user" 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:layout_marginTop="5dp" 
       android:hint="@string/userprofile_email" 
       android:inputType="textEmailAddress" 
       android:imeActionLabel="@string/next" 
       android:imeOptions="actionNext" 
       /> 
+0

箭頭沒有改變仍然有任何其他方式幫助我嘗試這3小時我不能改變那箭頭進入下一個文本 – user2372490

+0

可能是我們無法更改圖標,但嘗試任何其他ime選項instanded「actionNext」並檢查 –

0

採用Android:imeOptions = 「actionGo」 在你的EditText視圖中點擊這個EditText上查看鍵盤上將會轉到按鈕出現

<RelativeLayout 
     android:id="@+id/relative" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_below="@+id/header" 
     android:background="@drawable/rounded_corner_bg" > 

     <EditText 
      android:id="@+id/userName" 
      android:layout_width="wrap_content" 
      android:layout_height="60dp" 
      android:layout_marginLeft="20dp" 
      android:background="@android:color/transparent" 
      android:ems="10" 
      android:hint="@string/Username" 
      android:inputType="textEmailAddress" > 

      <requestFocus /> 
     </EditText> 

     <View 
      android:id="@+id/lineView" 
      android:layout_width="match_parent" 
      android:layout_height="1dp" 
      android:layout_below="@+id/userName" 
      android:background="@color/lineColor" /> 

     <EditText 
      android:id="@+id/password" 
      android:layout_width="wrap_content" 
      android:layout_height="60dp" 
      android:layout_alignLeft="@+id/userName" 
      android:layout_below="@+id/lineView" 
      android:background="@android:color/transparent" 
      android:ems="10" 
      android:hint="@string/Password" 
      android:imeOptions="actionGo" 
      android:inputType="textPassword" 
      android:singleLine="true" /> 
    </RelativeLayout> 
+0

我嘗試這款鍵盤不出現前往按鈕你知道任何其他選項 – user2372490

+0

請檢查上面的代碼我的工作 – OMAK

+0

感謝omak其工作 – user2372490

相關問題