本文整理了Java中android.app.Dialog.setTitle()
方法的一些代码示例,展示了Dialog.setTitle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialog.setTitle()
方法的具体详情如下:
包路径:android.app.Dialog
类名称:Dialog
方法名:setTitle
暂无
代码示例来源:origin: facebook/facebook-android-sdk
public View onCreateView(
LayoutInflater inflater,
@Nullable ViewGroup container,
Bundle savedInstanceState) {
getDialog().setTitle(getString(R.string.current_place));
return inflater.inflate(R.layout.current_place_fragment, container, false);
}
代码示例来源:origin: facebook/stetho
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.settings_btn) {
SettingsActivity.show(MainActivity.this);
} else if (id == R.id.apod_btn) {
APODActivity.show(MainActivity.this);
} else if (id == R.id.irc_btn) {
IRCConnectActivity.show(MainActivity.this);
} else if (id == R.id.about) {
View view = LayoutInflater.from(MainActivity.this).inflate(R.layout.dialog_layout, null);
Dialog dialog = new Dialog(MainActivity.this);
dialog.setContentView(view);
dialog.setTitle(getString(R.string.app_name));
dialog.show();
}
}
};
代码示例来源:origin: k9mail/k-9
@Override
public boolean onPreferenceChange(final Preference preference, final Object newValue) {
final SliderPreference slider = (SliderPreference) preference;
final Float value = (Float) newValue;
slider.setSummary(String.format(summaryFormat, scaleToInt(value)));
slider.setDialogTitle(
String.format(titleFormat, slider.getTitle(), slider.getSummary()));
if (slider.getDialog() != null) {
slider.getDialog().setTitle(slider.getDialogTitle());
}
return true;
}
}
代码示例来源:origin: sjwall/MaterialTapTargetPrompt
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_dialog, container);
getDialog().setTitle("DialogFragment");
getDialog().setOnShowListener(new DialogInterface.OnShowListener()
{
@Override
public void onShow(DialogInterface dialog)
{
showFragmentFabPrompt();
}
});
rootView.findViewById(R.id.button_fab_prompt)
.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view)
{
showFragmentFabPrompt();
}
});
return rootView;
}
代码示例来源:origin: sjwall/MaterialTapTargetPrompt
getDialog().setTitle("DialogFragment");
getDialog().setOnShowListener(new DialogInterface.OnShowListener()
代码示例来源:origin: googlesamples/android-FingerprintDialog
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
getDialog().setTitle(getString(R.string.sign_in));
View v = inflater.inflate(R.layout.fingerprint_dialog_container, container, false);
mCancelButton = (Button) v.findViewById(R.id.cancel_button);
代码示例来源:origin: chat-sdk/chat-sdk-android
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (isDialog) {
if(title.equals("")) {
getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
}
else {
getDialog().setTitle(title);
}
}
mainView = inflater.inflate(activityLayout(), null);
initViews();
loadData(true);
return mainView;
}
代码示例来源:origin: NordicSemiconductor/Android-nRF-Beacon
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
getDialog().setTitle(R.string.monalisa_title);
return inflater.inflate(R.layout.fragment_dialog_monalisa, container, false);
}
代码示例来源:origin: michael-rapp/AndroidBottomSheet
@Override
public final void setTitle(@Nullable final CharSequence title) {
super.setTitle(title);
this.title = title;
adaptTitle();
}
代码示例来源:origin: vogellacompany/codeexamples-android
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_editnamedialog,
container);
mEditText = (EditText) view.findViewById(R.id.txt_your_name);
getDialog().setTitle("Please enter your name");
return view;
}
}
代码示例来源:origin: michael-rapp/AndroidMaterialDialog
@Override
public final void setTitle(@Nullable final CharSequence title) {
super.setTitle(title);
decorator.setTitle(title);
}
代码示例来源:origin: henrymorgen/android-advanced-light
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mDialog=new ProgressDialog(getActivity());
mDialog.setTitle("获取数据中");
bt_ipinfo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mPresenter.getIpInfo("39.155.184.147");
}
});
}
@Override
代码示例来源:origin: henrymorgen/android-advanced-light
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mDialog = new ProgressDialog(getActivity());
mDialog.setTitle("获取数据中");
binding.btIpinfo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mPresenter.getIpInfo("39.155.184.147");
}
});
}
代码示例来源:origin: Catrobat/Paintroid
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState);
dialog.setTitle(R.string.color_chooser_title);
return dialog;
}
代码示例来源:origin: ultramega/elementary
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
getDialog().setTitle(R.string.titleAbout);
}
代码示例来源:origin: ogarcia/opensudoku
@Override
protected void onPrepareDialog(int id, Dialog dialog) {
super.onPrepareDialog(id, dialog);
switch (id) {
case DIALOG_IMPORT_FILE:
dialog.setTitle(getString(R.string.import_file_title, mSelectedFile.getName()));
break;
}
}
代码示例来源:origin: michaelcarrano/detective-droid
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_detector_task, container);
mProgressText = (TextView) view.findViewById(R.id.progress_message_1);
mProgressBar = (ProgressBar) view.findViewById(R.id.progress_bar);
getDialog().setTitle(R.string.progress_dialog_title);
getDialog().setCanceledOnTouchOutside(false);
return view;
}
代码示例来源:origin: daliyan/MyKeep
private void initView() {
getDialog().getWindow().setBackgroundDrawableResource(R.drawable.date_corners_bg);
getDialog().setTitle("设置时间");
setOnClick();
mDatePagerAdapter = new DatePagerAdapter();
mVp.setAdapter(mDatePagerAdapter);
mTabLayout.setupWithViewPager(mVp);
}
代码示例来源:origin: MFlisar/GDPRDialog
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = initView(inflater, container);
if (!mViewManager.getSetup().noToolbarTheme()) {
getDialog().setTitle(R.string.gdpr_dialog_title);
}
return view;
}
代码示例来源:origin: sorz/TinyKeePass
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
getDialog().setTitle(R.string.fingerprint_dialog_title);
getDialog().setCancelable(true);
getDialog().setCanceledOnTouchOutside(true);
View view = inflater.inflate(R.layout.fragment_fingerprint_dialog, container, false);
fingerprintUiHelper = new FingerprintUiHelper(getContext(), view, this::onFingerprintFinish);
return view;
}
内容来源于网络,如有侵权,请联系作者删除!