मैं एक टेबल लेआउट प्रदर्शित कर रहा हूं, जिसमें मुझे तालिका में पंक्तियों के बीच अलगाव रेखा चाहिए। तालिका लेआउट में कॉलम वार पृथक्करण करना भी संभव है। कृपया मेरी मदद करें।तालिका लेआउट में पंक्तियों के बीच अलगाव
के बाद मेरी एक्सएमएल तालिका लेआउट है:
<?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="wrap_content"
android:orientation="vertical"
android:paddingBottom="6dip"
android:paddingTop="4dip">
<TableLayout
android:id="@+id/tablelayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="2dip">
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Income"></TextView>
<TextView
android:layout_width="150px"
android:layout_height="wrap_content"
android:layout_marginLeft="150dp"
android:text="Expense"></TextView>
</TableRow>
<TableRow android:layout_marginTop="30px">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Household:"></TextView>
<TextView
android:id="@+id/text50"
android:layout_width="150px"
android:layout_height="wrap_content"
android:text="Household:"></TextView>
</TableRow>
<TableRow android:layout_marginTop="40px">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_span="2"
android:text="Travel:"></TextView>
<TextView
android:id="@+id/text51"
android:layout_width="150px"
android:layout_height="wrap_content"
android:layout_marginLeft="-250dp"
android:text="Travel"></TextView>
</TableRow>
<TableRow android:layout_marginTop="40px">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_span="2"
android:text="Education:"></TextView>
<TextView
android:id="@+id/text52"
android:layout_width="150px"
android:layout_height="wrap_content"
android:layout_marginLeft="-250dp"
android:text="Education"></TextView>
</TableRow>
</TableLayout>
</LinearLayout>
यू तालिका पंक्ति में 2 ग्रंथों, एक छवि (लाइन) पाठ होने चौड़ाई 2dp.this के बीच विभक्त विभक्त – AkashG
रूप में काम करेंगे आप भी इस कोशिश कर सकते हैं के रूप में/दृश्य जोड़ने जोड़ रहे हैं के रूप में। http://stackoverflow.com/questions/2108456/how-can-i-create-a-table-with-borders-in-android या http://stackoverflow.com/questions/7117533/कैसे-से-देने-सीमा-के-कक्ष-इन-टेबललेआउट-इन-एंड्रॉइड – spr