inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

이미지 업로드

283

hi

작성한 질문수 1

0

스크린샷 2023-07-15 오후 8.05.22.png

게시글 작성 xml 을 동일하게 따라했는데도 이미지를 업로드 하면 이미지와 content 사이에 마진이 생깁니다.

<?xml version="1.0" encoding="utf-8"?>

<layout>

    <LinearLayout
        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"
        tools:context=".BoardWriteActivity"
        android:orientation="vertical">

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="60dp">

                    <TextView
                        android:text="글쓰기 페이지"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:textColor="@color/black"
                        android:gravity="center"/>

                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="0.5dp"
                    android:background="#000000"/>

                <EditText
                    android:id="@+id/titleView"
                    android:layout_margin="20dp"
                    android:layout_width="match_parent"
                    android:background="@android:color/transparent"
                    android:hint="제목을 입력해주세요"
                    android:layout_height="60dp"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="0.5dp"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="20dp"
                    android:background="#000000"/>

                <EditText
                    android:id="@+id/contentView"
                    android:layout_margin="20dp"
                    android:layout_width="match_parent"
                    android:hint="내용을 입력해주세요"
                    android:background="@android:color/transparent"
                    android:layout_height="60dp"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="0.5dp"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="20dp"
                    android:background="#000000"/>

                <ImageView
                    android:id="@+id/contentImage"
                    android:src="@drawable/plusbtn"
                    android:layout_marginTop="20dp"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

                <Button
                    android:id="@+id/textUploadBtn"
                    android:text="입력"
                    android:layout_width="match_parent"
                    android:background="@drawable/custom_edittext"
                    android:layout_marginTop="50dp"
                    android:layout_marginLeft="20dp"
                    android:layout_marginRight="20dp"
                    android:layout_height="wrap_content"/>

            </LinearLayout>

        </ScrollView>

    </LinearLayout>

</layout>

android kotlin firebase

답변 1

0

개복치개발자

안녕하세요.

말씀해주신 정보로는 파악이 조금 어려운데요.

  1. 강의 어느 부분을 보고 있으신건지

  2. 원래 어떻게 나오기를 바라시는건지

  3. 현재 어떻게 나오고있는지

를 설명해주시면 도움드릴 수 있을 것 같습니다.

0

hi

강의 이미지 업로드 부분을 보고 있습니다. 강의에서는 이미지가 글쓰는 부분 바로 아래에 뜨는데 제가 하면 margin이 사진 위 아래로 크게 제가 올린 사진처럼 생깁니다.

0

개복치개발자

image

보내주신 코드가 글쓰기 페이지 맞나요?

제가 이미지를 임시로 넣어봤는데 동일하게 보이지 않는가요?

이미지가 기본이미지인지 확인

0

132

1

NavController error 발생

0

140

1

fragment 생성하고 메인에서 불러왔는데 안뜹니다.

0

140

2

67강 댓글

0

98

2

7강 데이터바인딩 에러

0

113

2

Firebase 스토리지 유료화 문제

1

295

2

게시글 이미지가 파이어베이스에 저장되지 않습니다.

0

180

2

AVD 갤러리에 이미지 저장 안되는 문제

0

240

2

이미지 받아오는 방법?

0

203

2

회원탈퇴 기능을 추가하려고 합니다.

0

186

2

상태바 질문 드립니다.

0

110

1

섹션2 인트로 페이지 꾸미기 질문 드립니다.

0

109

1

게시판 글을 길게 쓸경우

0

123

2

로그인 로그아웃

0

177

2

갤럭시 연결시 게시판에 업로드한 사진이 보이지 않아요.

0

206

2

웹뷰 AVD 실행안됨

0

191

1

자막켜기가 안되요 ㅜ.ㅜ

1

185

1

리사이클러뷰, 그리드레이아웃 오류

0

185

2

리사이클러뷰 오류 해결 방법이 궁금합니다.

0

194

1

firebase 스마트폰으로 연결이 안되는데 원인이 있을까요

0

259

2

안드로이드 스튜디오 게시글 이미지 업로드 유무

0

217

1

firebase 설정 오류

0

304

2

홈 화면 커뮤니티

0

178

1

게시판 글 읽기

0

239

2