2011-04-29 12 views
5

मेरे विचारों में से एक में मेरे पास तीन संपादन टेक्स्ट फ़ील्ड हैं। पहले दो सिंगल लाइन हैं, और तीसरा मल्टीलाइन है। मैं android:windowSoftInputMode="stateVisible|adjustResize" का उपयोग कर रहा हूं हालांकि आईएमई आने पर तीसरा क्षेत्र पोर्ट्रेट मोड में बहुत छोटा हो जाता है और इसका ध्यान केंद्रित होता है।एंड्रॉइड - विंडो आकार में एकाधिक संपादन टेक्स्ट फ़ील्ड

क्या न्यूनतम ऊंचाई निर्धारित करने का कोई विकल्प है जो विंडो को तीसरे क्षेत्र को समायोजित करने के लिए नीचे स्क्रॉल करने के लिए मजबूर करेगा?

मैंने xml फ़ाइल में android:minHeight="20dip" सेटिंग करने का प्रयास किया है, लेकिन इसका कोई प्रभाव नहीं है।

<EditText 
     android:id="@+id/msgreplyarea" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" android:gravity="top" 
     android:layout_weight="1" 
     android:layout_marginLeft="10dip" android:layout_marginRight="10dip" 
     android:layout_marginTop="10px" 
     android:inputType="textCapSentences|textMultiLine" 
     android:imeOptions="flagNoEnterAction" />

धन्यवाद:

प्रश्न में EditText तरह दिखता है।

उत्तर

2

एंड्रॉयड: minHeight काम करता है, लेकिन माता-पिता को देखने

<ScrollView 
    android:layout_width="fill_parent" 
    android:layout_height="0dip" 
    android:layout_weight="1" 
    android:scrollbarStyle="outsideInset" 
    android:fillViewport="true"> 
    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:orientation="vertical" > 
     <EditText 
      android:id="@+id/replyarea" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" android:gravity="top" 
      android:singleLine="false" android:layout_weight="1" 
      android:layout_marginLeft="10dip" android:layout_marginRight="10dip" 
      android:layout_marginTop="10px" 
      android:minHeight="120dp" 
      android:inputType="textAutoCorrect|textCapSentences|textMultiLine" 
      android:imeOptions="flagNoEnterAction" /> 
    </LinearLayout>  
</ScrollView> 
0

Android documentation इससे आपकी सहायता कर सकता है। या आप त्वरित सुधार का उपयोग कर सकते हैं:

<activity name="EditContactActivity" 
    android:windowSoftInputMode="stateVisible|adjustResize"> 
    ... 
</activity> 

या

android:windowSoftInputMode="adjustPan" 
+0

आप ध्यान देंगे एक ScollView में लिपटे होने की जरूरत है मेरे प्रश्न में मैं निर्दिष्ट करता हूं कि मैं पहले से ही इसका उपयोग कर रहा हूं। – aperture

संबंधित मुद्दे