사용자 지정 listview 레이아웃을 설정하여 실험하고 있습니다.ListView에서 세로 방향으로 LinearLayout 설정
가test.xml의은 :
그러다가 선형 배치의 방향을 변경할 때 수평 혼잡되는을 :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
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="hello"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="hello 2"
/>
</LinearLayout>
이 이렇게 정상적인 보이는 I 부풀려 레이아웃이있다 다음과 같이 보입니다. 이 문제를 해결할 방법이 있습니까? 아니면 여기서 내가 뭘 잘못하고 있습니까?
다시이 문제를 해결하기 위해 또는 내가 잘못 여기서 뭐하고있는 방법은 무엇입니까?
텍스트보기에서 android : layout_width = "wrap_content"를 사용해보십시오. Doe 앉는 것이 효과가 있니? –
레이아웃 무게 – androidqq6