Reputation: 11107
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);
}
Upvotes: 0
Views: 337
Reputation: 16068
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.
Upvotes: 1