Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
avishekdas128 committed Jan 30, 2021
2 parents 35c6f9b + 0fd9bed commit 37dab49
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
> This project was created during my internship <a href="https://dcoder.tech/" target="_blank">@dcodermobile</a>
<kbd><img src="https://play-lh.googleusercontent.com/PWUsRLZ8fawBOdTjMrSWwa6-EBpzOguNIlvqxepMRFmBD8eTq8UPGj2241I2qFF1Eg=s360-rw" width="14" height="14" /></kbd>.
I am open sourcing it to give back to community.
> <br/><a href="https://play.google.com/store/apps/details?id=com.paprbit.dcoder" target="_blank">Download Dcoder app for Android</a>
# Language Drawable [![](https://jitpack.io/v/avishekdas128/Language-Drawbale.svg)](https://jitpack.io/#avishekdas128/Language-Drawbale)
A language drawable generator like GitHub in Android.

## Screenshots
![Screenshot_1](https://user-images.githubusercontent.com/43132866/106358279-41000600-6331-11eb-950e-58c18d01ab5a.png)

![Screenshot_2](https://user-images.githubusercontent.com/43132866/106358280-42313300-6331-11eb-8fa6-5c7cb81ee41d.png)


## How to implement in your project
### Add it in your root build.gradle at the end of repositories:
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
### Add the dependency in your app build.gradle
```
dependencies {
implementation 'com.github.avishekdas128:Language-Drawbale:0.1.0'
}
```
### Now in your Java code,
```JAVA
languageLayout = findViewById(R.id.language_layout);

//The language model takes the fraction of the language and color.
languageList = new ArrayList<>();
languageList.add(new LanguageModel(.2f, Color.RED));
languageList.add(new LanguageModel(.1f, Color.GREEN));
languageList.add(new LanguageModel(.4f, Color.BLUE));
languageList.add(new LanguageModel(.3f, Color.BLACK));

languageLayout.setBackground(new LanguageDrawable(languageList));
```

That's it. You've added a GitHub like different language drawable.

0 comments on commit 37dab49

Please sign in to comment.