Android Activity Title Set setActivityTitle(Activity activity, int... ids)

Here you can find the source of setActivityTitle(Activity activity, int... ids)

Description

set Activity Title

Declaration

public static final void setActivityTitle(Activity activity, int... ids) 

Method Source Code

//package com.java2s;

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 w ww  .j  ava  2s. c o  m
        }

        activity.setTitle(title);
    }
}

Related

  1. setSubtitle(Activity a, int sub)
  2. setSubtitle(Activity a, String sub)