我有一个固定大小scrollview,我试图使问题。我已经阅读了许多类似(但不等于)在StackOverflow和其他网站中的问题,但没有任何答案对我有所帮助,所以我决定问自己的问题。Android:固定大小ScrollView不滚动/滚动奇怪
基本上,我想要一个固定大小scrollview与不同的控制里面。基本的将是一个textview其中的动态变化的大小。当我更改textview的文本并且它大于scrollview时,滚动条会很快闪烁,表示我可以滚动,但无论我滑动手指多少次,它都不会滚动。然后,我尝试用两个或三个手指滑动,有时(仅计数)滚动。
我已经尝试了很多不同的方法,比如将textview更改为edittext,焦点= false,所以它不给用户编辑文本的机会;或者将textview单独放在scrollview中,或者将其包含在linearlayouts,相对布局等中,并且它仍然不滚动。
下面是代码,因为它是今天。这个滚动视图是在一个垂直线性布局和其他控件之间的,我不会把这个长度放在原因上,但如果有人需要它,我会把它放在里面。如果有人能指出我的问题或帮助我解决这个问题,我将非常感激。
XML:
android:id="@+id/scrollFifthHorizontalLineDetails"
android:layout_width="304dp"
android:layout_height="133dp"
android:layout_gravity="center"
android:layout_marginTop="5dp" >
android:id="@+id/rrrr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
android:id="@+id/txtlblPlaceDetails"
android:layout_width="302dp"
android:layout_height="wrap_content"
android:background="@drawable/placedescriptionbg"
android:text="@string/null_text"
android:textAppearance="?android:attr/textAppearanceSmall" />
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
我在其中填充的TextView行:
((TextView) findViewById(R.id.txtlblPlaceDetails)).setText(mJsonOb.getString("placeDescription"));