TextInputLayout ne montrant pas EditText truc avant de l'utilisateur de se concentrer sur elle

Je suis aide a récemment publié Android Support À La Conception De La Bibliothèque pour montrer flottant étiquette avec EditTexts. Mais je suis confronté au problème que l'Indicateur sur l'EditText ne s'affiche pas lorsque l'INTERFACE utilisateur est rendu, mais je vois l'Indice après je me concentre sur la EditTexts.

Ma Disposition est comme suit:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:id="@+id/ScrollView01"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">
<android.support.design.widget.TextInputLayout
android:id="@+id/name_et_textinputlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin">
<EditText
android:id="@+id/FeedBackerNameET"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/feedbackname"
android:inputType="textPersonName|textCapWords" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/email_textinputlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/FeedBackerEmailET"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/feedbackemail"
android:inputType="textEmailAddress" />
</android.support.design.widget.TextInputLayout>
<Spinner
android:id="@+id/SpinnerFeedbackType"
android:layout_width="fill_parent"
android:layout_height="48dp"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:entries="@array/feedbacktypelist"
android:prompt="@string/feedbacktype" />
<android.support.design.widget.TextInputLayout
android:id="@+id/body_textinputlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/EditTextFeedbackBody"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/feedbackbody"
android:inputType="textMultiLine|textCapSentences"
android:lines="5" />
</android.support.design.widget.TextInputLayout>
<CheckBox
android:id="@+id/CheckBoxFeedBackResponse"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:text="@string/feedbackresponse" />
<Button
android:id="@+id/ButtonSendFeedback"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:text="@string/feedbackbutton" />
</LinearLayout>
</ScrollView>
</FrameLayout>
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/toolbar_shadow" />
</FrameLayout>

J'ai aussi essayé de mettre le soupçon, pour la TextInputLayout l'aide de la méthode setHint mais pas de chance.

mNameTextInputLayout = (TextInputLayout) v.findViewById(R.id.name_et_textinputlayout);
mNameTextInputLayout.setErrorEnabled(true);
mNameTextInputLayout.setHint(feedBackerNameET.getHint());
mEmailTextInputLayout = (TextInputLayout) v.findViewById(R.id.email_textinputlayout);
mEmailTextInputLayout.setErrorEnabled(true);
mEmailTextInputLayout.setHint(feedBackerEmail.getHint());
mBodyTextInputLayout = (TextInputLayout) v.findViewById(R.id.body_textinputlayout);
mBodyTextInputLayout.setErrorEnabled(true);
mBodyTextInputLayout.setHint(feedBackBody.getHint());
  • J'ai le même problème. À ma grande surprise, l'exécution de l'application sur 4.1 émulateur a très bien fonctionné, mais sur mon M aperçu activé Nexus TextInputLayout a été défaillante et ne montrant pas l'astuce pour l'embarqué EditText.
  • Pouvez-vous vérifier votre indice de couleur, ou d'essayer de changer votre point de vue couleur d'arrière-plan, peut-être qu'ils sont là, mais vous ne pouvez pas le voir à cause de la couleur
  • je pense que l'indicateur de couleur ne doit pas être un problème. Cependant je vais essayer d'avoir un coup d'oeil après le changement de la couleur d'arrière-plan.
  • Afzal je vous raconte cette suggestion parce que j'ai eu le même problème que vous, et quand j'ai ajouté de fond à la vue, j'ai vu le truc. Je l'utilise à l'intérieur d'un fragment. Je n'ai pas ajouter du code à partir de java, tout ce que je fait, c'est à partir de xml
  • Je vais voir ce problème lorsque je ajouter/supprimer des fragments. Mais si je afficher/masquer les fragments, je ne vois pas ce problème.
  • Même problème avec les fragments, Si j'utilise ajouter transaction fonctionne bien lorsque vous revenez. Si j'utilise remplacer transaction lorsque vous revenez, vous ne voyez pas l'astuce