Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 滚动视图文本视图_Java_Android_Eclipse - Fatal编程技术网

Java 滚动视图文本视图

Java 滚动视图文本视图,java,android,eclipse,Java,Android,Eclipse,我在某个网站上复制了一个大文本,我想在单个文本视图上显示它。 在ADT上 它在eclipse上显示正确(adt) () 那就记在我的账上。(出口apk) () 以下是我的XML: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" andro

我在某个网站上复制了一个大文本,我想在单个文本视图上显示它。 在ADT上

它在eclipse上显示正确(adt)

()

那就记在我的账上。(出口apk)

()

以下是我的XML:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#02222f"

>

    <TextView
        android:id="@+id/textView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="20sp"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textColor="#FFFFFF"
        android:text="
        Audio
        Android's audio Hardware Abstraction Layer (HAL) connects the higher level, audio-specific framework APIs in android.media to the underlying audio driver and hardware.\n

        The following figure and list describe how audio functionality is implemented and the relevant source code that is involved in the implementation.

        Application framework
        At the application framework level is the app code, which utilizes the android.media APIs to interact with the audio hardware. Internally, this code calls corresponding JNI glue classes to access the native code that interacts with the audio hardware.

        JNI
        The JNI code associated with android.media is located in the frameworks/base/core/jni/ and frameworks/base/media/jni directories. This code calls the lower level native code to obtain access to the audio hardware.

        Native framework
        The native framework is defined in frameworks/av/media/libmedia and provides a native equivalent to the android.media package. The native framework calls the Binder IPC proxies to obtain access to audio-specific services of the media server.

        Binder IPC
        The Binder IPC proxies facilitate communication over process boundaries. They are located in the frameworks/av/media/libmedia directory and begin with the letter I.

        Media Server
        The audio services in the media server, located in frameworks/av/services/audioflinger, is the actual code that interacts with your HAL implementations.

        HAL
        The HAL defines the standard interface that audio services call into and that you must implement to have your audio hardware function correctly. The audio HAL interfaces are located in hardware/libhardware/include/hardware. See audio.h for additional details.

        Kernel Driver
        The audio driver interacts with the hardware and your implementation of the HAL. You can choose to use ALSA, OSS, or a custom driver of your own at this level. The HAL is driver-agnostic."/>


</LinearLayout>


</ScrollView>


问题是为什么它在eclipse上显示为正确,而在我的选项卡上显示为错误?

很可能是行尾字符有问题。您可能正在windows计算机上开发,并在基于linux的物理计算机上运行

简单的解决方法是在每行末尾添加
\n
,以强制系统正确打印新行字符


此外,您应该使用“string.xml”文件进行此操作,但仍然需要使用相同的修复程序

为什么不将xml值用于字符串?感谢您的快速响应!:)