[
  {
    "path": ".gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
  },
  {
    "path": ".idea/codeStyles/Project.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <Objective-C-extensions>\n      <file>\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Import\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Macro\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Typedef\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Enum\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Constant\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Global\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Struct\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"FunctionPredecl\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Function\" />\n      </file>\n      <class>\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Property\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Synthesize\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"InitMethod\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"StaticMethod\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"InstanceMethod\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"DeallocMethod\" />\n      </class>\n      <extensions>\n        <pair source=\"cpp\" header=\"h\" fileNamingConvention=\"NONE\" />\n        <pair source=\"c\" header=\"h\" fileNamingConvention=\"NONE\" />\n      </extensions>\n    </Objective-C-extensions>\n  </code_scheme>\n</component>"
  },
  {
    "path": ".idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/app\" />\n          </set>\n        </option>\n        <option name=\"resolveModulePerSourceSet\" value=\"false\" />\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"NullableNotNullManager\">\n    <option name=\"myDefaultNullable\" value=\"android.support.annotation.Nullable\" />\n    <option name=\"myDefaultNotNull\" value=\"android.support.annotation.NonNull\" />\n    <option name=\"myNullables\">\n      <value>\n        <list size=\"7\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.Nullable\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nullable\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"javax.annotation.CheckForNull\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.Nullable\" />\n          <item index=\"4\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.Nullable\" />\n          <item index=\"5\" class=\"java.lang.String\" itemvalue=\"androidx.annotation.Nullable\" />\n          <item index=\"6\" class=\"java.lang.String\" itemvalue=\"androidx.annotation.RecentlyNullable\" />\n        </list>\n      </value>\n    </option>\n    <option name=\"myNotNulls\">\n      <value>\n        <list size=\"6\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.NotNull\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nonnull\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.NonNull\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.NonNull\" />\n          <item index=\"4\" class=\"java.lang.String\" itemvalue=\"androidx.annotation.NonNull\" />\n          <item index=\"5\" class=\"java.lang.String\" itemvalue=\"androidx.annotation.RecentlyNonNull\" />\n        </list>\n      </value>\n    </option>\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_1_8\" project-jdk-name=\"1.8\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/runConfigurations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <option name=\"ignoredProducers\">\n      <set>\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"$PROJECT_DIR$\" vcs=\"Git\" />\n  </component>\n</project>"
  },
  {
    "path": "README.md",
    "content": "# DouyinDemo\n仿抖音上下滑动播放视频demo\n###\n效果图\n###\n![gif](https://github.com/PangHaHa12138/DouyinDemo/blob/master/Screenshot_gif/gif3.gif)\n###\n![gif](https://github.com/PangHaHa12138/DouyinDemo/blob/master/Screenshot_gif/gif2.gif)\n###\n![gif](https://github.com/PangHaHa12138/DouyinDemo/blob/master/Screenshot_gif/gif1.gif)\n\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\n\nandroid {\n    compileSdkVersion 27\n    defaultConfig {\n        applicationId \"com.example.administrator.douyin\"\n        minSdkVersion 15\n        targetSdkVersion 27\n        versionCode 1\n        versionName \"1.0\"\n        testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation 'com.android.support:appcompat-v7:27.1.1'\n    implementation 'com.android.support.constraint:constraint-layout:1.1.2'\n    implementation 'com.android.support:recyclerview-v7:27+'\n    /*第三方库*/\n    implementation 'de.hdodenhof:circleimageview:2.2.0'\n    testImplementation 'junit:junit:4.12'\n    androidTestImplementation 'com.android.support.test:runner:1.0.2'\n    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'\n    compile \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version\"\n}\nrepositories {\n    mavenCentral()\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "app/src/androidTest/java/com/example/administrator/douyin/ExampleInstrumentedTest.java",
    "content": "package com.example.administrator.douyin;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\nimport android.support.test.runner.AndroidJUnit4;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport static org.junit.Assert.*;\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n    @Test\n    public void useAppContext() {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getTargetContext();\n\n        assertEquals(\"com.example.administrator.douyin\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.administrator.douyin\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/header_icon_1\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/header_icon_1\"\n        android:supportsRtl=\"true\"\n        android:resizeableActivity=\"true\"\n        android:theme=\"@style/main_theme\">\n        <!-- android 全面屏 -->\n        <meta-data\n            android:name=\"android.max_aspect\"\n            android:value=\"2.1\" />\n\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "app/src/main/java/com/example/administrator/douyin/FullWindowVideoView.java",
    "content": "package com.example.administrator.douyin;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.widget.VideoView;\n\npublic class FullWindowVideoView extends VideoView {\n\n    public FullWindowVideoView(Context context) {\n        super(context);\n    }\n\n    public FullWindowVideoView(Context context, AttributeSet attrs) {\n        super(context, attrs);\n    }\n\n    public FullWindowVideoView(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n    }\n\n    @Override\n    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n        // 其实就是在这里做了一些处理。\n        int width = getDefaultSize(0, widthMeasureSpec);\n        int height = getDefaultSize(0, heightMeasureSpec);\n        setMeasuredDimension(width, height);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/example/administrator/douyin/Love.java",
    "content": "package com.example.administrator.douyin;\n\n\nimport android.animation.Animator;\nimport android.animation.AnimatorListenerAdapter;\nimport android.animation.AnimatorSet;\nimport android.animation.ObjectAnimator;\nimport android.animation.TimeInterpolator;\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.support.annotation.Nullable;\nimport android.util.AttributeSet;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.animation.LinearInterpolator;\nimport android.widget.ImageView;\nimport android.widget.RelativeLayout;\nimport android.widget.Toast;\n\nimport java.util.Random;\n\npublic class Love extends RelativeLayout {\n    private Context mContext;\n    float[] num = {-30, -20, 0, 20, 30};//随机心形图片角度\n\n    public Love(Context context) {\n        super(context);\n        initView(context);\n    }\n\n    public Love(Context context, @Nullable AttributeSet attrs) {\n        super(context, attrs);\n        initView(context);\n    }\n\n    public Love(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n        initView(context);\n    }\n\n    private void initView(Context context) {\n        mContext = context;\n    }\n\n    @Override\n    public boolean onTouchEvent(MotionEvent event) {\n\n        final ImageView imageView = new ImageView(mContext);\n        LayoutParams params = new LayoutParams(300, 300);\n        params.leftMargin = (int) event.getX() - 150;\n        params.topMargin = (int) event.getY() - 300;\n        imageView.setImageDrawable(getResources().getDrawable(R.mipmap.icon_home_like_after));\n        imageView.setLayoutParams(params);\n        addView(imageView);\n\n        AnimatorSet animatorSet = new AnimatorSet();\n        animatorSet.play(scale(imageView, \"scaleX\", 2f, 0.9f, 100, 0))\n                .with(scale(imageView, \"scaleY\", 2f, 0.9f, 100, 0))\n                .with(rotation(imageView, 0, 0, num[new Random().nextInt(4)]))\n                .with(alpha(imageView, 0, 1, 100, 0))\n                .with(scale(imageView, \"scaleX\", 0.9f, 1, 50, 150))\n                .with(scale(imageView, \"scaleY\", 0.9f, 1, 50, 150))\n                .with(translationY(imageView, 0, -600, 800, 400))\n                .with(alpha(imageView, 1, 0, 300, 400))\n                .with(scale(imageView, \"scaleX\", 1, 3f, 700, 400))\n                .with(scale(imageView, \"scaleY\", 1, 3f, 700, 400));\n\n        animatorSet.start();\n        animatorSet.addListener(new AnimatorListenerAdapter() {\n            @Override\n            public void onAnimationEnd(Animator animation) {\n                super.onAnimationEnd(animation);\n                removeViewInLayout(imageView);\n            }\n        });\n        return super.onTouchEvent(event);\n    }\n\n    public static ObjectAnimator scale(View view, String propertyName, float from, float to, long time, long delayTime) {\n        ObjectAnimator translation = ObjectAnimator.ofFloat(view\n                , propertyName\n                , from, to);\n        translation.setInterpolator(new LinearInterpolator());\n        translation.setStartDelay(delayTime);\n        translation.setDuration(time);\n        return translation;\n    }\n\n    public static ObjectAnimator translationX(View view, float from, float to, long time, long delayTime) {\n        ObjectAnimator translation = ObjectAnimator.ofFloat(view\n                , \"translationX\"\n                , from, to);\n        translation.setInterpolator(new LinearInterpolator());\n        translation.setStartDelay(delayTime);\n        translation.setDuration(time);\n        return translation;\n    }\n\n    public static ObjectAnimator translationY(View view, float from, float to, long time, long delayTime) {\n        ObjectAnimator translation = ObjectAnimator.ofFloat(view\n                , \"translationY\"\n                , from, to);\n        translation.setInterpolator(new LinearInterpolator());\n        translation.setStartDelay(delayTime);\n        translation.setDuration(time);\n        return translation;\n    }\n\n    public static ObjectAnimator alpha(View view, float from, float to, long time, long delayTime) {\n        ObjectAnimator translation = ObjectAnimator.ofFloat(view\n                , \"alpha\"\n                , from, to);\n        translation.setInterpolator(new LinearInterpolator());\n        translation.setStartDelay(delayTime);\n        translation.setDuration(time);\n        return translation;\n    }\n\n    public static ObjectAnimator rotation(View view, long time, long delayTime, float... values) {\n        ObjectAnimator rotation = ObjectAnimator.ofFloat(view, \"rotation\", values);\n        rotation.setDuration(time);\n        rotation.setStartDelay(delayTime);\n        rotation.setInterpolator(new TimeInterpolator() {\n            @Override\n            public float getInterpolation(float input) {\n                return input;\n            }\n        });\n        return rotation;\n    }\n}\n\n"
  },
  {
    "path": "app/src/main/java/com/example/administrator/douyin/Love2.kt",
    "content": "package com.example.administrator.douyin\n\nimport android.animation.Animator\nimport android.animation.AnimatorListenerAdapter\nimport android.animation.AnimatorSet\nimport android.animation.ObjectAnimator\nimport android.animation.TimeInterpolator\nimport android.content.Context\nimport android.os.SystemClock\nimport android.util.AttributeSet\nimport android.view.MotionEvent\nimport android.view.View\nimport android.view.animation.LinearInterpolator\nimport android.widget.ImageView\nimport android.widget.RelativeLayout\nimport java.util.*\n\n\n/**\n * information：仿抖音点赞功能\n */\n\nclass Love2(context: Context) : RelativeLayout(context) {\n    var mContext: Context? = null\n    //动画中随机❤的旋转角度\n    var num = floatArrayOf(-35f, -25f, 0f, 25f, 35f)\n\n    //用来判断是否是连续的点击事件\n    private val mHits = LongArray(3)\n\n    constructor(context: Context, attrs: AttributeSet) : this(context) {\n        mContext = context\n    }\n\n\n    override fun onTouchEvent(event: MotionEvent?): Boolean {\n\n        System.arraycopy(mHits, 1, mHits, 0, mHits.size - 1)\n        mHits[mHits.size - 1] = SystemClock.uptimeMillis()\n\n        //用这个来判断是否是3击事件，判断数组中pos=2的点击事件的时间与数组中pos=0的点击事件的时间差值是否小于500，若是小于500认为是3击事件，这时需要绘制爱心图片\n        if (mHits[0] >= (SystemClock.uptimeMillis() - 500)) {\n            //点击是触发心形的图片add到整个view中，然后执行动画\n\n            //有连续触摸的时候，创建一个展示心形的图片\n            var iv: ImageView = ImageView(mContext)\n\n            //设置展示的位置，需要在手指触摸的位置上方，即触摸点是心形的右下角的位置\n            var lp: LayoutParams = LayoutParams(300, 300)\n            lp.leftMargin = (event?.x!! - 150F).toInt()\n            lp.topMargin = (event?.y!! - 300F).toInt()\n            //设置图片资源\n            iv.setImageDrawable(resources.getDrawable(R.mipmap.icon_home_like_after))\n            iv.layoutParams = lp\n\n            //把IV添加到父布局当中\n            addView(iv)\n\n            //设置控件的动画\n            var animatorSet: AnimatorSet = AnimatorSet()\n            animatorSet.play(\n                    //缩放动画，X轴2倍缩小至0.9倍\n                    scaleAni(iv, \"scaleX\", 2f, 0.9f, 100, 0))\n                    //缩放动画，Y轴2倍缩放至0.9倍\n                    .with(scaleAni(iv, \"scaleY\", 2f, 0.9f, 100, 0))\n                    //旋转动画，随机旋转角\n                    .with(rotation(iv, 0, 0, num[Random().nextInt(4)]))\n                    //渐变透明动画，透明度从0-1\n                    .with(alphaAni(iv, 0F, 1F, 100, 0))\n                    //缩放动画，X轴0.9倍缩小至\n                    .with(scaleAni(iv, \"scaleX\", 0.9f, 1F, 50, 150))\n                    //缩放动画，Y轴0.9倍缩放至\n                    .with(scaleAni(iv, \"scaleY\", 0.9f, 1F, 50, 150))\n                    //位移动画，Y轴从0上移至600\n                    .with(translationY(iv, 0F, -600F, 800, 400))\n                    //透明动画，从1-0\n                    .with(alphaAni(iv, 1F, 0F, 300, 400))\n                    //缩放动画，X轴1至3倍\n                    .with(scaleAni(iv, \"scaleX\", 1F, 3f, 700, 400))\n                    //缩放动画，Y轴1至3倍\n                    .with(scaleAni(iv, \"scaleY\", 1F, 3f, 700, 400))\n\n\n            //开始动画\n            animatorSet.start()\n            //设置动画结束监听\n            animatorSet.addListener(object : AnimatorListenerAdapter() {\n                override fun onAnimationEnd(animation: Animator?) {\n                    super.onAnimationEnd(animation)\n\n                    //当动画结束以后，需要把控件从父布局移除\n                    removeViewInLayout(iv)\n                }\n            })\n\n        }\n\n        return super.onTouchEvent(event)\n\n    }\n\n\n    fun scaleAni(view: View, propertyName: String, from: Float, to: Float, time: Long, delayTime: Long): ObjectAnimator {\n        val ani: ObjectAnimator = ObjectAnimator.ofFloat(view, propertyName, from, to)\n        ani.interpolator = LinearInterpolator()\n        ani.startDelay = delayTime\n        ani.duration = time\n        return ani\n    }\n\n    fun translationX(view: View, from: Float, to: Float, time: Long, delayTime: Long): ObjectAnimator {\n        val ani: ObjectAnimator = ObjectAnimator.ofFloat(view, \"translationX\", from, to)\n        ani.interpolator = LinearInterpolator()\n        ani.startDelay = delayTime\n        ani.duration = time\n        return ani\n    }\n\n    fun translationY(view: View, from: Float, to: Float, time: Long, delayTime: Long): ObjectAnimator {\n        val ani: ObjectAnimator = ObjectAnimator.ofFloat(view, \"translationY\", from, to)\n        ani.interpolator = LinearInterpolator()\n        ani.startDelay = delayTime\n        ani.duration = time\n        return ani\n    }\n\n    fun alphaAni(view: View, from: Float, to: Float, time: Long, delayTime: Long): ObjectAnimator {\n        val ani = ObjectAnimator.ofFloat(view, \"alpha\", from, to)\n        ani.interpolator = LinearInterpolator()\n        ani.startDelay = delayTime\n        ani.duration = time\n        return ani\n    }\n\n    fun rotation(view: View, time: Long, delayTime: Long, vararg values: Float): ObjectAnimator {\n        val ani = ObjectAnimator.ofFloat(view, \"rotation\", *values)\n        ani.duration = time\n        ani.startDelay = delayTime\n        ani.interpolator = TimeInterpolator { input -> input }\n        return ani\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/com/example/administrator/douyin/MainActivity.java",
    "content": "package com.example.administrator.douyin;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.media.MediaPlayer;\nimport android.net.Uri;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\nimport android.support.v7.widget.OrientationHelper;\nimport android.support.v7.widget.RecyclerView;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\nimport android.widget.RelativeLayout;\nimport android.widget.VideoView;\n\n\npublic class MainActivity extends AppCompatActivity {\n    private static final String TAG = \"douyin\";\n    private RecyclerView mRecyclerView;\n    private MyAdapter mAdapter;\n    MyLayoutManager2 myLayoutManager;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        initView();\n        initListener();\n    }\n\n    private void initView() {\n        mRecyclerView = findViewById(R.id.recycler);\n        myLayoutManager = new MyLayoutManager2(this, OrientationHelper.VERTICAL, false);\n\n        mAdapter = new MyAdapter(this);\n        mRecyclerView.setLayoutManager(myLayoutManager);\n        mRecyclerView.setAdapter(mAdapter);\n\n    }\n\n    private void initListener() {\n        myLayoutManager.setOnViewPagerListener(new OnViewPagerListener() {\n            @Override\n            public void onInitComplete() {\n\n            }\n\n            @Override\n            public void onPageRelease(boolean isNext, int position) {\n                Log.e(TAG, \"释放位置:\" + position + \" 下一页:\" + isNext);\n                int index = 0;\n                if (isNext) {\n                    index = 0;\n                } else {\n                    index = 1;\n                }\n                releaseVideo(index);\n            }\n\n            @Override\n            public void onPageSelected(int position, boolean bottom) {\n                Log.e(TAG, \"选择位置:\" + position + \" 下一页:\" + bottom);\n\n                playVideo(0);\n            }\n        });\n    }\n\n    class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> {\n        private int[] imgs = {R.mipmap.img_video_1, R.mipmap.img_video_2, R.mipmap.img_video_3, R.mipmap.img_video_4, R.mipmap.img_video_5, R.mipmap.img_video_6, R.mipmap.img_video_7, R.mipmap.img_video_8};\n        private int[] videos = {R.raw.video_1, R.raw.video_2, R.raw.video_3, R.raw.video_4, R.raw.video_5, R.raw.video_6, R.raw.video_7, R.raw.video_8};\n        private int index = 0;\n        private Context mContext;\n\n        public MyAdapter(Context context) {\n            this.mContext = context;\n        }\n\n\n        @Override\n        public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n            View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_view_pager, parent, false);\n            return new ViewHolder(view);\n        }\n\n        @Override\n        public void onBindViewHolder(ViewHolder holder, int position) {\n            holder.img_thumb.setImageResource(imgs[index]);\n            holder.videoView.setVideoURI(Uri.parse(\"android.resource://\" + getPackageName() + \"/\" + videos[index]));\n            index++;\n            if (index >= 7) {\n                index = 0;\n            }\n        }\n\n        @Override\n        public int getItemCount() {\n            return 88;\n        }\n\n        public class ViewHolder extends RecyclerView.ViewHolder {\n            ImageView img_thumb;\n            VideoView videoView;\n            ImageView img_play;\n            RelativeLayout rootView;\n\n            public ViewHolder(View itemView) {\n                super(itemView);\n                img_thumb = itemView.findViewById(R.id.img_thumb);\n                videoView = itemView.findViewById(R.id.video_view);\n                img_play = itemView.findViewById(R.id.img_play);\n                rootView = itemView.findViewById(R.id.root_view);\n            }\n        }\n    }\n\n    private void releaseVideo(int index) {\n        View itemView = mRecyclerView.getChildAt(index);\n        final VideoView videoView = itemView.findViewById(R.id.video_view);\n        final ImageView imgThumb = itemView.findViewById(R.id.img_thumb);\n        final ImageView imgPlay = itemView.findViewById(R.id.img_play);\n        videoView.stopPlayback();\n        imgThumb.animate().alpha(1).start();\n        imgPlay.animate().alpha(0f).start();\n    }\n\n\n    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)\n    private void playVideo(int position) {\n        View itemView = mRecyclerView.getChildAt(position);\n        final FullWindowVideoView videoView = itemView.findViewById(R.id.video_view);\n        final ImageView imgPlay = itemView.findViewById(R.id.img_play);\n        final ImageView imgThumb = itemView.findViewById(R.id.img_thumb);\n        final RelativeLayout rootView = itemView.findViewById(R.id.root_view);\n        final MediaPlayer[] mediaPlayer = new MediaPlayer[1];\n        videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n            @Override\n            public void onPrepared(MediaPlayer mp) {\n\n            }\n        });\n        videoView.setOnInfoListener(new MediaPlayer.OnInfoListener() {\n            @Override\n            public boolean onInfo(MediaPlayer mp, int what, int extra) {\n                mediaPlayer[0] = mp;\n                mp.setLooping(true);\n                imgThumb.animate().alpha(0).setDuration(200).start();\n                return false;\n            }\n        });\n\n        videoView.start();\n\n        imgPlay.setOnClickListener(new View.OnClickListener() {\n            boolean isPlaying = true;\n\n            @Override\n            public void onClick(View v) {\n                if (videoView.isPlaying()) {\n                    imgPlay.animate().alpha(0.7f).start();\n                    videoView.pause();\n                    isPlaying = false;\n                } else {\n                    imgPlay.animate().alpha(0f).start();\n                    videoView.start();\n                    isPlaying = true;\n                }\n            }\n        });\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/com/example/administrator/douyin/MyLayoutManager.java",
    "content": "package com.example.administrator.douyin;\n\nimport android.content.Context;\nimport android.support.annotation.NonNull;\nimport android.support.v7.widget.LinearLayoutManager;\nimport android.support.v7.widget.PagerSnapHelper;\nimport android.support.v7.widget.RecyclerView;\nimport android.view.View;\n\npublic class MyLayoutManager extends LinearLayoutManager implements RecyclerView.OnChildAttachStateChangeListener {\n    private int mDrift;//位移，用来判断移动方向\n\n    private PagerSnapHelper mPagerSnapHelper;\n    private OnViewPagerListener mOnViewPagerListener;\n\n    public MyLayoutManager(Context context) {\n        super(context);\n    }\n\n    public MyLayoutManager(Context context, int orientation, boolean reverseLayout) {\n        super(context, orientation, reverseLayout);\n        mPagerSnapHelper = new PagerSnapHelper();\n    }\n\n    @Override\n    public void onAttachedToWindow(RecyclerView view) {\n\n        view.addOnChildAttachStateChangeListener(this);\n        mPagerSnapHelper.attachToRecyclerView(view);\n        super.onAttachedToWindow(view);\n    }\n//当Item添加进来了  调用这个方法\n\n    //\n    @Override\n    public void onChildViewAttachedToWindow(@NonNull View view) {\n//        播放视频操作 即将要播放的是上一个视频 还是下一个视频\n        int position = getPosition(view);\n        if (0 == position) {\n            if (mOnViewPagerListener != null) {\n                mOnViewPagerListener.onPageSelected(getPosition(view), false);\n            }\n\n        }\n    }\n\n    public void setOnViewPagerListener(OnViewPagerListener mOnViewPagerListener) {\n        this.mOnViewPagerListener = mOnViewPagerListener;\n    }\n\n    @Override\n    public void onScrollStateChanged(int state) {\n        switch (state) {\n            case RecyclerView.SCROLL_STATE_IDLE:\n                View view = mPagerSnapHelper.findSnapView(this);\n                int position = getPosition(view);\n                if (mOnViewPagerListener != null) {\n                    mOnViewPagerListener.onPageSelected(position, position == getItemCount() - 1);\n\n                }\n//                postion  ---回调 ----》播放\n\n\n                break;\n        }\n        super.onScrollStateChanged(state);\n    }\n\n    @Override\n    public void onChildViewDetachedFromWindow(@NonNull View view) {\n//暂停播放操作\n        if (mDrift >= 0) {\n            if (mOnViewPagerListener != null)\n                mOnViewPagerListener.onPageRelease(true, getPosition(view));\n        } else {\n            if (mOnViewPagerListener != null)\n                mOnViewPagerListener.onPageRelease(false, getPosition(view));\n        }\n    }\n\n\n    @Override\n    public int scrollVerticallyBy(int dy, RecyclerView.Recycler recycler, RecyclerView.State state) {\n        this.mDrift = dy;\n        return super.scrollVerticallyBy(dy, recycler, state);\n    }\n\n    @Override\n    public boolean canScrollVertically() {\n        return true;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/example/administrator/douyin/MyLayoutManager2.kt",
    "content": "package com.example.administrator.douyin\n\nimport android.content.Context\nimport android.support.v7.widget.LinearLayoutManager\nimport android.support.v7.widget.PagerSnapHelper\nimport android.support.v7.widget.RecyclerView\nimport android.view.View\n\n/**\n *  @desc\n *  @auth ${user}\n *  @time 2018/8/9  15:38\n */\nclass MyLayoutManager2 : LinearLayoutManager, RecyclerView.OnChildAttachStateChangeListener {\n\n\n    constructor(context: Context) : super(context)\n\n    constructor(context: Context, @RecyclerView.Orientation orientation: Int,\n                reverseLayout: Boolean) : super(context, orientation, reverseLayout) {\n        pagerSpaner = PagerSnapHelper()\n    }\n\n    var pagerSpaner: PagerSnapHelper? = null\n    var viewPagerListener: OnViewPagerListener? = null\n    var diffY = 0\n\n    override fun onAttachedToWindow(view: RecyclerView) {\n        super.onAttachedToWindow(view)\n        view.addOnChildAttachStateChangeListener(this)\n        pagerSpaner!!.attachToRecyclerView(view)\n    }\n\n\n    override fun onChildViewDetachedFromWindow(view: View?) {\n        val position = getPosition(view)\n        if (0 < diffY) {\n            viewPagerListener?.onPageRelease(true, position)\n        } else {\n            viewPagerListener?.onPageRelease(false, position)\n        }\n    }\n\n    override fun onChildViewAttachedToWindow(view: View?) {\n\n        val position = getPosition(view)\n        if (0 == position) {\n            viewPagerListener?.onPageSelected(position, false)\n        }\n\n\n    }\n\n    override fun onScrollStateChanged(state: Int) {\n        if (RecyclerView.SCROLL_STATE_IDLE == state) {\n            val view = pagerSpaner!!.findSnapView(this)\n            val position = getPosition(view)\n            viewPagerListener?.onPageSelected(position, position == itemCount - 1)\n        }\n        super.onScrollStateChanged(state)\n    }\n\n    public fun setOnViewPagerListener(listener: OnViewPagerListener) {\n        viewPagerListener = listener\n    }\n\n    override fun scrollVerticallyBy(dy: Int, recycler: RecyclerView.Recycler?, state: RecyclerView.State?): Int {\n        diffY = dy\n        return super.scrollVerticallyBy(dy, recycler, state)\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/com/example/administrator/douyin/OnViewPagerListener.java",
    "content": "package com.example.administrator.douyin;\n\npublic interface OnViewPagerListener {\n    /*初始化完成*/\n    void onInitComplete();\n\n    /*释放的监听*/\n    void onPageRelease(boolean isNext, int position);\n\n    /*选中的监听以及判断是否滑动到底部*/\n    void onPageSelected(int position, boolean isBottom);\n\n\n}\n"
  },
  {
    "path": "app/src/main/res/drawable/circle_big_red.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\"\n    >\n    <solid android:color=\"@android:color/holo_red_dark\"/>\n    <size android:width=\"20dp\"\n        android:height=\"20dp\"/>\n    <corners android:radius=\"10dp\"/>\n\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/circle_red.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\"\n    >\n    <solid android:color=\"#FE5C9D\"/>\n    <size android:width=\"10dp\"\n        android:height=\"10dp\"/>\n    <corners android:radius=\"5dp\"/>\n\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/cirque_gray.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\"\n    >\n    <corners android:radius=\"5dp\"/>\n    <stroke android:width=\"1dp\"\n        android:color=\"@android:color/darker_gray\"\n        />\n    <size android:width=\"10dp\"\n        android:height=\"10dp\"\n        />\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/echelon_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" android:shape=\"rectangle\">\n    <corners\n        android:radius=\"1dp\"\n        android:topRightRadius=\"0dp\"\n        android:bottomRightRadius=\"0dp\"\n        android:bottomLeftRadius=\"0dp\" />\n    <stroke\n        android:width=\"2dp\"\n        android:color=\"#22e2e2e2\" />\n\n    <solid android:color=\"@android:color/white\" />\n\n</shape>"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillColor=\"#26A69A\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/play_arrow.xml",
    "content": "<vector android:alpha=\"0.61\" android:height=\"24dp\"\n    android:viewportHeight=\"24.0\" android:viewportWidth=\"24.0\"\n    android:width=\"24dp\" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <path android:fillColor=\"#99ffffff\" android:pathData=\"M8,5v14l11,-7z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillType=\"evenOdd\"\n        android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                android:endX=\"78.5885\"\n                android:endY=\"90.9159\"\n                android:startX=\"48.7653\"\n                android:startY=\"61.0927\"\n                android:type=\"linear\">\n                <item\n                    android:color=\"#44000000\"\n                    android:offset=\"0.0\" />\n                <item\n                    android:color=\"#00000000\"\n                    android:offset=\"1.0\" />\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n        android:fillColor=\"#FFFFFF\"\n        android:fillType=\"nonZero\"\n        android:pathData=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n                xmlns:tools=\"http://schemas.android.com/tools\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"@android:color/black\"\n    >\n\n    <android.support.v7.widget.RecyclerView\n        android:id=\"@+id/recycler\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"/>\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"25dp\"\n        android:layout_marginTop=\"35dp\"\n        android:orientation=\"horizontal\"\n        >\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerHorizontal=\"true\"\n            android:orientation=\"horizontal\"\n            >\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginRight=\"16dp\"\n                android:text=\"推荐\"\n                android:textColor=\"@android:color/white\"\n                android:textSize=\"18sp\"\n                android:textStyle=\"bold\"\n                />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"附近\"\n                android:textColor=\"#f2f2f2\"\n                android:textSize=\"17sp\"\n                android:textStyle=\"bold\"\n                />\n        </LinearLayout>\n\n        <ImageView\n            android:layout_width=\"20dp\"\n            android:layout_height=\"20dp\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_marginLeft=\"16dp\"\n            android:layout_centerVertical=\"true\"\n            android:src=\"@mipmap/search_icon\"\n            android:tint=\"#f2f2f2\"\n            />\n\n        <ImageView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerVertical=\"true\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_marginRight=\"16dp\"\n            android:src=\"@mipmap/icon_storyhome_open\"\n            android:tint=\"#f2f2f2\"\n            />\n    </RelativeLayout>\n\n\n    <View\n        android:id=\"@+id/line_bottom\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1px\"\n        android:layout_above=\"@+id/bottom\"\n        android:background=\"@android:color/white\"\n        />\n\n    <LinearLayout\n        android:id=\"@+id/bottom\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"?actionBarSize\"\n        android:layout_alignParentBottom=\"true\"\n        android:gravity=\"center_vertical\"\n        android:orientation=\"horizontal\"\n        >\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"首页\"\n            android:textColor=\"@android:color/white\"\n            android:textSize=\"18sp\"\n            android:textStyle=\"bold\"\n            />\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"关注\"\n            android:textColor=\"#f2f2f2\"\n            android:textSize=\"17sp\"\n            android:textStyle=\"bold\"\n            />\n\n        <ImageView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"30dp\"\n            android:layout_weight=\"1\"\n            android:src=\"@mipmap/add_bg\"\n            />\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"消息\"\n            android:textColor=\"#f2f2f2\"\n            android:textSize=\"17sp\"\n            android:textStyle=\"bold\"\n            />\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"我\"\n            android:textColor=\"#f2f2f2\"\n            android:textSize=\"17sp\"\n            android:textStyle=\"bold\"\n            />\n    </LinearLayout>\n</RelativeLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/item_view_pager.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/root_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n    <com.example.administrator.douyin.FullWindowVideoView\n        android:id=\"@+id/video_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:clickable=\"false\"\n        android:focusable=\"false\"\n        />\n    <ImageView\n        android:id=\"@+id/img_thumb\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:scaleType=\"centerCrop\"\n        android:clickable=\"false\"\n        android:focusable=\"false\"\n        android:visibility=\"visible\"\n        />\n    <LinearLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\n        android:layout_centerVertical=\"true\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_marginRight=\"10dp\"\n        android:gravity=\"center_horizontal\"\n        >\n        <RelativeLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\">\n\n            <de.hdodenhof.circleimageview.CircleImageView\n                android:layout_width=\"50dp\"\n                android:layout_height=\"50dp\"\n                android:layout_alignParentTop=\"true\"\n                android:src=\"@mipmap/header_icon_2\"\n                app:civ_border_color=\"@android:color/white\"\n                app:civ_border_width=\"2dp\" />\n            <ImageView\n                android:layout_width=\"20dp\"\n                android:layout_height=\"20dp\"\n                android:background=\"@drawable/circle_big_red\"\n                android:src=\"@mipmap/add_icon\"\n                android:tint=\"@android:color/white\"\n                android:scaleType=\"centerInside\"\n                android:layout_centerHorizontal=\"true\"\n                android:layout_marginTop=\"40dp\"\n                />\n        </RelativeLayout>\n\n        <TextView\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:drawableTop=\"@mipmap/heart_icon\"\n            android:layout_marginTop=\"16dp\"\n            android:text=\"88.8w\"\n            android:textColor=\"@android:color/white\"\n            android:gravity=\"center\"\n            />\n        <TextView\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:drawableTop=\"@mipmap/msg_icon\"\n            android:layout_marginTop=\"16dp\"\n            android:text=\"66.8w\"\n            android:textColor=\"@android:color/white\"\n            android:gravity=\"center\"\n            />\n        <TextView\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:drawableTop=\"@mipmap/share_icon\"\n            android:layout_marginTop=\"16dp\"\n            android:text=\"99.8w\"\n            android:textColor=\"@android:color/white\"\n            android:gravity=\"center\"\n            />\n    </LinearLayout>\n    <ImageView\n        android:id=\"@+id/img_play\"\n        android:layout_width=\"60dp\"\n        android:layout_height=\"60dp\"\n        android:src=\"@mipmap/ic_live_profile_paly\"\n        android:clickable=\"true\"\n        android:focusable=\"true\"\n        android:tint=\"#f2f2f2\"\n        android:alpha=\"0\"\n        android:layout_centerInParent=\"true\"\n        />\n\n    <com.example.administrator.douyin.Love2\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n    </com.example.administrator.douyin.Love2>\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#FF4081</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">仿抖音1</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n    <style name=\"main_theme\" parent=\"AppTheme\"></style>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-v19/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <style name=\"main_theme\" parent=\"AppTheme\">\n        <item name=\"android:windowTranslucentStatus\">true</item>\n        <item name=\"android:windowTranslucentNavigation\">true</item>\n    </style>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-v21/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <style name=\"main_theme\" parent=\"AppTheme\">\n        <item name=\"android:windowTranslucentStatus\">false</item>\n        <item name=\"android:windowTranslucentNavigation\">true</item>\n        <!--Android 5.x开始需要把颜色设置透明，否则导航栏会呈现系统默认的浅灰色-->\n        <item name=\"android:statusBarColor\">@android:color/transparent</item>\n    </style>\n</resources>"
  },
  {
    "path": "app/src/test/java/com/example/administrator/douyin/ExampleUnitTest.java",
    "content": "package com.example.administrator.douyin;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    ext.kotlin_version = '1.2.60'\n\n    repositories {\n        google()\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.1.2'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed Aug 08 20:04:27 CST 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.4-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app'\n"
  }
]