Skip to content

Commit

Permalink
Merge branch 'release/v2.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jul 17, 2017
2 parents 0a15cab + a8f6f78 commit 7d041c2
Show file tree
Hide file tree
Showing 41 changed files with 1,396 additions and 582 deletions.
5 changes: 5 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
##Upgrade Notes

### Library
#### 2.9.0
* The library-core was split apart into **iconics-core** and **iconics-views** to slim down the **iconics-core** and allow more advanced UI features in the **iconics-views**
* the core dep stays the same: `compile "com.mikepenz:iconics-core:2.9.0@aar"`
* for all UI widgets add `compile "com.mikepenz:iconics-views:2.9.0@aar"`

#### 2.8.0
* Dropping support for API < 14. New `MinSdkVersion` is now 14

Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,18 @@ Provide additional fonts for you project, or even create your custom font with j

## 1. Provide the gradle dependency
```gradle
compile "com.mikepenz:iconics-core:2.8.9@aar"
//the core iconcis library (without any widgets)
compile "com.mikepenz:iconics-core:2.9.0@aar"
```

## 1b. (optional) Add the view's dependency
```
//this adds all ui view widgets (IconicsButton, IconicsImageView, ...)
compile "com.mikepenz:iconics-core:2.9.0@aar"
compile "com.android.support:appcompat-v7:${supportLibVersion}"
```


