小编ndn*_*ndn的帖子

从TextSwitcher获取文本

如何获取之前设置的textswitcher中的文本.就像textview.getText()一样.我尝试了以下代码,但没有奏效.

TextSwitcher textSwitcher = (TextSwitcher)findViewById(...);
TextView currentlyShownTextView = (TextView) textSwitcher.getCurrentView();
String currentlyShownText = textSwitcher.getText().toString();
Run Code Online (Sandbox Code Playgroud)

android textview textswitcher

4
推荐指数
1
解决办法
1463
查看次数

在Recyclerview(GridLayoutManager)末尾显示更多类别按钮,如grofers app

Grofers应用程序图像

在此输入图像描述

我想在6个项目之后添加一个显示更多类别按钮recyclerview,onclick其中显示剩余项目和底部显示隐藏按钮

android android-recyclerview

0
推荐指数
1
解决办法
1354
查看次数