android top弹出框(2)
来源:未知 责任编辑:责任编辑 发表时间:2014-01-26 21:59 点击:次
0.0f, Animation.RELATIVE_TO_SELF, 0.0f,Animation.RELATIVE_TO_SELF,-1.0f,
Animation.RELATIVE_TO_SELF,0.0f);
showaction.setDuration(500);
//隐藏动画
hideaction=new TranslateAnimation(Animation.RELATIVE_TO_SELF,
0.0f, Animation.RELATIVE_TO_SELF, 0.0f,Animation.RELATIVE_TO_SELF,0.0f,
Animation.RELATIVE_TO_SELF,-1.0f);
hideaction.setDuration(500);
menushowed=false;
menu.setVisibility(View.GONE);
button.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
if(menushowed)
{
menushowed=false;
menu.startAnimation(hideaction);
menu.setVisibility(View.GONE);
}
else
{
menushowed=true;
menu.startAnimation(showaction);
menu.setVisibility(View.VISIBLE);
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 进入详细评论页>>