Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/187.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 我怎样才能实现这一观点?_Android_Android View - Fatal编程技术网

Android 我怎样才能实现这一观点?

Android 我怎样才能实现这一观点?,android,android-view,Android,Android View,我尝试过使用内部带有线性布局的水平滚动视图。它看起来和图片一模一样,但我不想使用滚动视图,因为在启动时,滚动条会显示出来,这不是我想要的 我还尝试了一个相对视图,每个视图彼此对齐,但最后一个视图被缩小,以适应剩余的小空间 有什么建议吗?为什么不试试看andoidGalleryView。就我所能想象的而言,我想这足以满足你的需要。你为什么不试试看andoidGalleryView。就我所能想象的而言,我想这足以满足您的需要。多媒体资料正被弃用。因此,建议使用HorizontalScrollView

我尝试过使用内部带有线性布局的水平滚动视图。它看起来和图片一模一样,但我不想使用滚动视图,因为在启动时,滚动条会显示出来,这不是我想要的

我还尝试了一个相对视图,每个视图彼此对齐,但最后一个视图被缩小,以适应剩余的小空间


有什么建议吗?

为什么不试试看andoid
Gallery
View。就我所能想象的而言,我想这足以满足你的需要。

你为什么不试试看andoid
Gallery
View。就我所能想象的而言,我想这足以满足您的需要。

多媒体资料正被弃用。因此,建议使用HorizontalScrollView来实现这一点。如果希望滚动条在启动期间不显示,可以打开/关闭滚动条,然后在启动后打开滚动条

该类在API级别16中被弃用。这个小部件不再是 支持。其他水平滚动小部件包括 支持库中的HorizontalScrollView和ViewPager


画廊正在被弃用。因此,建议使用HorizontalScrollView来实现这一点。如果希望滚动条在启动期间不显示,可以打开/关闭滚动条,然后在启动后打开滚动条

该类在API级别16中被弃用。这个小部件不再是 支持。其他水平滚动小部件包括 支持库中的HorizontalScrollView和ViewPager

找到了一个解决方案:

创建了一个内部具有水平线性布局的RelativeLayout。宽度为1500dp的相对长度(最高父级)。那么就没有什么可缩放的了

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="1500dp"
    android:layout_height="fill_parent"
    android:orientation="vertical" 
    android:background="#ffffffff">

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/techinc_splash_1" />
    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/techinc_splash_1" />
    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/techinc_splash_1" />
</LinearLayout>
</RelativeLayout>

找到了一个解决方案:

创建了一个内部具有水平线性布局的RelativeLayout。宽度为1500dp的相对长度(最高父级)。那么就没有什么可缩放的了

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="1500dp"
    android:layout_height="fill_parent"
    android:orientation="vertical" 
    android:background="#ffffffff">

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/techinc_splash_1" />
    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/techinc_splash_1" />
    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/techinc_splash_1" />
</LinearLayout>
</RelativeLayout>

尝试此操作,您可以使用此
setHorizontalScrollBarEnabled()启用或禁用滚动条。


尝试此操作,您可以使用此
setHorizontalScrollBarEnabled()


ScrollView是最好的选择?是的,也许CrollView是最好的选择?是的,也许吧