Android의보기에는 작지만 성가신 문제가 있습니다.애니메이션으로 이동 한 후에도 계속 표시되지만 보이지 않는 부분은 표시되지 않습니다.
관련 내용 : xml에 포함 된 다른 FrameLayout에 FrameLayout이 있습니다. 에, 그것의 20 %를 제외하고, 활동보기 중 클릭 내 내부 FrameLayout이 (topbanner)에 번역 에
<?xml version="1.0" encoding="utf-8"?>
<set
android:interpolator="@android:anim/bounce_interpolator"
xmlns:android="http://schemas.android.com/apk/res/android"
fillEnabled="true"
android:fillBefore="true"
android:fillAfter="true">
<translate
android:duration="500"
android:fromYDelta="0"
android:toYDelta="-80%" />
</set>
내가 원하는 것은 :
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:id="@android:id/list"
android:layout_height="fill_parent"
android:layout_width="fill_parent"></ListView>
<FrameLayout
android:id="@+id/TopBanner"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/ImageView01"
android:layout_width="fill_parent"
android:background="@drawable/topmenu"
android:layout_height="150dip"></ImageView>
<Gallery
android:id="@+id/Gallery01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"></Gallery>
</FrameLayout>
</FrameLayout>
은 또한 애니메이션 XML을 썼다 그것을 클릭하면 다시 나타납니다. 톱 메뉴의 종류.
내 애니메이션을 적용 할 나섰고 경우에도 내 레이아웃은 거기 여전히 것처럼 내가 만질 수, 을 번역됩니다. 어떠한 제안? 여기 내 자바 코드 :
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
UserSettings = getSharedPreferences("net.blabla_preferences", MODE_WORLD_WRITEABLE);
tab = getIntent().getExtras().getInt("net.blabla.FigureTab");
setContentView(R.layout.layout_figure_list);
final Animation animation = AnimationUtils.loadAnimation(this, R.anim.animation_topbanner);
topbanner = (FrameLayout) findViewById(R.id.TopBanner);
topbanner.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
v.startAnimation(animation);
}
});
load();
}
애니메이션의 경우 애니메이션 수신기 [animation.setAnimationListener]를 작성하고 애니메이션이 끝날 때 TopBanner의 가시성을 View.GONE으로 변경해보십시오. – Varun