I am using Android Navigation Drawer with Fragment and everything seems okay
package com.example.nghandler;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
public class Fragment_Home extends Fragment {
AutoCompleteTextView autoCompleteTextView;
String[] countries = {
"January",
"Febuary",
"March",
"June",
"July",
"April",
};
public Fragment_Home() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
String DEBUG_TAG = "Donald";
Context c = getActivity().getApplicationContext();
View view = inflater.inflate(R.layout.fragment_home, container, false);
autoCompleteTextView =
(AutoCompleteTextView)view.findViewById(R.id.autoCompleteTextView);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(c,
android.R.layout.simple_list_item_1, countries);
autoCompleteTextView.setThreshold(2);
autoCompleteTextView.setAdapter(adapter);
autoCompleteTextView.getAdapter();
return view;
}
}
okay but on running the App, the Suggestions are not showing
Here's the code
Fragment_Home.Java
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/7414e71d-a69f-46b8-ace4-2878bdeda34c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.