TextView를 사용하고 있지만 긴 텍스트에서는 첫 번째 줄이 숨겨져 있고 다음과 같이 스크롤 할 수 없습니다. Screenshot스크롤보기에서 TextView의 첫 번째 줄이 숨겨져 있습니다.
이이 문제를 해결하는 방법 내 레이아웃
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/tip_details_ll"
android:background = "#c8d26a">
<LinearLayout
android:id="@+id/titleBar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentTop="true"
android:orientation="horizontal"
android:visibility="gone"
>
<ImageView
android:id="@+id/iconImg"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_margin="5dip"
android:background="@drawable/ic_launcher" />
<TextView
android:id="@+id/titleTxt"
android:layout_width="140dp"
android:layout_height="40dp"
android:gravity="center_vertical"
android:text="Healthy Tips"
android:textSize="22dip"
android:textStyle="bold"
android:textColor="#4f4f4f"
android:layout_margin="5dip" />
<RelativeLayout
android:id="@+id/closeBtn"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingRight="2dip" >
</RelativeLayout>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="5dip"
android:background="@drawable/seperator" >
</View>
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="240dp"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_above="@+id/bottomShadow"
android:layout_below="@+id/topShadow" >
<LinearLayout
android:id="@+id/tips"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:orientation="vertical" >
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal|center"
android:layout_weight="1.33"
android:layout_marginTop="10dp"
android:gravity="center"
android:scrollbars = "vertical"
android:maxLines="20"
android:textStyle="bold"
android:text="In order to succeed, your desire for success should be greater than your fear of failure.In order to succeed, your desire for success should be greater than your fear of failure"
android:textColor="#4f4f4f"
android:textSize="25sp" />
<TextView
android:id="@+id/todayDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="10dp"
android:fontFamily="lucida grande"
android:gravity="center"
android:text="Mon, 16 Dec 2013"
android:textColor="#000000"
android:textSize="15sp"
android:visibility="gone" />
</LinearLayout>
</ScrollView>
<View
android:layout_width="fill_parent"
android:layout_height="5dip"
android:layout_marginTop="10dp"
android:background="@drawable/seperator" >
</View>
<LinearLayout
android:id="@+id/buttons"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:orientation="horizontal" >
<RelativeLayout
android:id="@+id/previous_tip_rl"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_weight="1" >
<ImageButton
android:id="@+id/previous_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginRight="4dp"
android:background="@drawable/previous_button"
android:visibility="gone" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/share_rl"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_weight="1" >
<ImageButton
android:id="@+id/share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginRight="4dp"
android:background="@drawable/share_button" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/favorite"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_weight="1" >
<ImageButton
android:id="@+id/star"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/star_off"
android:layout_marginLeft="4dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/next_tip_rl"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_weight="1" >
<ImageButton
android:id="@+id/next_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginRight="4dp"
android:background="@drawable/next_button"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="5dip"
android:layout_marginTop="10dp"
android:background="@drawable/seperator" >
</View>
<Button
android:id="@+id/dialog_dismiss"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_below="@+id/RelativeLayout1"
android:text="dismiss"
android:visibility="gone"
android:layout_marginRight="4dp"/>
</LinearLayout>
입니까? 미리 감사드립니다.
정말 고마워요, 당신은 모든 지점에서 옳습니다. – Eman87