Pergunta

I saw lots of questions about this topic, but I've found anything that solve my problem. I saw different solutions:

  • Removing gravity
  • Removing inputType
  • Insert android:ellipsize attribute

But no one has worked. Here's a sample of my code:

<EditText
    android:id="@+id/edtNotesText"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/layoutNotesEditMenu"
    android:gravity="left|top"
    android:hint="@string/edt_text_notes_add_hint"
    android:inputType="textFilter|textMultiLine|textNoSuggestions"
    android:padding="6dp"
    android:scrollbars="vertical"
    android:textColor="@color/lightGrey"
    android:textSize="20sp" />
Foi útil?

Solução 2

I've find out the problem: I forgot the instruction "setContentView"! Might be trivial but maybe could help someone else.

Outras dicas

try changing your edit text's color and set proper gravity

android:textColorHint="#FFFFFF"
android:gravity="center"
android:ellipsize="end"

this is worth a try...

None of those that you mentioned worked for me either, until I looked into my .java class file code. I had this:

   poemTitle.setText(poemListItem.getTitle());
   poemText.setText(poemListItem.getPoem());

As soon as I commented those out, then my hint text showed in both of my EditTexts. I had this code there to draw upon a model class to get text, but actually don't need it since my app's users will edit their own text.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top