ich die Warnung erhalten keine input angeben oder einen Hinweis „Dieses Textfeld ein input oder einen Hinweis nicht angeben:“ Wenn ich eine Kopie eines Tutorial Code ändern (siehe unten)Dieses Textfeld
<EditText android:id="@+id/edit_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/edit_message"
android:layout_weight="1" />
Das funktioniert gut, und die Warnung erscheint nur, wenn eine neue leere Zeile erstellt wird.
Ich habe es für einen Freund mit mehreren Kommentarzeilen geändert, die erklären, was jeder Teil davon tut, wenn ich jedoch eine zusätzliche Zeile hinzufüge im obigen (Sogar eine leere Zeile, in diesem Fall ist es eine Kommentarzeile) Ich erhalte den obigen Fehler
<!--edit text creates a text input box-->
<EditText android:id="@+id/edit_message"
<!-- edit_message is a variable, defined in strings.xml-->
<!-- determines the width of the textField, in this case 0dp means "however long the text is" IE: it will grow to fit however many characters the user types -->
android:layout_width="0dp"
<!-- determines the height of the Text Field -->
android:layout_height="wrap_content"
<!-- The hint is the default value for the text field, it calls on the variable edit_message defined in strings.xml-->
android:hint="@string/edit_message"
<!-- Weight means how much the screen the text field can take up, in this case, the ratio is 1:1 so it can take up however much room is needed, However if a different variable also had the weight of 1, the ratio would be 1:2 and each could take up half the screen -->
android:layout_weight="1" />
Ohne die Kommentare, die Warnung nicht da
Soweit mir bekannt ist, können Sie Ihre Kommentare nicht brechen das XML-Element. I.e. Sie können keine Kommentare zwischen und> 'setzen. [Eine ähnliche Frage] (http://StackOverflow.com/a/16904880/1029225), mit zufällig der gleichen Code-Ausschnitt, wurde kürzlich beantwortet. –