I do this, I get a field without a hint at all:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.dialog_add_category,container,false); TextInputLayout textInputLayout = (TextInputLayout)view.findViewById(R.id.ILetAddCategory); editText = (EditText)textInputLayout.findViewById(R.id.etAddCategory) ; textInputLayout.setHint("Floating Label"); return view; In xml
<android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/ILetAddCategory" android:hint="Floating Label" > <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/etAddCategory" android:inputType="text" /> </android.support.design.widget.TextInputLayout>
hintfor EditText and not for TextInputLayout - Yuriy SPb ♦