From 074963aee0e4d43f392822bbdd3237def2702cc2 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Wed, 9 Dec 2015 22:14:22 +0100 Subject: [PATCH] put progressbar on top of thumbnail and made it red --- app/src/main/AndroidManifest.xml | 2 +- .../newpipe/VideoItemDetailFragment.java | 11 - .../newpipe/views/DetailScrollView.java | 56 ----- .../layout-v21/fragment_videoitem_detail.xml | 226 ++++++++++++++++++ .../res/layout/fragment_videoitem_detail.xml | 17 +- app/src/main/res/values-v21/styles.xml | 5 - app/src/main/res/values/styles.xml | 4 - 7 files changed, 235 insertions(+), 86 deletions(-) delete mode 100644 app/src/main/java/org/schabi/newpipe/views/DetailScrollView.java create mode 100644 app/src/main/res/layout-v21/fragment_videoitem_detail.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d3c17455e..6f4fd2e19 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -25,7 +25,7 @@ + android:theme="@style/AppTheme"> diff --git a/app/src/main/java/org/schabi/newpipe/VideoItemDetailFragment.java b/app/src/main/java/org/schabi/newpipe/VideoItemDetailFragment.java index e7e108c98..354292108 100644 --- a/app/src/main/java/org/schabi/newpipe/VideoItemDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/VideoItemDetailFragment.java @@ -44,7 +44,6 @@ import java.util.Vector; import org.schabi.newpipe.services.VideoExtractor; import org.schabi.newpipe.services.ServiceList; import org.schabi.newpipe.services.StreamingService; -import org.schabi.newpipe.views.DetailScrollView; /** @@ -442,16 +441,6 @@ public class VideoItemDetailFragment extends Fragment { } }); - - DetailScrollView scrollView = (DetailScrollView) activity.findViewById(R.id.detailMainContent); - scrollView.setOnScrollViewListener(new DetailScrollView.OnScrollViewListener() { - // This is used to make the thumbnailView move half the speed than the content does - // while scrolling. - @Override - public void onScrollChanged(DetailScrollView v, int l, int t, int oldl, int oldt) { - //Log.d(TAG, Integer.toString(l) + " : " + Integer.toString(t)); - } - }); } } diff --git a/app/src/main/java/org/schabi/newpipe/views/DetailScrollView.java b/app/src/main/java/org/schabi/newpipe/views/DetailScrollView.java deleted file mode 100644 index 95fb42ad6..000000000 --- a/app/src/main/java/org/schabi/newpipe/views/DetailScrollView.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.schabi.newpipe.views; - -import android.content.Context; -import android.util.AttributeSet; -import android.widget.ScrollView; - -/** - * Created by the-scrabi on 02.12.15. - * - * Copyright (C) Christian Schabesberger 2015 - * DetailScrollView.java is part of NewPipe. - * - * NewPipe is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * NewPipe is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NewPipe. If not, see . - */ - -public class DetailScrollView extends ScrollView { - - OnScrollViewListener mOnScrollViewListener = null; - - public DetailScrollView(Context context) { - super(context); - } - - public DetailScrollView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public DetailScrollView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - public interface OnScrollViewListener { - void onScrollChanged( DetailScrollView v, int l, int t, int oldl, int oldt ); - } - - @Override - protected void onScrollChanged(int l, int t, int oldl, int oldt) { - mOnScrollViewListener.onScrollChanged(this, l, t, oldl, oldt); - super.onScrollChanged(l, t, oldl, oldt); - } - - public void setOnScrollViewListener(OnScrollViewListener listener) { - mOnScrollViewListener = listener; - } -} diff --git a/app/src/main/res/layout-v21/fragment_videoitem_detail.xml b/app/src/main/res/layout-v21/fragment_videoitem_detail.xml new file mode 100644 index 000000000..04cb40c8c --- /dev/null +++ b/app/src/main/res/layout-v21/fragment_videoitem_detail.xml @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + +