草庐IT

IconPageIndicator

全部标签

android - 如何在 IconPageIndicator 中实现图标点击监听器

我正在使用viewPagerIndicator库中的IconPageIndicator。当在指示器中单击图标时,我需要查看寻呼机移动到该页面。单击图标时如何获取事件单击?如何知道在IconPageIndicator中单击了哪个图标? 最佳答案 我已经阅读了你的问题和测试示例。你是对的,当我们点击图标时它不能移动。所以你需要编辑库项目--->IconPageIndicator.java只需替换下面的方法publicvoidnotifyDataSetChanged(){mIconsLayout.removeAllViews();Icon

android - 在 IconPageIndicator 中自定义填充和边距

我正在尝试实现自定义IconPageIndicator-viewpager。我想自定义com.viewpagerindicator.IconPageIndicator中显示的图标的边距和填充。所以我写了我的自定义IconPageIndicator和CustomLinearLayout。我更改了CustomLinearLayout中的dividerPadding变量。这是代码。但这似乎不起作用。边距和填充仍然相同。有帮助吗?classCustomLinearLayoutextendsLinearLayout{privatestaticfinalint[]LL=newint[]{/*0*/