本文整理了Java中android.view.Window.setTitle()
方法的一些代码示例,展示了Window.setTitle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.setTitle()
方法的具体详情如下:
包路径:android.view.Window
类名称:Window
方法名:setTitle
暂无
代码示例来源:origin: robolectric/robolectric
@Test
public void getTitle() throws Exception {
window.setTitle("Some title");
assertThat(shadowOf(window).getTitle()).isEqualTo("Some title");
}
代码示例来源:origin: robolectric/robolectric
@Test
public void getTitle_shouldReturnWindowTitle() throws Exception {
Activity activity = Robolectric.buildActivity(Activity.class).create().get();
Window window = activity.getWindow();
window.setTitle("My Window Title");
assertThat(shadowOf(window).getTitle()).isEqualTo("My Window Title");
}
代码示例来源:origin: com.willowtreeapps/oak-demos
@Override
public void setTitle(CharSequence title) {
if (DEBUG) Log.d(TAG, "[setTitle] title: " + title);
mActivity.getWindow().setTitle(title);
}
代码示例来源:origin: com.actionbarsherlock/actionbarsherlock
@Override
public void setTitle(CharSequence title) {
if (ActionBarSherlock.DEBUG) Log.d(TAG, "[setTitle] title: " + title);
mActivity.getWindow().setTitle(title);
}
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.help_dialog_title));
view = inflater.inflate(R.layout.fragment_dialog_help, container, false);
btnHelpDialog = (Button) view.findViewById(R.id.btnHelpDialog);
btnHelpDialog.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
}
});
return view;
}
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.manage_select_keyboard));
activity = getActivity();
datasource = new LimeDB(this.activity);
view = inflater.inflate(R.layout.fragment_dialog_keyboard, container, false);
listSelectKeyboard = (ListView) view.findViewById(R.id.listSelectKeyboard);
return view;
}
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.action_news));
mLIMEPref = new LIMEPreferenceManager(getActivity());
view = inflater.inflate(R.layout.fragment_dialog_news, container, false);
String html_value = mLIMEPref.getParameterString(Lime.LIME_NEWS_CONTENT, "");
if(!html_value.isEmpty()){
WebView newsContentArea = (WebView) view.findViewById(R.id.newsContentArea);
newsContentArea.getSettings().setJavaScriptEnabled(true);
newsContentArea.loadData(html_value, "text/html", "UTF-8");
}
btnHelpDialog = (Button) view.findViewById(R.id.btnNewsDialog);
btnHelpDialog.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
}
});
return view;
}
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.payment_dialog_title));
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.manage_word_dialog_add));
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.manage_related_dialog_add));
代码示例来源:origin: kebernet/shortyz
public void run() {
if (timer != null) {
getWindow().setTitle(timer.time());
//noinspection deprecation
getWindow().setFeatureInt(Window.FEATURE_PROGRESS,
puz.getPercentComplete() * 100);
}
if (runTimer) {
handler.postDelayed(this, 1000);
}
}
};
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.manage_word_dialog_edit));
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.manage_related_dialog_edit));
代码示例来源:origin: THEONE10211024/ApiDemos
/**
* Initialization of the Activity after it is first created. Must at least
* call {@link android.app.Activity#setContentView setContentView()} to
* describe what is to be displayed in the screen.
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
// Be sure to call the super class.
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_LEFT_ICON);
// See assets/res/any/layout/dialog_activity.xml for this
// view layout definition, which is being set here as
// the content of our screen.
setContentView(R.layout.dialog_activity);
getWindow().setTitle("This is just a test");
getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,
android.R.drawable.ic_dialog_alert);
Button button = (Button)findViewById(R.id.add);
button.setOnClickListener(mAddContentListener);
button = (Button)findViewById(R.id.remove);
button.setOnClickListener(mRemoveContentListener);
}
代码示例来源:origin: qiubiteme/android_api_demos
/**
* Initialization of the Activity after it is first created. Must at least
* call {@link android.app.Activity#setContentView setContentView()} to
* describe what is to be displayed in the screen.
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
// Be sure to call the super class.
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_LEFT_ICON);
// See assets/res/any/layout/dialog_activity.xml for this
// view layout definition, which is being set here as
// the content of our screen.
setContentView(R.layout.dialog_activity);
getWindow().setTitle("This is just a test");
getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,
android.R.drawable.ic_dialog_alert);
Button button = (Button)findViewById(R.id.add);
button.setOnClickListener(mAddContentListener);
button = (Button)findViewById(R.id.remove);
button.setOnClickListener(mRemoveContentListener);
}
代码示例来源:origin: lime-ime/limeime
getDialog().getWindow().setTitle(getResources().getString(R.string.setup_im_related_title));
getDialog().getWindow().setTitle(getResources().getString(R.string.setup_im_dialog_title_remove));
getDialog().getWindow().setTitle(getResources().getString(R.string.setup_im_dialog_title));
代码示例来源:origin: leeowenowen/rxjava-examples
private void switchToSample() {
getWindow().setTitle(getResources().getString(R.string.sample));
mListAdapter = new ActivityAdapter();
mListAdapter.register("AutoComplete", AutoCompleteActivity.class);
mListAdapter.register("ConditionTest", ConditionActivity.class);
mListAdapter.register("ReadWriteFile", RWFileActivity.class);
mListAdapter.register("Fetch Ad", AdFetchActivity.class);
mListAdapter.register("Group by", GroupByActivity.class);
mListAdapter.register("Buffer", BufferActivity.class);
mListAdapter.register("OtherAPI", OtherAPIActivity.class);
mListView.setAdapter(mListAdapter);
}
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.import_dialog_title));
datasource = new LimeDB(getActivity());
importdialog = this;
代码示例来源:origin: lime-ime/limeime
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) {
getDialog().getWindow().setTitle(getResources().getString(R.string.share_dialog_title));
datasource = new LimeDB(getActivity());
sharedialog = this;
代码示例来源:origin: leeowenowen/rxjava-examples
private void switchToApi() {
getWindow().setTitle(getResources().getString(R.string.api));
mListAdapter = new ActivityAdapter();
mListAdapter.register("Async", AsyncActivity.class);
mListAdapter.register("BlockingObservable", BlockingObservableActivity.class);
mListAdapter.register("Combine", CombineActivity.class);
mListAdapter.register("Condition", union.uc.com.rxjava_example.api.ConditionActivity.class);
mListAdapter.register("ConnectableObserverable", ConnectableObservableActivity.class);
mListAdapter.register("CustomeOperator", CustomeOperatorActivity.class);
mListAdapter.register("ErrorHandler", ErrorHandleActivity.class);
mListAdapter.register("Filter", FilterActivity.class);
mListAdapter.register("Math & Aggregate", MathAggregateActivity.class);
mListAdapter.register("ObservableCreate", ObservableCreateActivity.class);
mListAdapter.register("Plugin", PluginActivity.class);
mListAdapter.register("Scheduler", SchedulerActivity.class);
mListAdapter.register("String", StringActivity.class);
mListAdapter.register("Subject", SubjectActivity.class);
mListAdapter.register("Transform", TransformationActivity.class);
mListAdapter.register("Utility", UtilityActivity.class);
mListAdapter.register("ReactiveStream", ReactiveStreamActivity.class);
mListView.setAdapter(mListAdapter);
}
内容来源于网络,如有侵权,请联系作者删除!