Android Material Design(二)Observable Scroll View

Observable Scroll View是GitHub上的开源库,共有49个不同的效果组合,我把各个演示的Activity与一个49个item的ListView绑定,点击跳转到对应Activity查看效果。

  • ActionBarControlGridViewActivity // 1
  • ActionBarControlListViewActivity // 2
  • ActionBarControlRecyclerViewActivity // 3
  • ActionBarControlScrollViewActivity // 4
  • ActionBarControlWebViewActivity // 5
  • FillGap2ListViewActivity // 6
  • FillGap2RecyclerViewActivity // 7
  • FillGap2ScrollViewActivity // 8
  • FillGap3ListViewActivity // 9
  • FillGap3RecyclerViewActivity // 10
  • FillGap3ScrollViewActivity // 11
  • FillGapListViewActivity // 12
  • FillGapRecyclerViewActivity // 13
  • FillGapScrollViewActivity // 14
  • FlexibleSpaceToolbarScrollViewActivity // 15
  • FlexibleSpaceWithImageScrollViewActivity // 16
  • FlexibleSpaceWithImageRecyclerViewActivity // 17
  • FlexibleSpaceWithImageWithViewPagerTab2Activity // 18
  • FlexibleSpaceWithImageListViewActivity // 19
  • FragmentActionBarControlListViewActivity // 20
  • FragmentTransitionActivity // 21
  • HandleTouchGridViewActivity // 22
  • HandleTouchListViewActivity // 23
  • HandleTouchRecyclerViewActivity // 24
  • HandleTouchScrollViewActivity // 25
  • HandleTouchWebViewActivity // 26
  • ParallaxToolbarListViewActivity // 27
  • ParallaxToolbarScrollViewActivity // 28
  • ScrollFromBottomListViewActivity // 29
  • ScrollFromBottomRecyclerViewActivity // 30
  • SlidingUpGridViewActivity // 31
  • SlidingUpListViewActivity // 32
  • SlidingUpRecyclerViewActivity // 33
  • SlidingUpScrollViewActivity // 34
  • SlidingUpWebViewActivity // 35
  • StickyHeaderListViewActivity // 36
  • StickyHeaderRecyclerViewActivity // 37
  • StickyHeaderScrollViewActivity // 38
  • StickyHeaderWebViewActivity // 39
  • ToolbarControlGridViewActivity // 40
  • ToolbarControlListViewActivity // 41
  • ToolbarControlRecyclerViewActivity // 42
  • ToolbarControlScrollViewActivity // 43
  • ToolbarControlWebViewActivity // 44
  • ViewPagerTab2Activity // 45
  • ViewPagerTabActivity // 46
  • ViewPagerTabFragmentActivity // 47
  • ViewPagerTabListViewActivity // 48
  • ViewPagerTabScrollViewActivity // 49

以下是部分效果图:
技术分享

技术分享

技术分享

我不是代码的生产者,我只是Copylefter的搬运工。: )

GitHub源下载地址:
Observable Scroll View

下面是我写的一个Activity,可以用ListView调用这个项目的49个Activity:

package com.zms.materialdesign;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.Toast;

import com.zms.materialdesign.observablescrollview.activity.ActionBarControlGridViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ActionBarControlListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ActionBarControlRecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ActionBarControlScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ActionBarControlWebViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FillGap2ListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FillGap2RecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FillGap2ScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FillGap3ListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FillGap3RecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FillGap3ScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FillGapListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FillGapRecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FillGapScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FlexibleSpaceToolbarScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FlexibleSpaceWithImageListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FlexibleSpaceWithImageRecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FlexibleSpaceWithImageScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FlexibleSpaceWithImageWithViewPagerTab2Activity;
import com.zms.materialdesign.observablescrollview.activity.FragmentActionBarControlListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.FragmentTransitionActivity;
import com.zms.materialdesign.observablescrollview.activity.HandleTouchGridViewActivity;
import com.zms.materialdesign.observablescrollview.activity.HandleTouchListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.HandleTouchRecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.HandleTouchScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.HandleTouchWebViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ParallaxToolbarListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ParallaxToolbarScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ScrollFromBottomListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ScrollFromBottomRecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.SlidingUpGridViewActivity;
import com.zms.materialdesign.observablescrollview.activity.SlidingUpListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.SlidingUpRecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.SlidingUpScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.SlidingUpWebViewActivity;
import com.zms.materialdesign.observablescrollview.activity.StickyHeaderListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.StickyHeaderRecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.StickyHeaderScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.StickyHeaderWebViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ToolbarControlGridViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ToolbarControlListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ToolbarControlRecyclerViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ToolbarControlScrollViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ToolbarControlWebViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ViewPagerTab2Activity;
import com.zms.materialdesign.observablescrollview.activity.ViewPagerTabActivity;
import com.zms.materialdesign.observablescrollview.activity.ViewPagerTabFragmentActivity;
import com.zms.materialdesign.observablescrollview.activity.ViewPagerTabListViewActivity;
import com.zms.materialdesign.observablescrollview.activity.ViewPagerTabScrollViewActivity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by AlexZhou on 2015/3/20.
 * 14:13
 */
