Java Code Examples for uk.co.senab.actionbarpulltorefresh.library.PullToRefreshLayout#findViewById()
The following examples show how to use
uk.co.senab.actionbarpulltorefresh.library.PullToRefreshLayout#findViewById() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NewestNodeFragment.java From v2ex-daily-android with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mPullToRefreshLayout = (PullToRefreshLayout) inflater.inflate(R.layout.fragment_node, container, false); mListView = (ListView) mPullToRefreshLayout.findViewById(R.id.list_fragment_node); mListView.setEmptyView(mPullToRefreshLayout.findViewById(R.id.progress_fragment_node)); mListView.setOnItemClickListener(this); mAllNodesDataHelper = new AllNodesDataHelper(getActivity()); mNewestNodeDataHelper = new NewestNodeDataHelper(getActivity()); mNewestNodeAdapter = new NewestNodeAdapter(getActivity(), this); mListView.setAdapter(mNewestNodeAdapter); getLoaderManager().initLoader(0, null, this); return mPullToRefreshLayout; }
Example 2
Source File: UserFragment.java From v2ex-daily-android with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mPullToRefreshLayout = (PullToRefreshLayout) inflater.inflate(R.layout.fragment_user, container, false); mListView = (ListView) mPullToRefreshLayout.findViewById(R.id.list_fragment_user); mHeader = mPullToRefreshLayout.findViewById(R.id.header_fragment_user); mHeaderLogo = (ImageView) mPullToRefreshLayout.findViewById(R.id.header_logo_fragment_user); mName = (TextView) mPullToRefreshLayout.findViewById(R.id.txt_fragment_user_name); mDescription = (TextView) mPullToRefreshLayout.findViewById(R.id.txt_fragment_user_description); mPlaceHolderView = getActivity().getLayoutInflater().inflate(R.layout.view_header_placeholder, mListView, false); mListView.addHeaderView(mPlaceHolderView, null, false); mListView.setOnItemClickListener(this); return mPullToRefreshLayout; }
Example 3
Source File: TopicFragment.java From v2ex-daily-android with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mPullToRefreshLayout = (PullToRefreshLayout) inflater.inflate(R.layout.fragment_topic, container, false); mListView = (ListView) mPullToRefreshLayout.findViewById(R.id.list_fragment_topic); mListView.setEmptyView(mPullToRefreshLayout.findViewById(R.id.progress_fragment_topic)); return mPullToRefreshLayout; }
Example 4
Source File: NotificationFragment.java From v2ex-daily-android with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mPullToRefreshLayout = (PullToRefreshLayout) inflater.inflate(R.layout.fragment_notification, container, false); mListView = (ListView) mPullToRefreshLayout.findViewById(R.id.list_fragment_notification); mListView.setEmptyView(mPullToRefreshLayout.findViewById(R.id.txt_fragment_notification_empty)); mListView.setOnItemClickListener(this); return mPullToRefreshLayout; }
Example 5
Source File: NodeFragment.java From v2ex-daily-android with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mPullToRefreshLayout = (PullToRefreshLayout) inflater.inflate(R.layout.fragment_node, container, false); mListView = (ListView) mPullToRefreshLayout.findViewById(R.id.list_fragment_node); mListView.setEmptyView(mPullToRefreshLayout.findViewById(R.id.progress_fragment_node)); mListView.setOnItemClickListener(this); return mPullToRefreshLayout; }
Example 6
Source File: FragmentFeeds.java From rss with GNU General Public License v3.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); FeedsActivity activity = (FeedsActivity) getActivity(); PullToRefreshLayout layout = (PullToRefreshLayout) inflater.inflate(R.layout.viewpager, container, false); // Find and configure the ViewPager. s_viewPager = (ViewPager) layout.findViewById(R.id.viewpager); s_viewPager.setOffscreenPageLimit(128); s_viewPager.setOnPageChangeListener(new OnPageChangeListener()); // Create the Options object for the ActionBarPullToRefresh SetupWizard. Options.Builder optionsBuilder = Options.create(); optionsBuilder.scrollDistance(PULL_DISTANCE); Options options = optionsBuilder.build(); // Create the ActionBarPullToRefresh object using its SetupWizard. ActionBarPullToRefresh.SetupWizard setup = ActionBarPullToRefresh.from(activity); setup.allChildrenArePullable(); setup.options(options); setup.useViewDelegate(ViewPager.class, new ViewPagerDelegate()); setup.listener(new RefreshListener(activity)); setup.setup(layout); return layout; }