Changed TopicDetailFragment to pull UP to refresh
Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<manifest package="org.RickBarrette.osj.forum"
|
<manifest package="org.RickBarrette.osj.forum"
|
||||||
android:versionCode="8134"
|
android:versionCode="9100"
|
||||||
android:versionName="1.0" xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
|
android:versionName="1.0" xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
|
||||||
|
import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
|
||||||
import com.handmark.pulltorefresh.library.PullToRefreshBase.OnRefreshListener;
|
import com.handmark.pulltorefresh.library.PullToRefreshBase.OnRefreshListener;
|
||||||
import com.handmark.pulltorefresh.library.PullToRefreshListView;
|
import com.handmark.pulltorefresh.library.PullToRefreshListView;
|
||||||
|
|
||||||
@@ -85,4 +86,14 @@ public abstract class PullToRefreshListFragment extends ListFragment implements
|
|||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the mode of the Pull To Refresh ListView controlled by this fragment
|
||||||
|
*
|
||||||
|
* @param mode
|
||||||
|
* @author ricky barrette
|
||||||
|
*/
|
||||||
|
public void setMode(final Mode mode) {
|
||||||
|
mPullToRefreshListView.setMode(mode);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -41,6 +41,7 @@ import com.commonsware.cwac.thumbnail.ThumbnailBus;
|
|||||||
import com.commonsware.cwac.thumbnail.ThumbnailMessage;
|
import com.commonsware.cwac.thumbnail.ThumbnailMessage;
|
||||||
import com.handmark.pulltorefresh.extras.listfragment.PullToRefreshListFragment;
|
import com.handmark.pulltorefresh.extras.listfragment.PullToRefreshListFragment;
|
||||||
import com.handmark.pulltorefresh.library.PullToRefreshBase;
|
import com.handmark.pulltorefresh.library.PullToRefreshBase;
|
||||||
|
import com.handmark.pulltorefresh.library.PullToRefreshBase.Mode;
|
||||||
|
|
||||||
public class TopicDetailFragment extends PullToRefreshListFragment implements DatabaseListener {
|
public class TopicDetailFragment extends PullToRefreshListFragment implements DatabaseListener {
|
||||||
|
|
||||||
@@ -59,6 +60,7 @@ public class TopicDetailFragment extends PullToRefreshListFragment implements Da
|
|||||||
@Override
|
@Override
|
||||||
public void onActivityCreated(final Bundle savedInstanceState) {
|
public void onActivityCreated(final Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
setMode(Mode.PULL_UP_TO_REFRESH);
|
||||||
mDb = new ForumDatabase(getActivity(), this);
|
mDb = new ForumDatabase(getActivity(), this);
|
||||||
|
|
||||||
refreshList();
|
refreshList();
|
||||||
|
|||||||
Reference in New Issue
Block a user