내 AppBar에서 이상한 일을합니다. 이것은 720x1280 화면에서 보이는 것입니다. AppBar 높이가 잘못되었습니다.
어떻게 보일까요? 그리고 이것은 1080x1920 화면에서 보이는 모습입니다. app_bar_main.xml에서 툴바 높이로 놀고 있었지만 마음에 들지 않았습니다. 그래서 다시 기본값 인 attr/actionBarSize 값으로 설정했습니다. . 무엇이 문제 일 수 있습니까? 여기
<?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>
와
activity_main.xml
코드에서 높이와 너비 속성을 제거하려면이업데이트의
갱신
app_bar_main.xml
ocde은 레이아웃 코드 높이를 해결 –을 포함하지만, 그러면 탐색 표시 줄과 appbar 아래의 단편이 사라지고 흰색 배경 만 보입니다. –