简体   繁体   English

如何更改Android Loading图标位置?

[英]How to change Android Loading icon position?

First image: 第一张图片: 在此输入图像描述

Second image: 第二张图片: 在此输入图像描述

First XML: 第一个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>

Second XML: 第二个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>

Please anyone who can help me change my first loading to make it middle like second loading? 请有人帮我改变我的第一次加载,让它像第二次加载一样中间吗?

尝试在Manifest.xml中使用以下活动属性

android:windowSoftInputMode="adjustPan" or "adjustResize"

I am already solved it. 我已经解决了。

i changed layout height on second xml to: 我将第二个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