我正在创建一个用于混合文本和图像输入的活动。这是容器的xml。
<ScrollView
android:id="@+id/new_question_body_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/new_question_tag_container"
android:layout_above="@+id/oler_keyboard_accessory"
android:layout_alignLeft="@+id/new_question_tag_container"
android:layout_alignRight="@+id/new_question_tag_container"
android:scrollbars="none">
<LinearLayout
android:id="@+id/new_question_body_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:id="@+id/new_question_body_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:hint="Please edit your body here."
android:layout_marginBottom="5dp"/>
</LinearLayout>
</ScrollView>
在动态添加三个(两个图像不会滞后)imageViews之后,滚动时会变得相当滞后。即使我为每个50dp设置maxHeight和Width,滞后仍然存在。我以错误的方式添加imageView还是这是内存限制?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句