改行Android了,被布局问题搞的头大,一个简单布局问题问一下

宝龙哥 2012-02-17 05:54:30
所谓的布局,就是程序的界面,以前用BCB简直没有难度,现在Android的布局实在是让俺太郁闷了,其实我的问题很简单,

就是怎么实现把屏幕分成上下两部分,上面部分放置WebView组件,下面部分放置按钮,我弄来弄去出现三种情况,一种是按钮悬浮在WebView上,一种是按钮不显示,一种是按钮和WebView连成整体了,只当WebView滚动到底部时才显示按钮

我的目的是想在屏幕底部一直显示一些功能按钮,按钮上面的区域用WebView组件填充,用来显示浏览的网页,要求很简单的,用xml文件实现就好
...全文
121 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
宝龙哥 2012-02-21
  • 打赏
  • 举报
回复
OK,解决了,结贴。有很多问题,以后还要向老大请教

[Quote=引用 3 楼 hemiya 的回复:]
刚搞了一下,你看看这个可以不。

XML code


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:l……
[/Quote]
纯冰糖 2012-02-20
  • 打赏
  • 举报
回复
学习学习了。
nuozhai 2012-02-20
  • 打赏
  • 举报
回复
把我收了吧
hemiya 2012-02-19
  • 打赏
  • 举报
回复
刚搞了一下,你看看这个可以不。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0.44"
android:orientation="vertical" >

<WebView
android:id="@+id/webkit"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />

</LinearLayout>

<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

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

</LinearLayout>

</LinearLayout>
hemiya 2012-02-19
  • 打赏
  • 举报
回复
eclipse上的adt么?
那玩意搞界面很恶心,最好在网上搜一搜代码。

我用过ui设计最舒服的是bcb。
其次是qt自带的设计师,只是用起来和bcb比有点不方便,不过也算顺手。
Android的adt用起来很不顺手,有点别扭,可能还不太熟吧。
dfdscx 2012-02-18
  • 打赏
  • 举报
回复
android用啥开发我都不知道

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