게시판 만들기에서 게시글 ListView만들기 에서 발생한 문제 질문드립니다.
744
작성한 질문수 1
강의를 보며 개발자님과 똑같이 하지 않고 저에게 필요한 부분들을 제 스타일대로 바꾸면서 듣고 있습니다. 잘 되다 이번에 문제가 생겼습니다. 현재 레이아웃이 겹칩니다.. 어느 부분의 코드를 보여드리야할까요.. 추가적으로 어떤 걸 말씀드려야하는지 알려주시면 더 자세하게 질문하겠습니다. 도와주세요
답변 3
0
혹시 listview에 위에 marginTop을 줘보시겠어요?
<ListView
android:id="@+id/boardListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"
android:layout_marginBottom="70dp" />
0
<?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="100dp"
android:orientation="vertical">
<TextView
android:id="@+id/titleArea"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:text="title"
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="@+id/contentArea"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:text="content"
android:textColor="@color/black"
android:textSize="15sp" />
<TextView
android:id="@+id/timeArea"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:text="time"
android:textColor="#999999"
android:textSize="10sp" />
</LinearLayout>
// 위 코드는 board_list_item.xml 코드 입니다 (title, content, time이 적혀있는)
// 아래 코드는 택시 그림과 오른쪽에 메뉴를 선택할 수 있는 코드입니다.(board_list_item.xml과 겹치는)
<?xml version="1.0" encoding="utf-8"?>
<layout
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">
<!-- TODO: Update blank fragment layout -->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/boardListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="70dp" />
<ImageView
android:id="@+id/writeBtn"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="80dp"
android:src="@drawable/write"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="5dp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/mainColor" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent">
<ImageView
android:id="@+id/homeTap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/home" />
<ImageView
android:id="@+id/talkTap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/talk" />
<ImageView
android:id="@+id/writeTap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/note" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
0
xml 파일을 공유해주시면 문제를 찾을 수 있을 것 같아요~
0
<?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="100dp"
android:orientation="vertical">
<TextView
android:id="@+id/titleArea"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:text="title"
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="@+id/contentArea"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:text="content"
android:textColor="@color/black"
android:textSize="15sp" />
<TextView
android:id="@+id/timeArea"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:text="time"
android:textColor="#999999"
android:textSize="10sp" />
</LinearLayout>
// 위 코드는 board_list_item.xml 코드 입니다 (title, content, time이 적혀있는)
// 아래 코드는 택시 그림과 오른쪽에 메뉴를 선택할 수 있는 코드입니다.(board_list_item.xml과 겹치는)
<?xml version="1.0" encoding="utf-8"?>
<layout
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">
<!-- TODO: Update blank fragment layout -->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/boardListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="70dp" />
<ImageView
android:id="@+id/writeBtn"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="80dp"
android:src="@drawable/write"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="5dp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/mainColor" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent">
<ImageView
android:id="@+id/homeTap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/home" />
<ImageView
android:id="@+id/talkTap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/talk" />
<ImageView
android:id="@+id/writeTap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/note" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
이미지가 기본이미지인지 확인
0
143
1
NavController error 발생
0
155
1
fragment 생성하고 메인에서 불러왔는데 안뜹니다.
0
151
2
67강 댓글
0
113
2
7강 데이터바인딩 에러
0
129
2
Firebase 스토리지 유료화 문제
1
307
2
게시글 이미지가 파이어베이스에 저장되지 않습니다.
0
192
2
AVD 갤러리에 이미지 저장 안되는 문제
0
255
2
이미지 받아오는 방법?
0
212
2
회원탈퇴 기능을 추가하려고 합니다.
0
196
2
상태바 질문 드립니다.
0
119
1
섹션2 인트로 페이지 꾸미기 질문 드립니다.
0
123
1
게시판 글을 길게 쓸경우
0
130
2
로그인 로그아웃
0
186
2
갤럭시 연결시 게시판에 업로드한 사진이 보이지 않아요.
0
222
2
웹뷰 AVD 실행안됨
0
199
1
자막켜기가 안되요 ㅜ.ㅜ
1
197
1
리사이클러뷰, 그리드레이아웃 오류
0
192
2
리사이클러뷰 오류 해결 방법이 궁금합니다.
0
203
1
firebase 스마트폰으로 연결이 안되는데 원인이 있을까요
0
272
2
안드로이드 스튜디오 게시글 이미지 업로드 유무
0
228
1
firebase 설정 오류
0
310
2
홈 화면 커뮤니티
0
182
1
게시판 글 읽기
0
245
2





