I am trying to add a custom view to the new toolbar (Lollipop) . But somehow the view gets added below the toolbar. It was working fine when I used actionBar.setCustom
Just inflate the view that you want to add passing the toolbar view as second parameter of the inflate method; In this way the call to "addView" is not necessary:
setSupportActionBar(toolbar);
View logo = getLayoutInflater().inflate(R.layout.view_logo, toolbar);