unit testing - Android uianimator: How can I get an EditText value, when a hint is set -


मेरे पास एक EditText फ़ील्ड निर्दिष्ट संकेत के साथ है उदाहरण के लिए:

  & lt; EditText android: id = "@ + id / myedittext" एंड्रॉइड: layout_width = "wrap_content" एंड्रॉइड: layout_height = "wrap_content" एंड्रॉइड: hint = "मेरा विशेष संकेत" / & gt;  

मेरे एंड्रॉइड यूएनआईएमएटर टेस्टकेस में, मेरे पास निम्न कोड है:

  यूआई ऑब्जेक्ट editText = नया यूआईबॉक्स (नया UiSelector ()। ResourceId ("my.package : आईडी / myedittext ")); Println (editText.getText ());   

EditText खाली है जब editText.getText () कथन संकेत देता है अब मेरे पास ऐसा मामला है जिसमें मुझे यह सुनिश्चित करना है कि EditText खाली है

मेरे मामले में यह संकेत एक मूल्य है जो एक वैध मूल्य हो सकता है।

क्या इस पर कोई असर नहीं पड़ता?


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -