2016-09-13 5 views
1

도구 모음에 부분적으로 이미지가 필요하고 부분적으로보기가 필요합니다. 나는 그것의 좋은 예를 찾지 못한다. 어쩌면 누군가 그것을 어떻게하는지 안다. 저는 현재 Xamarin에서 일하고 있지만, Android Studio에 대한 예가 도움이 될 것입니다.도구 모음에 이미지를 추가하지만 도구 모음보다 커야합니다.

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" android:layout_height="match_parent"> 

    <android.support.design.widget.AppBarLayout android:id="@+id/app_bar" 
     android:layout_width="match_parent" android:layout_height="wrap_content" 
     android:theme="@style/ThemeOverlay.AppCompat.ActionBar"> 

     <android.support.v7.widget.Toolbar android:id="@+id/toolbar" 
      android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" 
      app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/> 

    </android.support.design.widget.AppBarLayout> 

    <ImageView android:id="@+id/image_anchored" 
     android:layout_width="wrap_content" android:layout_height="wrap_content" 
     android:layout_margin="16dp" android:src="@drawable/image_anchor" 
     app:layout_anchor="@id/app_bar" app:layout_anchorGravity="bottom|start|left"/> 

</android.support.design.widget.CoordinatorLayout> 
+0

나는 이것을 할 수있는 가장 좋은 방법은 도구 모음 아래쪽에 반투명 선을 만드는 것이라고 생각합니다. 몇 주 전에 질문을 읽었습니다. 찾을 수 있으면 보겠습니다. – LBJ33

+0

http://stackoverflow.com/questions/39380159/how-do-i-make-an-icon-seem-like-it-sticks - out-of-the-toolbar – LBJ33

답변

2

는이 CoordinatorLayoutlayout_anchor 사용?

또한 ActionBar의 맞춤 높이를 설정할 수 있습니다. 그러면 콘텐츠가 ActionBar 뒤에 게시 될 수 있다고 생각합니다. 그리고 ActionBar에서도 투명도를 사용할 수 있습니다.

0

은 아마 액션 바의 사용자 정의보기를 만들 :

enter image description here

관련 문제