2011-04-29 100 views
0

我有TableLayout,我在我的应用程序上有广告,但广告在屏幕上的最后一个按钮下, 我怎样才能让广告坚持到屏幕的底部?有关android布局的帮助?

<TextView 
android:id="@+id/textView1" 
android:layout_height="wrap_content" android:text="@string/time" 
android:layout_width="wrap_content"> 
</TextView> 

<Button 
android:layout_height="wrap_content" 
android:layout_centerInParent="true" 
android:id="@+id/totime" 
android:layout_width="wrap_content"> 
</Button> 

<Button 
android:layout_height="wrap_content" 
android:text="Save" 
android:id="@+id/save" 
android:layout_width="wrap_content"> 
</Button> 

<com.mobfox.sdk.MobFoxView 

机器人:ID = “@ + ID/mobFoxView” 机器人:layout_width = “FILL_PARENT” 机器人:layout_height = “50dp” 的publisherId =” * ** * ** * ** *“ />

+0

粘贴代码 – 2011-04-29 17:01:55

+0

我添加了一些代码,它TableLayout布局 – 2011-04-29 17:15:46

回答

1

然后,使用RelativeLayout,并把这样的:

<com.mobfox.sdk.MobFoxView 
    android:id="@+id/mobFoxView" 
    android:layout_width="fill_parent" 
    android:layout_height="50dp" 
    android:layout_alignParentBottom="true" 
    publisherId="**********" /> 

你将不得不修改MobFoxView以上的小部件......也许你可以离开他们的TableLayout内,并把该TableLayout的RelativeLayout内:

<RelativeLayout> 
    <TableLayout> 
     your other Stuff 
    </TableLayout> 
    <MobFoxStuff/> 
</RelativeLayout> 
+0

我得到XML绑定前缀上的TextView? – 2011-04-29 17:28:37

+0

谢谢,我再次把所有的代码,它的工作感谢 – 2011-04-29 17:51:18

+0

你必须错过你的主要相对布局xmlns:android =“http://schemas.android.com/apk/res/android” – 2011-04-29 17:52:15