<commit_before># recycler-fast-scroll
Provides fast scroll and section indexer for recycler view. Uses a different mechanism than similar libraries to provide smooth movement of scroller handle when scrolling the list. Can be used with vertical and horizontal RecyclerViews.

This library is still in early development stage. PRs are welcome.

![alt tag](http://i.imgur.com/EQsZ01x.gif)

## Usage
--------
In your layout file:
```java
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />

    <com.futuremind.recyclerviewfastscroll.FastScroller
        android:id="@+id/fastscroll"
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_alignParentRight="true"/>

</RelativeLayout>
```

In Activity/Fragment:

```java
        recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
        fastScroller = (FastScroller) findViewById(R.id.fastscroll);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setAdapter(adapter);

        //has to be called AFTER RecyclerView.setAdapter()
        fastScroller.setRecyclerView(recyclerView);
```

### Horizontal orientation

You can use this library with horizontal LayoutManager. To do it use android:orientation="horizontal" attribute:

```java

    <com.futuremind.recyclerviewfastscroll.FastScroller
        android:id="@+id/fastscroll"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

```

## Styling
--------

Styling was introduced in version 0.1.5 with a limited set of styleable attributes. More are on their way.

You can style the attributes in the xml layout:

```    <com.futuremind.recyclerviewfastscroll.FastScroller
           android:id="@+id/fastscroll"
           android:orientation="vertical"
           android:layout_width="wrap_content"
           android:layout_height="match_parent"
           android:layout_alignParentEnd="true"
           android:layout_alignParentRight="true"
           app:fastscroll__handleColor="#8f93d1"
           app:fastscroll__bubbleColor="#5e64ce"
           app:fastscroll__bubbleTextAppearance="@style/StyledScrollerTextAppearance"
           />
```

Or directly in the code:

```
         fastScroller.setBubbleColor(0xffff0000);
         fastScroller.setHandleColor(0xffff0000);
         fastScroller.setBubbleTextAppearance(R.style.StyledScrollerTextAppearance);
```

See the example code for more info.<commit_msg>fix readme xml styling example<commit_after># recycler-fast-scroll
Provides fast scroll and section indexer for recycler view. Uses a different mechanism than similar libraries to provide smooth movement of scroller handle when scrolling the list. Can be used with vertical and horizontal RecyclerViews.

This library is still in early development stage. PRs are welcome.

![alt tag](http://i.imgur.com/EQsZ01x.gif)

## Usage
--------
In your layout file:
```java
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />

    <com.futuremind.recyclerviewfastscroll.FastScroller
        android:id="@+id/fastscroll"
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_alignParentRight="true"/>

</RelativeLayout>
```

In Activity/Fragment:

```java
        recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
        fastScroller = (FastScroller) findViewById(R.id.fastscroll);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setAdapter(adapter);

        //has to be called AFTER RecyclerView.setAdapter()
        fastScroller.setRecyclerView(recyclerView);
```

### Horizontal orientation

You can use this library with horizontal LayoutManager. To do it use android:orientation="horizontal" attribute:

```java

    <com.futuremind.recyclerviewfastscroll.FastScroller
        android:id="@+id/fastscroll"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

```

## Styling
--------

Styling was introduced in version 0.1.5 with a limited set of styleable attributes. More are on their way.

You can style the attributes in the xml layout:

```java
    
    <com.futuremind.recyclerviewfastscroll.FastScroller
           ...
           app:fastscroll__handleColor="#8f93d1"
           app:fastscroll__bubbleColor="#5e64ce"
           app:fastscroll__bubbleTextAppearance="@style/StyledScrollerTextAppearance"
           />
```

Or directly in the code:

```
         fastScroller.setBubbleColor(0xffff0000);
         fastScroller.setHandleColor(0xffff0000);
         fastScroller.setBubbleTextAppearance(R.style.StyledScrollerTextAppearance);
```

See the example code for more info.
{'fraction_non_alphanumeric': 0.10263012690822144, 'fraction_numerical': 0.008460548096376677, 'mean_word_length': 3.7659947414548642, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2905307', 'n_tokens_mistral': 1603, 'n_tokens_neox': 1506, 'n_words': 328}