本文整理汇总了Java中com.github.ksoichiro.android.observablescrollview.Scrollable.setScrollViewCallbacks方法的典型用法代码示例。如果您正苦于以下问题:Java Scrollable.setScrollViewCallbacks方法的具体用法?Java Scrollable.setScrollViewCallbacks怎么用?Java Scrollable.setScrollViewCallbacks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.ksoichiro.android.observablescrollview.Scrollable
的用法示例。
在下文中一共展示了Scrollable.setScrollViewCallbacks方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.github.ksoichiro.android.observablescrollview.Scrollable; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_touchinterception_recyclerview);
((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName());
mScrollable = (Scrollable) findViewById(R.id.scrollable);
mScrollable.setScrollViewCallbacks(this);
ObservableRecyclerView recyclerView = (ObservableRecyclerView) mScrollable;
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setHasFixedSize(true);
recyclerView.setScrollViewCallbacks(this);
UiTestUtils.setDummyData(this, recyclerView);
mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height);
mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height);
mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper);
mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener);
}
开发者ID:LeMinhAn,项目名称:AndroidObservableScrollView-master,代码行数:20,代码来源:TouchInterceptionRecyclerViewActivity.java
示例2: SimpleObservableScrollHandler
import com.github.ksoichiro.android.observablescrollview.Scrollable; //导入方法依赖的package包/类
/**
* @param shouldStayViews 不隨layout滑動的Views
* @param scrollView 可滑動的ScrollView
* @param touchInterceptionFrameLayout
*/
public SimpleObservableScrollHandler(View[] shouldStayViews, View[] hasClickEventViews, Scrollable scrollView, TouchInterceptionFrameLayout touchInterceptionFrameLayout) {
ViewConfiguration vc = ViewConfiguration.get(touchInterceptionFrameLayout.getContext());
mHandler = new Handler();
mSlop = vc.getScaledTouchSlop();
this.shouldStayViews = shouldStayViews;
this.hasClickEventViews = hasClickEventViews;
this.scrollView = scrollView;
this.touchInterceptionFrameLayout = touchInterceptionFrameLayout;
touchInterceptionFrameLayout.setScrollInterceptionListener(interceptionListener);
scrollView.setScrollViewCallbacks(this);
scrollView.setTouchInterceptionViewGroup(touchInterceptionFrameLayout);
getHeights();
}
示例3: onCreate
import com.github.ksoichiro.android.observablescrollview.Scrollable; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_touchinterception_listview);
((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName());
mScrollable = (Scrollable) findViewById(R.id.scrollable);
mScrollable.setScrollViewCallbacks(this);
UiTestUtils.setDummyData(this, (ObservableListView) mScrollable);
mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height);
mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height);
mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper);
mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener);
}
开发者ID:LeMinhAn,项目名称:AndroidObservableScrollView-master,代码行数:16,代码来源:TouchInterceptionListViewActivity.java
示例4: onCreate
import com.github.ksoichiro.android.observablescrollview.Scrollable; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_touchinterception_scrollview);
((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName());
mScrollable = (Scrollable) findViewById(R.id.scrollable);
mScrollable.setScrollViewCallbacks(this);
mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height);
mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height);
mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper);
mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener);
}
开发者ID:LeMinhAn,项目名称:AndroidObservableScrollView-master,代码行数:15,代码来源:TouchInterceptionScrollViewActivity.java
示例5: onCreate
import com.github.ksoichiro.android.observablescrollview.Scrollable; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_touchinterception_gridview);
((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName());
mScrollable = (Scrollable) findViewById(R.id.scrollable);
mScrollable.setScrollViewCallbacks(this);
UiTestUtils.setDummyData(this, (ObservableGridView) mScrollable);
mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height);
mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height);
mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper);
mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener);
}
开发者ID:LeMinhAn,项目名称:AndroidObservableScrollView-master,代码行数:16,代码来源:TouchInterceptionGridViewActivity.java
示例6: onCreate
import com.github.ksoichiro.android.observablescrollview.Scrollable; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_touchinterception_webview);
((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName());
mScrollable = (Scrollable) findViewById(R.id.scrollable);
mScrollable.setScrollViewCallbacks(this);
((WebView) mScrollable).loadUrl("file:///android_asset/lipsum.html");
mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height);
mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height);
mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper);
mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener);
}
开发者ID:LeMinhAn,项目名称:AndroidObservableScrollView-master,代码行数:16,代码来源:TouchInterceptionWebViewActivity.java