Akhilian Akhilian - 7 months ago 75
Java Question

not showing full text in textview in a fragment android

I developing an Android App in

Eclipse
and i'm using
framelayout
as a container to my
fragment
... and the
fragment
doesn't showing full text... half of the text is hiding...
Please help me out...!!!
Thanks in advance...

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>


original fragment is Original
but the output coming is output
the remaining part is missing
Thanks in advance

Answer

Try like this
main_activity.xml()

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


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

        </ScrollView>