Example usage for android.app Activity setTitle

List of usage examples for android.app Activity setTitle

Introduction

In this page you can find the example usage for android.app Activity setTitle.

Prototype

public void setTitle(int titleId) 

Source Link

Document

Change the title associated with this activity.

Usage

From source file:com.aujur.ebookreader.activity.ReadingFragment.java

private void loadNewBook(String fileName) {

    Activity activity = getActivity();

    if (activity != null) {

        activity.setTitle(R.string.app_name);
        this.bookTitle = null;
        this.titleBase = null;

        bookView.clear();/*  w ww .  j a  v  a2s.  co  m*/

        updateFileName(null, fileName);
        new DownloadProgressTask().execute();
    }
}

From source file:com.aujur.ebookreader.activity.ReadingFragment.java

@Override
public void parseEntryComplete(int entry, String name) {

    if (name != null && !name.equals(this.bookTitle)) {
        this.titleBase = this.bookTitle + " - " + name;
    } else {//from w ww. j  a v a 2s .c  o  m
        this.titleBase = this.bookTitle;
    }

    Activity activity = getActivity();

    if (activity != null) {

        activity.setTitle(this.titleBase);

        if (this.ttsPlaybackItemQueue.isActive() && this.ttsPlaybackItemQueue.isEmpty()) {
            streamTTSToDisk();
        }

        closeWaitDialog();
    }

}