use of android.text.method.ScrollingMovementMethod in project android by owncloud.
the class GenericExplanationActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
String message = intent.getStringExtra(MESSAGE);
ArrayList<String> list = intent.getStringArrayListExtra(EXTRA_LIST);
ArrayList<String> list2 = intent.getStringArrayListExtra(EXTRA_LIST_2);
setContentView(R.layout.generic_explanation);
if (message != null) {
TextView textView = (TextView) findViewById(R.id.message);
textView.setText(message);
textView.setMovementMethod(new ScrollingMovementMethod());
}
ListView listView = (ListView) findViewById(R.id.list);
if (list != null && list.size() > 0) {
//ListAdapter adapter = new ArrayAdapter<String>(this,
// android.R.layout.simple_list_item_1, list);
ListAdapter adapter = new ExplanationListAdapterView(this, list, list2);
listView.setAdapter(adapter);
} else {
listView.setVisibility(View.GONE);
}
}
use of android.text.method.ScrollingMovementMethod in project platform_frameworks_base by android.
the class SoundTriggerTestActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
// Make sure that this activity can punch through the lockscreen if needed.
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mDebugView = (TextView) findViewById(R.id.console);
mScrollView = (ScrollView) findViewById(R.id.scroller_id);
mRadioGroup = (RadioGroup) findViewById(R.id.model_group_id);
mPlayTriggerButton = (Button) findViewById(R.id.play_trigger_id);
mDebugView.setText(mDebugView.getText(), TextView.BufferType.EDITABLE);
mDebugView.setMovementMethod(new ScrollingMovementMethod());
mCaptureAudioCheckBox = (CheckBox) findViewById(R.id.caputre_check_box);
mPlayCapturedAudioButton = (Button) findViewById(R.id.play_captured_id);
mHandler = new Handler();
mButtonModelUuidMap = new HashMap();
mModelButtons = new HashMap();
mModelNames = new HashMap();
mModelRadioButtons = new LinkedList();
setVolumeControlStream(AudioManager.STREAM_MUSIC);
// Make sure that the service is started, so even if our activity goes down, we'll still
// have a request for it to run.
startService(new Intent(getBaseContext(), SoundTriggerTestService.class));
// Bind to SoundTriggerTestService.
Intent intent = new Intent(this, SoundTriggerTestService.class);
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
}
use of android.text.method.ScrollingMovementMethod in project grpc-java by grpc.
the class HelloworldActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_helloworld);
mSendButton = (Button) findViewById(R.id.send_button);
mHostEdit = (EditText) findViewById(R.id.host_edit_text);
mPortEdit = (EditText) findViewById(R.id.port_edit_text);
mMessageEdit = (EditText) findViewById(R.id.message_edit_text);
mResultText = (TextView) findViewById(R.id.grpc_response_text);
mResultText.setMovementMethod(new ScrollingMovementMethod());
}
use of android.text.method.ScrollingMovementMethod in project android_frameworks_base by DirtyUnicorns.
the class SoundTriggerTestActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
// Make sure that this activity can punch through the lockscreen if needed.
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mDebugView = (TextView) findViewById(R.id.console);
mScrollView = (ScrollView) findViewById(R.id.scroller_id);
mRadioGroup = (RadioGroup) findViewById(R.id.model_group_id);
mPlayTriggerButton = (Button) findViewById(R.id.play_trigger_id);
mDebugView.setText(mDebugView.getText(), TextView.BufferType.EDITABLE);
mDebugView.setMovementMethod(new ScrollingMovementMethod());
mCaptureAudioCheckBox = (CheckBox) findViewById(R.id.caputre_check_box);
mPlayCapturedAudioButton = (Button) findViewById(R.id.play_captured_id);
mHandler = new Handler();
mButtonModelUuidMap = new HashMap();
mModelButtons = new HashMap();
mModelNames = new HashMap();
mModelRadioButtons = new LinkedList();
setVolumeControlStream(AudioManager.STREAM_MUSIC);
// Make sure that the service is started, so even if our activity goes down, we'll still
// have a request for it to run.
startService(new Intent(getBaseContext(), SoundTriggerTestService.class));
// Bind to SoundTriggerTestService.
Intent intent = new Intent(this, SoundTriggerTestService.class);
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
}
use of android.text.method.ScrollingMovementMethod in project android_frameworks_base by ResurrectionRemix.
the class SoundTriggerTestActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
// Make sure that this activity can punch through the lockscreen if needed.
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mDebugView = (TextView) findViewById(R.id.console);
mScrollView = (ScrollView) findViewById(R.id.scroller_id);
mRadioGroup = (RadioGroup) findViewById(R.id.model_group_id);
mPlayTriggerButton = (Button) findViewById(R.id.play_trigger_id);
mDebugView.setText(mDebugView.getText(), TextView.BufferType.EDITABLE);
mDebugView.setMovementMethod(new ScrollingMovementMethod());
mCaptureAudioCheckBox = (CheckBox) findViewById(R.id.caputre_check_box);
mPlayCapturedAudioButton = (Button) findViewById(R.id.play_captured_id);
mHandler = new Handler();
mButtonModelUuidMap = new HashMap();
mModelButtons = new HashMap();
mModelNames = new HashMap();
mModelRadioButtons = new LinkedList();
setVolumeControlStream(AudioManager.STREAM_MUSIC);
// Make sure that the service is started, so even if our activity goes down, we'll still
// have a request for it to run.
startService(new Intent(getBaseContext(), SoundTriggerTestService.class));
// Bind to SoundTriggerTestService.
Intent intent = new Intent(this, SoundTriggerTestService.class);
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
}
Aggregations