In my application I created auto complete field by using the below code
sugarVariety = (AutoCompleteTextView)findViewById(R.id.autocomplete_sugarVariety);
String[] VARIETY = new String[]{ "118", "119", "120", "121", "269", "270", "271", "272", "273", "346", "347", "348", "349", "350","351", "352", "353", "354", "355", "356", "357", "358",
"359", "360", "361", "345", "117", "266", "362", "363", "364", "365", "366", "367", "368", "369", "370", "371", "372", "373", "374", "375", "376", "377",
"378", "379", "380", "239", "240", "241", "242", "114", "230", "231", "101", "102", "103", "104", "108", "111", "112", "201", "202", "204", "206", "207",
"208", "210", "217", "218", "220", "221", "226", "227", "250", "301", "302","113", "228", "0", "246", "999", "205", "251", "243","268","329", "115", "116", "274"};
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line, VARIETY);
sugarVariety.setAdapter(adapter);
And in my layout I defined autocomplete textview as
<AutoCompleteTextView android:id="@+id/autocomplete_sugarVariety"
android:layout_width="wrap_content" android:inputType="number"
android:layout_height="42px"
android:layout_marginLeft="5dp"/>
The problem is if I give inputType=”number” I am not getting AutoComplete list of numbers for the array if I remove it then only I am getting but in my case I want to show the keyboard with numbers only and also I need auto complete can any one tell me how can I get this…
Guy, you’re doing something strange.
In your case you can cast all to String. If necessary get number after, you cast to
INTorLONGagain.(JUMP rs)