//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