TextView의 layout_height과 textSize가 같은 경우 하단의 텍스트가 짤리는 현상이 발생합니다.
텍스트뷰의 레이아웃 사이즈 Width 300px , Height 40px와 TextSize 40px를 유지하면서
문제를 해결할 수 있는 방법은 없는지 궁금합니다.
실행했을때 화면과 Graphical Layout화면은 아래와 같습니다.
< 에뮬레이터 실행화면>
<Graphical Layout 화면>
코드
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<EditText
android:id="@+id/id"
android:layout_width="300px"
android:layout_height="60px"
android:layout_marginBottom="20px"
android:layout_marginLeft="20px"
android:layout_marginTop="20px"
android:paddingLeft="15px"
android:paddingRight="15px"
android:textSize="20px" />
<EditText
android:id="@+id/password"
android:layout_width="300px"
android:layout_height="60px"
android:layout_alignLeft="@id/id"
android:layout_below="@id/id"
android:paddingLeft="15px"
android:paddingRight="15px"
android:layout_marginBottom="20px"
android:textSize="20px" />
<TextView
android:layout_width="300px"
android:layout_height="40px"
android:layout_alignLeft="@id/id"
android:layout_below="@id/password"
android:text="학교종이땡땡땡어서오너라"
android:textSize="40px"
android:gravity="center_vertical" />
</RelativeLayout>
** 추가질문좀 드리겠습니다. ( _ _ ) **
두번째 스샷인 Graphical Layout화면에서 EditText를 선택했을때 EditText(텍스트입력부분)가 300px * 60px 크기의 셀의 상단에 위치하고
있는것처럼 보이는데요. 이것 또한 수직중앙으로 정렬하고 싶은데 방법을 모르겠습니다. gravity와 layout_gravity를 사용해도 해결이
안되네요... 고수님들 많은 도움 부탁드립니다 ^^; 초보좀 도와주세요~~
답변 감사드립니다.~ 두번째 질문을 제가 너무 간략하게 말씀드려서 죄송하구요.
정렬 부분에서 질문드린것은. Graphical Layout화면에서 해당 에디트 텍스트를 클릭했을경우 첨부된 이미지처럼
파란색으로 영역이 표시되는데요. 에디트 텍스트의 실제로 글이입력되는 하얀색부분이 이 파란색 영역 안의 상단부분에
위치하고 있는것에 대해 의문점을 가진것입니다. 다시말해 파란색으로 표시된 영역안에 아래쪽 여백이 위쪽 여백보다
넓게 보이고 있는것에 대한 질문이었습니다. Button같은 경우에도 생성하고 Graphical Layout화면에서 확인하면 이와같이 보이는데요.
이것이 Android Drawable Editor에서 원래 저런형태로 보여주는 것이 아니라면 중앙으로 정렬하고 싶어서 질문드렸습니다.!
답변기다릴게요 ^^;




짤리는 이유는 아마 폰트때문에 그런거 같네요..
그리고 레이아웃 정렬이라..-_-저건 해보고 ....그러니까 위에 에딧텍스트뷰에 포커스가 갔을때
그 글쓰는 커서가 중간에 있게 하고 싶으시다는 말씀이신가요...
질문 이해를 잘 못하겠어요...보시고 답글 다시면 해보고 소스 올리겠습니다..