Android examples for android.app:Activity
set Activity Title
import android.app.Activity; public class Main { private static final String TITLE_ENTRIES_SEPARATOR = ": "; public static final void setActivityTitle(Activity activity, int... ids) { StringBuilder title = new StringBuilder(); for (int i = 0; i < ids.length; i++) { title.append(activity.getString(ids[i])); if (i < ids.length - 1) { title.append(TITLE_ENTRIES_SEPARATOR); }/*from ww w.j ava2 s. com*/ } activity.setTitle(title); } }