List of usage examples for android.text.method ScrollingMovementMethod ScrollingMovementMethod
ScrollingMovementMethod
From source file:org.chromium.latency.walt.DiagnosticsFragment.java
@Override public void onResume() { super.onResume(); logTextView.setMovementMethod(new ScrollingMovementMethod()); logTextView.setText(logger.getLogText()); logger.registerReceiver(logReceiver); }
From source file:com.luongbui.peng.android.AboutDialog.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_about, container); ((TextView) view.findViewById(R.id.license)).setMovementMethod(new ScrollingMovementMethod()); getDialog().setTitle(R.string.about); return view;//from www. j av a2 s . co m }
From source file:edu.rutgers.winlab.crowdpp.ui.SocialDiaryFragment.java
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.socialdiary_fragment_layout, container, false); bt_date = (Button) view.findViewById(R.id.bt_socialdiary_date); tv_record = (TextView) view.findViewById(R.id.tv_socialdiary_record); tv_record.setMovementMethod(new ScrollingMovementMethod()); mDatabase = new DataBaseHelper(getActivity().getApplicationContext()); mDB = mDatabase.getWritableDatabase(); // display the social diary based on the selected date bt_date.setOnClickListener(new OnClickListener() { @Override/* ww w . ja v a 2 s . co m*/ public void onClick(View v) { final String[] dates = mDatabase.queryDatesInDiary(mDB); new AlertDialog.Builder(getActivity()).setTitle("Choose date") .setSingleChoiceItems(dates, 0, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { String date[] = new String[] { dates[which] }; String diary = "Date\t\t\t\t\t\tTime\t\t\t\t\t\t#\t\t%\t\tLat\t\t\t\t\tLong\n"; mCursor = mDatabase.queryDiaryByDates(mDB, date); if (mCursor.moveToFirst()) { while (mCursor.isAfterLast() == false) { String record = mCursor.getString(0) + "\t\t\t" + mCursor.getString(1) + " - " + mCursor.getString(2) + "\t\t\t" + mCursor.getString(3) + "\t\t\t\t" + mCursor.getString(4) + "\n"; diary = diary + record; mCursor.moveToNext(); } } tv_record.setText(diary); dialog.dismiss(); } }).show(); } }); return view; }
From source file:com.joefernandez.irrduino.android.remote.ViewReportActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.report);/* w ww. j av a 2 s .c o m*/ reportText = (TextView) findViewById(id.report_text); reportText.setMovementMethod(new ScrollingMovementMethod()); settingsChanged = true; // get settings settings = PreferenceManager.getDefaultSharedPreferences(this); // set time zone settings and date formatter priorDate.setTimeZone(TimeZone.getDefault()); nextDate.setTimeZone(TimeZone.getDefault()); dateFormat = DateFormat.getDateFormat(this); // set localized date-only format timeFormat = DateFormat.getTimeFormat(this); // set localized time-only format //send the report request if (settings.getString(Settings.SERVER_HOST_NAME, Settings.DEFAULT_SERVER_HOST) .compareTo(Settings.DEFAULT_SERVER_HOST) == 0) { // default setting, warn user reportText.setText("Report server is not set,\n specify a server in Settings."); } else { reportText.setText("Requesting report..."); new IrrduinoServerRequestTask().execute(getReportServerUrl() + REPORT_JSON_FORMAT); } }
From source file:org.chromium.latency.walt.MidiFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { logger = SimpleLogger.getInstance(getContext()); midiTest = new MidiTest(getActivity()); midiTest.setTestStateListener(this); final View view = inflater.inflate(R.layout.fragment_midi, container, false); textView = (TextView) view.findViewById(R.id.txt_box_midi); startMidiInButton = view.findViewById(R.id.button_start_midi_in); startMidiOutButton = view.findViewById(R.id.button_start_midi_out); latencyChart = (HistogramChart) view.findViewById(R.id.latency_chart); textView.setMovementMethod(new ScrollingMovementMethod()); return view;//from ww w . ja va2 s . c o m }
From source file:com.rgam.morsekeyboard.SettingsFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.settings_fragment, container, false); predictiveButton = (Button) view.findViewById(R.id.predictiveButton); predictiveButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { SharedPreferences settings = getActivity().getSharedPreferences(Constants.GTAP_PREFS, 0); SharedPreferences.Editor editor = settings.edit(); boolean predictive = !settings.getBoolean(Constants.GTAP_PREDICTIVE_MODE, false); editor.putBoolean(Constants.GTAP_PREDICTIVE_MODE, predictive); editor.commit();/* w ww. j av a 2 s . co m*/ drawUI(); } }); TextView apache = (TextView) view.findViewById(R.id.apache_text); apache.setMovementMethod(new ScrollingMovementMethod()); return view; }
From source file:com.microsoft.identity.client.testapp.LogFragment.java
@Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment_log, container, false); mTextView = (TextView) view.findViewById(R.id.txt_log); final Bundle bundle = getArguments(); final String logs = (String) bundle.get(LOG_MSG); mTextView.setText(logs);/*from ww w . j a va 2 s. co m*/ mTextView.setMovementMethod(new ScrollingMovementMethod()); mClearLogButton = (Button) view.findViewById(R.id.btn_clearLogs); mClearLogButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mTextView.setText(""); ((MsalSampleApp) getActivity().getApplication()).clearLogs(); } }); return view; }
From source file:com.microsoft.aad.adal.example.userappwithbroker.LogFragment.java
@Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment_log, container, false); mTextView = (TextView) view.findViewById(R.id.txt_log); final Bundle bundle = getArguments(); final String logs = (String) bundle.get(LOG_MSG); mTextView.setText(logs);/*w ww. j a v a2 s . c o m*/ mTextView.setMovementMethod(new ScrollingMovementMethod()); mClearLogButton = (Button) view.findViewById(R.id.btn_clearLogs); mClearLogButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mTextView.setText(""); ((ADALSampleApp) getActivity().getApplication()).clearLogs(); } }); return view; }
From source file:com.example.blackberry.agoodandroidsample.SocketFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_socket, container, false); resultView = (TextView) view.findViewById(R.id.httpContents); //Enable scrolling in the resultView. resultView.setMovementMethod(new ScrollingMovementMethod()); final EditText theUrl = (EditText) view.findViewById(R.id.theUrl); final Button loadButton = (Button) view.findViewById(R.id.loadButton); loadButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { resultView.setText("Loading... "); new DownloadTask().execute(); }/*w w w .ja v a 2 s. c om*/ }); return view; }
From source file:com.example.blackberry.agoodandroidsample.HttpFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_http, container, false); resultView = (TextView) view.findViewById(R.id.httpContents); //Enable scrolling in the resultView. resultView.setMovementMethod(new ScrollingMovementMethod()); final EditText theUrl = (EditText) view.findViewById(R.id.theUrl); final Button loadButton = (Button) view.findViewById(R.id.loadButton); loadButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { resultView.setText("Loading... " + theUrl.getText().toString()); new DownloadTask().execute(theUrl.getText().toString()); }/*from w w w .ja v a 2 s .co m*/ }); return view; }