Search in sources :

Example 1 with StaticOverScrollDecorAdapter

use of me.everything.android.ui.overscroll.adapters.StaticOverScrollDecorAdapter in project Tangram-Android by alibaba.

the class LinearScrollView method init.

private void init() {
    setGravity(Gravity.CENTER_HORIZONTAL);
    setOrientation(VERTICAL);
    inflate(getContext(), R.layout.tangram_linearscrollview, this);
    setClickable(true);
    recyclerView = (RecyclerView) findViewById(R.id.tangram_linearscrollview_container);
    indicator = findViewById(R.id.tangram_linearscrollview_indicator);
    indicatorContainer = findViewById(R.id.tangram_linearscrollview_indicator_container);
    LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
    layoutManager.setOrientation(HORIZONTAL);
    recyclerView.setLayoutManager(layoutManager);
    totalDistanceOfIndicator = Style.dp2px(34);
    touchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop();
    overScrollDecorator = new HorizontalOverScrollBounceEffectDecoratorExt(new StaticOverScrollDecorAdapter(this));
}
Also used : HorizontalOverScrollBounceEffectDecoratorExt(com.tmall.wireless.tangram.ext.HorizontalOverScrollBounceEffectDecoratorExt) StaticOverScrollDecorAdapter(me.everything.android.ui.overscroll.adapters.StaticOverScrollDecorAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 HorizontalOverScrollBounceEffectDecoratorExt (com.tmall.wireless.tangram.ext.HorizontalOverScrollBounceEffectDecoratorExt)1 StaticOverScrollDecorAdapter (me.everything.android.ui.overscroll.adapters.StaticOverScrollDecorAdapter)1