Wenn ich zusammenbrechen Toolbar
, ListView
Aussehen ist die Hälfte. Es sieht nur aus wie Quadrat. Ich möchte jedoch alle sehen. Es sollte sich nach unten erstrecken. ListView
könnte ein Problem haben. Wie kann ich dieses Problem lösen? Zusätzlich,Symbolleiste mit ListView kollidieren
Wenn Sie nicht verstehen, habe ich dieses Problem in Bild beigefügt. Du wirst es leicht verstehen! click
EDIT: Eigentlich ImageView
ist in der Regel breiter, aber es scheint hier falsch, weil ich es zusammenbrechen. Wenn es voll ist, ist das quadratische Aussehen von ListView
wie Bild.
MY XML:
<android.support.design.widget.CoordinatorLayout 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"
tools:context="com.example./////">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:fitsSystemWindows="true">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="250dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:contentScrim="@color/colorPrimary"
app:expandedTitleTextAppearance="@android:color/transparent"
android:fitsSystemWindows="true">
<ImageView
app:layout_collapseMode="parallax"
android:src="@drawable/climbing"
android:contentDescription="@string/app_name"
android:scaleType="centerCrop"
android:layout_width="match_parent"
android:layout_height="250dp" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar2"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_collapseMode="pin"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
app:layout_behavior="@string/appbar_scrolling_view_behavior" >
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
app:cardElevation="10dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical>
<ListView
android:id="@+id/lstTask"
android:layout_width="match_parent"
android:layout_height="287dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginTop="12dp"
/>
</LinearLayout>
</android.support.v7.widget.CardView>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:src="@drawable/edit"
app:backgroundTint="#6666ff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:pressedTranslationZ="12dp"
app:layout_anchor="@id/app_bar_layout"
app:layout_anchorGravity="bottom|right|end"
app:elevation="6dp"
app:fabSize="mini"
android:id="@+id/action_add"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/savedHabits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/add"
app:backgroundTint="#6666ff"
app:fabSize="mini"
app:elevation="6dp"
app:layout_anchor="@id/app_bar_layout"
app:layout_anchorGravity="bottom|left"
app:pressedTranslationZ="12dp" />
</android.support.design.widget.CoordinatorLayout>
fixiert einfach das 'android: layout_height = "match_parent"' im 'ListView'. – KeLiuyue
Es funktioniert nicht. Es sieht so aus: imgur.com/a/Y7PYr @KeLiuyue –
Hi Batuhan Zurnaci, ich änderte einen anderen Weg, um es zu lösen. Sie können es versuchen. – KeLiuyue