我沒有看到它,但AVD上的佈局與我預期基於ADT的佈局不同。我有一個圖像按鈕1/3和一個普通按鈕,應該是寬度的2/3。 我創建了一個realtivelayout併爲按鈕設置了一個線性佈局,爲什麼ADT中的佈局與AVD不一樣,我該如何解決這個問題?AVD中的佈局與ADT不同?
,這是AVD
<TextView
android:id="@+id/textHeaderView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageQuoteView"
android:layout_centerHorizontal="true"
android:layout_marginTop="18dp"
android:text="@string/textHeaderQuote"
android:textColor="#FFFFFF"
android:textSize="24sp" />
<TextView
android:id="@+id/viewQuote"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textHeaderView"
android:layout_centerHorizontal="true"
android:layout_marginTop="18dp"
android:text="@string/textViewQuote"
android:textColor="#FFFFFF"
android:textSize="20sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:paddingLeft="0dp"
>
<ImageButton
android:id="@+id/btnShare"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#CCCCCC"
android:contentDescription="@string/btnsharetext"
android:onClick="shareQuote"
android:src="@android:drawable/ic_menu_share" />
<Button
android:id="@+id/btnSendQuote"
android:layout_weight="2"
android:layout_height="80dp"
android:onClick="sendQuotePage"
android:text="@string/btn_text_sendQuote"
android:background="#FEFEFE" />
</LinearLayout>
都是相同大小的屏幕? –
@robin抱歉,你的意思是? AVD只是ADT屏幕的虛擬屏幕,對吧? – alex