Rename SubSettingLauncher.setTitle, add java doc
For make this method usage more clear, setTitle(charSequence) rename as setTitleText, add java doc: it is only for user generated string setTitle(int) rename as setTitleRes. Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e Fixes: 78347436 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -48,18 +48,37 @@ public class SubSettingLauncher {
|
||||
return this;
|
||||
}
|
||||
|
||||
public SubSettingLauncher setTitle(@StringRes int titleResId) {
|
||||
return setTitle(null /*titlePackageName*/, titleResId);
|
||||
/**
|
||||
* Set title with resource string id.
|
||||
*
|
||||
* @param titleResId res id of string
|
||||
*/
|
||||
public SubSettingLauncher setTitleRes(@StringRes int titleResId) {
|
||||
return setTitleRes(null /*titlePackageName*/, titleResId);
|
||||
}
|
||||
|
||||
public SubSettingLauncher setTitle(String titlePackageName, @StringRes int titleResId) {
|
||||
/**
|
||||
* Set title with resource string id, and package name to resolve the resource id.
|
||||
*
|
||||
* @param titlePackageName package name to resolve resource
|
||||
* @param titleResId res id of string, will use package name to resolve
|
||||
*/
|
||||
public SubSettingLauncher setTitleRes(String titlePackageName, @StringRes int titleResId) {
|
||||
mLaunchRequest.titleResPackageName = titlePackageName;
|
||||
mLaunchRequest.titleResId = titleResId;
|
||||
mLaunchRequest.title = null;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SubSettingLauncher setTitle(CharSequence title) {
|
||||
/**
|
||||
* Set title with text,
|
||||
* This method is only for user generated string,
|
||||
* display text will not update after locale change,
|
||||
* if title string is from resource id, please use setTitleRes.
|
||||
*
|
||||
* @param title text title
|
||||
*/
|
||||
public SubSettingLauncher setTitleText(CharSequence title) {
|
||||
mLaunchRequest.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user