2014-09-03 80 views
1

您好我正在尝试android,我是WP c#开发人员。所以有一个问题,将图像设置到屏幕的中下部。在WP中,对我来说很容易。所以这里我试图:将ImageView设置为底部

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <ImageView 
     android:src="@android:drawable/ic_menu_gallery" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:id="@+id/appLogo" /> 
</LinearLayout> 

在WP我只是做一个网格,并设置VerticalAlignment =底部和完成。

我的心态不是为android设置的,所以对于最基本的问题抱歉。 任何帮助和指针都受到高度赞赏:)

回答

1

您可能必须将它放在RelativeLayout中,然后在您的ImageView上使用android:layout_alignParentBottom="true"。像这样:

<RelativeLayout 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 

    <ImageView 
     android:src="@android:drawable/ic_menu_gallery" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:id="@+id/appLogo" /> 

</RelativeLayout> 
+0

呦亲爱的:)很棒的工作。 – loop 2014-09-03 21:35:54

+0

如果有效,请单击复选标记以接受它为true。祝你晚安! – user1282637 2014-09-03 21:36:53

+0

兄弟不要担心,我会标记它正确的只是不让我这么快就做。 – loop 2014-09-03 21:37:53