I have two `TextView` and below `ListView` with two `TextView`.
My problem is: How do I set that value from my second `TextView` from `ListView` be right under second `TextView` which is above `ListView`.
Can anyone help?
I have 2 tableRows. In first I have 2 textView's: TextViewNameOfProduct and TextViewPriceOfProduct. In second tableRow i have a listView. ListView have also 2 textView's:textViewProduct and textViewPrice.
My problem is that the textViewPrice is not right below TextViewPriceOfProduct...it isn't aligned with TextViewPriceOfProduct. My english is bad and i I'm not sure if I was clear enough...
http://imageupload.org/?d=2ABFEE041
OPIS PROIZVODA is first textView, second is CENA. Under that are elements from listView. How to put 100 below CENA??? How to align that...if you need my xml i will put it here...
[1]: http://i.stack.imgur.com/ODWyj.jpg
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableLayout android:id="@+id/tableLayout1" android:layout_height="wrap_content" android:layout_width="fill_parent">
<TableRow android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/tableRow7">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:layout_weight="1">
<TextView android:text="OPIS PROIZVODA"
android:id="@+id/textViewOpisProizvoda"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1">
</TextView>
<TextView android:text="CENA"
android:id="@+id/textViewCena"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_gravity="center"
android:gravity="center"
android:layout_weight="1">
</TextView>
</LinearLayout>
</TableRow>
<TableRow android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/tableRow8">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView
android:id="@+id/listViewPonuda"
android:layout_width="fill_parent"
android:smoothScrollbar="true"
android:visibility="visible"
android:layout_height="wrap_content"
android:textSize="14sp"
>
</ListView>
</LinearLayout>
</TableRow>
</TableLayout>
0
A
답변
0
목록보기의 textview 즉 (ListView에는 2 개의 textView : textViewProduct 및 textViewPrice가 있습니다.)이 레이아웃을 사용할 수 있습니다. 당신은 당신의 요구 사항에 따라 간단하게 패딩하여 두 번째 textview를 조정할 수 있습니다.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/country_name"
android:text="textViewProduct"
android:paddingLeft="10dip"
android:layout_weight="0.5"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/country_abbrev"
android:text="textViewPrice"
android:layout_gravity="right"
android:paddingRight="30dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
관련 문제
- 1. ListView의 id 문제
- 2. 안드로이드에 이미지를 저장하는 listview의 문제
- 3. 안드로이드 문제 관련 ListView의 OnItemClickListener
- 4. 레이아웃 이동 - CSS 문제
- 5. IE7의 레이아웃 문제
- 6. 테두리가있는 CSS 레이아웃 문제
- 7. 레일 레이아웃 관련 문제
- 8. 자바 스윙 레이아웃 문제
- 9. Android 선형 레이아웃 문제
- 10. 흐름 레이아웃 패널 문제
- 11. 안드로이드 레이아웃 문제
- 12. Android 레이아웃 문제
- 13. 보조 레이아웃 회전 문제
- 14. Android 레이아웃 문제
- 15. 레이아웃 관리자의 가시성 문제
- 16. CSS 레이아웃 디자인 문제
- 17. 레이아웃 무게 문제
- 18. Rebol 레이아웃 문제
- 19. 안드로이드 : 상대 레이아웃 문제
- 20. IE의 레이아웃 문제 도움말
- 21. Android 레이아웃 문제
- 22. IE9 CSS 레이아웃 문제
- 23. C# 패널 레이아웃 문제
- 24. 런타임의 선형 레이아웃 문제
- 25. 안드로이드 레이아웃 문제
- 26. 안드로이드 레이아웃 Fill_Parent 문제
- 27. Android : xml 레이아웃 문제
- 28. 상대 레이아웃 문제
- 29. UI 레이아웃 문제/알고리즘
- 30. IE7의 상대 레이아웃 문제
사진에 추가 하시겠습니까? 지금 당장 당신이 의미하는 것은 ... 해독 할 수없는 것입니다. – Kheldar
조금 분명히하십시오. 우리는 당신이 정확히 묻고있는 것과 당신의 상황을 알 수 없습니다. –
당신의 문장을 어기십시오. – Ronnie