mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-04 17:16:24 +00:00
change view naming in detail fragment
This commit is contained in:
parent
7bea94144e
commit
2601bf6d81
@ -104,7 +104,7 @@ public class StreamInfoWorker {
|
|||||||
Log.e(TAG, "------");
|
Log.e(TAG, "------");
|
||||||
}
|
}
|
||||||
|
|
||||||
View rootView = a != null ? a.findViewById(R.id.videoitem_detail) : null;
|
View rootView = a != null ? a.findViewById(R.id.video_item_detail) : null;
|
||||||
ErrorActivity.reportError(h, a,
|
ErrorActivity.reportError(h, a,
|
||||||
streamInfo.errors, null, rootView,
|
streamInfo.errors, null, rootView,
|
||||||
ErrorActivity.ErrorInfo.make(ErrorActivity.REQUESTED_STREAM,
|
ErrorActivity.ErrorInfo.make(ErrorActivity.REQUESTED_STREAM,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package org.schabi.newpipe.detail;
|
package org.schabi.newpipe.detail;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
@ -27,7 +26,6 @@ import android.view.MotionEvent;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
@ -99,21 +97,19 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
private int streamingServiceId = -1;
|
private int streamingServiceId = -1;
|
||||||
|
|
||||||
private boolean autoPlayEnabled;
|
private boolean autoPlayEnabled;
|
||||||
private boolean showNextVideoItem;
|
private boolean showNextStreamItem;
|
||||||
private Bitmap videoThumbnail;
|
|
||||||
|
|
||||||
private View thumbnailWindowLayout;
|
private View thumbnailWindowLayout;
|
||||||
//this only remains due to downwards compatibility
|
//this only remains due to downwards compatibility
|
||||||
private FloatingActionButton playVideoButton;
|
private FloatingActionButton playVideoButton;
|
||||||
private final Point initialThumbnailPos = new Point(0, 0);
|
private final Point initialThumbnailPos = new Point(0, 0);
|
||||||
|
private View rootView = null;
|
||||||
|
private Bitmap streamThumbnail = null;
|
||||||
|
|
||||||
private ImageLoader imageLoader = ImageLoader.getInstance();
|
private ImageLoader imageLoader = ImageLoader.getInstance();
|
||||||
private DisplayImageOptions displayImageOptions =
|
private DisplayImageOptions displayImageOptions =
|
||||||
new DisplayImageOptions.Builder().cacheInMemory(true).build();
|
new DisplayImageOptions.Builder().cacheInMemory(true).build();
|
||||||
|
|
||||||
private View rootView = null;
|
|
||||||
|
|
||||||
private InfoListAdapter similarStreamsAdapter = null;
|
private InfoListAdapter similarStreamsAdapter = null;
|
||||||
|
|
||||||
public interface OnInvokeCreateOptionsMenuListener {
|
public interface OnInvokeCreateOptionsMenuListener {
|
||||||
@ -124,54 +120,55 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
|
|
||||||
private void updateInfo(final StreamInfo info) {
|
private void updateInfo(final StreamInfo info) {
|
||||||
try {
|
try {
|
||||||
Context c = getContext();
|
Activity a = getActivity();
|
||||||
|
|
||||||
RelativeLayout textContentLayout =
|
RelativeLayout textContentLayout =
|
||||||
(RelativeLayout) activity.findViewById(R.id.detailTextContentLayout);
|
(RelativeLayout) activity.findViewById(R.id.detail_text_content_layout);
|
||||||
final TextView videoTitleView =
|
final TextView videoTitleView =
|
||||||
(TextView) activity.findViewById(R.id.detailVideoTitleView);
|
(TextView) activity.findViewById(R.id.detail_video_title_view);
|
||||||
TextView uploaderView = (TextView) activity.findViewById(R.id.detailUploaderView);
|
TextView uploaderView = (TextView) activity.findViewById(R.id.detail_uploader_view);
|
||||||
TextView viewCountView = (TextView) activity.findViewById(R.id.detailViewCountView);
|
TextView viewCountView = (TextView) activity.findViewById(R.id.detail_view_count_view);
|
||||||
TextView thumbsUpView = (TextView) activity.findViewById(R.id.detailThumbsUpCountView);
|
TextView thumbsUpView = (TextView) activity.findViewById(R.id.detail_thumbs_up_count_view);
|
||||||
TextView thumbsDownView =
|
TextView thumbsDownView =
|
||||||
(TextView) activity.findViewById(R.id.detailThumbsDownCountView);
|
(TextView) activity.findViewById(R.id.detail_thumbs_down_count_view);
|
||||||
TextView uploadDateView = (TextView) activity.findViewById(R.id.detailUploadDateView);
|
TextView uploadDateView = (TextView) activity.findViewById(R.id.detail_upload_date_view);
|
||||||
TextView descriptionView = (TextView) activity.findViewById(R.id.detailDescriptionView);
|
TextView descriptionView = (TextView) activity.findViewById(R.id.detail_description_view);
|
||||||
FrameLayout nextVideoFrame =
|
RecyclerView nextStreamView =
|
||||||
(FrameLayout) activity.findViewById(R.id.detailNextVideoFrame);
|
(RecyclerView) activity.findViewById(R.id.detail_next_stream_content);
|
||||||
RelativeLayout nextVideoRootFrame =
|
RelativeLayout nextVideoRootFrame =
|
||||||
(RelativeLayout) activity.findViewById(R.id.detailNextVideoRootLayout);
|
(RelativeLayout) activity.findViewById(R.id.detail_next_stream_root_layout);
|
||||||
Button nextVideoButton = (Button) activity.findViewById(R.id.detailNextVideoButton);
|
TextView similarTitle = (TextView) activity.findViewById(R.id.detail_similar_title);
|
||||||
TextView similarTitle = (TextView) activity.findViewById(R.id.detailSimilarTitle);
|
|
||||||
Button backgroundButton = (Button)
|
Button backgroundButton = (Button)
|
||||||
activity.findViewById(R.id.detailVideoThumbnailWindowBackgroundButton);
|
activity.findViewById(R.id.detail_stream_thumbnail_window_background_button);
|
||||||
View topView = activity.findViewById(R.id.detailTopView);
|
View topView = activity.findViewById(R.id.detailTopView);
|
||||||
View nextVideoView = null;
|
Button channelButton = (Button) activity.findViewById(R.id.channel_button);
|
||||||
Button channelButton = (Button) activity.findViewById(R.id.channelButton);
|
|
||||||
if(info.next_video != null) {
|
|
||||||
nextVideoView.setVisibility(View.GONE);
|
|
||||||
} else {
|
|
||||||
activity.findViewById(R.id.detailNextVidButtonAndContentLayout).setVisibility(View.GONE);
|
|
||||||
activity.findViewById(R.id.detailNextVideoTitle).setVisibility(View.GONE);
|
|
||||||
activity.findViewById(R.id.detailNextVideoButton).setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
progressBar.setVisibility(View.GONE);
|
progressBar.setVisibility(View.GONE);
|
||||||
if(nextVideoView != null) {
|
if(info.next_video != null) {
|
||||||
nextVideoFrame.addView(nextVideoView);
|
InfoListAdapter adapter = new InfoListAdapter(a, rootView);
|
||||||
|
nextStreamView.setAdapter(adapter);
|
||||||
|
nextStreamView.setLayoutManager(new LinearLayoutManager(a));
|
||||||
|
adapter.setOnItemSelectedListener(new InfoListAdapter.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void selected(String url) {
|
||||||
|
openStreamUrl(url);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
nextStreamView.setVisibility(View.GONE);
|
||||||
|
activity.findViewById(R.id.detail_similar_title).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
initThumbnailViews(info, nextVideoFrame);
|
|
||||||
|
|
||||||
textContentLayout.setVisibility(View.VISIBLE);
|
textContentLayout.setVisibility(View.VISIBLE);
|
||||||
if (android.os.Build.VERSION.SDK_INT < 18) {
|
if (android.os.Build.VERSION.SDK_INT < 18) {
|
||||||
playVideoButton.setVisibility(View.VISIBLE);
|
playVideoButton.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
ImageView playArrowView = (ImageView) activity.findViewById(R.id.playArrowView);
|
ImageView playArrowView = (ImageView) activity.findViewById(R.id.play_arrow_view);
|
||||||
playArrowView.setVisibility(View.VISIBLE);
|
playArrowView.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!showNextVideoItem) {
|
if (!showNextStreamItem) {
|
||||||
nextVideoRootFrame.setVisibility(View.GONE);
|
nextVideoRootFrame.setVisibility(View.GONE);
|
||||||
similarTitle.setVisibility(View.GONE);
|
similarTitle.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@ -182,7 +179,7 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onTouch(View v, MotionEvent event) {
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
if (event.getAction() == android.view.MotionEvent.ACTION_UP) {
|
if (event.getAction() == android.view.MotionEvent.ACTION_UP) {
|
||||||
ImageView arrow = (ImageView) activity.findViewById(R.id.toggleDescriptionView);
|
ImageView arrow = (ImageView) activity.findViewById(R.id.toggle_description_view);
|
||||||
View extra = activity.findViewById(R.id.detailExtraView);
|
View extra = activity.findViewById(R.id.detailExtraView);
|
||||||
if (extra.getVisibility() == View.VISIBLE) {
|
if (extra.getVisibility() == View.VISIBLE) {
|
||||||
extra.setVisibility(View.GONE);
|
extra.setVisibility(View.GONE);
|
||||||
@ -202,29 +199,29 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
if(!info.uploader.isEmpty()) {
|
if(!info.uploader.isEmpty()) {
|
||||||
uploaderView.setText(info.uploader);
|
uploaderView.setText(info.uploader);
|
||||||
} else {
|
} else {
|
||||||
activity.findViewById(R.id.detailUploaderWrapView).setVisibility(View.GONE);
|
activity.findViewById(R.id.detail_uploader_view).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if(info.view_count >= 0) {
|
if(info.view_count >= 0) {
|
||||||
viewCountView.setText(Localization.localizeViewCount(info.view_count, c));
|
viewCountView.setText(Localization.localizeViewCount(info.view_count, a));
|
||||||
} else {
|
} else {
|
||||||
viewCountView.setVisibility(View.GONE);
|
viewCountView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if(info.dislike_count >= 0) {
|
if(info.dislike_count >= 0) {
|
||||||
thumbsDownView.setText(Localization.localizeNumber(info.dislike_count, c));
|
thumbsDownView.setText(Localization.localizeNumber(info.dislike_count, a));
|
||||||
} else {
|
} else {
|
||||||
thumbsDownView.setVisibility(View.INVISIBLE);
|
thumbsDownView.setVisibility(View.INVISIBLE);
|
||||||
activity.findViewById(R.id.detailThumbsDownImgView).setVisibility(View.GONE);
|
activity.findViewById(R.id.detail_thumbs_down_count_view).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if(info.like_count >= 0) {
|
if(info.like_count >= 0) {
|
||||||
thumbsUpView.setText(Localization.localizeNumber(info.like_count, c));
|
thumbsUpView.setText(Localization.localizeNumber(info.like_count, a));
|
||||||
} else {
|
} else {
|
||||||
thumbsUpView.setVisibility(View.GONE);
|
thumbsUpView.setVisibility(View.GONE);
|
||||||
activity.findViewById(R.id.detailThumbsUpImgView).setVisibility(View.GONE);
|
activity.findViewById(R.id.detail_thumbs_up_img_view).setVisibility(View.GONE);
|
||||||
thumbsDownView.setVisibility(View.GONE);
|
thumbsDownView.setVisibility(View.GONE);
|
||||||
activity.findViewById(R.id.detailThumbsDownImgView).setVisibility(View.GONE);
|
activity.findViewById(R.id.detail_thumbs_down_img_view).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if(!info.upload_date.isEmpty()) {
|
if(!info.upload_date.isEmpty()) {
|
||||||
uploadDateView.setText(Localization.localizeDate(info.upload_date, c));
|
uploadDateView.setText(Localization.localizeDate(info.upload_date, a));
|
||||||
} else {
|
} else {
|
||||||
uploadDateView.setVisibility(View.GONE);
|
uploadDateView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@ -244,25 +241,16 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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, info.next_video.webpage_url);
|
|
||||||
detailIntent.putExtra(VideoItemDetailFragment.STREAMING_SERVICE, streamingServiceId);
|
|
||||||
startActivity(detailIntent);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
textContentLayout.setVisibility(View.VISIBLE);
|
textContentLayout.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
if(info.next_video == null) {
|
||||||
|
activity.findViewById(R.id.detail_next_stream_title).setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
if(info.related_streams != null && !info.related_streams.isEmpty()) {
|
if(info.related_streams != null && !info.related_streams.isEmpty()) {
|
||||||
initSimilarVideos(info);
|
initSimilarVideos(info);
|
||||||
} else {
|
} else {
|
||||||
activity.findViewById(R.id.detailSimilarTitle).setVisibility(View.GONE);
|
activity.findViewById(R.id.detail_similar_title).setVisibility(View.GONE);
|
||||||
activity.findViewById(R.id.similar_streams_view).setVisibility(View.GONE);
|
activity.findViewById(R.id.similar_streams_view).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,18 +290,18 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
channelButton.setVisibility(Button.GONE);
|
channelButton.setVisibility(Button.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initThumbnailViews(info);
|
||||||
|
|
||||||
} catch (java.lang.NullPointerException e) {
|
} catch (java.lang.NullPointerException e) {
|
||||||
Log.w(TAG, "updateInfo(): Fragment closed before thread ended work... or else");
|
Log.w(TAG, "updateInfo(): Fragment closed before thread ended work... or else");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initThumbnailViews(final StreamInfo info, View nextVideoFrame) {
|
private void initThumbnailViews(final StreamInfo info) {
|
||||||
ImageView videoThumbnailView = (ImageView) activity.findViewById(R.id.detailThumbnailView);
|
ImageView videoThumbnailView = (ImageView) activity.findViewById(R.id.detail_thumbnail_view);
|
||||||
ImageView uploaderThumb
|
ImageView uploaderThumb
|
||||||
= (ImageView) activity.findViewById(R.id.detailUploaderThumbnailView);
|
= (ImageView) activity.findViewById(R.id.detail_uploader_thumbnail_view);
|
||||||
ImageView nextVideoThumb =
|
|
||||||
(ImageView) nextVideoFrame.findViewById(R.id.itemThumbnailView);
|
|
||||||
|
|
||||||
if(info.thumbnail_url != null && !info.thumbnail_url.isEmpty()) {
|
if(info.thumbnail_url != null && !info.thumbnail_url.isEmpty()) {
|
||||||
imageLoader.displayImage(info.thumbnail_url, videoThumbnailView,
|
imageLoader.displayImage(info.thumbnail_url, videoThumbnailView,
|
||||||
@ -333,7 +321,7 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
|
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
|
||||||
videoThumbnail = loadedImage;
|
streamThumbnail = loadedImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -348,11 +336,6 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
uploaderThumb, displayImageOptions,
|
uploaderThumb, displayImageOptions,
|
||||||
new ImageErrorLoadingListener(activity, rootView, info.service_id));
|
new ImageErrorLoadingListener(activity, rootView, info.service_id));
|
||||||
}
|
}
|
||||||
if(info.thumbnail_url != null && !info.thumbnail_url.isEmpty() && info.next_video != null) {
|
|
||||||
imageLoader.displayImage(info.next_video.thumbnail_url,
|
|
||||||
nextVideoThumb, displayImageOptions,
|
|
||||||
new ImageErrorLoadingListener(activity, rootView, info.service_id));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupActionBarHandler(final StreamInfo info) {
|
private void setupActionBarHandler(final StreamInfo info) {
|
||||||
@ -461,9 +444,9 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
info.audio_streams.get(getPreferredAudioStreamId(info));
|
info.audio_streams.get(getPreferredAudioStreamId(info));
|
||||||
if (!useExternalAudioPlayer && android.os.Build.VERSION.SDK_INT >= 18) {
|
if (!useExternalAudioPlayer && android.os.Build.VERSION.SDK_INT >= 18) {
|
||||||
//internal music player: explicit intent
|
//internal music player: explicit intent
|
||||||
if (!BackgroundPlayer.isRunning && videoThumbnail != null) {
|
if (!BackgroundPlayer.isRunning && streamThumbnail != null) {
|
||||||
ActivityCommunicator.getCommunicator()
|
ActivityCommunicator.getCommunicator()
|
||||||
.backgroundPlayerThumbnail = videoThumbnail;
|
.backgroundPlayerThumbnail = streamThumbnail;
|
||||||
intent = new Intent(activity, BackgroundPlayer.class);
|
intent = new Intent(activity, BackgroundPlayer.class);
|
||||||
|
|
||||||
intent.setAction(Intent.ACTION_VIEW);
|
intent.setAction(Intent.ACTION_VIEW);
|
||||||
@ -549,8 +532,8 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
|
|
||||||
private void onErrorBlockedByGema() {
|
private void onErrorBlockedByGema() {
|
||||||
Button backgroundButton = (Button)
|
Button backgroundButton = (Button)
|
||||||
activity.findViewById(R.id.detailVideoThumbnailWindowBackgroundButton);
|
activity.findViewById(R.id.detail_stream_thumbnail_window_background_button);
|
||||||
ImageView thumbnailView = (ImageView) activity.findViewById(R.id.detailThumbnailView);
|
ImageView thumbnailView = (ImageView) activity.findViewById(R.id.detail_thumbnail_view);
|
||||||
|
|
||||||
progressBar.setVisibility(View.GONE);
|
progressBar.setVisibility(View.GONE);
|
||||||
thumbnailView.setImageBitmap(BitmapFactory.decodeResource(
|
thumbnailView.setImageBitmap(BitmapFactory.decodeResource(
|
||||||
@ -570,7 +553,7 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onNotSpecifiedContentError() {
|
private void onNotSpecifiedContentError() {
|
||||||
ImageView thumbnailView = (ImageView) activity.findViewById(R.id.detailThumbnailView);
|
ImageView thumbnailView = (ImageView) activity.findViewById(R.id.detail_thumbnail_view);
|
||||||
progressBar.setVisibility(View.GONE);
|
progressBar.setVisibility(View.GONE);
|
||||||
thumbnailView.setImageBitmap(BitmapFactory.decodeResource(
|
thumbnailView.setImageBitmap(BitmapFactory.decodeResource(
|
||||||
getResources(), R.drawable.not_available_monkey));
|
getResources(), R.drawable.not_available_monkey));
|
||||||
@ -579,7 +562,7 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onNotSpecifiedContentErrorWithMessage(int resourceId) {
|
private void onNotSpecifiedContentErrorWithMessage(int resourceId) {
|
||||||
ImageView thumbnailView = (ImageView) activity.findViewById(R.id.detailThumbnailView);
|
ImageView thumbnailView = (ImageView) activity.findViewById(R.id.detail_thumbnail_view);
|
||||||
progressBar.setVisibility(View.GONE);
|
progressBar.setVisibility(View.GONE);
|
||||||
thumbnailView.setImageBitmap(BitmapFactory.decodeResource(
|
thumbnailView.setImageBitmap(BitmapFactory.decodeResource(
|
||||||
getResources(), R.drawable.not_available_monkey));
|
getResources(), R.drawable.not_available_monkey));
|
||||||
@ -605,7 +588,7 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
activity = (AppCompatActivity) getActivity();
|
activity = (AppCompatActivity) getActivity();
|
||||||
showNextVideoItem = PreferenceManager.getDefaultSharedPreferences(getActivity())
|
showNextStreamItem = PreferenceManager.getDefaultSharedPreferences(getActivity())
|
||||||
.getBoolean(activity.getString(R.string.show_next_video_key), true);
|
.getBoolean(activity.getString(R.string.show_next_video_key), true);
|
||||||
|
|
||||||
|
|
||||||
@ -642,7 +625,7 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
rootView = inflater.inflate(R.layout.fragment_videoitem_detail, container, false);
|
rootView = inflater.inflate(R.layout.fragment_videoitem_detail, container, false);
|
||||||
progressBar = (ProgressBar) rootView.findViewById(R.id.detailProgressBar);
|
progressBar = (ProgressBar) rootView.findViewById(R.id.detail_progress_bar);
|
||||||
|
|
||||||
actionBarHandler = new ActionBarHandler(activity);
|
actionBarHandler = new ActionBarHandler(activity);
|
||||||
actionBarHandler.setupNavMenu(activity);
|
actionBarHandler.setupNavMenu(activity);
|
||||||
@ -658,11 +641,11 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
super.onActivityCreated(savedInstanceBundle);
|
super.onActivityCreated(savedInstanceBundle);
|
||||||
Activity a = getActivity();
|
Activity a = getActivity();
|
||||||
if (android.os.Build.VERSION.SDK_INT < 18) {
|
if (android.os.Build.VERSION.SDK_INT < 18) {
|
||||||
playVideoButton = (FloatingActionButton) a.findViewById(R.id.playVideoButton);
|
playVideoButton = (FloatingActionButton) a.findViewById(R.id.play_video_button);
|
||||||
}
|
}
|
||||||
thumbnailWindowLayout = a.findViewById(R.id.detailVideoThumbnailWindowLayout);
|
thumbnailWindowLayout = a.findViewById(R.id.detail_stream_thumbnail_window_layout);
|
||||||
Button backgroundButton = (Button)
|
Button backgroundButton = (Button)
|
||||||
a.findViewById(R.id.detailVideoThumbnailWindowBackgroundButton);
|
a.findViewById(R.id.detail_stream_thumbnail_window_background_button);
|
||||||
|
|
||||||
// Sometimes when this fragment is not visible it still gets initiated
|
// Sometimes when this fragment is not visible it still gets initiated
|
||||||
// then we must not try to access objects of this fragment.
|
// then we must not try to access objects of this fragment.
|
||||||
@ -676,7 +659,7 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
autoPlayEnabled = getArguments().getBoolean(AUTO_PLAY);
|
autoPlayEnabled = getArguments().getBoolean(AUTO_PLAY);
|
||||||
|
|
||||||
if(Build.VERSION.SDK_INT >= 18) {
|
if(Build.VERSION.SDK_INT >= 18) {
|
||||||
ImageView thumbnailView = (ImageView) activity.findViewById(R.id.detailThumbnailView);
|
ImageView thumbnailView = (ImageView) activity.findViewById(R.id.detail_thumbnail_view);
|
||||||
thumbnailView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
|
thumbnailView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
|
||||||
// This is used to synchronize the thumbnailWindowButton and the playVideoButton
|
// This is used to synchronize the thumbnailWindowButton and the playVideoButton
|
||||||
// inside the ScrollView with the actual size of the thumbnail.
|
// inside the ScrollView with the actual size of the thumbnail.
|
||||||
@ -706,11 +689,7 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
similarStreamsAdapter.setOnItemSelectedListener(new InfoListAdapter.OnItemSelectedListener() {
|
similarStreamsAdapter.setOnItemSelectedListener(new InfoListAdapter.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void selected(String url) {
|
public void selected(String url) {
|
||||||
Intent detailIntent = new Intent(activity, VideoItemDetailActivity.class);
|
openStreamUrl(url);
|
||||||
detailIntent.putExtra(VideoItemDetailFragment.VIDEO_URL, url);
|
|
||||||
detailIntent.putExtra(
|
|
||||||
VideoItemDetailFragment.STREAMING_SERVICE, streamingServiceId);
|
|
||||||
activity.startActivity(detailIntent);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -814,4 +793,12 @@ public class VideoItemDetailFragment extends Fragment {
|
|||||||
Toast.makeText(VideoItemDetailFragment.this.getActivity(),
|
Toast.makeText(VideoItemDetailFragment.this.getActivity(),
|
||||||
stringResource, Toast.LENGTH_LONG).show();
|
stringResource, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openStreamUrl(String url) {
|
||||||
|
Intent detailIntent = new Intent(activity, VideoItemDetailActivity.class);
|
||||||
|
detailIntent.putExtra(VideoItemDetailFragment.VIDEO_URL, url);
|
||||||
|
detailIntent.putExtra(
|
||||||
|
VideoItemDetailFragment.STREAMING_SERVICE, streamingServiceId);
|
||||||
|
activity.startActivity(detailIntent);
|
||||||
|
}
|
||||||
}
|
}
|
@ -8,10 +8,10 @@
|
|||||||
style="?android:attr/textAppearanceLarge"
|
style="?android:attr/textAppearanceLarge"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/videoitem_detail">
|
android:id="@+id/video_item_detail">
|
||||||
|
|
||||||
<com.nirhart.parallaxscroll.views.ParallaxScrollView
|
<com.nirhart.parallaxscroll.views.ParallaxScrollView
|
||||||
android:id="@+id/detailMainContent"
|
android:id="@+id/detail_main_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
@ -23,12 +23,12 @@
|
|||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/detailVideoThumbnailWindowLayout"
|
android:id="@+id/detail_stream_thumbnail_window_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground">
|
android:background="?attr/selectableItemBackground">
|
||||||
|
|
||||||
<ImageView android:id="@+id/detailThumbnailView"
|
<ImageView android:id="@+id/detail_thumbnail_view"
|
||||||
android:contentDescription="@string/detail_thumbnail_view_description"
|
android:contentDescription="@string/detail_thumbnail_view_description"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -40,13 +40,13 @@
|
|||||||
android:background="@android:color/black"
|
android:background="@android:color/black"
|
||||||
android:src="@drawable/dummy_thumbnail_dark"/>
|
android:src="@drawable/dummy_thumbnail_dark"/>
|
||||||
|
|
||||||
<ProgressBar android:id="@+id/detailProgressBar"
|
<ProgressBar android:id="@+id/detail_progress_bar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:indeterminate="true"/>
|
android:indeterminate="true"/>
|
||||||
|
|
||||||
<ImageView android:id="@+id/playArrowView"
|
<ImageView android:id="@+id/play_arrow_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
@ -55,18 +55,17 @@
|
|||||||
android:visibility="invisible"/>
|
android:visibility="invisible"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/detailVideoThumbnailWindowBackgroundButton"
|
android:id="@+id/detail_stream_thumbnail_window_background_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/selectableItemBackground"/>
|
android:background="?attr/selectableItemBackground"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout android:id="@+id/detailTextContentLayout"
|
<RelativeLayout android:id="@+id/detail_text_content_layout"
|
||||||
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/detailVideoThumbnailWindowLayout"
|
android:layout_below="@id/detail_stream_thumbnail_window_layout"
|
||||||
android:background="@color/light_background_color"
|
android:background="@color/light_background_color"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
@ -75,7 +74,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/detailTopView">
|
android:id="@+id/detailTopView">
|
||||||
|
|
||||||
<TextView android:id="@+id/detailVideoTitleView"
|
<TextView android:id="@+id/detail_video_title_view"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight=".7"
|
android:layout_weight=".7"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -89,7 +88,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="15dp"
|
android:layout_width="15dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:id="@+id/toggleDescriptionView"
|
android:id="@+id/toggle_description_view"
|
||||||
android:src="@drawable/arrow_down"
|
android:src="@drawable/arrow_down"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
@ -99,7 +98,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView android:id="@+id/detailViewCountView"
|
<TextView android:id="@+id/detail_view_count_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_views_text_size"
|
android:textSize="@dimen/video_item_detail_views_text_size"
|
||||||
@ -115,14 +114,14 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/detailViewCountView"
|
android:layout_below="@id/detail_view_count_view"
|
||||||
android:id="@+id/detailExtraView"
|
android:id="@+id/detailExtraView"
|
||||||
android:layout_marginLeft="12dp"
|
android:layout_marginLeft="12dp"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginRight="12dp"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginEnd="12dp"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
<TextView android:id="@+id/detailUploadDateView"
|
<TextView android:id="@+id/detail_upload_date_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_upload_date_text_size"
|
android:textSize="@dimen/video_item_detail_upload_date_text_size"
|
||||||
@ -130,12 +129,12 @@
|
|||||||
android:text="Upload date"
|
android:text="Upload date"
|
||||||
android:layout_marginTop="3dp" />
|
android:layout_marginTop="3dp" />
|
||||||
|
|
||||||
<TextView android:id="@+id/detailDescriptionView"
|
<TextView android:id="@+id/detail_description_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_description_text_size"
|
android:textSize="@dimen/video_item_detail_description_text_size"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:layout_below="@id/detailUploadDateView"
|
android:layout_below="@id/detail_upload_date_view"
|
||||||
android:text="Description............."
|
android:text="Description............."
|
||||||
android:layout_marginTop="3dp" />
|
android:layout_marginTop="3dp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -143,27 +142,27 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/stream_info_layout"
|
||||||
android:layout_marginLeft="12dp"
|
android:layout_marginLeft="12dp"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_below="@+id/detailExtraView"
|
android:layout_below="@+id/detailExtraView"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginTop="5dp">
|
android:layout_marginTop="5dp">
|
||||||
<ImageView android:id="@+id/detailThumbsUpImgView"
|
<ImageView android:id="@+id/detail_thumbs_up_img_view"
|
||||||
android:contentDescription="@string/detail_likes_img_view_description"
|
android:contentDescription="@string/detail_likes_img_view_description"
|
||||||
android:layout_width="@dimen/video_item_detail_like_image_width"
|
android:layout_width="@dimen/video_item_detail_like_image_width"
|
||||||
android:layout_height="@dimen/video_item_detail_like_image_height"
|
android:layout_height="@dimen/video_item_detail_like_image_height"
|
||||||
android:src="@drawable/thumbs_up" />
|
android:src="@drawable/thumbs_up" />
|
||||||
|
|
||||||
<TextView android:id="@+id/detailThumbsUpCountView"
|
<TextView android:id="@+id/detail_thumbs_up_count_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_likes_text_size"
|
android:textSize="@dimen/video_item_detail_likes_text_size"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:text="200" />
|
android:text="200" />
|
||||||
|
|
||||||
<ImageView android:id="@+id/detailThumbsDownImgView"
|
<ImageView android:id="@+id/detail_thumbs_down_img_view"
|
||||||
android:contentDescription="@string/detail_dislikes_img_view_description"
|
android:contentDescription="@string/detail_dislikes_img_view_description"
|
||||||
android:layout_width="@dimen/video_item_detail_like_image_width"
|
android:layout_width="@dimen/video_item_detail_like_image_width"
|
||||||
android:layout_height="@dimen/video_item_detail_like_image_height"
|
android:layout_height="@dimen/video_item_detail_like_image_height"
|
||||||
@ -171,7 +170,7 @@
|
|||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginStart="10dp"/>
|
android:layout_marginStart="10dp"/>
|
||||||
|
|
||||||
<TextView android:id="@+id/detailThumbsDownCountView"
|
<TextView android:id="@+id/detail_thumbs_down_count_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_likes_text_size"
|
android:textSize="@dimen/video_item_detail_likes_text_size"
|
||||||
@ -182,21 +181,21 @@
|
|||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/detailUploaderFrame"
|
android:id="@+id/detail_uploader_frame"
|
||||||
android:layout_below="@+id/linearLayout">
|
android:layout_below="@id/stream_info_layout">
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/detailUploaderLayout"
|
android:id="@+id/detail_uploader_layout"
|
||||||
android:layout_marginTop="12dp">
|
android:layout_marginTop="12dp">
|
||||||
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:background="#000"
|
android:background="#000"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px" />
|
android:layout_height="1px" />
|
||||||
|
|
||||||
<de.hdodenhof.circleimageview.CircleImageView android:id="@+id/detailUploaderThumbnailView"
|
<de.hdodenhof.circleimageview.CircleImageView
|
||||||
|
android:id="@+id/detail_uploader_thumbnail_view"
|
||||||
android:contentDescription="@string/detail_uploader_thumbnail_view_description"
|
android:contentDescription="@string/detail_uploader_thumbnail_view_description"
|
||||||
android:layout_width="@dimen/video_item_detail_uploader_image_size"
|
android:layout_width="@dimen/video_item_detail_uploader_image_size"
|
||||||
android:layout_height="@dimen/video_item_detail_uploader_image_size"
|
android:layout_height="@dimen/video_item_detail_uploader_image_size"
|
||||||
@ -208,7 +207,7 @@
|
|||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginBottom="5dp"/>
|
android:layout_marginBottom="5dp"/>
|
||||||
|
|
||||||
<TextView android:id="@+id/detailUploaderView"
|
<TextView android:id="@+id/detail_uploader_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
@ -216,8 +215,8 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:text="Uploader"
|
android:text="Uploader"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toRightOf="@+id/detailUploaderThumbnailView"
|
android:layout_toRightOf="@+id/detail_uploader_thumbnail_view"
|
||||||
android:layout_toEndOf="@+id/detailUploaderThumbnailView"
|
android:layout_toEndOf="@+id/detail_uploader_thumbnail_view"
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginStart="28dp" />
|
android:layout_marginStart="28dp" />
|
||||||
|
|
||||||
@ -225,28 +224,26 @@
|
|||||||
android:background="#000"
|
android:background="#000"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:layout_below="@id/detailUploaderThumbnailView"/>
|
android:layout_below="@id/detail_uploader_thumbnail_view"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_marginTop="11dp"
|
android:layout_marginTop="13dp"
|
||||||
android:id="@+id/channelButton"
|
android:id="@+id/channel_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/selectableItemBackground"/>
|
android:background="?attr/selectableItemBackground"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<RelativeLayout android:id="@+id/detail_next_stream_root_layout"
|
||||||
|
|
||||||
<RelativeLayout android:id="@+id/detailNextVideoRootLayout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
android:layout_below="@+id/detailUploaderFrame"
|
android:layout_below="@+id/detail_uploader_frame"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
<TextView android:id="@+id/detailNextVideoTitle"
|
<TextView
|
||||||
|
android:id="@+id/detail_next_stream_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
@ -255,37 +252,25 @@
|
|||||||
android:text="@string/next_video_title"
|
android:text="@string/next_video_title"
|
||||||
android:textAllCaps="true" />
|
android:textAllCaps="true" />
|
||||||
|
|
||||||
<RelativeLayout android:id="@+id/detailNextVidButtonAndContentLayout"
|
<android.support.v7.widget.RecyclerView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/detailNextVideoTitle">
|
android:id="@+id/detail_next_stream_content"/>
|
||||||
<FrameLayout
|
<TextView android:id="@+id/detail_similar_title"
|
||||||
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>
|
|
||||||
<TextView android:id="@+id/detailSimilarTitle"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:textSize="@dimen/video_item_detail_next_text_size"
|
android:textSize="@dimen/video_item_detail_next_text_size"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:text="@string/similar_videos_btn_text"
|
android:text="@string/similar_videos_btn_text"
|
||||||
android:layout_below="@id/detailNextVidButtonAndContentLayout"
|
android:layout_below="@id/detail_next_stream_content"
|
||||||
android:textAllCaps="true" />
|
android:textAllCaps="true" />
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/similar_streams_view"
|
android:id="@+id/similar_streams_view"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_below="@id/detailSimilarTitle"/>
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@id/detail_similar_title"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
style="?android:attr/textAppearanceLarge"
|
style="?android:attr/textAppearanceLarge"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/videoitem_detail">
|
android:id="@+id/video_item_detail">
|
||||||
|
|
||||||
<com.nirhart.parallaxscroll.views.ParallaxScrollView
|
<com.nirhart.parallaxscroll.views.ParallaxScrollView
|
||||||
android:id="@+id/detailMainContent"
|
android:id="@+id/detail_main_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
@ -23,12 +23,12 @@
|
|||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/detailVideoThumbnailWindowLayout"
|
android:id="@+id/detail_stream_thumbnail_window_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground">
|
android:background="?attr/selectableItemBackground">
|
||||||
|
|
||||||
<ImageView android:id="@+id/detailThumbnailView"
|
<ImageView android:id="@+id/detail_thumbnail_view"
|
||||||
android:contentDescription="@string/detail_thumbnail_view_description"
|
android:contentDescription="@string/detail_thumbnail_view_description"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -40,14 +40,14 @@
|
|||||||
android:background="@android:color/black"
|
android:background="@android:color/black"
|
||||||
android:src="@drawable/dummy_thumbnail_dark"/>
|
android:src="@drawable/dummy_thumbnail_dark"/>
|
||||||
|
|
||||||
<ProgressBar android:id="@+id/detailProgressBar"
|
<ProgressBar android:id="@+id/detail_progress_bar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:indeterminate="true"/>
|
android:indeterminate="true"/>
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/playVideoButton"
|
android:id="@+id/play_video_button"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -57,18 +57,17 @@
|
|||||||
android:layout_margin="@dimen/video_item_detail_play_fab_margin"/>
|
android:layout_margin="@dimen/video_item_detail_play_fab_margin"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/detailVideoThumbnailWindowBackgroundButton"
|
android:id="@+id/detail_stream_thumbnail_window_background_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/selectableItemBackground"/>
|
android:background="?attr/selectableItemBackground"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout android:id="@+id/detailTextContentLayout"
|
<RelativeLayout android:id="@+id/detail_text_content_layout"
|
||||||
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/detailVideoThumbnailWindowLayout"
|
android:layout_below="@id/detail_stream_thumbnail_window_layout"
|
||||||
android:background="@color/light_background_color"
|
android:background="@color/light_background_color"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
@ -77,7 +76,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/detailTopView">
|
android:id="@+id/detailTopView">
|
||||||
|
|
||||||
<TextView android:id="@+id/detailVideoTitleView"
|
<TextView android:id="@+id/detail_video_title_view"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight=".7"
|
android:layout_weight=".7"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -91,7 +90,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="15dp"
|
android:layout_width="15dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:id="@+id/toggleDescriptionView"
|
android:id="@+id/toggle_description_view"
|
||||||
android:src="@drawable/arrow_down"
|
android:src="@drawable/arrow_down"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
@ -101,7 +100,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView android:id="@+id/detailViewCountView"
|
<TextView android:id="@+id/detail_view_count_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_views_text_size"
|
android:textSize="@dimen/video_item_detail_views_text_size"
|
||||||
@ -117,14 +116,14 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/detailViewCountView"
|
android:layout_below="@id/detail_view_count_view"
|
||||||
android:id="@+id/detailExtraView"
|
android:id="@+id/detailExtraView"
|
||||||
android:layout_marginLeft="12dp"
|
android:layout_marginLeft="12dp"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginRight="12dp"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginEnd="12dp"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
<TextView android:id="@+id/detailUploadDateView"
|
<TextView android:id="@+id/detail_upload_date_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_upload_date_text_size"
|
android:textSize="@dimen/video_item_detail_upload_date_text_size"
|
||||||
@ -132,12 +131,12 @@
|
|||||||
android:text="Upload date"
|
android:text="Upload date"
|
||||||
android:layout_marginTop="3dp" />
|
android:layout_marginTop="3dp" />
|
||||||
|
|
||||||
<TextView android:id="@+id/detailDescriptionView"
|
<TextView android:id="@+id/detail_description_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_description_text_size"
|
android:textSize="@dimen/video_item_detail_description_text_size"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:layout_below="@id/detailUploadDateView"
|
android:layout_below="@id/detail_upload_date_view"
|
||||||
android:text="Description............."
|
android:text="Description............."
|
||||||
android:layout_marginTop="3dp" />
|
android:layout_marginTop="3dp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -145,27 +144,27 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/stream_info_layout"
|
||||||
android:layout_marginLeft="12dp"
|
android:layout_marginLeft="12dp"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_below="@+id/detailExtraView"
|
android:layout_below="@+id/detailExtraView"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginTop="5dp">
|
android:layout_marginTop="5dp">
|
||||||
<ImageView android:id="@+id/detailThumbsUpImgView"
|
<ImageView android:id="@+id/detail_thumbs_up_img_view"
|
||||||
android:contentDescription="@string/detail_likes_img_view_description"
|
android:contentDescription="@string/detail_likes_img_view_description"
|
||||||
android:layout_width="@dimen/video_item_detail_like_image_width"
|
android:layout_width="@dimen/video_item_detail_like_image_width"
|
||||||
android:layout_height="@dimen/video_item_detail_like_image_height"
|
android:layout_height="@dimen/video_item_detail_like_image_height"
|
||||||
android:src="@drawable/thumbs_up" />
|
android:src="@drawable/thumbs_up" />
|
||||||
|
|
||||||
<TextView android:id="@+id/detailThumbsUpCountView"
|
<TextView android:id="@+id/detail_thumbs_up_count_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_likes_text_size"
|
android:textSize="@dimen/video_item_detail_likes_text_size"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:text="200" />
|
android:text="200" />
|
||||||
|
|
||||||
<ImageView android:id="@+id/detailThumbsDownImgView"
|
<ImageView android:id="@+id/detail_thumbs_down_img_view"
|
||||||
android:contentDescription="@string/detail_dislikes_img_view_description"
|
android:contentDescription="@string/detail_dislikes_img_view_description"
|
||||||
android:layout_width="@dimen/video_item_detail_like_image_width"
|
android:layout_width="@dimen/video_item_detail_like_image_width"
|
||||||
android:layout_height="@dimen/video_item_detail_like_image_height"
|
android:layout_height="@dimen/video_item_detail_like_image_height"
|
||||||
@ -173,7 +172,7 @@
|
|||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginStart="10dp"/>
|
android:layout_marginStart="10dp"/>
|
||||||
|
|
||||||
<TextView android:id="@+id/detailThumbsDownCountView"
|
<TextView android:id="@+id/detail_thumbs_down_count_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/video_item_detail_likes_text_size"
|
android:textSize="@dimen/video_item_detail_likes_text_size"
|
||||||
@ -184,12 +183,12 @@
|
|||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/detailUploaderFrame"
|
android:id="@+id/detail_uploader_frame"
|
||||||
android:layout_below="@+id/linearLayout">
|
android:layout_below="@id/stream_info_layout">
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/detailUploaderWrapView"
|
android:id="@+id/detail_uploader_layout"
|
||||||
android:layout_marginTop="12dp">
|
android:layout_marginTop="12dp">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@ -197,7 +196,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px" />
|
android:layout_height="1px" />
|
||||||
|
|
||||||
<de.hdodenhof.circleimageview.CircleImageView android:id="@+id/detailUploaderThumbnailView"
|
<de.hdodenhof.circleimageview.CircleImageView
|
||||||
|
android:id="@+id/detail_uploader_thumbnail_view"
|
||||||
android:contentDescription="@string/detail_uploader_thumbnail_view_description"
|
android:contentDescription="@string/detail_uploader_thumbnail_view_description"
|
||||||
android:layout_width="@dimen/video_item_detail_uploader_image_size"
|
android:layout_width="@dimen/video_item_detail_uploader_image_size"
|
||||||
android:layout_height="@dimen/video_item_detail_uploader_image_size"
|
android:layout_height="@dimen/video_item_detail_uploader_image_size"
|
||||||
@ -209,7 +209,7 @@
|
|||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginBottom="5dp"/>
|
android:layout_marginBottom="5dp"/>
|
||||||
|
|
||||||
<TextView android:id="@+id/detailUploaderView"
|
<TextView android:id="@+id/detail_uploader_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
@ -217,8 +217,8 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:text="Uploader"
|
android:text="Uploader"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toRightOf="@+id/detailUploaderThumbnailView"
|
android:layout_toRightOf="@+id/detail_uploader_thumbnail_view"
|
||||||
android:layout_toEndOf="@+id/detailUploaderThumbnailView"
|
android:layout_toEndOf="@+id/detail_uploader_thumbnail_view"
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginStart="28dp" />
|
android:layout_marginStart="28dp" />
|
||||||
|
|
||||||
@ -226,25 +226,26 @@
|
|||||||
android:background="#000"
|
android:background="#000"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:layout_below="@id/detailUploaderThumbnailView"/>
|
android:layout_below="@id/detail_uploader_thumbnail_view"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<Button
|
<Button
|
||||||
android:layout_marginTop="13dp"
|
android:layout_marginTop="13dp"
|
||||||
android:id="@+id/channelButton"
|
android:id="@+id/channel_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/selectableItemBackground"/>
|
android:background="?attr/selectableItemBackground"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<RelativeLayout android:id="@+id/detailNextVideoRootLayout"
|
<RelativeLayout android:id="@+id/detail_next_stream_root_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
android:layout_below="@id/linearLayout"
|
android:layout_below="@+id/detail_uploader_frame"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
<TextView android:id="@+id/detailNextVideoTitle"
|
<TextView
|
||||||
|
android:id="@+id/detail_next_stream_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
@ -253,37 +254,25 @@
|
|||||||
android:text="@string/next_video_title"
|
android:text="@string/next_video_title"
|
||||||
android:textAllCaps="true" />
|
android:textAllCaps="true" />
|
||||||
|
|
||||||
<RelativeLayout android:id="@+id/detailNextVidButtonAndContentLayout"
|
<android.support.v7.widget.RecyclerView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/detailNextVideoTitle">
|
android:id="@+id/detail_next_stream_content"/>
|
||||||
<FrameLayout
|
<TextView android:id="@+id/detail_similar_title"
|
||||||
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>
|
|
||||||
<TextView android:id="@+id/detailSimilarTitle"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:textSize="@dimen/video_item_detail_next_text_size"
|
android:textSize="@dimen/video_item_detail_next_text_size"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:text="@string/similar_videos_btn_text"
|
android:text="@string/similar_videos_btn_text"
|
||||||
android:layout_below="@id/detailNextVidButtonAndContentLayout"
|
android:layout_below="@id/detail_next_stream_content"
|
||||||
android:textAllCaps="true" />
|
android:textAllCaps="true" />
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/similar_streams_view"
|
android:id="@+id/similar_streams_view"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/detailSimilarTitle"/>
|
android:layout_below="@id/detail_similar_title"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -104,7 +104,5 @@
|
|||||||
android:id="@+id/item_button"
|
android:id="@+id/item_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignTop="@id/detailNextVideoFrame"
|
|
||||||
android:layout_alignBottom="@id/detailNextVideoFrame"
|
|
||||||
android:background="?attr/selectableItemBackground"/>
|
android:background="?attr/selectableItemBackground"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
Loading…
Reference in New Issue
Block a user