smart-zihan

一、新建一个empty activity项目

二、切换到Design页面

去掉下方连接,width改为match,textAlignment选择center。textSize: 200sp,textColor: colorAccent,id: LuckyNumber(id名字不可以有空格)。

拖一个Button,text: Draw Number,连接左右下,width: match。切换到text模式,在Button标签下添加android:onClick="drawNumber";

在mainActivity.java中添加drawNumber的函数。

可以去运行小程序啦。

分类:

技术点:

相关文章:

  • 2021-11-24
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2021-12-23
猜你喜欢
  • 2021-09-28
  • 2022-12-23
  • 2021-04-03
  • 2022-02-02
  • 2021-12-28
  • 2021-12-15
相关资源
相似解决方案