所以我想在水平滚动视图上方的屏幕顶部居中显示一行文本。基本上,文本的第一行将显示您正在进行的调整,在其下方将显示水平滚动条,在其下方我将在稍后添加图像,我尝试了一些不同的东西,但它们似乎都在推动水平滚动条离开屏幕。关于如何做到这一点的任何建议?这是到目前为止的代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black">
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbars="none"
android:layout_gravity="center" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@color/near_black">
<Button
android:id="@+id/e_button"
android:text="@string/E"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="10sp"
android:background="@null"
android:textSize="50sp"
android:textStyle="bold"
android:textColor="@color/white">
</Button>
这继续通过几个按钮,我关闭了所有内容。那么关于如何实现这一目标的任何建议?