मेरे पास TextInputLayout
के साथ EditText
के साथ एक लेआउट है।TextInputLayout ऑटो फोकस
जब लेआउट लोड किया गया है EditText
तुरंत संपादन मोड में है, कीबोर्ड ऊपर नहीं है लेकिन कर्सर चमक रहा है और संकेत EditText
के अंदर नहीं है लेकिन इसके ऊपर है।
मैं चाहता हूं कि संकेत संपादन टेक्स्ट से एनिमेटेड हो, केवल पहले उपयोग EditText
पर क्लिक करता है।
मैं इसे कैसे पूरा कर सकता हूं? मैंने EditText
और TextInputLayout
दोनों पर clearFocus() की कोशिश की है।
मेरे xml:
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<EditText
android:singleLine="true"
android:id="@+id/case_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Case name" >
</EditText>
</android.support.design.widget.TextInputLayout>
@Kuffs एंड्रॉयड कोशिश: या तो काम नहीं करता है windowSoftInputMode = "stateHidden" , तुम कोशिश कर सकते हैं। – aviran
शायद मैंने जो प्रश्न सुझाया वह एक अच्छा उदाहरण नहीं था, लेकिन कई अन्य लोग एक ही बात पूछ रहे हैं। कृपया खोज का प्रयोग करें। http://stackoverflow.com/questions/5550429/edittext-android-automatic- फ़ोकस सभी उत्तरों को केवल स्वीकृत लोगों की जांच करें। – Kuffs
इस में सबसे अधिक गतिविधि है http://stackoverflow.com/questions/1555109/stop-edittext-from-gaining-focus-at-activity-startup – Kuffs