xiakalaka 2016-01-04 06:55 采纳率: 100%
浏览 1614
已采纳

android简单UI问题!!!

android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:divider="#0000" >

    <EditText
    android:id="@+id/input_text"
    android:layout_width="0dp"   /*这行错了,错误说明:this will make the view invisible, probably intended for layout_height*/
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:hint="Type somthing here"
    android:maxLines="2" />
    <Button
    android:id="@+id/send"
    android:layout_width="wrap_content"     
    android:layout_height="wrap_content"
    android:text="Send" />

  • 写回答

7条回答 默认 最新

  • ProXin 2016-01-04 07:49
    关注

    你设置他的宽为0dp,你见过宽为0的视图吗?所以系统提示你:这样设置将使控件不显示(invisible)。宽度和高度都是不能设置为0的。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(6条)

报告相同问题?

悬赏问题

  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作