Skip to content

Commit

Permalink
Merge branch 'release/v3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Nov 18, 2017
2 parents b894d88 + 1558513 commit 87bd035
Show file tree
Hide file tree
Showing 61 changed files with 305 additions and 169 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ proguard/

# Log Files
*.log
functiongraphic.psd
Binary file modified DEV/functiongraphic/functiongraphic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed DEV/functiongraphic/functiongraphic.psd
Binary file not shown.
Binary file added DEV/github/2017-11-18 12.39.39.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DEV/github/2017-11-18 12.39.46.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DEV/github/2017-11-18 12.39.48.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DEV/github/2017-11-18 12.39.54.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DEV/github/2017-11-18 12.39.57.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DEV/github/2017-11-18 12.40.00.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DEV/github/2017-11-18 12.40.04.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed DEV/github/Screenshot_2015-08-12-19-30-01.png
Binary file not shown.
Binary file removed DEV/github/Screenshot_2015-08-12-19-30-15.png
Binary file not shown.
Binary file removed DEV/github/Screenshot_2015-08-12-19-30-24.png
Binary file not shown.
Binary file removed DEV/github/Screenshot_2015-08-12-19-30-41.png
Binary file not shown.
Binary file removed DEV/github/Screenshot_2015-08-12-19-30-47.png
Binary file not shown.
Binary file modified DEV/github/screenshots1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed DEV/github/screenshots1.png
Binary file not shown.
Binary file removed DEV/screenshots/screenshot1.png
Binary file not shown.
Binary file removed DEV/screenshots/screenshot2.png
Binary file not shown.
Binary file removed DEV/screenshots/screenshot3.png
Binary file not shown.
Binary file removed DEV/screenshots/screenshot4.png
Binary file not shown.
Binary file removed DEV/screenshots/screenshot_1_small.png
Binary file not shown.
Binary file removed DEV/screenshots/screenshot_2_small.png
Binary file not shown.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ Use the icons in the variation you need them.

**What do you get**
- No customization limitations (size, color, contour, background, padding, positioning, ...)
- Shadow support
- One icon source (no more mdpi, hdpi, ...)
- Flexibility
- Size
- Colors
- Contour
- Shadow
- If it takes a Drawable, it will also work with the IconicsDrawable!
- Save in APK size
- All licenses included, best used with [AboutLibraries](https://github.com/mikepenz/AboutLibraries)
Expand Down Expand Up @@ -47,14 +52,14 @@ Provide additional fonts for you project, or even create your custom font with j
## 1. Provide the gradle dependency
```gradle
//the core iconcis library (without any widgets)
implementation "com.mikepenz:iconics-core:2.9.5@aar"
implementation "com.mikepenz:iconics-core:3.0.0@aar"
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
```

## 1b. (optional) Add the view's dependency
```
//this adds all ui view widgets (IconicsButton, IconicsImageView, ...)
implementation "com.mikepenz:iconics-views:2.9.5@aar"
implementation "com.mikepenz:iconics-views:3.0.0@aar"
```


Expand Down
16 changes: 9 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 29500
versionName "2.9.5"
versionCode 30000
versionName "3.0.0"

setProperty("archivesBaseName", "Android Iconics-v$versionName-c$versionCode")
}

