设置一下项的宽度为 fill_parent 试试
解决方案 »
- android中:如何调用json参数的webservice
- LayoutInflater.from(context) 空指针错误
- Android游戏开发 点击图片按钮实现返回上一个View的效果
- couldn't save which view has focus because the focused view
- 关于android页面的传值,请教大家一下
- android版本不同导致图像缩放出错
- 短信发送
- 求助帖,进来给个建议吧
- 在Android Studio里基本方法的用不了
- 请问高手如何显示半张图片(一半在屏幕外面)
- android桌面快捷方式,有没办法不重复创建进程?
- 想做一个类似QQ游戏那样的应用框架,怎么实现?
但TextView里的文本长度可能不一样,
我在布局文件里已经把TextView的宽度设为fill_parent,但貌似还是wrap_content的效果,
导致如果文本很短的话这一个item很难被点到,
小弟初学android,只是想着应该可以把TextView弄宽些吧,但又不想给TextView设置固定的宽度,这里是不是还要配个啥属性呢?
http://stackoverflow.com/questions/4552977/android-listview-item-width-fill-parent-doesnt-work解决答案是:
How are you creating your ListView? Is it defined in XML? Are you using a ListActivity? Or are you creating it programmatically? You need to make sure that the ListView itself has a width of fill_parent.