मैं TextView
से अधिक लंबा होने पर अंत में 3 बिंदुओं को दिखाने के लिए एक सिंगल लाइन TextView
रखना चाहता हूं। मुझे नहीं पता क्यों - लेकिन मुझे यह नहीं मिला।टेक्स्टव्यू इलिप्सिज़ (...) काम नहीं कर रहा है
मैंने पहले से ही अपने सिर को समान स्टैक ओवरफ्लो प्रश्नों के चारों ओर लपेट लिया है, लेकिन मैं बिना समाधान के समाप्त हुआ। शायद किसी के पास कुछ उपयोगी संकेत हैं।
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical">
<TextView
android:textStyle="bold"
android:text="Full Name"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_width="wrap_content"
android:id="@+id/lName"
android:layout_gravity="center_vertical"
android:maxLines="1"
android:ellipsize="end"/>
</LinearLayout>
LinearLayout
ऊपर 2 अन्य LinearLayouts
में नीडिंत है। शायद यह जानना महत्वपूर्ण है। मैंने पहले से ही "singleLine
" विशेषता का प्रयास किया है, लेकिन कुछ कहते हैं कि यह बहिष्कृत है और यह वैसे भी काम नहीं करता है।
लेकिन टेक्स्ट व्यू के लिए कोई स्टाइल वैल्यू नहीं है !? –
ऐड्रॉइड के बजाय स्टाइल = "@ स्टाइल/ऑटोस्कोल" का उपयोग करें: style = "@ style/autoscroll" – Deshan
मैं प्रोग्रामिक – Riskhan