I have an app that I am building using Mono Droid. I am trying to make an endless scrollview so that my users can scroll to the bottom and have more items loaded. Here is the class that I am using
public class EndlessScroll : ScrollView
{
public EndlessScroll (Context context) : base (context)
{
}
public EndlessScroll(Context context, IAttributeSet attrs) : base(context, attrs)
{
}
public EndlessScroll(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle)
{
}
public interface OnScrollViewListener
{
void onScrollChanged(EndlessScroll v, int l, int t, int oldl, int oldt);
}
public OnScrollViewListener mOnScrollViewListener;
public void setOnScrollViewListener(OnScrollViewListener l) {
this.mOnScrollViewListener = l;
}
protected void onScrollChanged(int l, int t, int oldl, int oldt)
{
mOnScrollViewListener.onScrollChanged(this, l, t, oldl, oldt);
base.OnScrollChanged(l, t, oldl, oldt);
}
}
Here is my xml file. I converted all this code from Java so there may be something that I am doing wrong.
<com.BirdsIView.BirdsIView.EndlessScroll
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="90"
android:id="@+id/scrollView">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/viewDebug" />
</com.BirdsIView.BirdsIView.EndlessScroll>
No comments:
Post a Comment