如何在 MaterialSearchView 中增加建议中的文本大小? [英] How to increase the size of the text in suggestions in MaterialSearchView?

查看:45
本文介绍了如何在 MaterialSearchView 中增加建议中的文本大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在一个片段中实现了

解决方案

我不确定这个库的开发者/贡献者是否提供了一种无需 fork 和编辑库就可以做到这一点的方法.

无论如何,对我来说,做我想做的最简单的方法是编辑库.对于您的情况,如果您想编辑建议的 textview 的文本属性,您可以分叉 lib 并编辑名为 suggest_item 的布局,因为它是显示建议的适配器.

链接 thisthis

<小时>

如果这不适合您,您可以随时在 github 上的 repo 问题跟踪器上向 lib 的开发人员/贡献者添加新问题和/或问题,请关注 此链接

<小时>

关于如何处理点击建议的评论中的问题:

lib 的开发者/贡献者提供了一个可以用来添加点击监听器的公共方法,它被命名为 setOnItemClickListener

请参见 this 获取完整的方法代码

I've implemented MaterialSearchView in a fragment and it works fine. Now I want to increase the size of the text in suggestions. How can I do that? Thanks!

解决方案

I am not sure if the developers/contributors of this lib has provided an way to do this without the need to fork and edit the lib.

Anyway, for me the easiest way to do what I want is to edit the lib. for your case, if you want edit the text attributes of the textview of suggestions, you may fork the lib and edit the layout named suggest_item as it is the layout used by the adapter that shows the suggestions.

Links this and this


if this does not suit you, you can always add new issue and/or question to the developers/contributors of the lib on the their repo's issue tracker on github, follow this link


EDIT: for your question in comments on how to handle click on suggestions:

The developers/contributors of the lib has provided a public method that you can use to add a click listener, it is named setOnItemClickListener

See this for full method code

这篇关于如何在 MaterialSearchView 中增加建议中的文本大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