1 Replies - 1369 Views - Last Post: 20 November 2012 - 02:12 AM

#1 kiriappa  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 14-November 12

scrollbar is not working properly in the android phone

Posted 14 November 2012 - 09:49 PM

Hi,

Thoguh, scroll bar is displayed in the android app, it is not working properly. I mean, some of the data is truncated and shown in the scroll view.

Here is the code of xml file.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/page1background"
    android:paddingRight="@dimen/padding_large" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="196dp"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:paddingTop="@dimen/padding_Title_Top"
        android:text="@string/text"
        android:gravity="center_horizontal"
        android:textAppearance="?android:attr/textAppearanceMedium" />


    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="fill_parent"
        android:layout_height="25dp"
        android:layout_below="@id/textView1"
        android:layout_centerHorizontal="true" >

        <View
            android:id="@+id/view1"
            android:layout_width="fill_parent"
            android:layout_height="25dp" />
    </LinearLayout>



    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_above="@id/linearLayout2"
        android:layout_below="@id/linearLayout1"
        android:paddingTop="@dimen/padding_Title_Top"
        android:scrollbarAlwaysDrawVerticalTrack="true" >



        <TextView
            android:id="@+id/textView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginBottom="23dp"
            android:gravity="right"
            android:padding="@dimen/padding_maintextview"
            android:text="@string/text"
            android:textAppearance="?android:attr/textAppearanceMedium" />

    </ScrollView>

    <LinearLayout
        android:id="@+id/linearLayout2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true" >

        <View
            android:id="@+id/view2"
            android:layout_width="fill_parent"
            android:layout_height="100dp" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/linearLayout3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true" >

        <ImageButton
            android:id="@+id/back_arrow"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_marginBottom="30dp"
            android:layout_marginRight="45dp"
            android:layout_weight=".5"
            android:background="@drawable/backbut"
            android:contentDescription="@string/Description"
            android:onclick="onclickBtn"
            android:src="@drawable/backarrowpress" />

        <ImageButton
            android:id="@+id/copyButton"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_marginLeft="45dp"
            android:layout_weight=".5"
            android:background="@drawable/copy"
            android:contentDescription="@string/Description"
            android:onclick="onclickBtn" />
    </LinearLayout>

</RelativeLayout>




If anybody can help me to find why data is truncated in the scroll view.

thanks in advance

Is This A Good Question/Topic? 0
  • +

Replies To: scrollbar is not working properly in the android phone

#2 kiriappa  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 14-November 12

Re: scrollbar is not working properly in the android phone

Posted 20 November 2012 - 02:12 AM

Surrounding text view with a liner layout in the scroll view was help me to correct this.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1