2

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

First second

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

Community
  • 1
  • 1
SK16
  • 623
  • 8
  • 17

1 Answers1

0

Why don't you set android:scrollHorizontally in your textview to true It would scroll your textview horizontally when the width of the screen is small to occupy the complete textview..

gsanskar
  • 673
  • 5
  • 10