我可能失去了一些东西简单,但我有一个AutoCompleteTextView包含一些很长的项目。单击时,它将在EditText中正确显示文本,并跨越多行。的Android定制布局AutoCompleteTextView
不过,我希望它是在上弹出,以及使用户可以看到他们正在选择哪个项目多行。
这里是我的自定义布局:
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="none"
android:maxLines="100"
android:scrollHorizontally="false" />
这里是我的阵列和适配器的初始化:
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
R.layout.dropdown_item_wrap_line,
getResources().getStringArray(R.array.building_descriptions));
mBuildingDesc.setAdapter(adapter);
你需要元素中有多行?我的意思是AutoCompleteTextView中的单个视图应该包含两行,并且您将使用第二行来显示一些其他信息?我是对的? – 2013-03-26 16:25:22
对不起,不,我只是说对于环绕,而不是切断一个观点,我的项目可能会很长(如“Lorem存有悲坐阿梅德,consectetur adipiscing ELIT。Aliquam ultricies坦帕斯预期值,也制造业egestas ERAT tincidunt等。”) – 2013-03-26 16:41:52