本文整理汇总了Java中com.handmark.pulltorefresh.library.ILoadingLayout类的典型用法代码示例。如果您正苦于以下问题:Java ILoadingLayout类的具体用法?Java ILoadingLayout怎么用?Java ILoadingLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ILoadingLayout类属于com.handmark.pulltorefresh.library包,在下文中一共展示了ILoadingLayout类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initRefreshListView
import com.handmark.pulltorefresh.library.ILoadingLayout; //导入依赖的package包/类
private void initRefreshListView() {
ILoadingLayout layout = mRefreshListView.getLoadingLayoutProxy();
layout.setPullLabel(getString(R.string.pull_torefresh));
layout.setReleaseLabel(getString(R.string.release_to_refresh));
layout.setRefreshingLabel(getString(R.string.refreshing_tips));
}
开发者ID:Android-Jungle,项目名称:Android-SlideSupport-ListLayouts,代码行数:7,代码来源:WithPullToRefreshLibrarySampleActivity.java
示例2: onCreate
import com.handmark.pulltorefresh.library.ILoadingLayout; //导入依赖的package包/类
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ptr_list);
mPullRefreshListView = (PullToRefreshListView) findViewById(R.id.pull_refresh_list);
// Set a listener to be invoked when the list should be refreshed.
mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
// ひっぱりきって指をはなしたとき?
@Override
public void onRefresh(PullToRefreshBase<ListView> refreshView) {
String label = DateUtils.formatDateTime(getApplicationContext(),
System.currentTimeMillis(),
DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE
| DateUtils.FORMAT_ABBREV_ALL);
// Update the LastUpdatedLabel
refreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label);
// Do work to refresh the list here.
new GetDataTask().execute();
}
});
/**
* customize
*/
mPullRefreshListView.setMode(Mode.BOTH);
// LoadingLayoutに関してカスタマイズ(主に文言)
ILoadingLayout iLoadingLayout = mPullRefreshListView.getLoadingLayoutProxy(true, true);
iLoadingLayout.setLastUpdatedLabel("");
iLoadingLayout.setReleaseLabel("離してください、更新します");
iLoadingLayout.setPullLabel("さらに下に引いて下さい");
iLoadingLayout.setRefreshingLabel("更新中です");
// Add an end-of-list listener
mPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
@Override
public void onLastItemVisible() {
Toast.makeText(PullToRefreshCustomActivity.this, "End of List!", Toast.LENGTH_SHORT)
.show();
}
});
/**
* リスト表示
*/
mIemsList = new LinkedList<String>();
mIemsList.addAll(Arrays.asList(INITIAL_LIST));
mAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mIemsList);
ListView actualListView = mPullRefreshListView.getRefreshableView();
actualListView.setAdapter(mAdapter);
}