मैं पंक्तियों के साथ एक TableLayout प्रदर्शित कर रहा हूँ में एक TextView में बहु लाइन पाठ का प्रदर्शन:Android और एक TableRow इस प्रकार
<?xml version="1.0" encoding="utf-8"?>
<TableRow
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/one"
android:layout_marginLeft="10dip"
android:textColor="#B0171F" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/one"
android:id="@+id/two"
android:layout_marginLeft="10dip"
android:ellipsize="none"
android:singleLine="false"
android:scrollHorizontally="false"
android:maxLines="10"
android:textColor="@android:color/black" />
</RelativeLayout>
</TableRow>
मैं मैं यहाँ पा सकते हैं और के बारे में सोच सकते हैं सब कुछ के साथ इस मार कर रहा हूँ टेक्स्ट को कई लाइनों पर लपेटने की अनुमति दें लेकिन इसका कोई फायदा नहीं हुआ: टेक्स्ट को हमेशा एक लाइन पर मजबूर किया जाता है, स्क्रीन से चल रहा है। इससे कोई फर्क नहीं पड़ता कि मैं यहां एक टेबलरो के अंदर काम कर रहा हूं, और जहां तक मैं यह कह सकता हूं कि इस साइट पर इसका इलाज नहीं किया गया है।
तो, मैं अपने दूसरे टेक्स्ट व्यू को कई पंक्तियों में लपेटने के लिए कैसे मजबूर करूं?
एक टेबलरो बस यही है - एक पंक्ति। मुझे नहीं लगता कि आपको एक पंक्ति पर कई लाइनों को आजमाने और बनाने की ज़रूरत है, जो कि थोड़ी सी बात है। वहाँ TableRow का उपयोग करने का उद्देश्य क्या है? – Klaus
क्या आपने 'एंड्रॉइड: सिंगललाइन =" झूठी "रेखा को हटाने का प्रयास किया था? –
बस अपने कोड को ग्रहण में कॉपी किया गया है, और पाठ सही ढंग से लपेट रहा है, जैसा कि मैं ग्राफिकल लेआउट में देख सकता हूं। (मैंने अभी 'एंड्रॉइड: टेक्स्ट = "(एक लंबा टेक्स्ट)" प्रदर्शित करने के लिए कुछ पाठ जोड़ने के लिए जोड़ा है) – Adinia