I used some code I found for a sliding panel, and basically it works but has a small issue.
小组首次开场白。
here:
TranslateAnimation anim = null;
m_isOpen = !m_isOpen;
if (m_isOpen) {
setVisibility(View.VISIBLE);
anim = new TranslateAnimation(0.0f, 0.0f, getHeight(), 0.0f);
} else {
anim = new TranslateAnimation(0.0f, 0.0f, 0.0f, getHeight());
anim.setAnimationListener(new Animation.AnimationListener() {
public void onAnimationEnd(Animation animation) {
setVisibility(View.GONE);
}
public void onAnimationRepeat(Animation animation) {
// not needed
}
public void onAnimationStart(Animation animation) {
// not needed
}
});
}
anim.setDuration(300);
anim.setInterpolator(new AccelerateInterpolator(1.0f));
startAnimation(anim);
为什么在我宣布小组开会时,没有人要问,但还有其他什么?