【问题标题】:Cant add border to Button using XML [duplicate]无法使用 XML 向按钮添加边框 [重复]
【发布时间】:2018-05-09 12:08:18
【问题描述】:

我只是想在我的 Button 中添加一个兄弟,但它不起作用。

主xml脚本:

button_style4.xml:

按钮在应用程序中正常显示,它可以正常工作,只是边框没有出现... 有人找错了吗?

【问题讨论】:

  • 它不是重复的!它只是不像每个人所说的那样工作

标签: android xml android-studio


【解决方案1】:
    <Button
    android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:background="@drawable/button_border"
    android:text="Example"
    android:textColor="@color/black"
    style="@style/Theme.AppCompat.NoActionBar"
    />

【讨论】:

  • 不工作请看我的代码
猜你喜欢
  • 1970-01-01
  • 2014-04-08
  • 2022-01-23
  • 1970-01-01
  • 2018-12-06
  • 2014-07-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多