I am using custom dialog box to display some data. i have used gridlayout and this dialog layout is taken in dialogfragment. Following are snaps
as you can see if we click on list dialog box appears but in it's name textview, item name does not get wrap. until now i have used all options answered in this thread.
xml code is
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/edit_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical" >
<GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="2" >
<TextView
android:id="@+id/txtv_Reg_Name_dialog"
android:layout_column="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollHorizontally="false"
android:layout_gravity="left|top"
android:layout_row="1"
android:padding="10dp"
android:text=""
android:textAppearance="?android:attr/textAppearanceMedium" />
Thanx in advnce..
您为什么不将textview中的android:scrollHorizontally
设置为true
,当屏幕宽度较小以占据整个textview时,它将水平滚动textview。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.