// Path: SlidingActivityDemo/app/src/main/java/com/example/yuyu/slideactivity/demo/Activity2.java
// public class Activity2 extends BaseActivity {
// 
//     @Override
//     protected int setBackgroundColor() {
//         return Color.YELLOW;
//     }
// 
//     @Override
//     protected String setButtonText() {
//         return "第二个Activity";
//     }
// }
// 
// Path: SlidingActivityDemo/app/src/main/java/com/example/yuyu/slideactivity/demo/Activity3.java
// public class Activity3 extends BaseActivity {
// 
//     @Override
//     protected int setBackgroundColor() {
//         return Color.GRAY;
//     }
// 
//     @Override
//     protected String setButtonText() {
//         return "第三个Activity";
//     }
// 
// }
// 
// Path: SlidingActivityDemo/app/src/main/java/com/example/yuyu/slideactivity/demo/Activity4.java
// public class Activity4 extends SlideActivity {
// 
//     RecyclerView mList;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_demo4);
//         init();
//     }
// 
//     private void init() {
//         mList = (RecyclerView) findViewById(R.id.list);
//         LinearLayoutManager manager = new LinearLayoutManager(this);
//         manager.setOrientation(LinearLayoutManager.HORIZONTAL);
//         mList.setLayoutManager(manager);
//         MyAdapter adapter = new MyAdapter(getData());
//         mList.setAdapter(adapter);
//     }
// 
//     private List<String> getData() {
//         List<String> data = new ArrayList<>();
//         for (int i = 0; i < 20; i++) {
//             data.add("item " + i);
//         }
//         return data;
//     }
// 
// }


import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.example.yuyu.slideactivity.R;
import com.example.yuyu.slideactivity.demo.Activity2;
import com.example.yuyu.slideactivity.demo.Activity3;
import com.example.yuyu.slideactivity.demo.Activity4;
package com.example.yuyu.slideactivity.base;



public abstract class BaseActivity extends SlideActivity {
    Button mBt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_demo);
        findViewById(R.id.background).setBackgroundColor(setBackgroundColor());
        mBt = (Button) findViewById(R.id.button);
        String str = setButtonText();
        mBt.setText(str);
        mBt.setTag(str.substring(1, 2));
    }

    public void onClick(View view) {
        Intent intent = null;
        switch (String.valueOf(view.getTag())) {
            case "一":
                intent = new Intent(this, Activity2.class);
                break;
            case "二":
// Path: SlidingActivityDemo/app/src/main/java/com/example/yuyu/slideactivity/demo/Activity2.java
// public class Activity2 extends BaseActivity {
// 
//     @Override
//     protected int setBackgroundColor() {
//         return Color.YELLOW;
//     }
// 
//     @Override
//     protected String setButtonText() {
//         return "第二个Activity";
//     }
// }
// 
// Path: SlidingActivityDemo/app/src/main/java/com/example/yuyu/slideactivity/demo/Activity3.java
// public class Activity3 extends BaseActivity {
// 
//     @Override
//     protected int setBackgroundColor() {
//         return Color.GRAY;
//     }
// 
//     @Override
//     protected String setButtonText() {
//         return "第三个Activity";
//     }
// 
// }
// 
// Path: SlidingActivityDemo/app/src/main/java/com/example/yuyu/slideactivity/demo/Activity4.java
// public class Activity4 extends SlideActivity {
// 
//     RecyclerView mList;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_demo4);
//         init();
//     }
// 
//     private void init() {
//         mList = (RecyclerView) findViewById(R.id.list);
//         LinearLayoutManager manager = new LinearLayoutManager(this);
//         manager.setOrientation(LinearLayoutManager.HORIZONTAL);
//         mList.setLayoutManager(manager);
//         MyAdapter adapter = new MyAdapter(getData());
//         mList.setAdapter(adapter);
//     }
// 
//     private List<String> getData() {
//         List<String> data = new ArrayList<>();
//         for (int i = 0; i < 20; i++) {
//             data.add("item " + i);
//         }
//         return data;
//     }
// 
// }


// Path: SlidingActivityDemo/app/src/main/java/com/example/yuyu/slideactivity/base/BaseActivity.java
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.example.yuyu.slideactivity.R;
import com.example.yuyu.slideactivity.demo.Activity2;
import com.example.yuyu.slideactivity.demo.Activity3;
import com.example.yuyu.slideactivity.demo.Activity4;

package com.example.yuyu.slideactivity.base;



public abstract class BaseActivity extends SlideActivity {
    Button mBt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_demo);
        findViewById(R.id.background).setBackgroundColor(setBackgroundColor());
        mBt = (Button) findViewById(R.id.button);
        String str = setButtonText();
        mBt.setText(str);
        mBt.setTag(str.substring(1, 2));
    }

    public void onClick(View view) {
        Intent intent = null;
        switch (String.valueOf(view.getTag())) {
            case "一":
                intent = new Intent(this, Activity2.class);
                break;
            case "二":
                intent = new Intent(this, Activity3.class);