Skip to content

v2.5.0

Choose a tag to compare

@mikepenz mikepenz released this 01 Dec 22:22
· 876 commits to develop since this release

library

  • rename old IconicsLayoutInflator to InternalLayoutInflater and make private
  • add new IconicsLayoutInflater which can be used in AppCompatActivities or all activities which feature an AppCompatDelegate
    • this is also compatible with libs which wrap the basecontext like calligraphy
  • remove unnecessary methods

sample

  • change AutomaticActivity to showcase the new IconicsLayoutInflater
  • add new OldAutomaticActivity to showcase how to wrap the context for normal Activities which do not use an AppCompatDelegete / or do not extend from the AppCompatActivity
  • update to the latest materialDrawer

MIGRATION

2.x.y -> 2.5.0

  • there is now a new prefered solution to enable the Iconics features on Android base views like ImageViews, TextViews or all views which extend those.
    • instead of wrapping the baseContext you should now define the IconicsLayoutInflater as default LayoutInflater. This will also bring Calligraphy compatiblity (or to other libs which wrap the baseContext)
    • this requires an Activity extending the AppCompatActivity or implementing the AppCompatDelegate
@Override
protected void onCreate(Bundle savedInstanceState) {
    LayoutInflaterCompat.setFactory(getLayoutInflater(), new IconicsLayoutInflater(getDelegate()));
    //...
    super.onCreate(savedInstanceState);
    //...
}
  • if you do not wrap the BaseContext with a different lib, or do not extend from AppCompatActivity or do not implement AppCompatDelegate you can still wrap the baseContext
@Override
protected void attachBaseContext(Context newBase) {
    super.attachBaseContext(IconicsContextWrapper.wrap(newBase));
}