ScrollView doesn't display its content properly in lower versions of android

强颜欢笑 提交于 2019-12-04 07:31:54

Don't use float values that lower than 1 in this format: ".x" Instead use this format: "0.x"

If you change those values you see the warnings disappear!

Note: Also note that "alpha" attribute introduced in API Level 11 so it will not work in lower API(s).

I don't think it'll work but u should try it once.

instead of using android:layout_height="60dp" use maxHeight and minHeight with same value 60dp as ur case .I think it will solve your problem.And also fill some background color to see whats wrong with the soln.

Don't use wrap_content for the ScrollView. The ScrollView should have a concrete size which is relate with the screen size, not the content. The LinearLayout inside it should keep the wrap_content. In both your examples, you should use match_parent for the ScrollView

don`t use .5dp while setting height or width

<TextView
 android:id="@+id/textView7"
 android:layout_width="match_parent"
 android:layout_height=".5dp"  //  **modify** this to android:layout_height="1dp"
 android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
 android:id="@+id/textView12"
 android:layout_width="match_parent"
 android:layout_height=".5dp"  //  **modify** this to android:layout_height="1dp" />

Using this you can remove this error requestfocus does not set the required layout_height attribute and also might be you can solve your issue also

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!