लपेट नहीं पाएगा, मुझे पता है कि स्टैक ओवरफ्लो में बहुत से संबंधित प्रश्न हैं, लेकिन मैंने उनमें से किसी भी में लिखे गए सब कुछ करने की कोशिश की और अब तक मैं यह काम नहीं कर सका।एडिटटेक्स्ट अपना टेक्स्ट
मेरी समस्या सरल है। मेरे पास एंड्रॉइड एप्लिकेशन है, और मेरे पास एक बॉक्स है जहां उपयोगकर्ता टेक्स्ट इनपुट करेगा। हालांकि, मैं नहीं चाहता कि यह टेक्स्ट मल्टीलाइन हो (इसमें इसमें "\ n" नहीं होना चाहिए), लेकिन अगर मैं व्यूपोर्ट से अधिक लाइन का आकार बड़ा करता हूं तो मैं इसे लपेटना चाहता हूं। तो मूल रूप से, जो मैं चाहता हूं वह वही व्यवहार है जो जीमेल विषय फ़ील्ड पर टेक्स्टबॉक्स है।
यह मेरे पूरे दृश्य है:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/question"
android:textAppearance="@style/titleFont"/>
<EditText
android:id="@+id/edit_question_value"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.3"
android:gravity="top"
android:inputType="textImeMultiLine|textEmailSubject"
android:maxLength="70"
>
</EditText>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/answer"
android:textAppearance="@style/titleFont"/>
<EditText
android:id="@+id/edit_question_answer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:gravity="top"
android:layout_weight="0.7"
android:inputType="textMultiLine"/>
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<Button
android:id="@+id/save_question"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_weight="0.5"
android:text="@string/save"/>
<Button
android:id="@+id/cancel_edit_question"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:text="@string/cancel"/>
</LinearLayout>
पाठ मैं इस व्यवहार करना चाहते हैं theone साथ आईडी + id/edit_question_value @ के बराबर है। अब तक, मैं इसे सचमुच बहुमुखी बनाने में सक्षम हूं (इसलिए यदि उपयोगकर्ता चाहता है तो उपयोगकर्ता प्रवेश कर सकता है) या सिंगल-लाइन और टेक्स्ट लपेट नहीं जाएगा। शायद पाठ के आस-पास के कुछ तत्वों में कुछ हस्तक्षेप हो रहा है, और यही कारण है कि मैंने पूरा दृश्य शामिल किया।
क्या कोई जानता है कि क्या हो रहा है?