MyCustomWidgets


Source link: https://github.com/developerVatsal/MyCustomWidgetsExample

MyCustomWidgetsLibrary

This is an Android Library for developer to use android customized widgets and change fonts style easily.
Example is avilable in app module.

##Download

###Gradle dependency:

  • Add the following to your project level build.gradle:
allprojects {
  repositories {

...
maven {
 url "https://jitpack.io" 
}
  
}
 
}
 
  • Add this to your app build.gradle:
dependencies {
  compile 'com.github.vatsaldesai92:MyCustomWidgetsLibrary:1.0.1' 
}
 

##Usage

  • User can can directly change widget fonts by add bellow code in xml.

  • Add .ttf file in assets folder.

  • app:fontPath contain path of the ttf file that can be from string.xml or direct path of assets.

  • if user add .ttf file path in string.xml


 <string name="font5">verdana.ttf</string>

<com.desai.vatsal.mycustomwidgets.MyCustomTextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="10dp"

android:text="my dynamic textview 3"

app:fontPath="@string/font5" /> 
  • if user add .ttf file in assets folder

 <com.desai.vatsal.mycustomwidgets.MyCustomTextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="my dynamic textview 1"

app:fontPath="verdana.ttf" /> 
  • if user create folder fonts in assets folder then add .ttf file in it

 <com.desai.vatsal.mycustomwidgets.MyCustomTextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="my dynamic textview 1"

app:fontPath="fonts/verdana.ttf" /> 

##All Widgets

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:id="@+id/activity_main"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical">

  <com.desai.vatsal.mycustomwidgets.MyCustomTextView

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:text="my dynamic textview 1"

  app:fontPath="cambriai.ttf" />

  <com.desai.vatsal.mycustomwidgets.MyCustomEditText

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:layout_marginTop="10dp"

  android:hint="my dynamic edittext 1"

  app:fontPath="@string/font4" />

  <com.desai.vatsal.mycustomwidgets.MyCustomRadioButton

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:layout_marginTop="10dp"

  android:text="my dynamic radio button 2"

  app:fontPath="verdana.ttf" />

  <com.desai.vatsal.mycustomwidgets.MyCustomCheckBox

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:layout_marginTop="10dp"

  android:text="my dynamic checkbox 1"

  app:fontPath="@string/font4" />

  <com.desai.vatsal.mycustomwidgets.MyCustomButton

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:layout_marginTop="10dp"

  android:text="my dynamic button 2"

  app:fontPath="verdana.ttf" />

  <com.desai.vatsal.mycustomwidgets.MyCustomAutoCompleteTextView

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:layout_marginTop="10dp"

  android:text="my dynamic auto complete textview 1"

  app:fontPath="@string/font5" />

  <com.desai.vatsal.mycustomwidgets.MyCustomCheckedTextView

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:layout_marginTop="10dp"

  android:text="my dynamic checked textview 1"

  app:fontPath="cambriai.ttf" />

  <com.desai.vatsal.mycustomwidgets.MyCustomMultiAutoCompleteTextView

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:layout_marginTop="10dp"

  android:text="my dynamic multi auto complete textview 1"

  app:fontPath="@string/font3" />

  <com.desai.vatsal.mycustomwidgets.MyCustomSwitch

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:layout_marginTop="10dp"

  android:text="my dynamic switch 1"

  app:fontPath="@string/font3" />

  <com.desai.vatsal.mycustomwidgets.MyCustomToggleButton

  android:layout_width="wrap_content"

  android:layout_height="wrap_content"

  android:layout_marginTop="10dp"

  android:text="my dynamic toggle button 1"

  app:fontPath="@string/font3" />  </LinearLayout>

##License


 Apache Version 2.0

Copyright 2016.

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. 

Resources

Update available Notification for Google Play.

DMAudioStreamer library helps you to integrate audio streaming in your application.

Swipe, drag-and-drop, items clicks, view holder's events delegation and other stuff for Android Recycler View.

A simple cool dismissal animation for activities.

Star DNS Changer is a DNS Changer application.

A plugin for Kotlin generate Kotlin data class code from a json string.

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