2010-04-26 15 views
108

¿Dónde puedo encontrar los valores que inputType puede tener?EditText, inputType values ​​(xml)

Conozco http://developer.android.com/reference/android/text/InputType.html, pero ¿cómo deberían ser los valores en los archivos xml de diseño?

+3

Esto puede ser lo que estás lookng para: http://developer.android.com/reference/android/R.styleable.html#TextView_inputType –

+2

Un poco tarde en el día, pero creo que este podría ser lo que está buscando: http://developer.android.com/reference/android/R.attr.html – ChrisV

+1

Específicamente http: // developer.android.com/reference/android/R.attr.html#inputType – cottonBallPaws

Respuesta

277

Puede usar la pestaña de propiedades en eclipse para establecer varios valores.

continuación se muestran todos los valores posibles

  • ninguno
  • texto
  • textCapCharacters
  • textCapWords
  • textCapSentences
  • textAutoCorrect
  • textAutoComplete
  • textMultiLine
  • textImeMultiLine
  • textNoSuggestions
  • textUri
  • textEmailAddress
  • textEmailSubject
  • textShortMessage
  • textLongMessage
  • textPersonName
  • textPostalAddress
  • textPassword
  • textVisiblePassword
  • textWebEditText
  • textFilter
  • textPhonetic
  • textWebEmailAddress
  • textWebPassword
  • número
  • numberSigned
  • numberDecimal
  • numberPassword
  • teléfono
  • fecha y hora
  • fecha
  • tiempo

Consulte aquí las explicaciones: 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

Descripción ...? –

-8

Prueba el siguiente fragmento de código. Así es como debe verse una entrada estándar. Lo he probado con 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

no es la respuesta absoluta de esta pregunta. – kablu

Cuestiones relacionadas