【问题标题】:Android - How do I move my button programmatically in a grid layout?Android - 如何在网格布局中以编程方式移动我的按钮?
【发布时间】:2015-07-03 01:46:34
【问题描述】:

我正在制作一个安卓应用,如果你点击Button,它将创建一个Textview。但我的问题是,当TextView 放置在GridLayout 内时,Button 会保持原位。我想相对于 TextView 的放置位置移动按钮。

【问题讨论】:

    标签: android user-interface button


    【解决方案1】:

    您在GridLayout 中的TextViewGridLayout 控制,GridLayout 与其他ViewGroups-afaik、an ex of gridlayout 相比,其工作方式不同,您会看到它使用@987654327 @ 和row,所以如果你想达到你想要达到的目的,请将其列更改为首选位置。

    为了安全起见,请使用不同的Viewgroup

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-24
      • 2014-08-27
      相关资源
      最近更新 更多