1
嗨大家好我新來的android和在我的項目需求我需要在同一個位置創建兩個LinearLayouts,他們稍後在Java代碼中動畫,用於測試目的最初我在這些佈局插入圖像視圖後成功取得圖像視圖和插入的EditTexts在相同的佈局,但奇怪的以前的圖像顯示在一個線性佈局後執行,這是預覽中沒有顯示重疊視圖時奇怪的輸出..?
我測試了所有的選項,如清潔項目,從設備卸載和重新安裝IAM得到同樣的問題
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Animate Now"/>
<LinearLayout
android:id="@+id/image_list_fragment"
android:layout_width="250dip"
android:layout_below="@+id/button1"
android:layout_height="200dip"
android:background="#FF00FF"
android:layout_centerInParent="true"
>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Please Enter some text here"
android:singleLine="false"
/>
</LinearLayout>
<LinearLayout
android:layout_width="200dip"
android:layout_height="300dip"
android:orientation="vertical"
android:layout_below="@+id/button1"
android:visibility="visible"
android:background="#32FFFF"
android:layout_centerInParent="true"
android:id="@+id/image_details_fragment"
>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Please Enter some text here"
android:singleLine="true"
/>
</LinearLayout>
</RelativeLayout>
這裏是在Eclipse中輸出預覽和輸出模擬器運行