簡體   English   中英

如何更改Android Loading圖標位置?

[英]How to change Android Loading icon position?

第一張圖片: 在此輸入圖像描述

第二張圖片: 在此輸入圖像描述

第一個XML:

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:padding="10dp" >

    <EditText
        android:id="@+id/text"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="99.81"
        android:ems="10"
        android:hint="@string/search_hint" />

    <ImageButton
        android:id="@+id/add"
        android:layout_width="35dp"
        android:layout_height="match_parent"
        android:layout_weight="4.47"
        android:background="@drawable/search_button"
        android:contentDescription="@string/desc"
        android:src="@drawable/ic_menu_search_bar" />
</LinearLayout>

<View
    android:layout_width="fill_parent"
    android:layout_height="1dp"
    android:background="#dddddd" />

<FrameLayout
    android:id="@+id/player_frag_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
</FrameLayout>

第二個XML:

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:padding="10dp" >

    <Button
        android:id="@+id/list_view_upcoming"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/label_upcoming"
        android:layout_weight="1" />

    <Button
        android:id="@+id/list_view_completed"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="@string/label_completed" />
</LinearLayout>

<View
    android:layout_width="fill_parent"
    android:layout_height="1dp"
    android:background="#dddddd" />

<FrameLayout
    android:id="@+id/fragment_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
</FrameLayout>

請有人幫我改變我的第一次加載,讓它像第二次加載一樣中間嗎?

嘗試在Manifest.xml中使用以下活動屬性

android:windowSoftInputMode="adjustPan" or "adjustResize"

我已經解決了。

我將第二個xml的布局高度更改為:

 <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:padding="10dp" >

    <Button
        android:id="@+id/list_view_upcoming"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/label_upcoming"
        android:layout_weight="1" />

    <Button
        android:id="@+id/list_view_completed"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="@string/label_completed" />

</LinearLayout>

<View
    android:layout_width="fill_parent"
    android:layout_height="1dp"
    android:background="#dddddd" />

<FrameLayout
    android:id="@+id/fragment_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
</FrameLayout>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM