我正在使用 android 2.1 开发应用程序。为它创建一个小部件,我创建了一个具有文本视图布局、大字体的简单小部件。我想添加可滚动视图,所以如果文本超出框,用户可以滚动。但是每当我添加标签时。小工具不起作用,有什么解决办法吗?
<?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"
android:background="@android:color/background_light"
android:layout_margin="5sp"
>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="slkjflasjdlkfjaslkjflksjf saldjfslkjdflksf lskjdflkasjdlkfjsa lkfklsa dfsakldjfksajdfkljasdklfjlaksdfkla sdlf askj fljsalfk aslkjfklsdjf lksadkfjsadkljf lksadjkf sadlkjfksa jfkljs dklfj skldjf klsadjkflsa dklfj sadkl fklsadj fklasdj kfjsa dklfjsadkljfklasdjklfsjadfjklsadj;as;fdjaljfd;klajd;klfaklsdjfkas fljldfjasdfjiojsdkljfiowejfisdklfkldjf k kljsedjr ilejicjdisfkeriejfcsdijioerfid cvisdjis kl jiowejfliwejlwjfkjdlkfjsjr i sijflessdf;lejfdejcjwejfij nlkefi ewijtioejifeiofrjiowejflie vilejeijioejfeojvolijsljfoisdjie ff iejieifiejfswjiflisijiejeifjeilfjelis fs ijfis efjsijfilesjflsjlfe sif j"
android:textSize="15sp"
/>
</ScrollView>
</LinearLayout>