本文整理汇总了Java中com.yalantis.phoenix.PullToRefreshView类的典型用法代码示例。如果您正苦于以下问题:Java PullToRefreshView类的具体用法?Java PullToRefreshView怎么用?Java PullToRefreshView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PullToRefreshView类属于com.yalantis.phoenix包,在下文中一共展示了PullToRefreshView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreateView
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_list_view, container, false);
ListView listView = (ListView) rootView.findViewById(R.id.list_view);
listView.setAdapter(new SampleAdapter(getActivity(), R.layout.list_item, mSampleList));
mPullToRefreshView = (PullToRefreshView) rootView.findViewById(R.id.pull_to_refresh);
mPullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
mPullToRefreshView.postDelayed(new Runnable() {
@Override
public void run() {
mPullToRefreshView.setRefreshing(false);
}
}, REFRESH_DELAY);
}
});
return rootView;
}
开发者ID:Yalantis,项目名称:Phoenix,代码行数:23,代码来源:ListViewFragment.java
示例2: onCreateView
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_recycler_view, container, false);
RecyclerView recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setAdapter(new SampleAdapter());
mPullToRefreshView = (PullToRefreshView) rootView.findViewById(R.id.pull_to_refresh);
mPullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
mPullToRefreshView.postDelayed(new Runnable() {
@Override
public void run() {
mPullToRefreshView.setRefreshing(false);
}
}, REFRESH_DELAY);
}
});
return rootView;
}
开发者ID:Yalantis,项目名称:Phoenix,代码行数:25,代码来源:RecyclerViewFragment.java
示例3: initView
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Override
public void initView(View view) {
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mRecyclerView.setAdapter(adapter);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(getActivity()).build());
mPullToRefreshView = (PullToRefreshView)view.findViewById(R.id.pull_to_refresh_b);
mPullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
getData();
refresh_flag = 1;
}
});
getData();
}
开发者ID:sczyh30,项目名称:yuedong-app,代码行数:17,代码来源:MessageFragment.java
示例4: initView
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Override
public void initView(View view) {
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mRecyclerView.setAdapter(adapter);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(getActivity()).build());
mPullToRefreshView = (PullToRefreshView)view.findViewById(R.id.pull_to_refresh_b);
mPullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
getData();
}
});
tlUserProfileTabs.addTab(tlUserProfileTabs.newTab().setText("动态"));
tlUserProfileTabs.addTab(tlUserProfileTabs.newTab().setText("信息"));
getData();
}
开发者ID:sczyh30,项目名称:yuedong-app,代码行数:18,代码来源:MessageTempFragment.java
示例5: setPullToRefreshView
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
private void setPullToRefreshView(final PullToRefreshView pullToRefreshView) {
pullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
appAdapter.clear();
appSystemAdapter.clear();
appFavoriteAdapter.clear();
recyclerView.setAdapter(null);
new getInstalledApps().execute();
pullToRefreshView.postDelayed(new Runnable() {
@Override
public void run() {
pullToRefreshView.setRefreshing(false);
}
}, 2000);
}
});
}
开发者ID:javiersantos,项目名称:MLManager,代码行数:20,代码来源:MainActivity.java
示例6: onCreateView
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.tasks_layout, container, false);
mUnbinder = ButterKnife.bind(this, rootView);
// to reuse this fragment we check the argument and inflate corresponding view with an adapter
if (getArguments().getInt(ARG_SECTION_NUMBER) == PagerAdapter.LISTVIEW_FRAGMENT) {
initListViewAdapter();
} else {
initRecyclerAdapter();
}
mListEmpty.setVisibility(View.INVISIBLE);
mSwipeRefreshLayout.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
if (Utilities.isOnline(getContext())) {
mSwipeRefreshLayout.setRefreshing(false);
// call PagerActivity to refetch data
((PagerActivity) getActivity()).fetchData();
} else {
mSwipeRefreshLayout.setRefreshing(false);
}
}
});
return rootView;
}
开发者ID:dmytroKarataiev,项目名称:YalantisInternship,代码行数:31,代码来源:TasksFragment.java
示例7: SunRefreshView
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
public SunRefreshView(Context context, final PullToRefreshView parent) {
super(context, parent);
mParent = parent;
mMatrix = new Matrix();
setupAnimations();
parent.post(new Runnable() {
@Override
public void run() {
initiateDimens(parent.getWidth());
}
});
}
开发者ID:dmytroKarataiev,项目名称:YalantisInternship,代码行数:14,代码来源:SunRefreshView.java
示例8: onCreate
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_disable_app);
// mContext = DisableAppActivity.this;
Toast.makeText(this, R.string.disableapptips,Toast.LENGTH_LONG).show();
new MyTask().execute();
mPullToRefreshView = (PullToRefreshView) findViewById(R.id.pull_to_refresh);
mPullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
mPullToRefreshView.postDelayed(new Runnable() {
@Override
public void run() {
initData();
showData();
adapter.notifyDataSetChanged();
mPullToRefreshView.setRefreshing(false);
}
}, 2000);
}
});
}
开发者ID:coderstory,项目名称:Mi-Ki,代码行数:30,代码来源:DisableAppActivity.java
示例9: createSuccessPage
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Override
public View createSuccessPage() {
View view = View.inflate(getActivity(), R.layout.funny_fragment_layout, null);
mListView = (ListView) view.findViewById(R.id.list_view);
// mListView.setOnLoadMoreListener(this);
mListView.setOnItemClickListener(this);
mListView.setOnScrollListener(this);
mListView.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
mPullToRefreshView = (PullToRefreshView) view.findViewById(R.id.pull_to_refresh);
mPullToRefreshView.setOnRefreshListener(this);
return view;
}
开发者ID:PartingSoul,项目名称:news,代码行数:13,代码来源:JokeFragment.java
示例10: createSuccessPage
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Override
public View createSuccessPage() {
View view = View.inflate(getActivity(), R.layout.weichat_fragment_layout, null);
mListView = (LoadMoreItemListView) view.findViewById(R.id.list_view);
mPullToRefreshView = (PullToRefreshView) view.findViewById(R.id.pull_to_refresh);
mPullToRefreshView.setOnRefreshListener(this);
mListView.setOnItemClickListener(this);
LogUtils.d(CommonInfo.TAG, "--->111" + "createSuccess()");
return view;
}
开发者ID:PartingSoul,项目名称:news,代码行数:11,代码来源:WeiChatFragment.java
示例11: createSuccessPage
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
/**
* 创建显示数据的界面
*
* @return View
*/
@Override
public View createSuccessPage() {
View view = null;
if (getActivity() != null) {
view = View.inflate(getActivity(), R.layout.news_detail_fragment, null);
mListView = (ListView) view.findViewById(R.id.news_lists);
mPullToRefreshView = (PullToRefreshView) view.findViewById(R.id.pull_to_refresh);
mListView.setOnItemClickListener(this);
mPullToRefreshView.setOnRefreshListener(this);
}
Log.d(TAG, "+DEBUG createSuccessPage -->fragment " + mNewTypeParam);
return view;
}
开发者ID:PartingSoul,项目名称:news,代码行数:19,代码来源:NewsDetailFragment.java
示例12: onCreate
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
this.appPreferences = MLManagerApplication.getAppPreferences();
this.activity = this;
this.context = this;
setInitialConfiguration();
checkAndAddPermissions(activity);
setAppDir();
recyclerView = (RecyclerView) findViewById(R.id.appList);
pullToRefreshView = (PullToRefreshView) findViewById(R.id.pull_to_refresh);
fastScroller = (VerticalRecyclerViewFastScroller) findViewById(R.id.fast_scroller);
progressWheel = (ProgressWheel) findViewById(R.id.progress);
noResults = (LinearLayout) findViewById(R.id.noResults);
pullToRefreshView.setEnabled(false);
recyclerView.setHasFixedSize(true);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
recyclerView.setLayoutManager(linearLayoutManager);
drawer = UtilsUI.setNavigationDrawer((Activity) context, context, toolbar, appAdapter, appSystemAdapter, appFavoriteAdapter, appHiddenAdapter, recyclerView);
progressWheel.setBarColor(appPreferences.getPrimaryColorPref());
progressWheel.setVisibility(View.VISIBLE);
new getInstalledApps().execute();
}
开发者ID:javiersantos,项目名称:MLManager,代码行数:33,代码来源:MainActivity.java
示例13: BaseRefreshView
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
public BaseRefreshView(Context context, PullToRefreshView layout) {
mRefreshLayout = layout;
}
开发者ID:dmytroKarataiev,项目名称:YalantisInternship,代码行数:4,代码来源:BaseRefreshView.java
示例14: getRefreshLayout
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
public PullToRefreshView getRefreshLayout() {
return mRefreshLayout;
}
开发者ID:dmytroKarataiev,项目名称:YalantisInternship,代码行数:4,代码来源:BaseRefreshView.java
示例15: onCreateView
import com.yalantis.phoenix.PullToRefreshView; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
setLayout();
needCache = setCache();
getArgs();
parentView = inflater.inflate(mLayout, container, false);
withHeaderTab = setHeaderTab();
withRefreshView = setRefreshView();
progressBar = (ProgressBar) parentView.findViewById(R.id.progressbar);
recyclerView = (RecyclerView) parentView.findViewById(R.id.recyclerView);
placeHolder = (View) parentView.findViewById(R.id.placeholder);
onCreateCache();
adapter = bindAdapter();
mLayoutManager = new LinearLayoutManager(LeisureApplication.AppContext);
recyclerView.setAdapter(adapter);
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setLayoutManager(mLayoutManager);
refreshView = (PullToRefreshView) parentView.findViewById(R.id.pull_to_refresh);
View view = getActivity().findViewById(R.id.tab_layout);
if(withHeaderTab){
view.setVisibility(View.VISIBLE);
}else{
if(view !=null) {
view.setVisibility(View.GONE);
}
}
if(withRefreshView){
refreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
loadFromNet();
}
});
placeHolder.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
placeHolder.setVisibility(View.GONE);
loadFromNet();
}
});
}else{
refreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
refreshView.setRefreshing(false);
}
});
}
HttpUtil.readNetworkState();
new Thread(new Runnable() {
@Override
public void run() {
loadFromCache();
}
}).start();
return parentView;
}
开发者ID:MummyDing,项目名称:Leisure,代码行数:70,代码来源:BaseListFragment.java
注:本文中的com.yalantis.phoenix.PullToRefreshView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论