I am trying to resize the Android support toolbar Activitywhen changing orientation since it is too large in landscape mode. It does not change automatically when used
android:configChanges="orientation|screenSize"
in my activity, and therefore the activity will not be recreated. The XML toolbar is as follows:
<android.support.v7.widget.Toolbar
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/my_awesome_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary" />
in my onConfigurationChanged()I resize the toolbar for example. eg:
findViewById(R.id.my_awesome_toolbar).setLayoutParams(new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 114));
The result is not as expected. Menu items that are filled with setSupportActionBar(toolbar);and onCreateOptionsMenu()are incorrectly aligned vertically, and not a single navigation icon ( toolbar.setNavigationIcon(...):

- , ?