开发者

Animation in Android

I am having a default layout from which i have to inflate new layout..My code is here

super.onCreate(savedInstanceState);
     setContentView(R.layout.mydeals_list);

     list_layout=(RelativeLayout) findViewById(R.id.mydeals_list_layout);

If this condition satisfies i want new Layout how i can hide the R.layout.mydeals_list layout and make new layout Visible

if(Signin.login_flag){
     list_layout.setVisibility(View.GONE);
     LayoutInflater inflater = (LayoutInflater) DbServerActivity.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
     final View layout = inflater.inflate(R.layout.slider, (ViewGroup)findViewById(R.id.slider_main_layout));

---------Place i want to display new layout ----------------

   开发者_运维问答      Animation slideUpIn = AnimationUtils.loadAnimation(DbServerActivity.this,R.anim.slide);
         slide_layout.startAnimation(slideUpIn);

      }


I'm not 100% sure what you are after, your wording is a little strange to me.

However, you may find a ViewFlipper to your liking.

A ViewFlipper can let you swap between various Layouts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