## 2. Choose your desired fonts
```gradle
compile 'com.mikepenz:google-material-typeface:3.0.1.1.original@aar'
Expand Down Expand Up @@ -291,6 +299,9 @@ All other ProGuard rules are now bundled internally with each font.
You can try the sample application out. It's on Google Play ;)
https://play.google.com/store/apps/details?id=com.mikepenz.iconics.sample

# Special Contributor
- [Peter Gulko](https://github.com/zTrap) Thanks for providing better XML support for compound Iconics drawables, and for doing the initial work of splitting up core and views library
- Also thanks for all the other contributors.

# Credits
- [Joan Zapata](https://github.com/JoanZapata) He is the creator of [Android-Iconify](https://github.com/JoanZapata/android-iconify) which gave me the idea of this project. Some core concepts and ideas were reused, but everything is written from scratch.
Expand Down
11 changes: 6 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 28901
versionName "2.8.9"
versionCode 29001
versionName "2.9.0"
}

buildTypes {
Expand Down Expand Up @@ -50,7 +50,7 @@ dependencies {
// contains util classes to support various android versions, and clean up code
// comes with the awesome "Holder"-Pattern
// https://github.com/mikepenz/Materialize
compile 'com.mikepenz:materialize:1.0.2@aar'
compile 'com.mikepenz:materialize:1.0.3@aar'

// used to fill the RecyclerView with the DrawerItems
// and provides single and multi selection, expandable items
Expand All @@ -60,20 +60,21 @@ dependencies {

//used to generate the drawer on the left
//https://github.com/mikepenz/MaterialDrawer
compile('com.mikepenz:materialdrawer:5.9.2@aar') {
compile('com.mikepenz:materialdrawer:5.9.4@aar') {
transitive = true
exclude module: "fastadapter"
exclude module: "iconics-core"
}

// used to generate the Open Source section
// https://github.com/mikepenz/AboutLibraries
compile('com.mikepenz:aboutlibraries:5.9.5@aar') {
compile('com.mikepenz:aboutlibraries:5.9.6@aar') {
transitive = true
exclude module: "fastadapter"
exclude module: "iconics-core"
}

compile project(':iconics-view-library')
compile project(':fontawesome-typeface-library')
compile project(':material-design-iconic-typeface-library')
compile project(':google-material-typeface-library')
Expand Down
37 changes: 25 additions & 12 deletions app/src/main/java/com/mikepenz/iconics/sample/IconsFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
Expand Down Expand Up @@ -140,30 +141,42 @@ public boolean onTouch(View v, MotionEvent motionEvent, IAdapter<IconItem> adapt
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position, List payloads) {
IconItem.ViewHolder holder = (IconItem.ViewHolder) viewHolder;

//as we overwrite the default listener
mAdapter.getItem(position).bindView(holder, payloads);
IconItem item = mAdapter.getItem(position);

if(item != null) {
//set the R.id.fastadapter_item tag of this item to the item object (can be used when retrieving the view)
viewHolder.itemView.setTag(com.mikepenz.fastadapter.R.id.fastadapter_item, item);

//as we overwrite the default listener
item.bindView(holder, payloads);

if (randomize) {
holder.image.setColorRes(getRandomColor(position));
holder.image.setPaddingDp(random.nextInt(12));
if (randomize) {
holder.image.setColorRes(getRandomColor(position));
holder.image.setPaddingDp(random.nextInt(12));

holder.image.setContourWidthDp(random.nextInt(2));
holder.image.setContourColor(getRandomColor(position - 2));
holder.image.setContourWidthDp(random.nextInt(2));
holder.image.setContourColor(getRandomColor(position - 2));


int y = random.nextInt(10);
if (y % 4 == 0) {
holder.image.setBackgroundColorRes(getRandomColor(position - 4));
holder.image.setRoundedCornersDp(2 + random.nextInt(10));
int y = random.nextInt(10);
if (y % 4 == 0) {
holder.image.setBackgroundColorRes(getRandomColor(position - 4));
holder.image.setRoundedCornersDp(2 + random.nextInt(10));
}
}
}
}

@Override
public void unBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
IconItem item = mAdapter.getItem(position);
IconItem item = (IconItem) viewHolder.itemView.getTag(com.mikepenz.fastadapter.R.id.fastadapter_item);
if (item != null) {
item.unbindView((IconItem.ViewHolder) viewHolder);
//remove set tag's
viewHolder.itemView.setTag(com.mikepenz.fastadapter.R.id.fastadapter_item, null);
viewHolder.itemView.setTag(com.mikepenz.fastadapter.R.id.fastadapter_item_adapter, null);
} else {
Log.e("FastAdapter", "The bindView method of this item should set the `Tag` on its itemView (https://github.com/mikepenz/FastAdapter/blob/develop/library-core/src/main/java/com/mikepenz/fastadapter/items/AbstractItem.java#L189)");
}
}

Expand Down
138 changes: 134 additions & 4 deletions app/src/main/res/layout/activity_playground.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="IconicsTextView with side-drawables"
android:textColor="@android:color/black"

app:iiv_all_color="@color/md_amber_300"
app:iiv_all_icon="@string/gmd_account_circle"
app:iiv_all_size="24dp"/>
Expand Down Expand Up @@ -296,15 +298,15 @@
android:layout_marginTop="8dp"
android:background="#000"/>

<FrameLayout
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.mikepenz.iconics.view.IconicsCheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="IconicsCheckBox"
android:layout_gravity="start"
android:padding="5dp"

app:iiv_checked_color="@color/primary"
Expand All @@ -319,7 +321,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Iconics{fon-test1}CheckBox{faw-adjust}"
android:layout_gravity="end"
android:padding="5dp"

app:iiv_checked_color="@color/primary"
Expand All @@ -329,7 +330,136 @@
app:iiv_unchecked_color="@color/primary"
app:iiv_unchecked_icon="@string/gmd_check_box_outline_blank"
app:iiv_unchecked_size="24dp"/>
</FrameLayout>

<com.mikepenz.iconics.view.IconicsCheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"

app:iiv_checked_color="@color/primary"
app:iiv_checked_icon="@string/gmd_play_circle_filled"
app:iiv_checked_size="24dp"

app:iiv_unchecked_color="@color/primary"
app:iiv_unchecked_icon="@string/gmd_play_circle_outline"
app:iiv_unchecked_size="24dp"/>
</LinearLayout>
<!--endregion-->

<!--region IconicsCheckableTextView Showcase-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="IconicsCheckableTextView Showcase"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="#000"/>

<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.mikepenz.iconics.view.IconicsCheckableTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="IconicsCheckableTextViewStart"
android:textColor="@android:color/black"
android:padding="5dp"

app:iiv_start_icon="@string/gmd_error_outline"
app:iiv_start_color="@color/colorAccent"
app:iiv_start_size="24dp"

app:iiv_start_checked_icon="@string/gmd_error"
app:iiv_start_checked_color="@color/colorAccent"
app:iiv_start_checked_size="24dp"/>

<com.mikepenz.iconics.view.IconicsCheckableTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="IconicsCheckableTextViewTop"
android:textColor="@android:color/black"
android:padding="5dp"

app:iiv_top_icon="@string/gmd_help_outline"
app:iiv_top_color="@color/md_deep_orange_400"
app:iiv_top_size="24dp"

app:iiv_top_checked_icon="@string/gmd_help"
app:iiv_top_checked_color="@color/md_deep_orange_400"
app:iiv_top_checked_size="24dp"/>

<com.mikepenz.iconics.view.IconicsCheckableTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="IconicsCheckableTextViewEnd"
android:textColor="@android:color/black"
android:padding="5dp"

app:iiv_end_icon="@string/gmd_info_outline"
app:iiv_end_color="@color/md_cyan_800"
app:iiv_end_size="24dp"

app:iiv_end_checked_icon="@string/gmd_info"
app:iiv_end_checked_color="@color/md_cyan_800"
app:iiv_end_checked_size="24dp"/>

<com.mikepenz.iconics.view.IconicsCheckableTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="IconicsCheckableTextViewBottom"
android:textColor="@android:color/black"
android:padding="5dp"

app:iiv_bottom_icon="@string/gmd_add_circle_outline"
app:iiv_bottom_color="@color/md_blue_grey_300"
app:iiv_bottom_size="24dp"

app:iiv_bottom_checked_icon="@string/gmd_add_circle"
app:iiv_bottom_checked_color="@color/md_blue_grey_300"
app:iiv_bottom_checked_size="24dp"/>

<com.mikepenz.iconics.view.IconicsCheckableTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="IconicsCheckableTextView"
android:textColor="@android:color/black"
android:padding="5dp"

app:iiv_start_icon="@string/gmd_error_outline"
app:iiv_start_color="@color/colorAccent"
app:iiv_start_size="24dp"
app:iiv_start_checked_icon="@string/gmd_error"
app:iiv_start_checked_color="@color/colorAccent"
app:iiv_start_checked_size="24dp"

app:iiv_top_icon="@string/gmd_help_outline"
app:iiv_top_color="@color/md_deep_orange_400"
app:iiv_top_size="24dp"
app:iiv_top_checked_icon="@string/gmd_help"
app:iiv_top_checked_color="@color/md_deep_orange_400"
app:iiv_top_checked_size="24dp"

app:iiv_end_icon="@string/gmd_info_outline"
app:iiv_end_color="@color/md_cyan_800"
app:iiv_end_size="24dp"
app:iiv_end_checked_icon="@string/gmd_info"
app:iiv_end_checked_color="@color/md_cyan_800"
app:iiv_end_checked_size="24dp"

app:iiv_bottom_icon="@string/gmd_add_circle_outline"
app:iiv_bottom_color="@color/md_blue_grey_300"
app:iiv_bottom_size="24dp"
app:iiv_bottom_checked_icon="@string/gmd_add_circle"
app:iiv_bottom_checked_color="@color/md_blue_grey_300"
app:iiv_bottom_checked_size="24dp"/>
</LinearLayout>
<!--endregion-->

</LinearLayout>
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.android.tools.build:gradle:3.0.0-alpha6'
classpath 'com.novoda:bintray-release:0.5.0'
}
}

ext {
compileSdkVersion = 25
buildToolsVersion = "25.0.2"
buildToolsVersion = "25.0.3"
supportLibVersion = "25.4.0"

minSdkVersion = 14
Expand Down
1 change: 1 addition & 0 deletions iconics-view-library/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
35 changes: 35 additions & 0 deletions iconics-view-library/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apply plugin: 'com.android.library'

group "com.mikepenz"

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2900
versionName "2.9.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}

if (project.hasProperty('pushall') || project.hasProperty('libraryviewsonly')) {
apply from: '../gradle-mvn-push.gradle'
apply plugin: 'com.novoda.bintray-release'
apply from: '../gradle-jcenter-push.gradle'
}

dependencies {
compile project(':library-core')
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
}
19 changes: 19 additions & 0 deletions iconics-view-library/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Copyright 2016 Mike Penz
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
VERSION_NAME=2.9.0
VERSION_CODE=2900
POM_NAME=Android-Iconics Library
POM_ARTIFACT_ID=iconics-views
POM_PACKAGING=aar
Loading

0 comments on commit 7d041c2

Please sign in to comment.