Skip to content

Commit

Permalink
Update zavoloklom's material icons to 2.1.1
Browse files Browse the repository at this point in the history
Bump dependencies versions

Closes #3
  • Loading branch information
Malinskiy committed Jul 6, 2015
1 parent 67fce1d commit 258a8ef
Show file tree
Hide file tree
Showing 13 changed files with 893 additions and 782 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### About

**android-material-icons** allows you to include any of the **[Material Design 1.0.1 icons by Google packed by Sergey Kupletsky](http://zavoloklom.github.io/material-design-iconic-font/)** in your texts, your ```ActionBar```, and even in your ```EditText```s. Icons are infinitely **scalable**, and **customizable** with shadows and everything you can do on texts.
**android-material-icons** allows you to include any of the **[Material Design 2.1.1 icons by Google packed by Sergey Kupletsky](http://zavoloklom.github.io/material-design-iconic-font/)** in your texts, your ```ActionBar```, and even in your ```EditText```s. Icons are infinitely **scalable**, and **customizable** with shadows and everything you can do on texts.

Special thanks to **Joan Zapata** for his [android-iconify](https://github.com/JoanZapata/android-iconify) project since this is mostly a copy :)

Expand Down Expand Up @@ -43,7 +43,7 @@ menu.findItem(R.id.share).setIcon(
```

### Design-time preview (```maybe working```)
1. Copy material font [file](https://github.com/Malinskiy/android-material-icons/blob/master/android-material-icons/src/main/resources/material-design-iconic-font-1.0.1.ttf) (do not rename it) to your ```$ANDROID_SDK/platforms/android-$N/data/fonts/``` folder for each platform ```$N``` available.
1. Copy material font [file](https://github.com/Malinskiy/android-material-icons/blob/master/android-material-icons/src/main/resources/material-design-iconic-font-2.1.1.ttf) (do not rename it) to your ```$ANDROID_SDK/platforms/android-$N/data/fonts/``` folder for each platform ```$N``` available.
2. Assign attribute ```hacky_preview``` like this:
```xml
<com.malinskiy.materialicons.widget.IconTextView
Expand All @@ -69,7 +69,7 @@ repositories {
...
dependencies {
...
compile 'com.malinskiy:materialicons:1.0.1'
compile 'com.malinskiy:materialicons:1.0.2'
...
}
```
Expand Down
16 changes: 8 additions & 8 deletions android-material-icons-sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apply plugin: 'com.android.application'
apply plugin: 'android-apt'

def AAVersion = '3.2'
def AAVersion = '3.3.1'

android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.malinskiy.materialicons.sample"
minSdkVersion 8
targetSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
Expand All @@ -33,10 +33,10 @@ dependencies {
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"

compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.android.support:cardview-v7:21.0.2'
compile 'com.android.support:recyclerview-v7:21.0.2'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'

compile 'com.github.johnkil.android-robototextview:robototextview:2.2.0'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.ActivityOptionsCompat;
import android.support.v4.view.GestureDetectorCompat;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.GestureDetector;
Expand All @@ -14,7 +14,7 @@
import org.androidannotations.annotations.ViewById;

@EActivity(R.layout.activity_main)
public class MainActivity extends ActionBarActivity implements RecyclerView.OnItemTouchListener {
public class MainActivity extends AppCompatActivity implements RecyclerView.OnItemTouchListener {

@ViewById(R.id.recycler_icons)
protected RecyclerView recyclerView;
Expand Down Expand Up @@ -46,14 +46,18 @@ public boolean onInterceptTouchEvent(RecyclerView recyclerView, MotionEvent moti
public void onTouchEvent(RecyclerView recyclerView, MotionEvent motionEvent) {
}

@Override
public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
}

private class RecyclerViewOnGestureListener extends GestureDetector.SimpleOnGestureListener {

@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
View view = recyclerView.findChildViewUnder(e.getX(), e.getY());
if(view == null) return false;

int position = recyclerView.getChildPosition(view);
int position = recyclerView.getChildLayoutPosition(view);

MainActivity activity = MainActivity.this;

Expand Down
12 changes: 6 additions & 6 deletions android-material-icons/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.library'
apply plugin: 'robolectric'
apply plugin: 'org.robolectric'

android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
minSdkVersion 4
targetSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0.0"
}
Expand All @@ -22,8 +22,8 @@ android {
}

dependencies {
androidTestCompile 'junit:junit:4.11'
androidTestCompile 'org.robolectric:robolectric:2.3'
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:2.4'
}

apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
Loading

0 comments on commit 258a8ef

Please sign in to comment.