java - android fragment 中的textview中不显示全文

标签 java android eclipse performance android-fragments

我在 Eclipse 中开发 Android 应用程序,并使用 framelayout 作为我的 fragment 的容器...以及 >fragment 不显示全文...一半的文本被隐藏... 请帮帮我...!!! 提前致谢...

activty_main.xml`

    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:orientation="vertical">

        <ScrollView
            android:id="@+id/scrollView2"
            android:layout_width="match_parent"
            android:layout_height="match_parent" >


                <FrameLayout
    android:id="@+id/fragment_place"
    android:layout_width="match_parent"
    android:layout_height="match_parent"

    android:focusable="true"/>

        </ScrollView>
  `

fragment_about.xml

    <LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:padding="10dp">

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="About Us"
        android:textColor="#F44336"
        android:layout_gravity="center"
        android:textAppearance="?android:attr/textAppearanceLarge" 
        android:textSize="30dp"/>

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
         android:textColor="#2196F3"
        android:text="         Our vision is to interrelate the old and present students of college with each other and to develop a constant interaction among them.This also serves as a good opportunity to get the required career guidance to reach their future endeavours."
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <View
        android:id="@+id/view1"
        android:layout_width="wrap_content"
        android:layout_height="9dp"
        />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#2196F3"
        android:text="        We provide e-library to our students which compraises many number of e-books, projects and all fundamentals of electronics"
        android:textAppearance="?android:attr/textAppearanceLarge" />


    <View
        android:id="@+id/view2"
        android:layout_width="wrap_content"
        android:layout_height="9dp"
        />

    <TextView
        android:id="@+id/textView4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
         android:textColor="#2196F3"
        android:text="        We automized our students internal/external marks system so, every student can log on to his account and get his/her result at any time after the results are out"
        android:textAppearance="?android:attr/textAppearanceLarge" />

</LinearLayout>

原始 fragment 是Original 但输出是 output 剩余部分缺失 提前致谢

最佳答案

请尝试一次。保持 Activity_main.xml 不变。如果是fragment_about.xml,则将 Root View 作为ScrollView,然后在下面添加一个 View ,即

                <ScrollView
                        android:id="@+id/scroll"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                          android:fitsSystemWindows="true"    >


                   <LinearLayout 
           android:layout_width="match_parent"
                     android:layout_height="match_parent"
            android:orientation="vertical"
            android:padding="10dp">

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="About Us"
                android:textColor="#F44336"
                android:layout_gravity="center"
                android:textAppearance="?android:attr/textAppearanceLarge" 
                android:textSize="30dp"/>

            <TextView
                android:id="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                 android:textColor="#2196F3"
                android:text="         Our vision is to interrelate the old and present students of college with each other and to develop a constant interaction among them.This also serves as a good opportunity to get the required career guidance to reach their future endeavours."
                android:textAppearance="?android:attr/textAppearanceLarge" />

            <View
                android:id="@+id/view1"
                android:layout_width="wrap_content"
                android:layout_height="9dp"
                />

            <TextView
                android:id="@+id/textView3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#2196F3"
                android:text="        We provide e-library to our students which compraises many number of e-books, projects and all fundamentals of electronics"
                android:textAppearance="?android:attr/textAppearanceLarge" />


            <View
                android:id="@+id/view2"
                android:layout_width="wrap_content"
                android:layout_height="9dp"
                />

            <TextView
                android:id="@+id/textView4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                 android:textColor="#2196F3"
                android:text="        We automized our students internal/external marks system so, every student can log on to his account and get his/her result at any time after the results are out"
                android:textAppearance="?android:attr/textAppearanceLarge" />
    <View
                android:layout_width="match_parent"
                android:layout_height="25dp"/>
 </LinearLayout>
                    </ScrollView>

Hope it will help.

关于java - android fragment 中的textview中不显示全文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36980397/

相关文章:

java - 多个 $CATALINA_BASES 上的 Tomcat 管理器/管理应用程序

android - 在 Chrome 操作系统中部署 APK。有可能的?

java - java中的客户端Web服务——代理认证

java - 在 pde 中隐藏选项卡

java - Jmeter 插件管理器

java - 将用户已输入的数据插入mysql(java)

Java 版本?它如何提供已安装的 Java 版本详细信息

android - ICS 上的位图以错误的像素格式加载

android - 无法对非静态方法 getPackageManager() 进行静态引用

java - Java Eclipse SDK 入门