dynamic-support


Source link: https://github.com/pranavpandey/dynamic-support

Dynamic Support

License Build Status Download

A complete library to build apps for Android 14+ (ICS or above) devices with a built-in theme engine. It is built on top of the latest app compat library to provide best compatibility.

Since v2.0.0, it uses AndroidX so, first migrate your project to AndroidX.


Contents


Installation

It can be installed by adding the following dependency to your build.gradle file:

dependencies {

  // For AndroidX enabled projects.
  implementation 'com.pranavpandey.android:dynamic-support:2.2.1'

// For legacy projects.
  implementation 'com.pranavpandey.android:dynamic-support:1.3.0' 
}

Usage

It is a collection of activities, fragments, widgets, views and some utility functions required to build a standard Android app. It also provides some in-built use cases like an intro screen, drawer activity, about screen, collapsing app bar, bottom navigation, color picker, multiple locales, runtime permissions, etc. which can be used and customised according to the need.

For complete reference, please read the documentation.

Theme engine

Each activity and widget can be themed by using the in-built theme engine with background aware functionality to avoid any visibility issues. Colors can be selected by using the provided material design colors or by selecting a custom color from the in-built picker which supports HEX, HSV and ARGB values.

Background aware

Below are the same colors applied on the light and dark backgrounds respectively. But the final color is adjusted according to the colored view background to provide best visibility.

Sample

This library is fully commented so, please check the individual classes or files for the documentation. Basic documentation will be available soon.

Checkout the sample to know more about the basic implementation.

Proguard

This library uses reflection at some places to theme widgets at runtime. So, their original name must be preserved to theme them properly. It will automatically apply the appropriate rules if proguard is enabled in the project.

The following rules will be applied by this library:

dependencies {

  # Keep application class.
  -keep public class * extends android.app.Application

 # Keep methods in Activity that could be used in the XML.
  -keepclassmembers class * extends android.app.Activity {


  public void *(android.view.View);

  
}


 # Keep support library classes.
  #-keep class androidx.appcompat.widget.** {
 *; 
}

  #-keep class android.support.v4.widget.** {
 *; 
}

  #-keep class android.support.v7.widget.** {
 *; 
}

  #-keep class android.support.design.widget.** {
 *; 
}

  #-keep class android.support.design.internal.** {
 *; 
}


 # Keep AndroidX classes.
  -keep class androidx.core.widget.** {
 *; 
}

  -keep class androidx.appcompat.view.menu.** {
 *; 
}

  -keep class androidx.recyclerview.widget.** {
 *; 
}

  -keep class androidx.viewpager.widget.** {
 *; 
}


 # Keep Material Components classes.
  -keep class com.google.android.material.internal.** {
 *; 
}

  -keep class com.google.android.material.navigation.** {
 *; 
}

  -keep class com.google.android.material.textfield.** {
 *; 
}


 # Keep all the Dynamic Support models.
  -keep class com.pranavpandey.android.dynamic.support.model.** {
 *; 
}


 # Gson uses generic type information stored in a class file when working with fields.
  # Proguard removes such information by default, so configure it to keep all of it.
  -keepattributes Signature

 # For using GSON @Expose annotation
  -keepattributes *Annotation*

 # Gson specific classes
  -keep class sun.misc.Unsafe {
 *; 
}

  -keep class com.google.gson.** {
 *; 
}
 
}

Apps using Dynamic Support

All of my apps are using some or all part of this library. You can download them from Play Store. Please email me if you are using this library and want to feature your app here. Also, please checkout the Rotation app to experience the full potential of this library.


Translations

  • German (de) - Flubberlutsch
  • Indonesian (in) - Gamal Kevin A
  • Italian (it) - Nicola
  • Spanish (es) - Dave
  • Turkish (tr) - Fatih F?r?nc?
  • Chinese (Simplified) (zh-rCN) - John Canny

License

Copyright 2018 Pranav Pandey  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

Custom animation for Google Speech Recognizer.

Android DialogFragment that enables Dialog to be swiped away to dismiss.

RX based bus with lifecycle based queuing support.

An Android library that checks for your application's updates on Google Play Store. This library uses Android Publisher API.

This plugin integrates Google Play Developer API (Publishing API) with the Gradle build system. With this plugin, you can upload apks and listings directly via command line, IntelliJ, Android Studio and other IDEs.

RxJava extension for Android to access camera and gallery to take images.

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