CollapsingToolbar
이라는 간단한 활동이 있습니다. 내가 가지고있는 것을 보여주고 그 문제가 무엇인지 설명해 드리겠습니다. 이 (오른쪽) 당신이 볼 수 있듯이 도구 모음이 확장 될 때CollapsingToolbar를 사용할 때 내 버튼이 숨겨져 있습니다.
에서, Search button
가 표시되지 않습니다 확장 될 때 도구 모음 (왼쪽) 대 축소
. 이 문제를 어떻게 해결할 수 있습니까?
activity_search.xml :
<android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget.AppBarLayout android:fitsSystemWindows="true" android:layout_width="match_parent" android:layout_height="@dimen/app_bar_height" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.design.widget.CollapsingToolbarLayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:layout_scrollFlags="scroll|exitUntilCollapsed"> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_collapseMode="parallax"/> <android.support.v7.widget.Toolbar android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:layout_collapseMode="pin" app:popupTheme="@style/AppTheme.PopupOverlay"/> </android.support.design.widget.CollapsingToolbarLayout> </android.support.design.widget.AppBarLayout> <include layout="@layout/content_search" /> </android.support.design.widget.CoordinatorLayout>
content_search.xml는
<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_behavior="@string/appbar_scrolling_view_behavior" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/ll" android:layout_alignParentTop="true" android:layout_marginBottom="@dimen/view_margin" android:orientation="horizontal"> <AutoCompleteTextView android:id="@+id/etIngredients" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1"/> <ImageButton android:id="@+id/btAdd" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_add"/> </LinearLayout> <Button android:id="@+id/btSearch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:text="@string/search"/> <android.support.v7.widget.RecyclerView android:id="@+id/rvIngredients" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_above="@id/btSearch" android:layout_below="@id/ll"/> </RelativeLayout>
이 질문을 검색했는데, 전혀 아무것도 찾을 could'nt있다!
의미가 있습니다! 나는 내 PC로 돌아갈 때 이것을 시도 할 것이다. 감사합니다 –
감사. 이 작업을! :) –
당신을 환영합니다 :) – Neo