Class ViewPumpContextWrapper

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Object getSystemService(String name)
      final static ContextWrapper wrap(Context base)
      final static ContextWrapper wrap(Context base, ViewPump viewPump) Uses the default configuration from ViewPumpRemember if you are defining default in the ViewPump make sure this is initialised before the activity is created.
      final static View onActivityCreateView(Activity activity, View parent, View view, String name, Context context, AttributeSet attr) You only need to call this IF you disable ViewPump.Builder.setPrivateFactoryInjectionEnabled This will need to be called from the Activity.onCreateView method to enable view font injection if the view is created inside the activity onCreateView.
      • Methods inherited from class android.content.Context

        getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, revokeSelfPermissionOnKill, sendBroadcastWithMultiplePermissions
      • Methods inherited from class android.content.ContextWrapper

        bindIsolatedService, bindService, bindService, bindServiceAsUser, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingOrSelfUriPermissions, checkCallingPermission, checkCallingUriPermission, checkCallingUriPermissions, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, checkUriPermissions, clearWallpaper, createAttributionContext, createConfigurationContext, createContext, createContextForSplit, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, createWindowContext, createWindowContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getAttributionSource, getAttributionTag, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDataDir, getDatabasePath, getDir, getDisplay, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFileStreamPath, getFilesDir, getMainExecutor, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getOpPackageName, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getParams, getResources, getSharedPreferences, getSystemServiceName, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, isUiContext, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerComponentCallbacks, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeSelfPermissionsOnKill, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setTheme, setWallpaper, setWallpaper, startActivities, startActivities, startActivity, startActivity, startForegroundService, startInstrumentation, startIntentSender, startIntentSender, startService, stopService, unbindService, unregisterComponentCallbacks, unregisterReceiver, updateServiceGroup
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • wrap

         final static ContextWrapper wrap(Context base, ViewPump viewPump)

        Uses the default configuration from ViewPump

        Remember if you are defining default in the ViewPump make sure this is initialised before the activity is created.

        Parameters:
        base - ContextBase to Wrap.
      • onActivityCreateView

         final static View onActivityCreateView(Activity activity, View parent, View view, String name, Context context, AttributeSet attr)

        You only need to call this IF you disable ViewPump.Builder.setPrivateFactoryInjectionEnabled This will need to be called from the Activity.onCreateView method to enable view font injection if the view is created inside the activity onCreateView.

        You would implement this method like so in you base activity.

        @Override
        public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
          return ViewPumpContextWrapper.onActivityCreateView(this, parent, super.onCreateView(parent, name, context, attrs), name, context, attrs);
        }
        override fun onCreateView(parent: View, name: String, context: Context, attrs: AttributeSet): View {
          return ViewPumpContextWrapper.onActivityCreateView(this, parent, super.onCreateView(parent, name, context, attrs), name, context, attrs)
        }
        Parameters:
        activity - The activity the original that the ContextWrapper was attached too.
        parent - Parent view from onCreateView
        view - The View Created inside onCreateView or from super.
        name - The View name from onCreateView
        context - The context from onCreateView
        attr - The AttributeSet from onCreateView