这种布局怎么实现????

llller 2012-12-24 04:06:02


这种布局怎么实现...???
...全文
258 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
nj_dobetter 2012-12-25
  • 打赏
  • 举报
回复
FrameLayout里面包含LinearLayout 可以实现
LCore 2012-12-25
  • 打赏
  • 举报
回复
如楼上所说的可以考虑FrameLayout布局的方式实现
下面是实现
代码演示:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >

<ImageView
android:id="@+id/blue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dip"
android:src="@drawable/blue" />

<ImageView
android:id="@+id/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/blue"
android:src="@drawable/white" />

<ImageView
android:id="@+id/gray"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/blue"
android:layout_toRightOf="@+id/blue"
android:src="@drawable/gray" />
</RelativeLayout>

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="80dip"
android:layout_marginTop="10dip"
android:src="@drawable/pian" />

</FrameLayout>


实际效果:
欢乐的小熊 2012-12-25
  • 打赏
  • 举报
回复
外层FrameLayout,内层LinearLayout
heyouhua123yeah 2012-12-25
  • 打赏
  • 举报
回复
用RelativeLayout就能吧!
yuanshouhui1987 2012-12-25
  • 打赏
  • 举报
回复
可以试方式 kiritor的方法
zhgq2134 2012-12-25
  • 打赏
  • 举报
回复
恭喜完成了就是这样做的 反正就是几个布局多用就知道哦
dontsaymiss 2012-12-24
  • 打赏
  • 举报
回复
一部分在另一部分之上,用帧布局应该会容易实现

80,348

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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