Skip to content

Commit cf2e71c

Browse files
committed
initial commit
0 parents  commit cf2e71c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1554
-0
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Jolene
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Android Word Cloud Library
2+
3+
![GitHub License](https://img.shields.io/github/license/jolenechong/androidWordCloud)
4+
5+
The Android Word Cloud Library is a all-in-one customizable library that allows you to easily integrate word clouds into your Android applications. This library provides a simple way to generate visually appealing and readable word clouds based on a collection of words and their frequencies OR simply provide a string!
6+
<img src="demo.png">
7+
8+
## Installation
9+
10+
To use this library in your Android project, add the following dependency to your app's build.gradle file and settings gradle file:
11+
12+
```gradle
13+
// build.gradle.kts
14+
dependencies {
15+
implementation("com.github.jolenechong:androidWordCloud:1.0.1") {
16+
// exclude due to duplicate classes with the
17+
// edu.stanford.nlp:stanford-corenlp dependency for data processing
18+
exclude(group="com.sun.xml.bind", module="jaxb-core")
19+
exclude(group="com.sun.xml.bind", module="jaxb-impl")
20+
}
21+
}
22+
23+
// settings.gradle.kts
24+
// or maven { url 'https://jitpack.io' } if you're in Java
25+
dependencyResolutionManagement {
26+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
27+
repositories {
28+
google()
29+
mavenCentral()
30+
maven { url = uri("https://jitpack.io") } // add this
31+
}
32+
}
33+
```
34+
35+
## Usage
36+
1. Add the word cloud view to your layout file: (eg. activity_main.xml)
37+
38+
```xml
39+
<FrameLayout
40+
android:id="@+id/wordCloudView"
41+
android:layout_width="match_parent"
42+
android:layout_height="300dp"
43+
android:layout_margin="20dp"/>
44+
```
45+
46+
2. Add the following to your activity file: (eg. MainActivity.kt)
47+
```kotlin
48+
import com.jolenechong.androidwordcloud.WordCloud
49+
50+
wordCloudView = WordCloud(application, null)
51+
binding.wordCloudView.addView(wordCloudView)
52+
53+
// Set the text to be displayed in the word cloud
54+
wordCloudView.setParagraph(
55+
"Add some text you'd like to see a word cloud of here",
56+
topN = 10,
57+
lemmatize = false
58+
)
59+
60+
// OR use your own list of words
61+
// doesn't have cleaning, suitable when you want to implement the cleaning yourself
62+
wordCloudView.setWords(arrayListOf(
63+
"human",
64+
"tasks",
65+
"tasks",
66+
"AI",
67+
"AI",
68+
"AI",
69+
"AI",
70+
"systems",
71+
"systems",
72+
), topN = 10)
73+
```
74+
75+
## License
76+
77+
This project is licensed under the MIT License - see the LICENSE file for details.
78+
79+
## Contributing
80+
81+
We love contributions! Whether it's fixing a bug, adding a feature, or just improving the documentation, your help is appreciated. Here's how you can contribute:
82+
Ways to Contribute
83+
1. Open an Issue: Have an idea or find a bug? Open an issue! We're happy to hear your thoughts
84+
2. Submit a Pull Request: Found a bug and know how to fix it? Want to add a cool new feature? We're all ears! Submit a pull request and let's make it happen.
85+
3. Feature Requests: Got an idea for a feature you'd like to see? Open an issue and let's chat about it.
86+
87+
Getting Started
88+
- Fork this repository to your own GitHub account.
89+
- Clone your forked repository to your local machine.
90+
- Work your magic! Make the changes you'd like to contribute.
91+
- Push your changes to your fork and submit a pull request. We'll review it together.
92+
93+
#### No Contribution is Too Small
94+
95+
Whether it's a one-liner fix, a typo correction, or a massive feature, every contribution is valuable. Don't be shy; we appreciate all levels of involvement.
96+
97+
## Contact, Help and Feedback
98+
99+
If you're unsure about anything or need help, feel free to open an issue to ask questions. We're here to assist and guide you. We also welcome any feedback you may have. Let us know what you think!
100+
101+
Feel free to contact the maintainer directly at [jolenechong7@gmail.com](mailto:jolenechong7@gmail.com)
102+
103+
## Spread the Word
104+
105+
Enjoying the Android Word Cloud Library? Help us spread the word! Star the repository, tweet about it, or mention it in your favorite developer community.
106+
107+
Thank you for considering contributing. Together, let's make the Android Word Cloud Library even more awesome!
108+
109+
## Backlog
110+
- [ ] Allow customizations of base font size and color palette
111+
- [ ] Allow on click listener for each word

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle.kts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
plugins {
2+
id("com.android.application")
3+
id("org.jetbrains.kotlin.android")
4+
}
5+
6+
android {
7+
namespace = "com.jolenechong.androidwordcloud"
8+
compileSdk = 34
9+
10+
defaultConfig {
11+
applicationId = "com.jolenechong.androidwordcloud"
12+
minSdk = 26
13+
targetSdk = 34
14+
versionCode = 1
15+
versionName = "1.0"
16+
17+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18+
}
19+
20+
buildTypes {
21+
release {
22+
isMinifyEnabled = false
23+
proguardFiles(
24+
getDefaultProguardFile("proguard-android-optimize.txt"),
25+
"proguard-rules.pro"
26+
)
27+
}
28+
}
29+
compileOptions {
30+
sourceCompatibility = JavaVersion.VERSION_1_8
31+
targetCompatibility = JavaVersion.VERSION_1_8
32+
}
33+
kotlinOptions {
34+
jvmTarget = "1.8"
35+
}
36+
buildFeatures {
37+
viewBinding = true
38+
}
39+
}
40+
41+
dependencies {
42+
43+
implementation("androidx.core:core-ktx:1.9.0")
44+
implementation("androidx.appcompat:appcompat:1.6.1")
45+
implementation("com.google.android.material:material:1.11.0")
46+
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
47+
implementation(project(mapOf("path" to ":wordcloud")))
48+
testImplementation("junit:junit:4.13.2")
49+
androidTestImplementation("androidx.test.ext:junit:1.1.5")
50+
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
51+
}

0 commit comments

Comments
 (0)