Sunday 15 January 2012

android - Scrollview scrolls to bottom of page when footer-ad is loaded -



android - Scrollview scrolls to bottom of page when footer-ad is loaded -

my app has activity displays text under scroll-view, ad-fragment @ end of scrolling. problem is, whenever open activity, page scrolled bottom advertisement loads. layout file content is:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res-auto" android:orientation="vertical" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="${packagename}.${activityclass}" android:background="@color/black" > <textview android:id="@+id/tvtitle" android:layout_width="match_parent" android:layout_height="wrap_content" android:textcolor="@color/black" android:background="@color/darkblue" android:text="--single line title here --" /> <scrollview android:id="@+id/scroller_id" android:layout_width="match_parent" android:layout_height="wrap_content" android:fillviewport="true" android:scrollbars="vertical" android:background="@color/black" > <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <textview android:id="@+id/tvstory" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" android:layout_alignparentright="true" android:layout_alignparenttop="true" android:padding="15dp" android:background="@color/black" android:textcolor="@color/white" android:text="--multi-page story here --" /> <fragment android:id="@+id/adfragment" android:name="com.mysite.readactivity$adfragment" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentbottom="true" /> </linearlayout> </scrollview> </linearlayout>

any help in regard appreciated. thanks.

android admob fragment scrollview

No comments:

Post a Comment