Tôi sử dụng Android Studio, Vì vậy, tôi chỉ có thể cho u nhận xét XML chỉ cho A.S.
Đơn giản chỉ cần chọn một phần của mã bạn muốn làm cho nó bình luận và
báo chí (Ctrl + shift +?) Nó sẽ thêm < 1-- Mã của bạn ->, đây 1 được (Shift + 1) (chấm than mark)
Ghi một điều nữa, đây là một ngoại lệ: Ví dụ
<TextView
android:id="@+id/T_HomeworkMax1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF1E0101"
android:textAppearance="?android:textAppearanceSmall"
android:layout_marginStart="95dp"
android:text="Max" />
<TextView
android:id="@+id/T_HomeworkMin1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF1E0101"
android:layout_marginStart="140dp"
android:textAppearance="?android:textAppearanceSmall"
android:text="Min" />
ở đây, bạn không thể chọn chỉ một hoặc hai dòng từ mã, Bạn phải chọn Node đầy đủ (TextView).
<!-- <TextView
android:id="@+id/T_HomeworkMax1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF1E0101"
android:textAppearance="?android:textAppearanceSmall"
android:layout_marginStart="95dp"
android:text="Max" />-->
<TextView
android:id="@+id/T_HomeworkMin1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF1E0101"
android:layout_marginStart="140dp"
android:textAppearance="?android:textAppearanceSmall"
android:text="Min" />
Bây giờ, TextView đầu tiên là chú thích.
Nguồn
2016-04-02 08:50:23
chỉ định làm yếu tố? –
ví dụ android: id là thuộc tính của phần tử Button (kiểu xml) .. Tôi có thể chỉ định thuộc tính này làm phần tử con bên trong phần tử nút không? – ankith13
Chỉ cần kiểm tra liên kết dưới đây.Its mô tả cách chúng tôi có thể nhận xét http://stackoverflow.com/a/3484726/5858287 – rakeshdev