android.support.v7.widget.VectorEnabledTintResources Java Examples
The following examples show how to use
android.support.v7.widget.VectorEnabledTintResources.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SkinCompatDelegate.java From AndroidSkinAnimator with MIT License | 6 votes |
public View createView(View parent, final String name, @NonNull Context context, @NonNull AttributeSet attrs) { final boolean isPre21 = Build.VERSION.SDK_INT < 21; if (mSkinCompatViewInflater == null) { mSkinCompatViewInflater = new SkinCompatViewInflater(); } // We only want the View to inherit its context if we're running pre-v21 final boolean inheritContext = isPre21 && shouldInheritContext((ViewParent) parent); return mSkinCompatViewInflater.createView(parent, name, context, attrs, inheritContext, isPre21, /* Only read android:theme pre-L (L+ handles this anyway) */ true, /* Read read app:theme as a fallback at all times for legacy reasons */ VectorEnabledTintResources.shouldBeUsed() /* Only tint wrap the context if enabled */ ); }
Example #2
Source File: SkinCompatDelegate.java From Android-skin-support with MIT License | 6 votes |
public View createView(View parent, final String name, @NonNull Context context, @NonNull AttributeSet attrs) { final boolean isPre21 = Build.VERSION.SDK_INT < 21; if (mSkinCompatViewInflater == null) { mSkinCompatViewInflater = new SkinCompatViewInflater(); } // We only want the View to inherit its context if we're running pre-v21 final boolean inheritContext = isPre21 && shouldInheritContext((ViewParent) parent); return mSkinCompatViewInflater.createView(parent, name, context, attrs, inheritContext, isPre21, /* Only read android:theme pre-L (L+ handles this anyway) */ true, /* Read read app:theme as a fallback at all times for legacy reasons */ VectorEnabledTintResources.shouldBeUsed() /* Only tint wrap the context if enabled */ ); }
Example #3
Source File: BaseSkinActivity.java From ReadMark with Apache License 2.0 | 6 votes |
public View createView(View parent, final String name, @NonNull Context context, @NonNull AttributeSet attrs) { final boolean isPre21 = Build.VERSION.SDK_INT < 21; if (mAppCompatViewInflater == null) { mAppCompatViewInflater = new SkinAppCompatViewInflater(); } // We only want the View to inherit its context if we're running pre-v21 final boolean inheritContext = isPre21 && shouldInheritContext((ViewParent) parent); return mAppCompatViewInflater.createView(parent, name, context, attrs, inheritContext, isPre21, /* Only read android:theme pre-L (L+ handles this anyway) */ true, /* Read read app:theme as a fallback at all times for legacy reasons */ VectorEnabledTintResources.shouldBeUsed() /* Only tint wrap the context if enabled */ ); }
Example #4
Source File: BaseSkinActivity.java From ReadMark with Apache License 2.0 | 6 votes |
public View createView(View parent, final String name, @NonNull Context context, @NonNull AttributeSet attrs) { final boolean isPre21 = Build.VERSION.SDK_INT < 21; if (mAppCompatViewInflater == null) { mAppCompatViewInflater = new SkinAppCompatViewInflater(); } // We only want the View to inherit its context if we're running pre-v21 final boolean inheritContext = isPre21 && shouldInheritContext((ViewParent) parent); return mAppCompatViewInflater.createView(parent, name, context, attrs, inheritContext, isPre21, /* Only read android:theme pre-L (L+ handles this anyway) */ true, /* Read read app:theme as a fallback at all times for legacy reasons */ VectorEnabledTintResources.shouldBeUsed() /* Only tint wrap the context if enabled */ ); }
Example #5
Source File: RobotoInflater.java From Android-RobotoTextView with Apache License 2.0 | 6 votes |
@Override public View onCreateView(View parent, String name, Context context, AttributeSet attrs) { try { View view = mAppCompatDelegate.createView(parent, name, context, attrs); if (view == null) { final boolean isPre21 = Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP; final boolean inheritContext = isPre21 && shouldInheritContext((ViewParent) parent); view = mCompatInflater.createView(parent, name, context, attrs, inheritContext, isPre21, VectorEnabledTintResources.shouldBeUsed()); } if (view instanceof TextView) { RobotoTypefaces.setUpTypeface((TextView) view, context, attrs); } return view; } catch (Exception e) { //if some thing went wrong return null; } }
Example #6
Source File: SkinnableActivity.java From SkinSprite with MIT License | 5 votes |
@Override public View onCreateView(View parent, String name, Context context, AttributeSet attrs) { if (mSkinnableViewInflater == null) { mSkinnableViewInflater = new SkinnableViewInflater(); } final boolean isPre21 = Build.VERSION.SDK_INT < 21; final boolean inheritContext = isPre21 && shouldInheritContext((ViewParent) parent); return mSkinnableViewInflater.createView(parent, name, context, attrs, inheritContext, isPre21, /* Only read android:theme pre-L (L+ handles this anyway) */ true, /* Read read app:theme as a fallback at all times for legacy reasons */ VectorEnabledTintResources.shouldBeUsed() /* Only tint wrap the context if enabled */ ); }
Example #7
Source File: LayoutInflaterFactory2.java From ThemeDemo with Apache License 2.0 | 4 votes |
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) { final boolean isPre21 = Build.VERSION.SDK_INT < 21; return createView(parent, name, context, attrs, false, false, isPre21, VectorEnabledTintResources.shouldBeUsed()); }
Example #8
Source File: LayoutInflaterFactory2.java From ThemeDemo with Apache License 2.0 | 4 votes |
@Override public View onCreateView(String name, Context context, AttributeSet attrs) { final boolean isPre21 = Build.VERSION.SDK_INT < 21; return createView(null, name, context, attrs, false, false, isPre21, VectorEnabledTintResources.shouldBeUsed()); }