added NextVideo support

This commit is contained in:
Christian Schabesberger 2015-10-25 19:13:44 +01:00
parent 8c0156dea3
commit d9e690f62c
12 changed files with 311 additions and 123 deletions

View File

@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -31,4 +31,5 @@ public class VideoInfoItem {
public Bitmap thumbnail = null;
public String webpage_url = "";
public String upload_date = "";
public String view_count = "";
}

View File

@ -0,0 +1,76 @@
package org.schabi.newpipe;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
/**
* Created by Christian Schabesberger on 24.10.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* VideoInfoItemViewCreator.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 <http://www.gnu.org/licenses/>.
*/
public class VideoInfoItemViewCreator {
private static final String TAG = VideoInfoItemViewCreator.class.toString();
LayoutInflater inflater;
public VideoInfoItemViewCreator(LayoutInflater inflater) {
this.inflater = inflater;
}
public View getViewByVideoInfoItem(View convertView, ViewGroup parent, VideoInfoItem info) {
ViewHolder holder;
if(convertView == null) {
convertView = inflater.inflate(R.layout.video_item, parent, false);
holder = new ViewHolder();
holder.itemThumbnailView = (ImageView) convertView.findViewById(R.id.itemThumbnailView);
holder.itemVideoTitleView = (TextView) convertView.findViewById(R.id.itemVideoTitleView);
holder.itemUploaderView = (TextView) convertView.findViewById(R.id.itemUploaderView);
holder.itemDurationView = (TextView) convertView.findViewById(R.id.itemDurationView);
holder.itemUploadDateView = (TextView) convertView.findViewById(R.id.itemUploadDateView);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
if(info.thumbnail == null) {
holder.itemThumbnailView.setImageResource(R.drawable.dummi_thumbnail);
} else {
holder.itemThumbnailView.setImageBitmap(info.thumbnail);
}
holder.itemVideoTitleView.setText(info.title);
holder.itemUploaderView.setText(info.uploader);
holder.itemDurationView.setText(info.duration);
if(!info.upload_date.isEmpty()) {
holder.itemUploadDateView.setText(info.upload_date);
} else {
//tewak if nececeary: This is a hack preventing to have a white space in the layout :P
holder.itemUploadDateView.setText(info.view_count);
}
return convertView;
}
private class ViewHolder {
public ImageView itemThumbnailView;
public TextView itemVideoTitleView, itemUploaderView, itemDurationView, itemUploadDateView;
}
}

View File

@ -1,6 +1,7 @@
package org.schabi.newpipe;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
@ -15,9 +16,12 @@ import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import java.net.URL;
@ -57,6 +61,7 @@ public class VideoItemDetailFragment extends Fragment {
private boolean autoPlayEnabled = false;
private Thread extractorThread = null;
private VideoInfo currentVideoInfo = null;
private class ExtractorRunnable implements Runnable {
private Handler h = new Handler();
@ -83,6 +88,11 @@ public class VideoItemDetailFragment extends Fragment {
new URL(videoInfo.uploader_thumbnail_url)
.openConnection()
.getInputStream()), SetThumbnailRunnable.CHANNEL_THUMBNAIL));
h.post(new SetThumbnailRunnable(
BitmapFactory.decodeStream(
new URL(videoInfo.nextVideo.thumbnail_url)
.openConnection()
.getInputStream()), SetThumbnailRunnable.NEXT_VIDEO_THUMBNAIL));
}
} catch (Exception e) {
e.printStackTrace();
@ -103,8 +113,9 @@ public class VideoItemDetailFragment extends Fragment {
}
private class SetThumbnailRunnable implements Runnable {
public static final int CHANNEL_THUMBNAIL = 2;
public static final int VIDEO_THUMBNAIL = 1;
public static final int CHANNEL_THUMBNAIL = 2;
public static final int NEXT_VIDEO_THUMBNAIL = 3;
private Bitmap thumbnail;
private int thumbnailId;
public SetThumbnailRunnable(Bitmap thumbnail, int id) {
@ -123,19 +134,25 @@ public class VideoItemDetailFragment extends Fragment {
try {
switch (id) {
case SetThumbnailRunnable.VIDEO_THUMBNAIL:
thumbnailView = (ImageView) a.findViewById(R.id.detailThumbnailView);
break;
case SetThumbnailRunnable.CHANNEL_THUMBNAIL:
thumbnailView = (ImageView) a.findViewById(R.id.detailUploaderThumbnailView);
break;
case SetThumbnailRunnable.NEXT_VIDEO_THUMBNAIL:
FrameLayout nextVideoFrame = (FrameLayout) a.findViewById(R.id.detailNextVideoFrame);
thumbnailView = (ImageView) nextVideoFrame.findViewById(R.id.itemThumbnailView);
currentVideoInfo.nextVideo.thumbnail = thumbnail;
break;
default:
Log.d(TAG, "Error: Thumbnail id not known");
return;
}
if (thumbnailView != null) {
thumbnailView.setImageBitmap(thumbnail);
}
} catch (java.lang.NullPointerException e) {
// No god programm design i know. :/
Log.w(TAG, "updateThumbnail(): Fragment closed before thread ended work");
@ -144,7 +161,12 @@ public class VideoItemDetailFragment extends Fragment {
public void updateInfo(VideoInfo info) {
Activity a = getActivity();
currentVideoInfo = info;
try {
VideoInfoItemViewCreator videoItemViewCreator =
new VideoInfoItemViewCreator(LayoutInflater.from(getActivity()));
ScrollView contentMainView = (ScrollView) a.findViewById(R.id.detailMainContent);
ProgressBar progressBar = (ProgressBar) a.findViewById(R.id.detailProgressBar);
TextView videoTitleView = (TextView) a.findViewById(R.id.detailVideoTitleView);
TextView uploaderView = (TextView) a.findViewById(R.id.detailUploaderView);
@ -154,28 +176,14 @@ public class VideoItemDetailFragment extends Fragment {
TextView uploadDateView = (TextView) a.findViewById(R.id.detailUploadDateView);
TextView descriptionView = (TextView) a.findViewById(R.id.detailDescriptionView);
ImageView thumbnailView = (ImageView) a.findViewById(R.id.detailThumbnailView);
ImageView uploaderThumbnailView = (ImageView) a.findViewById(R.id.detailUploaderThumbnailView);
ImageView thumbsUpPic = (ImageView) a.findViewById(R.id.detailThumbsUpImgView);
ImageView thumbsDownPic = (ImageView) a.findViewById(R.id.detailThumbsDownImgView);
View textSeperationLine = a.findViewById(R.id.textSeperationLine);
FrameLayout nextVideoFrame = (FrameLayout) a.findViewById(R.id.detailNextVideoFrame);
View nextVideoView = videoItemViewCreator
.getViewByVideoInfoItem(null, nextVideoFrame, info.nextVideo);
nextVideoFrame.addView(nextVideoView);
Button nextVideoButton = (Button) a.findViewById(R.id.detailNextVideoButton);
if(textSeperationLine != null) {
textSeperationLine.setVisibility(View.VISIBLE);
}
contentMainView.setVisibility(View.VISIBLE);
progressBar.setVisibility(View.GONE);
videoTitleView.setVisibility(View.VISIBLE);
uploaderView.setVisibility(View.VISIBLE);
uploadDateView.setVisibility(View.VISIBLE);
viewCountView.setVisibility(View.VISIBLE);
thumbsUpView.setVisibility(View.VISIBLE);
thumbsDownView.setVisibility(View.VISIBLE);
uploadDateView.setVisibility(View.VISIBLE);
descriptionView.setVisibility(View.VISIBLE);
thumbnailView.setVisibility(View.VISIBLE);
uploaderThumbnailView.setVisibility(View.VISIBLE);
thumbsUpPic.setVisibility(View.VISIBLE);
thumbsDownPic.setVisibility(View.VISIBLE);
switch (info.videoAvailableStatus) {
case VideoInfo.VIDEO_AVAILABLE: {
@ -203,6 +211,18 @@ public class VideoItemDetailFragment extends Fragment {
}
ActionBarHandler.getHandler().setStreams(streamList, info.audioStreams);
}
nextVideoButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent detailIntent = new Intent(getActivity(), VideoItemDetailActivity.class);
detailIntent.putExtra(VideoItemDetailFragment.ARG_ITEM_ID, currentVideoInfo.nextVideo.id);
detailIntent.putExtra(VideoItemDetailFragment.VIDEO_URL, currentVideoInfo.nextVideo.webpage_url);
//todo: make id dynamic the following line is crap
detailIntent.putExtra(VideoItemDetailFragment.STREAMING_SERVICE, 0);
startActivity(detailIntent);
}
});
break;
case VideoInfo.VIDEO_UNAVAILABLE_GEMA:
thumbnailView.setImageBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.gruese_die_gema_unangebracht));

View File

@ -6,14 +6,12 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import java.util.Vector;
/**
* Created by the-scrabi on 11.08.15.
* Created by Christian Schabesberger on 11.08.15.
*
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
* VideoListAdapter.java is part of NewPipe.
@ -33,18 +31,20 @@ import java.util.Vector;
*/
public class VideoListAdapter extends BaseAdapter {
private static final String TAG = VideoListAdapter.class.toString();
private LayoutInflater inflater;
private Context context;
private VideoInfoItemViewCreator viewCreator;
private Vector<VideoInfoItem> videoList = new Vector<>();
private Vector<Boolean> downloadedThumbnailList = new Vector<>();
VideoItemListFragment videoListFragment;
ListView listView;
public VideoListAdapter(Context context, VideoItemListFragment videoListFragment) {
inflater = LayoutInflater.from(context);
viewCreator = new VideoInfoItemViewCreator(LayoutInflater.from(context));
this.videoListFragment = videoListFragment;
this.listView = videoListFragment.getListView();
this.context = context;
}
public void addVideoList(Vector<VideoInfoItem> videos) {
@ -96,30 +96,7 @@ public class VideoListAdapter extends BaseAdapter {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if(convertView == null) {
convertView = inflater.inflate(R.layout.video_item, parent, false);
holder = new ViewHolder();
holder.itemThumbnailView = (ImageView) convertView.findViewById(R.id.itemThumbnailView);
holder.itemVideoTitleView = (TextView) convertView.findViewById(R.id.itemVideoTitleView);
holder.itemUploaderView = (TextView) convertView.findViewById(R.id.itemUploaderView);
holder.itemDurationView = (TextView) convertView.findViewById(R.id.itemDurationView);
holder.itemUploadDateView = (TextView) convertView.findViewById(R.id.itemUploadDateView);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
final Context context = parent.getContext();
if(videoList.get(position).thumbnail == null) {
holder.itemThumbnailView.setImageResource(R.drawable.dummi_thumbnail);
} else {
holder.itemThumbnailView.setImageBitmap(videoList.get(position).thumbnail);
}
holder.itemVideoTitleView.setText(videoList.get(position).title);
holder.itemUploaderView.setText(videoList.get(position).uploader);
holder.itemDurationView.setText(videoList.get(position).duration);
holder.itemUploadDateView.setText(videoList.get(position).upload_date);
convertView = viewCreator.getViewByVideoInfoItem(convertView, parent, videoList.get(position));
if(listView.isItemChecked(position)) {
convertView.setBackgroundColor(context.getResources().getColor(R.color.primaryColorYoutube));
@ -129,9 +106,4 @@ public class VideoListAdapter extends BaseAdapter {
return convertView;
}
private class ViewHolder {
public ImageView itemThumbnailView;
public TextView itemVideoTitleView, itemUploaderView, itemDurationView, itemUploadDateView;
}
}

View File

@ -153,7 +153,7 @@ public class YoutubeExtractor implements Extractor {
//-------------------------------------
JSONObject playerArgs = null;
JSONObject ytAssets = null;
String dashManifest = "";
String dashManifest;
{
Pattern p = Pattern.compile("ytplayer.config\\s*=\\s*(\\{.*?\\});");
Matcher m = p.matcher(site);
@ -294,12 +294,10 @@ public class YoutubeExtractor implements Extractor {
// view count
videoInfo.view_count = doc.select("div[class=\"watch-view-count\"]").first().text();
/*
// next video
videoInfo.nextVideo = extractVideoInfoItem(doc.select("div[class=\"watch-sidebar-section\"]").first()
.select("li").first());
int i = 0;
// related videos
videoInfo.relatedVideos = new Vector<>();
@ -308,10 +306,8 @@ public class YoutubeExtractor implements Extractor {
if(li.select("a[class*=\"content-link\"]").first() != null) {
videoInfo.relatedVideos.add(extractVideoInfoItem(li));
i++;
Log.d(TAG, Integer.toString(i));
}
}
*/
return videoInfo;
}
@ -403,11 +399,10 @@ public class YoutubeExtractor implements Extractor {
} catch (Exception e) {
e.printStackTrace();
}
info.title = li.select("span[class=\"title\"]").first()
.text();
info.title = li.select("span[class=\"title\"]").first().text();
info.view_count = li.select("span[class*=\"view-count\"]").first().text();
info.uploader = li.select("span[class=\"g-hovercard\"]").first().text();
info.duration = li.select("span[class=\"video-time\"]").first().text();
Element img = li.select("img").first();
@ -418,7 +413,9 @@ public class YoutubeExtractor implements Extractor {
if(info.thumbnail_url.contains(".gif")) {
info.thumbnail_url = img.attr("data-thumb");
}
if(info.thumbnail_url.startsWith("//")) {
info.thumbnail_url = "https:" + info.thumbnail_url;
}
return info;
}

View File

@ -6,7 +6,8 @@
style="?android:attr/textAppearanceLarge"
tools:context=".VideoItemDetailFragment"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:id="@+id/videoitem_detail">
<ProgressBar android:id="@+id/detailProgressBar"
android:layout_width="wrap_content"
@ -15,10 +16,11 @@
android:indeterminate="true"/>
<ScrollView
android:id="@+id/videoitem_detail"
android:id="@+id/detailMainContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textIsSelectable="true">
android:textIsSelectable="true"
android:visibility="invisible">
<RelativeLayout
android:layout_width="match_parent"
@ -31,8 +33,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:src="@drawable/dummi_thumbnail"
android:visibility="invisible"/>
android:src="@drawable/dummi_thumbnail"/>
<TextView android:id="@+id/detailVideoTitleView"
android:layout_width="wrap_content"
@ -42,8 +43,7 @@
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Bla blabla !!!"
android:visibility="invisible"/>
android:text="Bla blabla !!!"/>
<ImageView android:id="@+id/detailUploaderThumbnailView"
android:layout_width="80dp"
@ -53,7 +53,6 @@
android:paddingRight="5dp"
android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentLeft="true"
android:visibility="invisible"
android:src="@drawable/budy" />
<TextView android:id="@+id/detailUploaderView"
@ -64,7 +63,6 @@
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="Herr von Gurken" />
<View android:id="@+id/textSeperationLine"
@ -73,7 +71,6 @@
android:background="@android:color/darker_gray"
android:layout_below="@id/detailUploaderView"
android:paddingTop="20dp"
android:visibility="invisible"
android:layout_alignParentLeft="true" />
<TextView android:id="@+id/detailViewCountView"
@ -83,7 +80,6 @@
android:layout_alignParentRight="true"
android:paddingTop="70dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:visibility="invisible"
android:text="1.000.115 views" />
<TextView android:id="@+id/detailThumbsDownCountView"
@ -92,7 +88,6 @@
android:layout_below="@id/detailViewCountView"
android:layout_alignParentRight="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="5.000" />
<ImageView android:id="@+id/detailThumbsDownImgView"
@ -100,7 +95,6 @@
android:layout_height="20dp"
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsDownCountView"
android:visibility="invisible"
android:src="@drawable/thumbs_down" />
<TextView android:id="@+id/detailThumbsUpCountView"
@ -109,7 +103,6 @@
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsDownImgView"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="111.111" />
<ImageView android:id="@+id/detailThumbsUpImgView"
@ -117,7 +110,6 @@
android:layout_height="20dp"
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsUpCountView"
android:visibility="invisible"
android:src="@drawable/thumbs_up" />
<TextView android:id="@+id/detailUploadDateView"
@ -129,7 +121,6 @@
android:paddingRight="6dp"
android:paddingTop="20dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:visibility="invisible"
android:text="Uploaded at: 45.64.1285" />
<TextView android:id="@+id/detailDescriptionView"
@ -140,14 +131,62 @@
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmodtempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. "
/>
<TextView android:id="@+id/detailNextVideoTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/detailDescriptionView"
android:layout_alignParentLeft="true"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="20dp"
android:paddingBottom="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black"
android:text="@string/nextVideoTitle"
/>
<View android:id="@+id/detailNextVideoSeperationLine"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:background="@android:color/darker_gray"
android:layout_below="@id/detailNextVideoTitle"
android:layout_alignParentLeft="true" />
<RelativeLayout android:id="@+id/detailNextVidButtonAndContantLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/detailNextVideoSeperationLine">
<FrameLayout
android:id="@+id/detailNextVideoFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/detailNextVideoButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignTop="@id/detailNextVideoFrame"
android:layout_alignBottom="@id/detailNextVideoFrame"
android:background="?attr/selectableItemBackground"/>
</RelativeLayout>
<View android:id="@+id/detailNextVideoSeperationLineEnd"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:background="@android:color/darker_gray"
android:layout_below="@id/detailNextVidButtonAndContantLayout"
android:layout_alignParentLeft="true" />
<View
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@id/detailDescriptionView"/>
android:layout_height="100dip"
android:layout_below="@id/detailNextVideoSeperationLineEnd"/>
</RelativeLayout>
</ScrollView>

View File

@ -6,7 +6,8 @@
style="?android:attr/textAppearanceLarge"
tools:context=".VideoItemDetailFragment"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:id="@+id/videoitem_detail">
<ProgressBar android:id="@+id/detailProgressBar"
android:layout_width="wrap_content"
@ -15,10 +16,11 @@
android:indeterminate="true"/>
<ScrollView
android:id="@+id/videoitem_detail"
android:id="@+id/detailMainContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textIsSelectable="true">
android:textIsSelectable="true"
android:visibility="invisible">
<RelativeLayout
android:layout_width="match_parent"
@ -31,8 +33,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:src="@drawable/dummi_thumbnail"
android:visibility="invisible"/>
android:src="@drawable/dummi_thumbnail"/>
<TextView android:id="@+id/detailVideoTitleView"
android:layout_width="wrap_content"
@ -42,8 +43,7 @@
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Bla blabla !!!"
android:visibility="invisible"/>
android:text="Bla blabla !!!"/>
<ImageView android:id="@+id/detailUploaderThumbnailView"
android:layout_width="80dp"
@ -53,7 +53,6 @@
android:paddingRight="5dp"
android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentLeft="true"
android:visibility="invisible"
android:src="@drawable/budy" />
<TextView android:id="@+id/detailUploaderView"
@ -64,7 +63,6 @@
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="Herr von Gurken" />
<View android:id="@+id/textSeperationLine"
@ -73,7 +71,6 @@
android:background="@android:color/darker_gray"
android:layout_below="@id/detailUploaderView"
android:paddingTop="20dp"
android:visibility="invisible"
android:layout_alignParentLeft="true" />
<TextView android:id="@+id/detailViewCountView"
@ -83,7 +80,6 @@
android:layout_alignParentRight="true"
android:paddingTop="70dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:visibility="invisible"
android:text="1.000.115 views" />
<TextView android:id="@+id/detailThumbsDownCountView"
@ -92,7 +88,6 @@
android:layout_below="@id/detailViewCountView"
android:layout_alignParentRight="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="5.000" />
<ImageView android:id="@+id/detailThumbsDownImgView"
@ -100,7 +95,6 @@
android:layout_height="20dp"
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsDownCountView"
android:visibility="invisible"
android:src="@drawable/thumbs_down" />
<TextView android:id="@+id/detailThumbsUpCountView"
@ -109,7 +103,6 @@
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsDownImgView"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="111.111" />
<ImageView android:id="@+id/detailThumbsUpImgView"
@ -117,7 +110,6 @@
android:layout_height="20dp"
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsUpCountView"
android:visibility="invisible"
android:src="@drawable/thumbs_up" />
<TextView android:id="@+id/detailUploadDateView"
@ -129,7 +121,6 @@
android:paddingRight="6dp"
android:paddingTop="20dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:visibility="invisible"
android:text="Uploaded at: 45.64.1285" />
<TextView android:id="@+id/detailDescriptionView"
@ -140,14 +131,62 @@
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmodtempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. "
/>
<TextView android:id="@+id/detailNextVideoTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/detailDescriptionView"
android:layout_alignParentLeft="true"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="20dp"
android:paddingBottom="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black"
android:text="@string/nextVideoTitle"
/>
<View android:id="@+id/detailNextVideoSeperationLine"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:background="@android:color/darker_gray"
android:layout_below="@id/detailNextVideoTitle"
android:layout_alignParentLeft="true" />
<RelativeLayout android:id="@+id/detailNextVidButtonAndContantLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/detailNextVideoSeperationLine">
<FrameLayout
android:id="@+id/detailNextVideoFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/detailNextVideoButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignTop="@id/detailNextVideoFrame"
android:layout_alignBottom="@id/detailNextVideoFrame"
android:background="?attr/selectableItemBackground"/>
</RelativeLayout>
<View android:id="@+id/detailNextVideoSeperationLineEnd"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:background="@android:color/darker_gray"
android:layout_below="@id/detailNextVidButtonAndContantLayout"
android:layout_alignParentLeft="true" />
<View
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@id/detailDescriptionView"/>
android:layout_height="100dip"
android:layout_below="@id/detailNextVideoSeperationLineEnd"/>
</RelativeLayout>
</ScrollView>

View File

@ -7,7 +7,8 @@
android:textIsSelectable="true"
style="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:id="@+id/videoitem_detail">
<ProgressBar android:id="@+id/detailProgressBar"
android:layout_width="wrap_content"
@ -16,9 +17,11 @@
android:indeterminate="true"/>
<ScrollView
android:id="@+id/videoitem_detail"
android:id="@+id/detailMainContent"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:visibility="invisible">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -30,7 +33,6 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:visibility="invisible"
android:src="@drawable/dummi_thumbnail"/>
<TextView android:id="@+id/detailVideoTitleView"
@ -42,7 +44,6 @@
android:paddingRight="6dp"
android:paddingBottom="20dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:visibility="invisible"
android:text="Bla blabla !!!"/>
<ImageView android:id="@+id/detailUploaderThumbnailView"
@ -53,7 +54,6 @@
android:paddingRight="2dp"
android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentLeft="true"
android:visibility="invisible"
android:src="@drawable/budy" />
<TextView android:id="@+id/detailUploaderView"
@ -64,7 +64,6 @@
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="Herr von Gurken" />
<TextView android:id="@+id/detailViewCountView"
@ -76,7 +75,6 @@
android:paddingRight="16dp"
android:paddingLeft="16dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:visibility="invisible"
android:text="drölf views" />
<TextView android:id="@+id/detailThumbsDownCountView"
@ -87,7 +85,6 @@
android:paddingRight="16dp"
android:paddingLeft="16dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="-5.000" />
<ImageView android:id="@+id/detailThumbsDownImgView"
@ -95,7 +92,6 @@
android:layout_height="20dp"
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsDownCountView"
android:visibility="invisible"
android:src="@drawable/thumbs_down" />
<TextView android:id="@+id/detailThumbsUpCountView"
@ -104,7 +100,6 @@
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsDownImgView"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="∞" />
<ImageView android:id="@+id/detailThumbsUpImgView"
@ -112,7 +107,6 @@
android:layout_height="20dp"
android:layout_below="@id/detailViewCountView"
android:layout_toLeftOf="@id/detailThumbsUpCountView"
android:visibility="invisible"
android:src="@drawable/thumbs_up" />
<TextView android:id="@+id/detailUploadDateView"
@ -124,7 +118,6 @@
android:paddingRight="6dp"
android:paddingTop="20dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:visibility="invisible"
android:text="Uploaded at: 45.64.1285" />
<TextView android:id="@+id/detailDescriptionView"
@ -135,14 +128,62 @@
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="invisible"
android:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmodtempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. "
/>
<TextView android:id="@+id/detailNextVideoTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/detailDescriptionView"
android:layout_alignParentLeft="true"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="20dp"
android:paddingBottom="6dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black"
android:text="@string/nextVideoTitle"
/>
<View android:id="@+id/detailNextVideoSeperationLine"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:background="@android:color/darker_gray"
android:layout_below="@id/detailNextVideoTitle"
android:layout_alignParentLeft="true" />
<RelativeLayout android:id="@+id/detailNextVidButtonAndContantLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/detailNextVideoSeperationLine">
<FrameLayout
android:id="@+id/detailNextVideoFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/detailNextVideoButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignTop="@id/detailNextVideoFrame"
android:layout_alignBottom="@id/detailNextVideoFrame"
android:background="?attr/selectableItemBackground"/>
</RelativeLayout>
<View android:id="@+id/detailNextVideoSeperationLineEnd"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:background="@android:color/darker_gray"
android:layout_below="@id/detailNextVidButtonAndContantLayout"
android:layout_alignParentLeft="true" />
<View
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@id/detailDescriptionView"/>
android:layout_height="100dip"
android:layout_below="@id/detailNextVideoSeperationLineEnd"/>
</RelativeLayout>
</ScrollView>

View File

@ -7,8 +7,9 @@
android:padding="6dp">
<ImageView android:id="@+id/itemThumbnailView"
android:layout_width="125dp"
android:layout_width="142dp"
android:layout_height="80dp"
android:scaleType="centerCrop"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/dummi_thumbnail"/>

View File

@ -3,7 +3,7 @@
<string name="app_name">NewPipe</string>
<string name="title_videoitem_detail">NewPipe</string>
<string name="nothingFound">Nichts gefunden</string>
<string name="viewSufix">views</string>
<string name="viewSufix">Aufrufe</string>
<string name="uploadDatePrefix">Hochgeladen am: </string>
<string name="noPlayerFound">Keinen Streamplayer gefunden. Vielleicht möchtest du einen installieren.</string>
<string name="installStreamPlayer">Jetzt installieren</string>
@ -45,4 +45,5 @@
<item>Video</item>
<item>Audio</item>
</string-array>
<string name="nextVideoTitle">Nächstes Video</string>
</resources>

View File

@ -45,4 +45,5 @@
<item>Video</item>
<item>Audio</item>
</string-array>
<string name="nextVideoTitle">Next Video</string>
</resources>