2010-04-26 7 views
108

Où puis-je trouver les valeurs que inputType peut avoir?EditText, valeurs inputType (xml)

Je connais http://developer.android.com/reference/android/text/InputType.html, mais comment les valeurs devraient-elles ressembler dans les fichiers XML de mise en page?

+3

Cela peut être ce que vous êtes lookng pour: http://developer.android.com/reference/android/R.styleable.html#TextView_inputType –

+2

Un peu tard dans la journée, mais je pense que cela pourrait être ce que vous cherchez: http://developer.android.com/reference/android/R.attr.html – ChrisV

+1

Plus précisément http: // développeur.android.com/reference/android/R.attr.html#inputType – cottonBallPaws

Répondre

277

Vous pouvez utiliser l'onglet Propriétés d'eclipse pour définir différentes valeurs.

Cliquez ici pour voir toutes les valeurs possibles

  • aucun
  • texte
  • textCapCharacters
  • textCapWords
  • textCapSentences
  • textAutoCorrect
  • textAutoComplete
  • textMultiLine
  • textImeMultiLine
  • textNoSuggestions
  • textUri
  • textEmailAddress
  • textEmailSubject
  • textShortMessage
  • textLongMessage
  • textPersonName
  • textPostalAddress
  • textPassword
  • textVisiblePassword
  • textWebEditText
  • textFilter
  • textPhonetic
  • textWebEmailAddress
  • textWebPassword
  • nombre
  • numberSigned
  • numberDecimal
  • numberPassword
  • téléphone
  • datetime
  • Date
  • temps

des explications Cochez cette case: http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType

+52

http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType – Josh

+0

Description ...? –

-8

Essayez le code suivant. Voilà comment une entrée standard devrait ressembler. Je l'ai testé avec 4.4.

<EditText 
    android:id="@+id/activity2UsernameEditText" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignBottom="@+id/activity2SaveButton" 
    android:layout_alignParentLeft="true" 
    android:layout_marginBottom="88dp" 
    android:ems="10" 
android:inputType="textNoSuggestions" /> 
+0

sa réponse non absolue de cette question. – kablu