android - How to display long text to multiple line in ListView -


here xml:

<listview                 android:id="@+id/headword_list"                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 android:fastscrollenabled="true"                 android:background="#ffffff"                 android:cachecolorhint="#00000000"                 android:layout_weight="2"/> 

the listview showed using following code:

headwordlist = (listview) rootview.findviewbyid(r.id.headword_list);          adapter = new mdxadapter(getsherlockactivity());         adapter.setdict(dict, getstring(r.string.empty_entry_list),                 getstring(r.string.invalid_dict));         headwordlist.setadapter(adapter);          rootview.requestfocus(); 

the problem faced when text display in list long fitted width, remaining text automatically truncated ... should can display long text 2 or more line, complete text can seen?

your listview layout irrelevant here, you'll have use custom view adapter.

here's example: http://www.codelearn.org/android-tutorial/twitter/5/listview-custom-adapter-example


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -