에서 화면을 이동 텍스트 뷰하는 레이아웃입니다 :이 RelativeLayout의
<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="2"
android:rowCount="2"
android:rowOrderPreserved="true"
android:alignmentMode="alignMargins">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_row="0"
android:layout_column="0"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Test:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_row="0"
android:layout_column="1"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="too long line too long line too long line too long line" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Test2:"
android:paddingRight="10dp"
android:layout_row="1"
android:layout_column="0" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_row="1"
android:layout_column="1"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Test line" />
</GridLayout>
여기 무슨 일의 스크린 샷입니다 : 내가 두 번째 텍스트 뷰를 방지 할 수있는 방법
합니다 (하나의 선택 스크린 샷)이 화면 경계를 넘어 가지 않습니까?
하지만 대답은 그것을 할 수있는 올바른 방법을 보여주는 코드를 추가하는 예를 들어, 좀 더 정교한 수 : 은 텍스트 뷰에서 다음 줄을 놓습니다. 그래도 좋은 해결책;) – 2Dee
나는 그것을 사과한다. 약간의 서두를했지만 도움을 원했습니다 :) –
@TheHungryAndroider : 감사합니다. layout_weight를 사용하여 예제를 게시 할 수 있습니까? – xx77aBs