2012-09-28 29 views
0

我在Android中遇到EditText问题。 导致其仅用于调试目的,布局的可见性,EditText被添加,正在开始不见了。EditText不会与内容一起增长

因此,我收到ServiceCall的信息,并发现一些可能的错误,我在此显示的字符串我作为响应。

我尝试了多种解决方案,没有任何工作。

<RelativeLayout 
     android:id="@+id/RelativeLayout2" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentLeft="true" 
     android:layout_below="@+id/chbDebug" 
     android:baselineAligned="false" 
     android:orientation="vertical" 
     android:padding="2dp" 
     android:visibility="gone" > 

     <someOtherCrazyShitsAndStuff />   

     <EditText 
      android:id="@+id/tbDebug" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_alignParentLeft="true" 
      android:layout_below="someOtherCrazyShitsAndStuff" 
      android:inputType="textMultiLine" /> 
    </RelativeLayout> 

因此,我发现设置android:lines/maxLines行的最小/最大数,但没有发生任何事情。还试图在填充文本后强制执行以通过一些代码行增加Linecount,但结果只是内容被删除。

还有一些想法吗?

+0

你有没有试过这个http://stackoverflow.com/questions/5636267/edittext-is-growing-as-text-entered –

+0

你的问题解决了吗? –

+0

是的,我也发现这篇文章,我有第一个linearLayout – Daassan

回答

0

我也有同样的问题曾经只是试试这个..

替换此

android:layout_width="fill_parent" 

有了这个

android:layout_width="wrap_content" 

威尔肯定工作

+0

感谢您的答案,但不会工作 – Daassan

1

尝试把你的edittextscrollview

+0

这将是最糟糕的解决方案,只是作为最后的可能性,在布局的原因是一些更多的调试东西,我不想一一设置它们所有的invi ,这就是为什么我把它们全部放在布局上,所以我一次就完成了 – Daassan

相关问题