List of usage examples for android.widget TextView setKeyListener
public void setKeyListener(KeyListener input)
From source file:it.scoppelletti.mobilepower.app.HelpActivity.java
/** * Creazione dell’attività. * /*from w ww . ja va2 s . com*/ * @param savedInstanceState Stato dell’istanza. */ @Override protected void onCreate(Bundle savedInstanceState) { TextView textControl; MarketTagHandler tagHandler; super.onCreate(savedInstanceState); setTheme(AppUtils.getActivityTheme()); setContentView(R.layout.textview); textControl = (TextView) findViewById(R.id.txt_content); textControl.setKeyListener(null); textControl.setAutoLinkMask(Linkify.EMAIL_ADDRESSES | Linkify.WEB_URLS); tagHandler = new MarketTagHandler(); textControl.setText(Html.fromHtml(buildText(), null, tagHandler)); tagHandler.addLinks(textControl, myFullPkgName); }
From source file:it.scoppelletti.mobilepower.app.ReleaseNoteActivity.java
/** * Creazione dell’attività. * /*from ww w . j av a 2 s .c o m*/ * @param savedInstanceState Stato dell’istanza. */ @Override protected void onCreate(Bundle savedInstanceState) { String notes; TextView textControl; Button button; MarketTagHandler tagHandler; super.onCreate(savedInstanceState); setTheme(AppUtils.getActivityTheme()); setContentView(R.layout.releasenotes); textControl = (TextView) findViewById(R.id.txt_content); textControl.setKeyListener(null); textControl.setAutoLinkMask(Linkify.EMAIL_ADDRESSES | Linkify.WEB_URLS); notes = getIntent().getStringExtra(ReleaseNoteActivity.EXTRA_RELEASENOTES); if (!StringUtils.isBlank(notes)) { tagHandler = new MarketTagHandler(); textControl.setText(Html.fromHtml(notes, null, tagHandler)); tagHandler.addLinks(textControl, AppUtils.getFullPackageName(this, false)); } button = (Button) findViewById(R.id.cmd_continue); button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { finish(); } }); }
From source file:it.scoppelletti.mobilepower.app.AboutActivity.java
/** * Creazione dell’attività. * /*from ww w .jav a 2 s.c om*/ * @param savedInstanceState Stato dell’istanza. */ @Override protected void onCreate(Bundle savedInstanceState) { TextView textControl; MarketTagHandler tagHandler; super.onCreate(savedInstanceState); setTheme(AppUtils.getActivityTheme()); setContentView(R.layout.textview); textControl = (TextView) findViewById(R.id.txt_content); textControl.setKeyListener(null); textControl.setAutoLinkMask(Linkify.EMAIL_ADDRESSES | Linkify.WEB_URLS); tagHandler = new MarketTagHandler(); textControl.setText(Html.fromHtml(buildText(), null, tagHandler)); tagHandler.addLinks(textControl, AppUtils.getFullPackageName(this, false)); }
From source file:com.bringcommunications.etherpay.SendActivity.java
public void onResume() { super.onResume(); // Always call the superclass method first if (auto_pay.equals("true")) { Button pay_button = (Button) findViewById(R.id.pay_button); pay_button.setEnabled(false);/*from w ww .j a v a 2 s .c o m*/ TextView size_view = (TextView) findViewById(R.id.size); size_view.setKeyListener(null); size_view.setCursorVisible(false); size_view.setFocusable(false); EditText data_view = (EditText) findViewById(R.id.data); data_view.setKeyListener(null); data_view.setCursorVisible(false); data_view.setFocusable(false); do_pay(null); } }
From source file:it.scoppelletti.mobilepower.app.HelpDialogFragment.java
/** * Crea il dialogo.//w ww . ja va 2 s.c o m * * @param savedInstanceState Stato dell’istanza. * @return Dialogo. */ @Override public Dialog onCreateDialog(Bundle savedInstanceState) { int mode, resId; View contentView; AlertDialog dlg; AlertDialog.Builder builder; LayoutInflater inflater; TextView textControl; Bundle args = getArguments(); builder = newAlertDialogBuilder(); resId = args.getInt(HelpDialogFragment.ARG_TITLEID, 0); if (resId > 0) { builder.setTitle(resId); } inflater = getActivity().getLayoutInflater(); contentView = inflater.inflate(R.layout.helpdialog, null); builder.setView(contentView); builder.setIcon(android.R.drawable.ic_dialog_info); mode = getArguments().getInt(HelpDialogFragment.ARG_MODE, HelpDialogFragment.MODE_HELP); switch (mode) { case HelpDialogFragment.MODE_CONFIRM: setCancelable(false); builder.setCancelable(false); builder.setPositiveButton(R.string.cmd_proceed, this); builder.setNegativeButton(android.R.string.cancel, this); break; default: // HelpDialogFragment.MODE_HELP builder.setNeutralButton(R.string.cmd_close, null); break; } dlg = builder.create(); textControl = (TextView) contentView.findViewById(R.id.txt_help); textControl.setKeyListener(null); resId = args.getInt(HelpDialogFragment.ARG_TEXTID, 0); if (resId > 0) { textControl.setText(Html.fromHtml(getResources().getString(resId))); } return dlg; }