ListView末尾的三个点

Three dots at the end of ListView

我知道如何在ListView项中添加Ellipsized TextView,如下代码

    android:singleLine="true"
    android:maxEms="20"
    android:ellipsize="end"

我想要的是在 listView 的末尾添加三个点,作为到达 listView 中最后一项的指示。检查下面的 link 以查看我想要实现的目标。

https://www.dropbox.com/s/69hpe6z112p0wa3/example.png?dl=0

注意:ListView 中的项目是从数据库中填充的

制作 3 个点的静态视图并将页脚添加到您的列表视图中

View footerView = ((LayoutInflater) ActivityContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.footer_layout, null, false);
ListView.addFooterView(footerView);

只需添加页脚视图并创建您希望在列表末尾显示的布局。

View footerView = ((LayoutInflater) ActivityContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.footer_layout, null, false);
listView.addFooterView(footerView);

如果您想将它显示在最后一项的末尾,则此方法很有用,但如果您想始终将其显示在列表的末尾,则可以在下面的布局中添加页脚视图xml 文件

中的列表视图