-4
가로로 배열 된 2 textView 레이아웃이 있습니다. textView는 sqlite 데이터베이스에서 검색하는 디스플레이 데이터에 사용되며 textView.plese의 배열을 변경하지 않고이 레이아웃에서 스크롤 뷰를 추가하려는 경우 이것이 도움이됩니다.스크롤 뷰에 textview를 추가하는 방법은 무엇입니까?
가로로 배열 된 2 textView 레이아웃이 있습니다. textView는 sqlite 데이터베이스에서 검색하는 디스플레이 데이터에 사용되며 textView.plese의 배열을 변경하지 않고이 레이아웃에서 스크롤 뷰를 추가하려는 경우 이것이 도움이됩니다.스크롤 뷰에 textview를 추가하는 방법은 무엇입니까?
나는 이것을 원한다고 생각합니다.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/xTv1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:id="@+id/xTv2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
수평 스크롤 또는 수직으로 만들고 싶습니까? –
@SomeshKumar vertical –
가능한 중복 - http://stackoverflow.com/questions/6674341/how-to-use-scrollview-in-android –