My AppBar делает странные вещи. Это то, что он выглядит на экране 720x1280: AppBar неправильная высота
Это то, как это должно выглядеть. И вот как это выглядит на экране 1080x1920: Я играл с высотой панели инструментов в app_bar_main.xml, но мне это не понравилось, поэтому я вернул ее к значению по умолчанию: attr/actionBarSize , В чем может быть проблема? Вот мой app_bar_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.koostamas.justtry.MainActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
А вот мой activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<include
android:id="@+id/app_bar"
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/containerView">
</FrameLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/drawerPane"
android:layout_gravity="start">
<!-- List of Actions (pages) -->
<ListView
android:id="@+id/navList"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:background="@color/busblue"/>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</LinearLayout>
удалить высоту и ширину атрибутов от включаемых код макета –
Это решает высоту, но затем исчезает ящик навигации и фрагмент под панелью приложения, и только белый фон отображается. –