简体   繁体   English

如何在android studio中覆盖第三方库类的方法?

[英]How to override third party library class' method in android studio?

So I am using a third party library called Multi Selection Spinner.所以我使用了一个名为 Multi Selection Spinner 的第三方库。 The advantage of this library is we can select multiple names in the spinner.这个库的优点是我们可以在微调器中选择多个名称。 By default we can select only one option.And also searchable feature also in this library.默认情况下,我们只能选择一个选项。这个库中也有可搜索的功能。

If i select 5 items in the spinner, after clicking OK button in the alert dialog box it will show all the 5 items in the spinner (As selected).如果我在微调器中选择 5 个项目,在警报对话框中单击“确定”按钮后,它将显示微调器中的所有 5 个项目(已选择)。 But what I want is i have to show only three names after that etc... should be there.但我想要的是我必须在此之后只显示三个名字……应该在那里。

For this purpose I want to override some methods of this library for my project.为此,我想为我的项目覆盖这个库的一些方法。

How can I do this(override third party library method locally ) or is there any other way to achieve this?我怎样才能做到这一点(在本地覆盖第三方库方法)或者有没有其他方法可以实现这一点?

Thanks in Advance.提前致谢。

你可以实现这个东西来导入这个库的模块而不是依赖。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM