请查看我的布局文件。 scrollview dosent向我展示了所有元素。请提出任何修改建议。我搜索过,发现没有解决方案。 我可以在手机中获得的最大值仅限于desciption textview。 我尝试了互联网上提供的所有解决方案,没有任何作用 MainActivity.xml
<?xml version="1.0" encoding="utf-8"?>
<layout
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"
tools:context="io.github.judeosbert.musicwiki.AlbumInformationActivity"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/blurred_iv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:cropToPadding="false"
android:scaleType="centerCrop"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.49"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mikhaellopez.circularimageview.CircularImageView
android:id="@+id/circularImageView"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:src="@mipmap/sample_image"
app:civ_border_color="#00000000"
app:layout_constraintBottom_toTopOf="@+id/artist_name_tv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.75" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:text="Playcount"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textColor="@color/colorFont"
app:layout_constraintBottom_toBottomOf="@id/blurred_iv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.25"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:text="Followers"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textColor="@color/colorFont"
app:layout_constraintBottom_toBottomOf="@id/blurred_iv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.75"
app:layout_constraintStart_toStartOf="@id/blurred_iv" />
<TextView
android:id="@+id/play_count_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:fontFamily="@font/poppins_semibold"
android:text="--"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@color/colorFont"
app:layout_constraintBottom_toTopOf="@+id/textView4"
app:layout_constraintEnd_toStartOf="@+id/textView4"
app:layout_constraintStart_toEndOf="@+id/textView4" />
<TextView
android:id="@+id/follow_count_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:fontFamily="@font/poppins_semibold"
android:text="--"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@color/colorFont"
app:layout_constraintBottom_toTopOf="@+id/textView5"
app:layout_constraintEnd_toStartOf="@+id/textView5"
app:layout_constraintStart_toEndOf="@+id/textView5" />
<TextView
android:id="@+id/artist_name_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:fontFamily="@font/dosis_bold"
android:text="--"
android:textAppearance="@style/TextAppearance.AppCompat.Display1"
android:textColor="@color/colorFont"
app:layout_constraintBottom_toTopOf="@+id/play_count_tv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<include
android:id="@+id/include"
layout="@layout/artist_information_main_part"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:background="#000"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/blurred_iv"
/>
<ImageView
android:id="@+id/back_button_iv"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_navigate_before_black_24dp" />
</android.support.constraint.ConstraintLayout>
</ScrollView>
</layout>
包含布局文件
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:id="@+id/top_tags_ll"/>
</HorizontalScrollView>
<TextView
android:id="@+id/artist_wiki_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginTop="8dp"
android:autoLink="web"
android:fontFamily="@font/poppins"
android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
tools:text="Disco is a genre of dance-oriented music that originated in African American, gay and Hispanic American communities in 1970s. In what is considered a forerunner to disco style clubs in February 1970 New York City DJ David Mancuso opened The Loft, a members-only private dance club set in his own home. Most agree that the first disco songs were released in 1973, though some claim that Soul Makossa by Manu Dibango's from 1972 to be the first disco record." />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:fontFamily="@font/poppins_semibold"
android:text="Top Tracks"
android:textColor="#000"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="100dp"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:id="@+id/top_tracks_ll"/>
</HorizontalScrollView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:fontFamily="@font/poppins_semibold"
android:text="Top Albums"
android:textColor="#000"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="100dp"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:id="@+id/top_albums_ll"
/>
</HorizontalScrollView>
<View
android:layout_width="match_parent"
android:layout_height="100dp"
/>
</LinearLayout>
</layout>
我有更新。包含布局中的视图从xml设置为高度10000dp,然后滚动内容。不知道为什么会这样。