public class ObservableScrollViewActivity extends Activity {

    ListView listView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.observable_scrollview);
        listView = (ListView) findViewById(R.id.list);

        final List adapterData = new ArrayList();

        // Initial ListView Text Content
        adapterData.add("00-Toast HeHe");
        adapterData.add("01-ActionBarControlGridViewActivity");    // 1
        adapterData.add("02-ActionBarControlListViewActivity");    // 2
        adapterData.add("03-ActionBarControlRecyclerViewActivity");    // 3
        adapterData.add("04-ActionBarControlScrollViewActivity");    // 4
        adapterData.add("05-ActionBarControlWebViewActivity");    // 5
        adapterData.add("06-FillGap2ListViewActivity");    // 6
        adapterData.add("07-FillGap2RecyclerViewActivity");    // 7
        adapterData.add("08-FillGap2ScrollViewActivity");    // 8
        adapterData.add("09-FillGap3ListViewActivity");    // 9
        adapterData.add("10-FillGap3RecyclerViewActivity");    // 10
        adapterData.add("11-FillGap3ScrollViewActivity");    // 11
        adapterData.add("12-FillGapListViewActivity");    // 12
        adapterData.add("13-FillGapRecyclerViewActivity");    // 13
        adapterData.add("14-FillGapScrollViewActivity");    // 14
        adapterData.add("15-FlexibleSpaceToolbarScrollViewActivity");    // 15
        adapterData.add("16-FlexibleSpaceWithImageScrollViewActivity");    // 16
        adapterData.add("17-FlexibleSpaceWithImageRecyclerViewActivity");    // 17
        adapterData.add("18-FlexibleSpaceWithImageWithViewPagerTab2Activity");    // 18
        adapterData.add("19-FlexibleSpaceWithImageListViewActivity");    // 19
        adapterData.add("20-FragmentActionBarControlListViewActivity");    // 20
        adapterData.add("21-FragmentTransitionActivity");    // 21
        adapterData.add("22-HandleTouchGridViewActivity");    // 22
        adapterData.add("23-HandleTouchListViewActivity");    // 23
        adapterData.add("24-HandleTouchRecyclerViewActivity");    // 24
        adapterData.add("25-HandleTouchScrollViewActivity");    // 25
        adapterData.add("26-HandleTouchWebViewActivity");    // 26
        adapterData.add("27-ParallaxToolbarListViewActivity");    // 27
        adapterData.add("28-ParallaxToolbarScrollViewActivity");    // 28
        adapterData.add("29-ScrollFromBottomListViewActivity");    // 29
        adapterData.add("30-ScrollFromBottomRecyclerViewActivity");    // 30
        adapterData.add("31-SlidingUpGridViewActivity");    // 31
        adapterData.add("32-SlidingUpListViewActivity");    // 32
        adapterData.add("33-SlidingUpRecyclerViewActivity");    // 33
        adapterData.add("34-SlidingUpScrollViewActivity");    // 34
        adapterData.add("35-SlidingUpWebViewActivity");    // 35
        adapterData.add("36-StickyHeaderListViewActivity");    // 36
        adapterData.add("37-StickyHeaderRecyclerViewActivity");    // 37
        adapterData.add("38-StickyHeaderScrollViewActivity");    // 38
        adapterData.add("39-StickyHeaderWebViewActivity");    // 39
        adapterData.add("40-ToolbarControlGridViewActivity");    // 40
        adapterData.add("41-ToolbarControlListViewActivity");    // 41
        adapterData.add("42-ToolbarControlRecyclerViewActivity");    // 42
        adapterData.add("43-ToolbarControlScrollViewActivity");    // 43
        adapterData.add("44-ToolbarControlWebViewActivity");    // 44
        adapterData.add("45-ViewPagerTab2Activity");    // 45
        adapterData.add("46-ViewPagerTabActivity");    // 46
        adapterData.add("47-ViewPagerTabFragmentActivity");    // 47
        adapterData.add("48-ViewPagerTabListViewActivity");    // 48
        adapterData.add("49-ViewPagerTabScrollViewActivity");    // 49


        ArrayAdapter adapter = new ArrayAdapter(this,
                android.R.layout.simple_list_item_1, adapterData);
        listView.setAdapter(adapter);
        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。