自定义快速滚动程序android

自定义快速滚动程序android,android,android-layout,listview,Android,Android Layout,Listview,我用节索引器实现了快速滚动器,但是快速滚动预览BackgroundRight可绘制文件中的文本被放大了。我想达到像这样的形象 这就是我所说的放大图像 My styles.xml <style name="GuideFastScroll" parent="Theme"> <item name="android:fastScrollThumbDrawable">@drawable/scroll_thumb_holo</item> <item

我用节索引器实现了快速滚动器,但是快速滚动预览BackgroundRight可绘制文件中的文本被放大了。我想达到像这样的形象 这就是我所说的放大图像

My styles.xml

<style name="GuideFastScroll" parent="Theme">
    <item name="android:fastScrollThumbDrawable">@drawable/scroll_thumb_holo</item>
    <item name="android:fastScrollOverlayPosition">atThumb</item>
    <item name="android:fastScrollTextColor">@color/black</item>
    <item name="android:fastScrollPreviewBackgroundRight">@drawable/scroll_scrolling_preview</item>
    <item name="android:fastScrollTrackDrawable">@null</item>
</style>

@可绘制/滚动\u拇指\u全息图
阿图姆
@颜色/黑色
@可绘制/滚动\u滚动\u预览
@空的
滚动_thumb_holo.xml

<item android:drawable="@drawable/scroll_active" android:state_pressed="true"/>
<item android:drawable="@drawable/scroll_inactive"/>


我的适配器

private class ChannelsAdapter extends ArrayAdapter<GuideChannel> implements SectionIndexer {

    private HashMap<String, Integer> fastScrollChannelMapIndex;
    private String[] fastScrollChannelSections;

    ChannelsAdapter(Context context, ImageViewLoader imageViewLoader, List<GuideChannel> guideChannelPresentationModels) {
        super(context, 0, 0, guideChannelPresentationModels);
        fastScrollChannelMapIndex = new LinkedHashMap<>();
        for(int x=0; x < guideChannelPresentationModels.size(); x++){
            String channelName = guideChannelPresentationModels.get(x).getName();
            if(channelName != null) {
                String channelInScroll=channelName;
                if (channelName.length() <= 0) {
                } else if (channelName.length() <= 3) {
                } else {
                    channelInScroll = channelName.substring(0, 3);
                }
                fastScrollChannelMapIndex.put(channelInScroll.toUpperCase(), x);
            }
        }

        Set<String> sectionIndex = fastScrollChannelMapIndex.keySet();
        ArrayList<String> sectionList = new ArrayList<>(sectionIndex);
        Collections.sort(sectionList);
        fastScrollChannelSections = new String[sectionList.size()];
        sectionList.toArray(fastScrollChannelSections);

    }

    @Override
    public Object[] getSections() {
        return fastScrollChannelSections;
    }

    @Override
    public int getPositionForSection(int sectionIndex) {
        return fastScrollChannelMapIndex.get(fastScrollChannelSections[sectionIndex]);
    }

    @Override
    public int getSectionForPosition(int position) {
        return 0;
    }
私有类ChannelsAdapter扩展ArrayAdapter实现SectionIndexer{
私有HashMap fastScrollChannelMapIndex;
私有字符串[]快速滚动部分;
ChannelsAdapter(上下文上下文、ImageViewLoader ImageViewLoader、列表指南ChannelPresentationModels){
super(context,0,0,guideChannelPresentationModels);
fastScrollChannelMapIndex=新建LinkedHashMap();
对于(int x=0;xif(channelName.length()请添加一些代码以及您可能试图解决的问题。您当前应用的屏幕截图也很好,这样我们就知道“放大”是什么意思了。我更新了帖子,谢谢。请添加一些代码以及您可能试图解决的问题。您当前应用的屏幕截图也很好,这样我们就知道“放大”是什么了ed的意思是,我更新了帖子,谢谢