홈>
해결할 수없는 이상한 문제가 있습니다. 설정 표시 줄과 툴바 사이에 약간의 간격이 있습니다. 여기에서보십시오
툴바의 내 XML :
<android.support.v7.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
활동에서 다음과 같이 칭합니다 :
도구 모음 myToolbar = (도구 모음) findViewById (R.id.my_toolbar); setSupportActionBar (myToolbar);
All Acitivity XML (모든 코드를 외부 파일에 넣고 포함)
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:fitsSystemWindows="true"
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"
tools:context="com.example.afcosta.inesctec.pt.android.FamilyLibrary"
android:paddingTop="6dp">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_menu_camera"
app:backgroundTint="#f1c40f"
tools:layout_constraintRight_creator="1"
tools:layout_constraintBottom_creator="1"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginEnd="37dp"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginBottom="33dp" />
<android.support.v7.widget.RecyclerView
android:id="@+id/gallery"
android:layout_width="0dp"
android:layout_height="562dp"
tools:layout_constraintTop_creator="1"
tools:layout_constraintRight_creator="1"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginTop="97dp"
tools:layout_constraintLeft_creator="1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include
layout="@layout/custom_toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="@+id/toolbar"/>
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Familias"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
tools:layout_constraintBottom_creator="1"
app:layout_constraintBottom_toTopOf="@+id/gallery"
android:layout_marginStart="8dp"
tools:layout_constraintLeft_creator="1"
android:layout_marginBottom="15dp"
app:layout_constraintLeft_toLeftOf="parent"
android:textSize="24dp"/>
</android.support.constraint.ConstraintLayout>
나타나지만 이상한 공백은 성가시다 :/
- 답변 # 1
관련 자료
- html - 기본 div와 바닥 글 사이의 공백
- javascript - 이러한 구성 요소 사이에 일반 공간을 추가하려면 어떻게해야합니까?
- javascript - join 메서드를 사용하여 중첩 배열의 요소 사이에 공백을 추가하는 방법
- java - 도와주세요! RahmanSajid 사이에 공간을 만드는 방법 Mizanur Rahman Sajid
- Microsoft Word 2017 방정식 편집기에서 방정식 사이에 공백을 추가하는 방법
- html - 이 두 div 사이의 공간을 어떻게 제거 할 수 있습니까?
- html - 이중 테두리 사이의 공간
- python - sed를 사용하여 같은 필드의 두 문자 사이에 공백을 삽입하십시오
- html - 수직, 엇갈림 및 겹치는 카드 더미 사이의 수평 공간 제거
- pandas - 파이썬 데이터 프레임에 공백이 포함 된 행 제거
- sass - 배열의 단일 문자열 내에서 빈 공간을 관리하는 방법
- dictionary - 맵 키 유형과 값 유형 사이의 공백의 구문 적 의미
- html - 탐색 모음에서 링크 텍스트 사이에 공백을두기
- html - 이미지 사이의 공간을 어떻게 제거합니까?
- html - Nav bar와 "Jumbotron"사이의 공백
- shell - 공백과 사이의 숫자를 바꾸는 sed 명령 -
- wordpress - 문의 양식 7에서 두 열 사이에 공간을 추가하는 방법
- memory management - 스왑 공간과 CPU 캐시의 차이점은 무엇입니까?
- javascript - 낙타 케이스 키 이름 사이에 공백을 추가하는 방법은 무엇입니까?
- java - 버튼 사이에 설명 할 수없는 공간이 있습니다
관련 질문
- java : Android가 작동하지 않는 set/getTag()의 조건부 논리
- java : Android에서 json 데이터를 xml로 변환하는 방법은 무엇입니까?
- java : 편집 텍스트에 스크롤바를 추가하는 방법
- java : 화면이 잠겨 있거나 꺼져 있을 때 카메라 셔터 onkeyevent가 있는 Android 앱
- Google Map NearbySearch Api를 사용하여 개조 및 RxJava로 2개의 연속 요청을 실행할 수 없습니다. 내가 무엇을 놓치고 있습니까?
- java : Android 앱 -지도 조각에서 사라지는 Google 지도 위치 마커
- java : URI를 업데이트하려고 할 때 FileNotFoundException이 발생하는 ActivityResultContracts.TakePicture()
- java : android studio에서 SQLite 데이터가 지속되지 않음
- java : XML에서 하위 요소의 값을 가져오는 방법은 무엇입니까?
- java : Firebase 실시간 데이터베이스(android studio)를 읽거나 쓸 수 없습니다.
ConstraintLayout
에서 패딩을 제거해야합니다 :