【发布时间】:2015-03-27 09:06:50
【问题描述】:
我有一个 GLSurfaceView,我想把它放在一个 ScrollView 中。我通过在添加到 ScrollView 的 LinearLayout 中添加 FrameLayout 来完成此操作。
一切都很好,除了滚动时 GLSurfaceView 顶部出现黑色边框。当屏幕静止时,一切看起来都很好。任何人都有任何想法。
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="900dp"
android:orientation="horizontal"
android:layout_weight="1"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="35dp"
android:visibility="visible"
android:weightSum="1"
android:overScrollMode="never">
<FrameLayout
android:id="@+id/ecg_graph"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
【问题讨论】:
-
遇到同样的问题,找到解决方法:stackoverflow.com/a/56936915/5599807
标签: android opengl-es scrollview android-framelayout glsurfaceview