在 android 中如何放置text views和image view?
来源:互联网 发布:淘宝卖家掌柜个性签名 编辑:程序博客网 时间:2024/06/07 03:20
原问题来自于CSDN问答频道,更多解决方案见:http://ask.csdn.net/questions/1510
原问题描述:
我想在android应用中获得以下的效果:
背景图片我使用一个nine-patch png图片。我用一个text view 来实现
但结果出来不是这个,应该怎么办?
解决方案:
用一个TextView?难道每次换内容的话都要弄那前、后和中间的空格?
<RelativeLayout android:id="@+id/relativeLayout1" android:layout_height="50dp" android:layout_width="200dp" android:background=""@drawable/rowimage"" > <TextView android:id="@+id/textView1" android:text="TextView1" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginLeft="10dp" android:layout_alignParentLeft="true" android:layout_centerVertical="true" /> <TextView android:id="@+id/textView2" android:text="TextView2" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginRight="10dp" android:layout_alignParentRight="true" android:layout_centerVertical="true" /></RelativeLayout>
- 在 android 中如何放置text views和image view?
- Android 如何在strings.xml中放置html文本
- 如何在Android Studio中放置assets文件夹
- 如何在Android Studio中放置assets文件夹
- 如何在Android Studio中放置assets文件夹
- UIButton将title和image放置在任意位置上
- 如何在Actionsheet中放置textfield
- How Android Draws Views,Android如何绘制View,
- Android中ListView中getView的原理&如何在ListView中放置多个item
- How Android Draws Views 安卓如何绘制view
- 在xml中定义EditText出现“EditText No label views point to this text field with an android:labelFor”
- Android 控件在布局中按比例放置 (
- Android 控件在布局中按比例放置
- [Android] ListView中getView的原理+如何在ListView中放置多个item
- [Android] ListView中getView的原理+如何在ListView中放置多个item
- [Android] ListView中getView的原理+如何在ListView中放置多个item
- [Android] ListView中getView的原理+如何在ListView中放置多个item
- [Android] ListView中getView的原理+如何在ListView中放置多个item
- shell中提取子串
- pipe
- QT中的信号与槽的概念体制 .
- PhD
- 伙伴系统算法中的伙伴
- 在 android 中如何放置text views和image view?
- Clojure STM 笔记-上篇
- linux常用命令积累 | ubuntu 10.04系统开发Android
- 使用最新 ALSA 驱动解决 Ubuntu Linux Intel 集成声卡问题
- struts2和freemarker集成实例
- SqlServer 排名函数(row_number、rank、dense_rank)的比较
- SQL SERVER 2008 数据恢复错误的解决步骤
- static_cast、dynamic_cast reinterpret_cast和const_cast的区别和使用
- Clojure STM 笔记-中篇