static boolean canCheckForV7Toolbar ( ) { if ( sToolbarCheck == null ) { try { Class . forName ( "android.support.v7.widget.Toolbar" ) ; sToolbarCheck = Boolean . TRUE ; } catch ( ClassNotFoundException e ) { sToolbarCheck = Boolean . FALSE ; } } return sToolbarCheck ; }
See if the user has added appcompat - v7 this is done at runtime so we only check once .