Auto complete text android development and sketchwere


//Create New
final AutoCompleteTextView url = new AutoCompleteTextView(MainActivity.this);

//Layout set Weight 1
url.setLayoutParams(new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.WRAP_CONTENT, 35, 1.0f));

//Padding
url.setPadding(8,8,8,8);

//Size
url.setTextSize(12);

//Color
url.setTextColor(Color.parseColor("#000000"));

//Hint
url.setHint("Write");

//Hint Color
url.setHintTextColor(Color.parseColor("#607D8B"));

//Set Bg Transparent
url.setBackgroundColor(Color.TRANSPARENT);

//ImeOption
url.setImeOptions(android.view.inputmethod.EditorInfo.IME_ACTION_GO);

//View By pos 0
linear2.addView(url, 0);


ArrayAdapter<String> adapterAutoCmplt = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, autoCmplt);
url.setAdapter(adapterAutoCmplt);

//Make List String With Name autoCmplt
//and add to string what you want

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.