本文整理汇总了Java中com.nostra13.universalimageloader.core.assist.PauseOnScrollListener类的典型用法代码示例。如果您正苦于以下问题:Java PauseOnScrollListener类的具体用法?Java PauseOnScrollListener怎么用?Java PauseOnScrollListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PauseOnScrollListener类属于com.nostra13.universalimageloader.core.assist包,在下文中一共展示了PauseOnScrollListener类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreateView
import com.nostra13.universalimageloader.core.assist.PauseOnScrollListener; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.channel_list, container, false);
OnChildClickListener channelItemListener = new OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
JSONObject channelItem = (JSONObject) adapter.getChild(groupPosition, childPosition);
channelSelected(channelItem);
return true;
}
};
ExpandableListView channelsView = (ExpandableListView) view.findViewById(R.id.channelListView);
channelsView.setEmptyView(view.findViewById(R.id.channelListProgress));
channelsView.setAdapter(adapter);
channelsView.setOnChildClickListener(channelItemListener);
PauseOnScrollListener listener = new PauseOnScrollListener(ImageLoader.getInstance(), true, true);
channelsView.setOnScrollListener(listener);
expandAll(view);
return view;
}
开发者ID:buddycloud,项目名称:buddycloud-android,代码行数:27,代码来源:GenericChannelsFragment.java
示例2: onCreateView
import com.nostra13.universalimageloader.core.assist.PauseOnScrollListener; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View layout = super.onCreateView(inflater, container, savedInstanceState);
// Get original ListView and Frame
ListView originalLv = (ListView) layout.findViewById(android.R.id.list);
ViewGroup frame = (ViewGroup) originalLv.getParent();
// Remove old ListView
frame.removeView(originalLv);
// Create new PullToRefreshListView and add to Frame
mPullRefreshListView = new PullToRefreshListView(getActivity());
frame.addView(mPullRefreshListView, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
@Override
public void onRefresh(PullToRefreshBase<ListView> refreshView) {
fetchPosts(null);
}
});
boolean pauseOnScroll = false;
boolean pauseOnFling = true;
PauseOnScrollListener listener = new PauseOnScrollListener(ImageLoader.getInstance(), pauseOnScroll,
pauseOnFling);
mPullRefreshListView.setOnScrollListener(listener);
return layout;
}
开发者ID:kmonaghan,项目名称:Broadsheet.ie-Android,代码行数:32,代码来源:PostListFragment.java
示例3: onCreate
import com.nostra13.universalimageloader.core.assist.PauseOnScrollListener; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_comment_list);
if (savedInstanceState != null) {
Log.d(TAG, "saved instance");
mPost = (Post) savedInstanceState.getSerializable(CURRENT_POST);
} else {
Bundle extras = getIntent().getExtras();
if (extras != null) {
BroadsheetApplication app = (BroadsheetApplication) getApplication();
if (app.getPosts().size() > 0) {
mPost = app.getPosts().get(extras.getInt("item_id"));
}
}
}
ListView list = (ListView) findViewById(android.R.id.list);
comments = new CommentAdapter(this, R.layout.comment_list_item, mPost.getSortedComments());
comments.setReplyCommentListener(this);
list.setAdapter(comments);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
boolean pauseOnScroll = false;
boolean pauseOnFling = true;
PauseOnScrollListener listener = new PauseOnScrollListener(ImageLoader.getInstance(), pauseOnScroll,
pauseOnFling);
list.setOnScrollListener(listener);
setTitle(getResources().getString(R.string.comment));
}
开发者ID:kmonaghan,项目名称:Broadsheet.ie-Android,代码行数:38,代码来源:CommentListActivity.java
示例4: init
import com.nostra13.universalimageloader.core.assist.PauseOnScrollListener; //导入依赖的package包/类
private void init() {
handler = new Handler();
gridGallery = (GridView) findViewById(R.id.gridGallery);
gridGallery.setFastScrollEnabled(true);
adapter = new GalleryAdapter(getApplicationContext(), imageLoader);
PauseOnScrollListener listener = new PauseOnScrollListener(imageLoader,
true, true);
gridGallery.setOnScrollListener(listener);
if (action.equalsIgnoreCase(Action.ACTION_MULTIPLE_PICK)) {
findViewById(R.id.llBottomContainer).setVisibility(View.VISIBLE);
gridGallery.setOnItemClickListener(mItemMulClickListener);
adapter.setMultiplePick(true);
} else if (action.equalsIgnoreCase(Action.ACTION_PICK)) {
findViewById(R.id.llBottomContainer).setVisibility(View.GONE);
gridGallery.setOnItemClickListener(mItemSingleClickListener);
adapter.setMultiplePick(false);
}
gridGallery.setAdapter(adapter);
imgNoMedia = (ImageView) findViewById(R.id.imgNoMedia);
btnGalleryOk = (Button) findViewById(R.id.btnGalleryOk);
btnGalleryOk.setOnClickListener(mOkClickListener);
new Thread() {
@Override
public void run() {
Looper.prepare();
handler.post(new Runnable() {
@Override
public void run() {
adapter.addAll(getGalleryPhotos());
checkImageStatus();
}
});
Looper.loop();
}
;
}.start();
}
开发者ID:teamOSC,项目名称:Studddinv2_android,代码行数:52,代码来源:CustomGalleryActivity.java
示例5: init
import com.nostra13.universalimageloader.core.assist.PauseOnScrollListener; //导入依赖的package包/类
private void init() {
handler = new Handler();
gridGallery = (GridView) findViewById(R.id.gridGallery);
gridGallery.setFastScrollEnabled(true);
adapter = new CustomGalleryAdapter(getApplicationContext(), imageLoader);
PauseOnScrollListener listener = new PauseOnScrollListener(imageLoader,
true, true);
gridGallery.setOnScrollListener(listener);
if (action.equalsIgnoreCase(Action.ACTION_MULTIPLE_PICK)) {
findViewById(R.id.llBottomContainer).setVisibility(View.VISIBLE);
gridGallery.setOnItemClickListener(mItemMulClickListener);
adapter.setMultiplePick(true);
} else if (action.equalsIgnoreCase(Action.ACTION_PICK)) {
findViewById(R.id.llBottomContainer).setVisibility(View.GONE);
gridGallery.setOnItemClickListener(mItemSingleClickListener);
adapter.setMultiplePick(false);
}
gridGallery.setAdapter(adapter);
imgNoMedia = (ImageView) findViewById(R.id.imgNoMedia);
btnGalleryOk = (Button) findViewById(R.id.btnGalleryOk);
btnGalleryOk.setOnClickListener(mOkClickListener);
new Thread() {
@Override
public void run() {
Looper.prepare();
handler.post(new Runnable() {
@Override
public void run() {
adapter.addAll(getGalleryPhotos());
checkImageStatus();
}
});
Looper.loop();
};
}.start();
}
开发者ID:Cutta,项目名称:MultipleImagePicker,代码行数:50,代码来源:CustomGalleryActivity.java
示例6: onViewCreated
import com.nostra13.universalimageloader.core.assist.PauseOnScrollListener; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
animeAdapter.setSupplementaryTextFactory(getSupplementaryTextFactory());
itemListView.setAdapter(animeAdapter);
itemListView.setOnItemClickListener(this);
PauseOnScrollListener listener = new PauseOnScrollListener(lazyLoader, false, true);
itemListView.setOnScrollListener(listener);
animeLoader = getLoaderManager().initLoader(0, null, this);
animeLoader.forceLoad();
}
开发者ID:riotopsys,项目名称:malforandroid2,代码行数:19,代码来源:AbstractListFragment.java
示例7: applyScrollListener
import com.nostra13.universalimageloader.core.assist.PauseOnScrollListener; //导入依赖的package包/类
private void applyScrollListener() {
listView.setOnScrollListener(new PauseOnScrollListener(imageLoader, pauseOnScroll, pauseOnFling));
}
开发者ID:jefer590,项目名称:semana-isw2013,代码行数:4,代码来源:GalleryActivity.java
注:本文中的com.nostra13.universalimageloader.core.assist.PauseOnScrollListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论