为了账号安全,请及时绑定邮箱和手机立即绑定

安卓button 内容显示不全 以及textview右居中

安卓button 内容显示不全 以及textview右居中

居正w 2017-02-24 16:06:26
  <Button         android:id="@+id/b"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginTop="10dp"         android:layout_gravity="center_horizontal"         android:text="怎么了?" />       另外我是线性布局<LinearLayout 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"    android:background="@drawable/q"    android:orientation="vertical" >想把文本向右对齐 在textview里加 android:gravity="right"为什么内容就不见了  <TextView        android:id="@+id/phnum"        android:layout_width="120dp"        android:layout_height="wrap_content"        android:layout_marginTop="50dp"        android:text="@string/phnum"        android:textAppearance="?android:attr/textAppearanceLarge"        android:textSize="18sp" />是bug吧 昨天都没问题。。。谢过 安卓小白爬坑中
查看完整描述

3 回答

?
习惯受伤

TA贡献885条经验 获得超1144个赞

看着宽度够啊?怎么没显示
查看完整回答
1 反对 回复 2017-02-24
  • 居正w
    居正w
    加了个这个android:gravity="center_vertical" 就好 文本内容居中
  • 习惯受伤
    习惯受伤
    哦,回去验证一下,这个看起来很奇葩。我琢磨一下“怎”字前边哪些控件如何解释呢
  • 3 回答
  • 0 关注
  • 2106 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信