CoolView


Source link: https://github.com/nadimgouia/CoolView/

CoolView

An Android Library that help you to customise views (Button, EditText, ImageView), by adding border with the size and color that you want, and give it the corner radius that you seems cool, and you can also make an imageview looks like a circle.

Gradle

compile on your dependencies

 dependencies {

 compile 'com.ndroid:cool-view:1.0' 
}
  

ScreenShot

Sample Example

Sample Module

Usage

To create a new CoolButton (its the same way for the CoolEditText)


 <com.ndroid.CoolButton

 android:layout_width="100dp"

 android:layout_height="wrap_content"

 android:background="#26d64c"

 android:drawableLeft="@drawable/phone"

 android:text="Call Now"

 android:textColor="#fff"

 custom:border_color="#262626"

 custom:border_radius="20"

 custom:border_stroke="5" />  

To set the border_radius, border_stroke, border_color from the activity class..



CoolButton coolButton = (CoolButton) findViewById(R.id.coolButton);

//custom button border ...

// set the border color

coolButton.setBorderColor("#FFD42626");

// set the border radius

coolButton.setBorderRadius(20);

// set the border stroke

coolButton.setBorderStroke(4);
  

Create a bordered Cool ImageView..


 <com.ndroid.CoolImageView

 android:layout_width="200dp"

 android:layout_height="200dp"

 android:background="#26d64c"

 android:drawableLeft="@drawable/phone"

 android:text="Call Now"

 android:textColor="#fff"

 custom:border_color="#262626"

 custom:border_radius="20"

 custom:border_stroke="5" />  

Make the CoolImageView Circle ...


 <com.ndroid.CoolImageView

 android:layout_width="200dp"

 android:layout_height="200dp"

 android:background="#26d64c"

 android:drawableLeft="@drawable/phone"

 android:text="Call Now"

 android:textColor="#fff"

 custom:border_color="#262626"

 custom:border_stroke="5"

 custom:is_circle="true"

 />  

Customize the ImageView From Activity class ...

 CoolImage coolImage = (CoolImage) findViewById(R.id.coolImage);

//custom ImageView border ...

// set the border color

coolImage.setBorderColor("#000000");

// set the border radius

coolImage.setBorderRadius(20);

// set the border stroke

coolImage.setBorderStroke(4);

// make the imageview circle

 coolImage.setCircle(true);

  

Resources

Android PopupWindow that can be easily located relative to anchor View.

An Android library that enables snappy smooth scrolling in RecyclerView.

Android and Java library for mocking and testing networking layers with built-in support for Retrofit.

This project contains sample code for Bluetooth communication.

RxJava extension for Firebase Cloud Messaging which acts as an architectural approach to easily satisfy the requirements of an android app when dealing with push notifications.

Android library listening available WiFi Access Points and related information with RxJava Observables.

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