【问题标题】:How to implement Google Hangouts FAB like "Jump to latest" button [duplicate]如何实现 Google Hangouts FAB,例如“跳转到最新”按钮 [重复]
【发布时间】:2017-09-11 10:55:59
【问题描述】:

我在 Google Hangouts 中注意到,如果用户在消息历史记录中回滚,则会出现类似 FloatingActionButton 的小部件(带有文本)。

按钮显示“跳到最新”,并带有一个向下指向文本左侧的箭头。它类似于FloatingActionButton。

我尝试使用FrameLayout 将AppCompatTextView 嵌入FloatingActionButton,但没有成功。

有什么想法吗?

PS。我已经尝试过FloatingActionButton with text instead of image 中的建议,但 FAB 宽度没有相应调整。

【问题讨论】:

    标签: android hangout floating-action-button


    【解决方案1】:

    这是满足您需求的简单拱门

    可能有无数种解决方案

    + FrameLayout
    ++++ A normal Button or ImageView if you'd like to use an icon
    ++++ Positioned like a modern FAB
    +
    ++++ A scrolling Layout holding your conversations
    

    单击按钮时,只需滚动到滚动视图的高度

    就是这样!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-16
      • 2014-08-27
      • 1970-01-01
      • 2018-10-04
      • 1970-01-01
      • 2012-06-30
      • 2019-11-14
      • 1970-01-01
      相关资源
      最近更新 更多