I am trying to set hint to be question mark (?). If I set it as string in xml file I get error
Error: Resource id cannot be an empty string (at 'hint' with value '?').
<EditText
android:id="@+id/txt_to_edit"
android:layout_width="92dp"
android:layout_height="wrap_content"
android:layout_column="8"
android:layout_gravity="bottom"
android:layout_row="5"
android:layout_rowSpan="6"
android:hint="?"
android:text="@string/txt_label"/>
If I set the hint to point at @string/quest in strings.xml I get the same error. If I try to use ! or anything similir it works fine. I am using Android SDK 4. Thanks
<EditText
android:id="@+id/txt_to_edit"
android:layout_width="92dp"
android:layout_height="wrap_content"
android:layout_column="8"
android:layout_gravity="bottom"
android:layout_row="5"
android:layout_rowSpan="6"
android:hint="@string/quest"
android:text="@string/txt_label"/>
?
is considered as a special character (used for ?android:attr
for example). Try with \?
.
I agree with Amokrane.
Maybe try
<EditText
android:id="@+id/txt_to_edit"
android:layout_width="92dp"
android:layout_height="wrap_content"
android:layout_column="8"
android:layout_gravity="bottom"
android:layout_row="5"
android:layout_rowSpan="6"
android:hint="\?"
android:text="@string/txt_label"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With