Example usage for android.widget TextView isShown

List of usage examples for android.widget TextView isShown

Introduction

In this page you can find the example usage for android.widget TextView isShown.

Prototype

public boolean isShown() 

Source Link

Document

Returns the visibility of this view and all of its ancestors

Usage

From source file:org.brandroid.openmanager.activities.OpenExplorer.java

public void updateTitle(CharSequence cs) {
    TextView title = (TextView) findViewById(R.id.title_path);
    if ((title == null || !title.isShown()) && !BEFORE_HONEYCOMB && getActionBar() != null
            && getActionBar().getCustomView() != null)
        title = (TextView) getActionBar().getCustomView().findViewById(R.id.title_path);
    //if(BEFORE_HONEYCOMB || !USE_ACTION_BAR || getActionBar() == null)
    if (title != null && title.getVisibility() != View.GONE)
        title.setText(cs, BufferType.SPANNABLE);
    if (!BEFORE_HONEYCOMB && USE_ACTION_BAR && getActionBar() != null && (title == null || !title.isShown()))
        getActionBar().setSubtitle(cs);//from   w w  w .j ava  2 s  .c o m
    //else
    {
        SpannableStringBuilder sb = new SpannableStringBuilder(getResources().getString(R.string.app_title));
        sb.append(cs.equals("") ? "" : " - ");
        sb.append(cs);
        setTitle(cs);
    }
}