buildTypes {
Expand Down Expand Up @@ -59,17 +61,17 @@ dependencies {
// contains util classes to support various android versions, and clean up code
// comes with the awesome "Holder"-Pattern
// https://github.com/mikepenz/Materialize
implementation 'com.mikepenz:materialize:1.1.1@aar'
implementation 'com.mikepenz:materialize:1.1.2@aar'

// used to fill the RecyclerView with the DrawerItems
// and provides single and multi selection, expandable items
// https://github.com/mikepenz/FastAdapter
implementation 'com.mikepenz:fastadapter:2.6.3@aar'
implementation 'com.mikepenz:fastadapter-commons:2.6.3@aar'
implementation 'com.mikepenz:fastadapter:3.0.4@aar'
implementation 'com.mikepenz:fastadapter-commons:3.0.1@aar'

//used to generate the drawer on the left
//https://github.com/mikepenz/MaterialDrawer
implementation('com.mikepenz:materialdrawer:5.9.5@aar') {
implementation('com.mikepenz:materialdrawer:6.0.0@aar') {
transitive = true
exclude module: "fastadapter"
exclude module: "iconics-core"
Expand All @@ -78,7 +80,7 @@ dependencies {

// used to generate the Open Source section
// https://github.com/mikepenz/AboutLibraries
implementation('com.mikepenz:aboutlibraries:5.9.8@aar') {
implementation('com.mikepenz:aboutlibraries:6.0.0@aar') {
transitive = true
exclude module: "fastadapter"
exclude module: "iconics-core"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<application
android:name=".CustomApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/MaterialDrawerTheme.Light.DarkToolbar">
<activity android:name=".MainActivity">
<intent-filter>
Expand Down
Binary file added app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 38 additions & 29 deletions app/src/main/java/com/mikepenz/iconics/sample/IconsFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
import android.widget.ImageView;
import android.widget.PopupWindow;

import com.mikepenz.fastadapter.FastAdapter;
import com.mikepenz.fastadapter.IAdapter;
import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter;
import com.mikepenz.fastadapter.listeners.OnBindViewHolderListener;
import com.mikepenz.iconics.Iconics;
import com.mikepenz.iconics.IconicsDrawable;
import com.mikepenz.iconics.sample.item.IconItem;
Expand All @@ -43,6 +42,7 @@ public class IconsFragment extends Fragment {
private ArrayList<IconItem> mIcons = new ArrayList<>();
private FastItemAdapter<IconItem> mAdapter;
private boolean mRandomize;
private boolean mShadow;
private String mSearch;
private PopupWindow mPopup;
private Random mRandom = new Random();
Expand All @@ -64,6 +64,13 @@ public void randomize(boolean randomize) {
}
}

public void shadow(boolean shadow) {
mShadow = shadow;
if (mAdapter != null) {
mAdapter.notifyAdapterDataSetChanged();
}
}

@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.icons_fragment, null, false);
Expand Down Expand Up @@ -104,37 +111,34 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat

private void configAdapter() {
//our popup on touch
mAdapter.withOnTouchListener(new FastAdapter.OnTouchListener<IconItem>() {
@Override
public boolean onTouch(View v, MotionEvent motionEvent, IAdapter<IconItem> adapter, IconItem item, int position) {
int a = motionEvent.getAction();
if (a == MotionEvent.ACTION_DOWN) {
if (mPopup != null && mPopup.isShowing()) {
mPopup.dismiss();
}
IconicsDrawable icon = new IconicsDrawable(v.getContext()).icon(item.getIcon()).sizeDp(144).paddingDp(8).backgroundColor(Color.parseColor("#DDFFFFFF")).roundedCornersDp(12);
ImageView imageView = new ImageView(v.getContext());
imageView.setImageDrawable(
icon
);
int size = (int) UIUtils.convertDpToPixel(144, v.getContext());
mPopup = new PopupWindow(imageView, size, size);
mPopup.showAsDropDown(v);

//copy to clipboard
ClipboardManager clipboard = (ClipboardManager) v.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("Android-Iconics icon", icon.getIcon().getFormattedName());
clipboard.setPrimaryClip(clip);
} else if (a == MotionEvent.ACTION_UP || a == MotionEvent.ACTION_CANCEL || a == MotionEvent.ACTION_OUTSIDE) {
if (mPopup != null && mPopup.isShowing()) {
mPopup.dismiss();
}
mAdapter.withOnTouchListener((v, motionEvent, adapter, item, position) -> {
int a = motionEvent.getAction();
if (a == MotionEvent.ACTION_DOWN) {
if (mPopup != null && mPopup.isShowing()) {
mPopup.dismiss();
}
IconicsDrawable icon = new IconicsDrawable(v.getContext()).icon(item.getIcon()).sizeDp(144).paddingDp(8).backgroundColor(Color.parseColor("#DDFFFFFF")).roundedCornersDp(12);
ImageView imageView = new ImageView(v.getContext());
imageView.setImageDrawable(
icon
);
int size = (int) UIUtils.convertDpToPixel(144, v.getContext());
mPopup = new PopupWindow(imageView, size, size);
mPopup.showAsDropDown(v);

//copy to clipboard
ClipboardManager clipboard = (ClipboardManager) v.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText("Android-Iconics icon", icon.getIcon().getFormattedName());
clipboard.setPrimaryClip(clip);
} else if (a == MotionEvent.ACTION_UP || a == MotionEvent.ACTION_CANCEL || a == MotionEvent.ACTION_OUTSIDE) {
if (mPopup != null && mPopup.isShowing()) {
mPopup.dismiss();
}
return false;
}
return false;
});

mAdapter.withOnBindViewHolderListener(new FastAdapter.OnBindViewHolderListener() {
mAdapter.withOnBindViewHolderListener(new OnBindViewHolderListener() {
@Override
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position, List payloads) {
IconItem.ViewHolder holder = (IconItem.ViewHolder) viewHolder;
Expand Down Expand Up @@ -162,6 +166,11 @@ public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position, L
holder.image.getIcon().roundedCornersDp(2 + mRandom.nextInt(10));
}
}

if (mShadow) {
holder.image.getIcon().enableShadowSupport(holder.image);
holder.image.getIcon().shadowDp(1, 1, 1, Color.argb(200, 0, 0, 0));
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class MainActivity extends AppCompatActivity {

private IconsFragment mIconsFragment;
private boolean mRandomize;
private boolean mShadow;
private List<ITypeface> mFonts;
private int mIdentifierGmd = 0;
private String mCurrentSearch = null;
Expand Down Expand Up @@ -213,6 +214,11 @@ public boolean onOptionsItemSelected(MenuItem item) {
mIconsFragment.randomize(item.isChecked());
mRandomize = item.isChecked();
return true;
case R.id.action_shadow:
item.setChecked(!item.isChecked());
mIconsFragment.shadow(item.isChecked());
mShadow = item.isChecked();
return true;
case R.id.action_opensource:
new LibsBuilder()
.withFields(R.string.class.getFields())
Expand Down Expand Up @@ -242,6 +248,7 @@ private void loadIcons(String fontName) {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
mIconsFragment = IconsFragment.newInstance(fontName);
mIconsFragment.randomize(mRandomize);
mIconsFragment.shadow(mShadow);
mIconsFragment.onSearch(mCurrentSearch);
ft.replace(R.id.content, mIconsFragment);
ft.commit();
Expand Down
Binary file removed app/src/main/res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/ic_launcher.png
Diff not rendered.
Binary file removed app/src/main/res/drawable-xxxhdpi/ic_launcher.png
Diff not rendered.
4 changes: 4 additions & 0 deletions app/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
android:id="@+id/action_randomize"
android:checkable="true"
android:title="@string/action_randomize" />
<item
android:id="@+id/action_shadow"
android:checkable="true"
android:title="@string/action_shadow" />
<item
android:id="@+id/action_opensource"
android:title="@string/action_opensource"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file added app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file added app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file added app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file added app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
6 changes: 3 additions & 3 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<resources>

<!-- Theme colors -->
<color name="primary">#ff6e40</color>
<color name="primary_dark">#ff5722</color>
<color name="accent">#ff4081</color>
<color name="primary">#F44336</color>
<color name="primary_dark">#D32F2F</color>
<color name="accent">#F44336</color>
<color name="theme_window_background">#ECECEC</color>

<!-- general colors for drawer -->
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#2196F3</color>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<string name="title_activity_old_automatic">Old Automatic Mapping</string>

<string name="action_randomize">Randomize</string>
<string name="action_shadow">Shadow</string>
<string name="action_opensource">Open Source</string>
<string name="action_playground">Playground</string>
<string name="action_automatic">Automatic Mapping</string>
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.novoda:bintray-release:0.5.0'
classpath 'com.novoda:bintray-release:0.7.0'
}
}

ext {
compileSdkVersion = 27
buildToolsVersion = "27.0.0"
supportLibVersion = "27.0.0"
buildToolsVersion = "27.0.1"
supportLibVersion = "27.0.1"
minSdkVersion = 14
targetSdkVersion = 27
}
Expand Down
4 changes: 2 additions & 2 deletions iconics-view-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2950
versionName "2.9.5"
versionCode 3000
versionName "3.0.0"
}
buildTypes {
release {
Expand Down
4 changes: 2 additions & 2 deletions iconics-view-library/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# 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.5
VERSION_CODE=2950
VERSION_NAME=3.0.0
VERSION_CODE=3000
POM_NAME=Android-Iconics Library
POM_ARTIFACT_ID=iconics-views
POM_PACKAGING=aar
4 changes: 2 additions & 2 deletions library-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2950
versionName "2.9.5"
versionCode 3000
versionName "3.0.0"
}
buildTypes {
release {
Expand Down
4 changes: 2 additions & 2 deletions library-core/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# 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.5
VERSION_CODE=2950
VERSION_NAME=3.0.0
VERSION_CODE=3000
POM_NAME=Android-Iconics Library
POM_ARTIFACT_ID=iconics-core
POM_PACKAGING=aar
Loading

0 comments on commit 87bd035

Please sign in to comment.