80,352
社区成员
发帖
与我相关
我的任务
分享
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
//System.out.println("MyScrollView-->onInterceptTouchEvent");
return false;
}
public class ScrollViewTest extends Activity {
private EditText t;
String s = "北京欢迎你,我家大门常打开,开怀容纳天地1 "+"\n"+
"北京欢迎你,我家大门常打开,开怀容纳天地 2"+"\n"+
"北京欢迎你,我家大门常打开,开怀容纳天地 3"+"\n"+
"北京欢迎你,我家大门常打开,开怀容纳天地 4"+"\n"+
"北京欢迎你,我家大门常打开,开怀容纳天地 5"+"\n"+
"北京欢迎你,我家大门常打开,开怀容纳天地 6"+"\n"+
"北京欢迎你,我家大门常打开,开怀容纳天地 7"+"\n";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.scroll_text);
t = (EditText)findViewById(R.id.sc[code=XML]
roll);
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText android:id="@+id/scroll"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:lines="3"/>
</ScrollView>
</LinearLayout>