Code example for LayerDrawable

Methods: setLayerInset

0
     * Suggest to the UI that the title bar can be hidden. The UI will then 
     * decide whether or not to hide based off a number of factors, such 
     * as if the user is editing the URL bar or if the page is loading 
     */ 
    public void suggestHideTitleBar() { 
        if (!isLoading() && !isEditingUrl() && !mTitleBar.wantsToBeVisible()
                && !mNavigationBar.isMenuShowing()) {
            hideTitleBar(); 
        } 
    } 
 
    protected final void showTitleBarForDuration() { 
        showTitleBarForDuration(HIDE_TITLEBAR_DELAY);
    } 
 
    protected final void showTitleBarForDuration(long duration) {
        showTitleBar(); 
        Message msg = Message.obtain(mHandler, MSG_HIDE_TITLEBAR);
        mHandler.sendMessageDelayed(msg, duration);
    }