CustomShapeImageView


Source link: https://github.com/MostafaGazar/CustomShapeImageView

CustomShapeImageView Demo ( Play Store Demo)

A library for supporting custom shaped ImageView(s) using SVGs and paint shapes

You can also use this gist https://gist.github.com/MostafaGazar/ee345987fa6c8924d61b if you do not want to add this library project to your codebase.

Usage

<com.meg7.widget.CustomShapeImageView
  android:layout_width="64dp"
  android:layout_height="64dp"
  android:src="@drawable/sample"
  app:shape="circle"
  android:scaleType="centerCrop" />  <com.meg7.widget.CircleImageView
  android:layout_width="64dp"
  android:layout_height="64dp"
  android:src="@drawable/sample"
  android:scaleType="centerCrop" />  <com.meg7.widget.RectangleImageView
  android:layout_width="64dp"
  android:layout_height="64dp"
  android:src="@drawable/sample"
  android:scaleType="centerCrop" />  <com.meg7.widget.SvgImageView
  android:layout_width="64dp"
  android:layout_height="64dp"
  android:src="@drawable/sample"
  app:svg_raw_resource="@raw/shape_star"
  android:scaleType="centerCrop" />

Download

Add the customshapeimageview dependency to your build.gradle file:

dependencies {

  ...
  compile 'com.mostafagazar:customshapeimageview:1.0.4'
  ... 
}

Proguard

If you're using proguard for code shrinking and obfuscation, make sure to add the following:


-keep class com.meg7.widget.** {
 *; 
}
 

Screenshots

Libraries used

Developed by

License

Copyright 2013-2016 Mostafa Gazar  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. 

Donations

If you'd like to support this library, you could make a donation here:

Resources

Custom view written in Kotlin to Display a translucent frame with corners as known from cameras. You can set the frame's alpha, the frame size, the length of the lines in the corner, their color and the width of them.

Improved AsyncQueryHandler that supports Bulk Insert operation

An Input box with different validators and ripple transition for android. It lets you to define custom animation for error text entrance and also comes up with seven ready validators.

Clean Architecture with Dagger2 + Retrofit2 + Picasso.

This application is an RSS Reader example of Clean Architecture with kotlin.

SugarLoader is a small library that adds sugar to Android Loader API.

Even when you rotate screen, tap home button, or anything, there is no risk to crash it or miss the callback, data will be loaded only once, then rendered to the restored activity/fragment, because there is Android Loader API under the hood.

A simple progress indicator (or chart widget) for Android.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes