本文整理匯總了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);
}