Skip to content

Commit

Permalink
Bump version to 1.0.0 & minor layout improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
marcauberer committed Jan 25, 2021
1 parent 2fc6f38 commit e0954b7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If you want to test the library, please visit the sample app on [Google Play](ht
## Usage
The first step for using this library is, to add it to the dependency section in your project:
```gradle
implementation 'com.chillibits:adobecolortool:1.0.0-alpha06'
implementation 'com.chillibits:adobecolortool:1.0.0'
```
Also you have to declare a file provider in your manifest, which should look similar to this one:
```xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ class MainActivity : AppCompatActivity() {
private fun importColors() {
AdobeColorTool(this).importColorList(this, object : AdobeColorTool.AdobeImportListener {
override fun onComplete(groups: Map<String, List<AdobeColor>>) {
Log.d("AC", colors.toString())

colors.clear()
groups.forEach { colors.addAll(it.value) }
colorAdapter.updateData(colors)
Expand All @@ -147,7 +145,7 @@ class MainActivity : AppCompatActivity() {

private fun generateRandomColors() {
colors.clear()
for (i in 0..(random.nextInt(5) +2)) { // Min 2, max 7 colors
for (i in 0..(random.nextInt(8) +2)) { // Min 2, max 10 colors
val randomColor = getRandomColor()
val name = "%06X".format(0xFFFFFF and randomColor).toUpperCase(Locale.getDefault())
colors.add(AdobeColor(randomColor, name))
Expand Down
15 changes: 10 additions & 5 deletions app/src/main/res/layout/item_color.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="67dp"
android:layout_height="62dp"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="6dp">

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/itemColor"
android:layout_width="55dp"
android:layout_height="match_parent"
android:layout_width="42dp"
android:layout_height="42dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:src="@drawable/circle"
android:padding="0.7dp"
Expand All @@ -28,11 +33,11 @@
app:layout_constraintStart_toEndOf="@+id/itemColor"
app:layout_constraintEnd_toEndOf="parent"
android:textStyle="bold"
android:textSize="20sp"
android:textSize="18.5sp"
android:maxLines="1"
android:ellipsize="end"
android:layout_marginStart="15dp"
android:layout_marginTop="5dp"/>
android:layout_marginTop="2dp"/>

<TextView
android:id="@+id/itemColorValues"
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*/

buildscript {
ext.library_version = '1.0.0-alpha06'
ext.library_version_code = 6
ext.library_version = '1.0.0'
ext.library_version_code = 1000
ext.kotlin_version = "1.4.21-2"
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.2"
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
Expand Down

0 comments on commit e0954b7

Please sign in to comment.