나는 DrawerLayout
의 움직임에 따라 슬라이드 인 및 아웃 슬라이드가 필요한 응용 프로그램을 빌드합니다. 마찬가지로, 우리가 open
서랍을 할 때 이미지가 약간 줄어들 때 우리는 close
서랍을 누른 다음 이미지의 크기를 되 찾습니다. 이 이미지는 Toolbar
에 있습니다.서랍 레이아웃으로 전환
내 코드 :
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
android:background="@android:color/transparent"
android:paddingLeft="10dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/left"
android:layout_centerVertical="true"
android:id="@+id/img"/>
</RelativeLayout>
내가 onDrawerClosed(View view)
및 onDrawerOpened(View drawerView)
에 아래의 코드
mImage.setAnimation(AnimationUtils.loadAnimation(context,R.anim.animation));
를 추가하여이 일을 시도했지만이 내가 필요로하는 유용하지 않습니다 이 애니메이션 또는 서랍 이동과의 전환 동기화
누구든지 의견이 있으면 공유하십시오.
방금 축소하고 이미지를 성장, 너무, 수평으로 이동하고자 있는가에
void onDrawerClosed (View drawerView)
리셋 규모 또한 ? –사실 나는 이미지를 수평으로 축소시키고 자르고 싶다. – Atula
그래서, 좀 쥐어 짜기를 원한다? 같은 높이지만 얇은가요? 그리고 미끄러지지 않습니까? –