Ich habe versucht, Tutorial für ScrollView in ScrollView zu suchen, und ich fand viele, aber niemand für mich arbeiten. Das ist mein Layout unten. Die zweite ScrollView (id = scroll_view_carousel) funktioniert nicht. Bitte hilf mir.ScrollView innerhalb ScrollView funktioniert nicht
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:context="com.rytmus.app.activities.DetailsActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white"
android:theme="@style/Toolbar"
app:collapseIcon="@drawable/ic_arrow_back_white_24dp"
app:layout_scrollFlags="scroll|enterAlways"
app:title="Rytmus"
app:titleTextColor="@color/colorPrimary">
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="0dp">
<ImageView
android:id="@+id/big_logo"
android:layout_width="match_parent"
android:layout_height="160dp"
android:scaleType="centerCrop" />
<ScrollView
android:id="@+id/scroll_view_carousel"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_below="@id/big_logo"
android:background="@color/colorBlack">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/background_rytmus_disco" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/background_rytmus_disco" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/ic_arrow_back_white_24dp" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/background_rytmus_disco" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/com_facebook_button_like_background" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/background_rytmus_disco" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/background_rytmus_disco" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/background_rytmus_disco" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/background_rytmus_disco" />
<ImageView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:src="@drawable/background_rytmus_disco" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/four_buttons"
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_below="@id/scroll_view_carousel"
android:background="@color/colorAccent"
android:orientation="horizontal">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabFirstsButtonsLinearLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical">
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="100dp"
android:layout_height="fill_parent"
android:orientation="vertical" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabSecondsButtonsLinearLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerHorizontal="true"
android:layout_weight="1"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/tabs_disco_details"
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_below="@id/four_buttons"
android:background="@color/colorPrimary"
android:orientation="horizontal">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabDescriptionLinearLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabDescription"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:gravity="center"
android:paddingLeft="10dp"
android:text="Descripción"
android:textColor="@color/white"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="90dp"
android:layout_height="fill_parent"
android:orientation="vertical" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabValorationLinearLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerHorizontal="true"
android:layout_weight="1"
android:orientation="vertical">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabValoration"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:gravity="center"
android:paddingLeft="10dp"
android:text="Valoraciones"
android:textColor="@color/white"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/container_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/tabs_disco_details"
android:orientation="vertical" />
<LinearLayout
android:layout_width="101dp"
android:layout_height="101dp"
android:layout_below="@id/scroll_view_carousel"
android:layout_centerHorizontal="true"
android:background="@drawable/border"
android:translationY="-5dp">
<ImageView
android:id="@+id/imagen_logo"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerHorizontal="true"
android:src="@drawable/background_rytmus_disco" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
</LinearLayout>
SOLUTION
ich das zweite Scroll für ein HorizontalScrollView ändern und arbeiten jetzt !!!
nur lineare Layout als Kind der Bildlaufansicht, nicht relatives Layout –