[英]Fix an imageView in the left side of the screen but not in the right side. xml, android
[英]regarding placing 2 buttons on the left and right side in an xml file in android
我正在開發一個應用程序。我在后面和項目中有2個按鈕。我想在按鈕下方放置一個列表。我該如何在xml文件中執行此操作?有人可以告訴我...
嘗試以下代碼
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/background">
<LinearLayout
android:id="@+id/LinearLayoutIcons"
android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center_horizontal">
<Button android:text="@+id/Button01" android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button><Button android:text="@+id/Button02" android:id="@+id/Button02" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
</LinearLayout>
<ListView
android:id="@+id/ListViewMessage"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</ListView>
</LinearLayout>
如果要在Button01下面對齊列表視圖
嘗試
android:layout_below="@+id/Button01"
在ListView中
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.