안드로이드 스크롤뷰 질문
조회수 670회
안드로이드 스튜디오로 스크롤뷰를 사용하여 완성한 모습은 아래 이미지입니다.
그런데 실제로 구동을 하면
이렇게 한글은 보이지도 않고 잘린 5부터 나오기 시작합니다.
그리고 마지막까지 스크롤을 내리면
알 수 없는 빈 공간까지 있습니다.
xml과 연동되는 자바 파일엔 이 액티비티를 끄는 finish() 기능만 구현 되어 있고 나머진 건드린게 없습니다.
혹시 몰라 xml 파일을 올려두겠습니다.
<?xml version="1.0" encoding="utf-8"?>
<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:orientation="vertical"
android:layout_height="600dp"
android:background="@drawable/bg_round"
tools:context=".HistoryActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:background="@drawable/bg_roundtop"
android:gravity="center"
android:orientation="vertical" />
<ImageView
android:id="@+id/imgview_back"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="2dp"
android:onClick="onClick"
android:src="@drawable/icon_cancle" />
</RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="2020년 9월 11일"
android:gravity="center"
android:textColor="@color/black"
android:textSize="20sp"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="하나"
android:textColor="@color/black"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="둘"
android:textColor="@color/black"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="셋"
android:textColor="@color/black"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="넷"
android:textColor="@color/black"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20"
android:textColor="@color/black"
android:textSize="16sp" />
</LinearLayout>
</ScrollView>
</LinearLayout>
왜 윗 내용들이 잘려서 나오는지 모르겠습니다.
-
(•́ ✖ •̀)
알 수 없는 사용자
댓글 입력