在Android項目工程的xml文件註釋格式通常是這樣的:在XML文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:id="@+id/btn_dialog"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Click to display a dialog"
android:onClick="onClick" />
</LinearLayout>
是否有可能一個標籤中註釋掉只是一個或兩個參數?例如,我可以在上面的代碼中註釋掉android:layout_width
或兩行android:layout_width and android:layout_height
嗎?
如果我想在上面的示例代碼中只改變一行來檢查它的效果,還有其他簡單的方法來做到這一點,比如C的''//'嗎?是否可以使「」部分成爲評論? – user13267
最簡單的方法就是簡單地剪切線條,這樣您就可以測試並重新粘貼。您也可以在標籤下方發表評論,並臨時粘貼該屬性。 –