<commit_before><p align="center">
  <img align="center" src="static/Logo.jpg"/>
</p>


# CustomizableCalendar

This library allows you to create a completely customizable calendar.
<br> You can use `CustomizableCalendar` to create your calendar, customizing UI and behaviour.

<p align="center">
  <img align="center" src="static/CalendarDemo.gif" width="400" />
</p>

# Features

* Custom header (should be implemented by the user);
* Custom sub view (month name by default);
* Custom weekly days view;
* Custom date view;
* Possibility to implement selection on day click;
* Possibility to implement weekly day calculation;
* Receive updates of Calendar (with AUCalendar);
* Every change to AUCalendar is notified and automatically refreshes UI;

# Limitations

* Only portrait orientation is supported

# Gradle
```gradle
allprojects {
  repositories {
    ...
    maven { url "https://jitpack.io" }
  }
}
```

```gradle
dependencies {
  compile 'com.github.MOLO17:CustomizableCalendar:v0.1.2'
}
```

# Dependencies

* RecyclerView
* [Joda-Time](https://github.com/JodaOrg/joda-time)
* [ButterKnife](https://github.com/JakeWharton/butterknife)
* [RxJava2](https://github.com/ReactiveX/RxJava)
* [Retrolambda](https://github.com/orfjackal/retrolambda)

# Usage

## Add to your layout

### XML

Add CustomizableCalendar to your layout

```xml
<com.molo17.customizablecalendar.library.components.CustomizableCalendar
        android:id="@+id/customizable_calendar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content />
```

### Java

First of all you should create a class that implements `ViewInteractor` interface (you can find the explanation in the `How to customize > Java` section).

After that go in the Activity/Fragment where you added the `CustomizableCalendar` View;
here you should specify the first month and the last month, to do this, create a `Calendar` (located in `com.molo17.customizablecalendar.library.model`) object.

An example of `CustomizableCalendar` init is the following:
```java
...

@BindView(R.id.customizable_calendar)
CustomizableCalendar customizableCalendar;

private CompositeDisposable subscriptions;

...

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  ButterKnife.bind(this);
<commit_msg>fixed typo<commit_after><p align="center">
  <img align="center" src="static/Logo.jpg"/>
</p>


# CustomizableCalendar

This library allows you to create a completely customizable calendar.
<br> You can use `CustomizableCalendar` to create your calendar, customizing UI and behaviour.

<p align="center">
  <img align="center" src="static/CalendarDemo.gif" width="400" />
</p>

# Features

* Custom header (should be implemented by the user);
* Custom sub view (month name by default);
* Custom weekly days view;
* Custom date view;
* Possibility to implement selection on day click;
* Possibility to implement weekly day calculation;
* Receive updates of Calendar (with AUCalendar);
* Every change to AUCalendar is notified and automatically refreshes UI;

# Limitations

* Only portrait orientation is supported

# Gradle
```gradle
allprojects {
  repositories {
    ...
    maven { url "https://jitpack.io" }
  }
}
```

```gradle
dependencies {
  compile 'com.github.MOLO17:CustomizableCalendar:v0.1.2'
}
```

# Dependencies

* RecyclerView
* [Joda-Time](https://github.com/JodaOrg/joda-time)
* [ButterKnife](https://github.com/JakeWharton/butterknife)
* [RxJava2](https://github.com/ReactiveX/RxJava)
* [Retrolambda](https://github.com/orfjackal/retrolambda)

# Usage

## Add to your layout

### XML

Add CustomizableCalendar to your layout

```xml
<com.molo17.customizablecalendar.library.components.CustomizableCalendar
        android:id="@+id/customizable_calendar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
```

### Java

First of all you should create a class that implements `ViewInteractor` interface (you can find the explanation in the `How to customize > Java` section).

After that go in the Activity/Fragment where you added the `CustomizableCalendar` View;
here you should specify the first month and the last month, to do this, create a `Calendar` (located in `com.molo17.customizablecalendar.library.model`) object.

An example of `CustomizableCalendar` init is the following:
```java
...

@BindView(R.id.customizable_calendar)
CustomizableCalendar customizableCalendar;

private CompositeDisposable subscriptions;

...

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  ButterKnife.bind(this);

{'fraction_non_alphanumeric': 0.11075815332486234, 'fraction_numerical': 0.005506141465480729, 'mean_word_length': 5.024234693877551, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1929466', 'n_tokens_mistral': 1440, 'n_tokens_neox': 1369, 'n_words': 419}