TextView放在ImageView下部(是imageview里面),大家是怎么做的

ihrthk
博客专家认证
2012-06-05 11:49:20
如题
...全文
640 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
jefferyyangkai 2012-06-07
  • 打赏
  • 举报
回复
对,RelativeLayout也可以,我只是随便写了个布局。推荐用RelativeLayout
jordankan 2012-06-06
  • 打赏
  • 举报
回复
FrameLayout和RelativeLayout
ibb-yes 2012-06-06
  • 打赏
  • 举报
回复
为什么有这样的需求呢 ! 你直接给TextView设置一个背景就好了
ihrthk 2012-06-06
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 的回复:]
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView android:id="@+id/online_num"
android:layout_width="match_parent"
android:layout_hei……
[/Quote]
不错,是一种很好的方法。还有没有别的方法呢?
life02 2012-06-06
  • 打赏
  • 举报
回复
Lz的需求说的不明确
Aria_zuo 2012-06-06
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 的回复:]

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView android:id="@+id/online_num"
android:lay……
[/Quote]
+1
用FrameLayout就可以了~
Aria_zuo 2012-06-06
  • 打赏
  • 举报
回复
你是要重叠的那种效果吗?textview重叠在imageview上面?
jefferyyangkai 2012-06-06
  • 打赏
  • 举报
回复
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView android:id="@+id/online_num"
android:layout_width="match_parent"
android:layout_height="match_parent"/>


<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="2px"
android:paddingBottom="2px"
android:paddingLeft="2px"
android:paddingRight="2px">

</FrameLayout>
鄙人姓胡 2012-06-06
  • 打赏
  • 举报
回复
需求确实有点怪,楼主用画布画上去吧,这样也还比较简单

80,472

社区成员

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

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