我想创建一个显示在屏幕底部的广告横幅,并且屏幕的页面是可滚动的,除了横幅。横幅始终位于底部。
所以,我需要一个 <ScrollView>
元素,我需要一个 <LinearLayout>
位于 <ScrollView>
顶部的元素.位于屏幕的底部。
如何在 Android 中实现广告横幅的布局??? (我正在开发 Android 2.1 API 7 应用程序),有人可以给我一些提示吗??
******更新******
我想到了使用 <FrameLayout>
, 但仍然有兴趣听取其他意见。
最佳答案
另一个选择(我想更简单)是使用这种类型的布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView>
//here is the scroll
</ScrollView>
<LinearLayout android:layout_alignParentBottom="true">
// here is the ad
</LinearLayout>
</RelativeLayout>
关于android - 布局元素 : one on top of the other,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9295910/