use of com.klinker.android.twitter.views.swipe_refresh_layout.FullScreenSwipeRefreshLayout in project Talon-for-Twitter by klinker24.
the class UserListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, null);
settings = AppSettings.getInstance(context);
View layout = LayoutInflater.from(context).inflate(R.layout.ptr_list_layout, container, false);
changeNoRetweetersText(layout);
mPullToRefreshLayout = (FullScreenSwipeRefreshLayout) layout.findViewById(R.id.swipe_refresh_layout);
mPullToRefreshLayout.setOnRefreshListener(new FullScreenSwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
onRefreshStarted();
}
});
if (settings.addonTheme) {
mPullToRefreshLayout.setColorScheme(settings.accentInt, SwipeProgressBar.COLOR2, settings.accentInt, SwipeProgressBar.COLOR3);
} else {
if (settings.theme != AppSettings.THEME_LIGHT) {
mPullToRefreshLayout.setColorScheme(context.getResources().getColor(R.color.app_color), SwipeProgressBar.COLOR2, context.getResources().getColor(R.color.app_color), SwipeProgressBar.COLOR3);
} else {
mPullToRefreshLayout.setColorScheme(context.getResources().getColor(R.color.app_color), getResources().getColor(R.color.light_ptr_1), context.getResources().getColor(R.color.app_color), getResources().getColor(R.color.light_ptr_2));
}
}
spinner = (LinearLayout) layout.findViewById(R.id.list_progress);
noContent = (LinearLayout) layout.findViewById(R.id.no_content);
listView = (AsyncListView) layout.findViewById(R.id.listView);
BitmapLruCache cache = App.getInstance(context).getBitmapCache();
ArrayListLoader loader = new ArrayListLoader(cache, context);
ItemManager.Builder builder = new ItemManager.Builder(loader);
builder.setPreloadItemsEnabled(true).setPreloadItemsCount(50);
builder.setThreadPoolSize(4);
listView.setItemManager(builder.build());
tweetId = getArguments().getLong("id", 0);
onRefreshStarted();
return layout;
}
Aggregations