-Reverted dropdown menu UI for list view info items.
|
@ -460,9 +460,6 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo> implement
|
|||
public void selected(StreamInfoItem selectedItem) {
|
||||
selectAndLoadVideo(selectedItem.service_id, selectedItem.url, selectedItem.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropdownClicked(StreamInfoItem selectedItem, PopupMenu menu) {}
|
||||
});
|
||||
|
||||
videoTitleRoot.setOnClickListener(this);
|
||||
|
|
|
@ -140,9 +140,6 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
|
|||
useAsFrontPage?getParentFragment().getFragmentManager():getFragmentManager(),
|
||||
selectedItem.service_id, selectedItem.url, selectedItem.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropdownClicked(StreamInfoItem selectedItem, PopupMenu menu) {}
|
||||
});
|
||||
|
||||
infoListAdapter.setOnChannelSelectedListener(new InfoItemBuilder.OnInfoItemSelectedListener<ChannelInfoItem>() {
|
||||
|
@ -153,9 +150,6 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
|
|||
useAsFrontPage?getParentFragment().getFragmentManager():getFragmentManager(),
|
||||
selectedItem.service_id, selectedItem.url, selectedItem.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropdownClicked(ChannelInfoItem selectedItem, PopupMenu menu) {}
|
||||
});
|
||||
|
||||
infoListAdapter.setOnPlaylistSelectedListener(new InfoItemBuilder.OnInfoItemSelectedListener<PlaylistInfoItem>() {
|
||||
|
@ -166,9 +160,6 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I> implem
|
|||
useAsFrontPage?getParentFragment().getFragmentManager():getFragmentManager(),
|
||||
selectedItem.service_id, selectedItem.url, selectedItem.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropdownClicked(PlaylistInfoItem selectedItem, PopupMenu menu) {}
|
||||
});
|
||||
|
||||
itemsList.clearOnScrollListeners();
|
||||
|
|
|
@ -10,7 +10,6 @@ import android.support.v7.widget.RecyclerView;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.PopupMenu;
|
||||
|
||||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.database.subscription.SubscriptionEntity;
|
||||
|
@ -20,8 +19,6 @@ import org.schabi.newpipe.fragments.BaseStateFragment;
|
|||
import org.schabi.newpipe.info_list.InfoItemBuilder;
|
||||
import org.schabi.newpipe.info_list.InfoListAdapter;
|
||||
import org.schabi.newpipe.report.UserAction;
|
||||
import org.schabi.newpipe.util.KioskTranslator;
|
||||
import org.schabi.newpipe.report.ErrorActivity;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -135,9 +132,6 @@ public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEnt
|
|||
NavigationHelper.openChannelFragment(getParentFragment().getFragmentManager(), selectedItem.service_id, selectedItem.url, selectedItem.name);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropdownClicked(ChannelInfoItem selectedItem, PopupMenu menu) {}
|
||||
});
|
||||
|
||||
headerRootLayout.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
|
@ -5,7 +5,6 @@ import android.support.annotation.NonNull;
|
|||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.PopupMenu;
|
||||
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
|
||||
|
@ -45,7 +44,6 @@ public class InfoItemBuilder {
|
|||
|
||||
public interface OnInfoItemSelectedListener<T extends InfoItem> {
|
||||
void selected(T selectedItem);
|
||||
void dropdownClicked(T selectedItem, PopupMenu menu);
|
||||
}
|
||||
|
||||
private final Context context;
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package org.schabi.newpipe.info_list.holder;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
||||
|
@ -14,9 +10,7 @@ import org.schabi.newpipe.R;
|
|||
import org.schabi.newpipe.extractor.InfoItem;
|
||||
import org.schabi.newpipe.extractor.channel.ChannelInfoItem;
|
||||
import org.schabi.newpipe.info_list.InfoItemBuilder;
|
||||
import org.schabi.newpipe.playlist.ChannelPlayQueue;
|
||||
import org.schabi.newpipe.util.Localization;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
|
||||
|
@ -24,7 +18,6 @@ public class ChannelMiniInfoItemHolder extends InfoItemHolder {
|
|||
public final CircleImageView itemThumbnailView;
|
||||
public final TextView itemTitleView;
|
||||
public final TextView itemAdditionalDetailView;
|
||||
public final ImageButton itemActionDropdown;
|
||||
|
||||
ChannelMiniInfoItemHolder(InfoItemBuilder infoItemBuilder, int layoutId, ViewGroup parent) {
|
||||
super(infoItemBuilder, layoutId, parent);
|
||||
|
@ -32,7 +25,6 @@ public class ChannelMiniInfoItemHolder extends InfoItemHolder {
|
|||
itemThumbnailView = itemView.findViewById(R.id.itemThumbnailView);
|
||||
itemTitleView = itemView.findViewById(R.id.itemTitleView);
|
||||
itemAdditionalDetailView = itemView.findViewById(R.id.itemAdditionalDetails);
|
||||
itemActionDropdown = itemView.findViewById(R.id.itemActionDropdown);
|
||||
}
|
||||
|
||||
public ChannelMiniInfoItemHolder(InfoItemBuilder infoItemBuilder, ViewGroup parent) {
|
||||
|
@ -58,55 +50,6 @@ public class ChannelMiniInfoItemHolder extends InfoItemHolder {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
enableActionDropdown(item);
|
||||
}
|
||||
|
||||
private void enableActionDropdown(final ChannelInfoItem item) {
|
||||
itemActionDropdown.setVisibility(View.VISIBLE);
|
||||
itemActionDropdown.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
final PopupMenu actionMenu = getStreamDropdown(itemBuilder.getContext(), itemActionDropdown, item);
|
||||
if (itemBuilder.getOnChannelSelectedListener() != null) {
|
||||
itemBuilder.getOnChannelSelectedListener().dropdownClicked(item, actionMenu);
|
||||
}
|
||||
actionMenu.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private PopupMenu getStreamDropdown(final Context context, final View anchor, final ChannelInfoItem infoItem) {
|
||||
PopupMenu actionMenu = new PopupMenu(context, anchor);
|
||||
|
||||
final MenuItem mainPlay = actionMenu.getMenu().add(R.string.play_all);
|
||||
mainPlay.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.playOnMainPlayer(context, new ChannelPlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
final MenuItem popupPlay = actionMenu.getMenu().add(R.string.controls_popup_title);
|
||||
popupPlay.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.playOnPopupPlayer(context, new ChannelPlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
final MenuItem backgroundPlay = actionMenu.getMenu().add(R.string.controls_background_title);
|
||||
backgroundPlay.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.playOnBackgroundPlayer(context, new ChannelPlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return actionMenu;
|
||||
}
|
||||
|
||||
protected String getDetailLine(final ChannelInfoItem item) {
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
package org.schabi.newpipe.info_list.holder;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
||||
|
@ -15,15 +11,12 @@ import org.schabi.newpipe.R;
|
|||
import org.schabi.newpipe.extractor.InfoItem;
|
||||
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem;
|
||||
import org.schabi.newpipe.info_list.InfoItemBuilder;
|
||||
import org.schabi.newpipe.playlist.PlaylistPlayQueue;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
|
||||
public class PlaylistInfoItemHolder extends InfoItemHolder {
|
||||
public final ImageView itemThumbnailView;
|
||||
public final TextView itemStreamCountView;
|
||||
public final TextView itemTitleView;
|
||||
public final TextView itemUploaderView;
|
||||
public final ImageButton itemActionDropdown;
|
||||
|
||||
public PlaylistInfoItemHolder(InfoItemBuilder infoItemBuilder, ViewGroup parent) {
|
||||
super(infoItemBuilder, R.layout.list_playlist_item, parent);
|
||||
|
@ -32,7 +25,6 @@ public class PlaylistInfoItemHolder extends InfoItemHolder {
|
|||
itemTitleView = itemView.findViewById(R.id.itemTitleView);
|
||||
itemStreamCountView = itemView.findViewById(R.id.itemStreamCountView);
|
||||
itemUploaderView = itemView.findViewById(R.id.itemUploaderView);
|
||||
itemActionDropdown = itemView.findViewById(R.id.itemActionDropdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,56 +47,8 @@ public class PlaylistInfoItemHolder extends InfoItemHolder {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
enableActionDropdown(item);
|
||||
}
|
||||
|
||||
private void enableActionDropdown(final PlaylistInfoItem item) {
|
||||
itemActionDropdown.setVisibility(View.VISIBLE);
|
||||
itemActionDropdown.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
final PopupMenu actionMenu = getStreamDropdown(itemBuilder.getContext(), itemActionDropdown, item);
|
||||
if (itemBuilder.getOnPlaylistSelectedListener() != null) {
|
||||
itemBuilder.getOnPlaylistSelectedListener().dropdownClicked(item, actionMenu);
|
||||
}
|
||||
actionMenu.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private PopupMenu getStreamDropdown(final Context context, final View anchor, final PlaylistInfoItem infoItem) {
|
||||
PopupMenu actionMenu = new PopupMenu(context, anchor);
|
||||
|
||||
final MenuItem mainPlay = actionMenu.getMenu().add(R.string.play_all);
|
||||
mainPlay.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.playOnMainPlayer(context, new PlaylistPlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
final MenuItem popupPlay = actionMenu.getMenu().add(R.string.controls_popup_title);
|
||||
popupPlay.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.playOnPopupPlayer(context, new PlaylistPlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
final MenuItem backgroundPlay = actionMenu.getMenu().add(R.string.controls_background_title);
|
||||
backgroundPlay.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.playOnBackgroundPlayer(context, new PlaylistPlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return actionMenu;
|
||||
}
|
||||
/**
|
||||
* Display options for playlist thumbnails
|
||||
*/
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package org.schabi.newpipe.info_list.holder;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
||||
|
@ -17,9 +13,7 @@ import org.schabi.newpipe.extractor.InfoItem;
|
|||
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
||||
import org.schabi.newpipe.extractor.stream.StreamType;
|
||||
import org.schabi.newpipe.info_list.InfoItemBuilder;
|
||||
import org.schabi.newpipe.playlist.SinglePlayQueue;
|
||||
import org.schabi.newpipe.util.Localization;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
|
||||
public class StreamMiniInfoItemHolder extends InfoItemHolder {
|
||||
|
||||
|
@ -27,7 +21,6 @@ public class StreamMiniInfoItemHolder extends InfoItemHolder {
|
|||
public final TextView itemVideoTitleView;
|
||||
public final TextView itemUploaderView;
|
||||
public final TextView itemDurationView;
|
||||
public final ImageButton itemActionDropdown;
|
||||
|
||||
StreamMiniInfoItemHolder(InfoItemBuilder infoItemBuilder, int layoutId, ViewGroup parent) {
|
||||
super(infoItemBuilder, layoutId, parent);
|
||||
|
@ -36,7 +29,6 @@ public class StreamMiniInfoItemHolder extends InfoItemHolder {
|
|||
itemVideoTitleView = itemView.findViewById(R.id.itemVideoTitleView);
|
||||
itemUploaderView = itemView.findViewById(R.id.itemUploaderView);
|
||||
itemDurationView = itemView.findViewById(R.id.itemDurationView);
|
||||
itemActionDropdown = itemView.findViewById(R.id.itemActionDropdown);
|
||||
}
|
||||
|
||||
public StreamMiniInfoItemHolder(InfoItemBuilder infoItemBuilder, ViewGroup parent) {
|
||||
|
@ -75,92 +67,6 @@ public class StreamMiniInfoItemHolder extends InfoItemHolder {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
switch (item.stream_type) {
|
||||
case AUDIO_STREAM:
|
||||
case VIDEO_STREAM:
|
||||
case FILE:
|
||||
enableActionDropdown(item);
|
||||
break;
|
||||
case LIVE_STREAM:
|
||||
case AUDIO_LIVE_STREAM:
|
||||
case NONE:
|
||||
default:
|
||||
disableActionDropdown();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void enableActionDropdown(final StreamInfoItem item) {
|
||||
itemActionDropdown.setClickable(true);
|
||||
itemActionDropdown.setVisibility(View.VISIBLE);
|
||||
itemActionDropdown.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
final PopupMenu actionMenu = getStreamDropdown(itemBuilder.getContext(), itemActionDropdown, item);
|
||||
if (itemBuilder.getOnStreamSelectedListener() != null) {
|
||||
itemBuilder.getOnStreamSelectedListener().dropdownClicked(item, actionMenu);
|
||||
}
|
||||
actionMenu.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void disableActionDropdown() {
|
||||
itemActionDropdown.setVisibility(View.GONE);
|
||||
itemActionDropdown.setClickable(false);
|
||||
itemActionDropdown.setOnClickListener(null);
|
||||
}
|
||||
|
||||
private PopupMenu getStreamDropdown(final Context context, final View anchor, final StreamInfoItem infoItem) {
|
||||
PopupMenu actionMenu = new PopupMenu(context, anchor);
|
||||
|
||||
final MenuItem backgroundEnqueue = actionMenu.getMenu().add(R.string.enqueue_on_background);
|
||||
backgroundEnqueue.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.enqueueOnBackgroundPlayer(context, new SinglePlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
final MenuItem popupEnqueue = actionMenu.getMenu().add(R.string.enqueue_on_popup);
|
||||
popupEnqueue.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.enqueueOnPopupPlayer(context, new SinglePlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
final MenuItem mainPlay = actionMenu.getMenu().add(R.string.play_btn_text);
|
||||
mainPlay.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.playOnMainPlayer(context, new SinglePlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
final MenuItem popupPlay = actionMenu.getMenu().add(R.string.controls_popup_title);
|
||||
popupPlay.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.playOnPopupPlayer(context, new SinglePlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
final MenuItem backgroundPlay = actionMenu.getMenu().add(R.string.controls_background_title);
|
||||
backgroundPlay.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||
NavigationHelper.playOnBackgroundPlayer(context, new SinglePlayQueue(infoItem));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return actionMenu;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Before Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 216 B |
Before Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 305 B |
|
@ -8,8 +8,7 @@
|
|||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingTop="@dimen/video_item_search_padding"
|
||||
android:paddingBottom="@dimen/video_item_search_padding">
|
||||
android:padding="@dimen/video_item_search_padding">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/itemThumbnailView"
|
||||
|
@ -18,35 +17,17 @@
|
|||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/video_item_search_image_right_margin"
|
||||
android:layout_marginRight="@dimen/video_item_search_image_right_margin"
|
||||
android:contentDescription="@string/list_thumbnail_view_description"
|
||||
android:src="@drawable/buddy"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/itemActionDropdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/video_item_search_thumbnail_image_height"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:paddingStart="@dimen/video_item_search_padding"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:src="?attr/more_vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:ignore="ContentDescription,RtlSymmetry"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/itemTitleView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginBottom="@dimen/video_item_search_image_right_margin"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toEndOf="@+id/itemThumbnailView"
|
||||
android:ellipsize="end"
|
||||
|
@ -61,8 +42,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/itemAdditionalDetails"
|
||||
android:layout_marginBottom="@dimen/channel_item_description_to_details_margin"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toEndOf="@+id/itemThumbnailView"
|
||||
android:ellipsize="end"
|
||||
|
@ -76,8 +55,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toEndOf="@+id/itemThumbnailView"
|
||||
android:lines="1"
|
||||
|
|
|
@ -8,42 +8,23 @@
|
|||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingTop="@dimen/video_item_search_padding"
|
||||
android:paddingBottom="@dimen/video_item_search_padding">
|
||||
android:padding="@dimen/video_item_search_padding">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/itemThumbnailView"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/video_item_search_image_right_margin"
|
||||
android:layout_marginRight="@dimen/video_item_search_image_right_margin"
|
||||
android:layout_marginRight="12dp"
|
||||
android:contentDescription="@string/list_thumbnail_view_description"
|
||||
android:src="@drawable/buddy_channel_item"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/itemActionDropdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:paddingStart="@dimen/video_item_search_padding"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:src="?attr/more_vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:ignore="ContentDescription,RtlSymmetry"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/itemTitleView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
|
@ -60,8 +41,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/itemTitleView"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:lines="1"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textSize="@dimen/video_item_search_upload_date_text_size"
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingTop="@dimen/video_item_search_padding"
|
||||
android:paddingBottom="@dimen/video_item_search_padding">
|
||||
android:padding="@dimen/video_item_search_padding">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/itemThumbnailView"
|
||||
|
@ -18,35 +17,17 @@
|
|||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/video_item_search_image_right_margin"
|
||||
android:layout_marginRight="@dimen/video_item_search_image_right_margin"
|
||||
android:contentDescription="@string/list_thumbnail_view_description"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/dummy_thumbnail_playlist"
|
||||
tools:ignore="RtlHardcoded"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/itemActionDropdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:paddingStart="@dimen/video_item_search_padding"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:src="?attr/more_vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:ignore="ContentDescription,RtlSymmetry"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/itemStreamCountView"
|
||||
android:layout_width="@dimen/playlist_item_thumbnail_stream_count_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignBottom="@id/itemThumbnailView"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_alignRight="@id/itemThumbnailView"
|
||||
android:layout_alignTop="@id/itemThumbnailView"
|
||||
android:background="@color/playlist_stream_count_background_color"
|
||||
|
@ -66,8 +47,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
|
@ -81,8 +60,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/itemTitleView"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:lines="1"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingTop="@dimen/video_item_search_padding"
|
||||
android:paddingBottom="@dimen/video_item_search_padding">
|
||||
android:padding="@dimen/video_item_search_padding">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/itemThumbnailView"
|
||||
|
@ -18,7 +17,6 @@
|
|||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/video_item_search_image_right_margin"
|
||||
android:layout_marginRight="@dimen/video_item_search_image_right_margin"
|
||||
android:contentDescription="@string/list_thumbnail_view_description"
|
||||
android:scaleType="centerCrop"
|
||||
|
@ -45,28 +43,11 @@
|
|||
tools:ignore="RtlHardcoded"
|
||||
tools:text="1:09:10"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/itemActionDropdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:paddingStart="@dimen/video_item_search_padding"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:src="?attr/more_vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:ignore="ContentDescription,RtlSymmetry"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/itemVideoTitleView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toEndOf="@+id/itemThumbnailView"
|
||||
android:ellipsize="end"
|
||||
|
@ -80,8 +61,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/itemVideoTitleView"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toEndOf="@+id/itemThumbnailView"
|
||||
android:lines="1"
|
||||
|
@ -94,8 +73,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toEndOf="@+id/itemThumbnailView"
|
||||
android:lines="1"
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingTop="@dimen/video_item_search_padding"
|
||||
android:paddingBottom="@dimen/video_item_search_padding">
|
||||
android:padding="@dimen/video_item_search_padding">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/itemThumbnailView"
|
||||
|
@ -18,7 +17,6 @@
|
|||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/video_item_search_padding"
|
||||
android:layout_marginRight="@dimen/video_item_search_image_right_margin"
|
||||
android:contentDescription="@string/list_thumbnail_view_description"
|
||||
android:scaleType="centerCrop"
|
||||
|
@ -44,47 +42,30 @@
|
|||
tools:ignore="RtlHardcoded"
|
||||
tools:text="1:09:10"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/itemActionDropdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="55dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingLeft="@dimen/video_item_search_padding"
|
||||
android:paddingStart="@dimen/video_item_search_padding"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:src="?attr/more_vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:ignore="ContentDescription,RtlSymmetry"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/itemVideoTitleView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toEndOf="@+id/itemThumbnailView"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textSize="@dimen/video_item_search_title_text_size"
|
||||
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tristique vitae sem vitae blanditLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsum"/>
|
||||
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tristique vitae sem vitae blanditLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsum"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/itemUploaderView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/itemVideoTitleView"
|
||||
android:layout_toLeftOf="@id/itemActionDropdown"
|
||||
android:layout_toStartOf="@id/itemActionDropdown"
|
||||
android:layout_toRightOf="@+id/itemThumbnailView"
|
||||
android:layout_toEndOf="@+id/itemThumbnailView"
|
||||
android:lines="1"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textSize="@dimen/video_item_search_uploader_text_size"
|
||||
tools:text="Uploader"/>
|
||||
tools:text="Uploader" />
|
||||
</RelativeLayout>
|
|
@ -20,7 +20,6 @@
|
|||
<attr name="history" format="reference"/>
|
||||
<attr name="drag_handle" format="reference"/>
|
||||
<attr name="selected" format="reference"/>
|
||||
<attr name="more_vertical" format="reference"/>
|
||||
|
||||
<!-- Can't refer to colors directly into drawable's xml-->
|
||||
<attr name="toolbar_shadow_drawable" format="reference"/>
|
||||
|
|
|
@ -310,6 +310,4 @@
|
|||
<string name="play_queue_stream_detail">Details</string>
|
||||
<string name="play_queue_audio_settings">Audio Settings</string>
|
||||
<string name="hold_to_append">Hold To Enqueue</string>
|
||||
<string name="enqueue_on_background">Enqueue on Background</string>
|
||||
<string name="enqueue_on_popup">Enqueue on Popup</string>
|
||||
</resources>
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
<item name="history">@drawable/ic_history_black_24dp</item>
|
||||
<item name="drag_handle">@drawable/ic_drag_handle_black_24dp</item>
|
||||
<item name="selected">@drawable/ic_fiber_manual_record_black_24dp</item>
|
||||
<item name="more_vertical">@drawable/ic_more_vert_black_24dp</item>
|
||||
|
||||
<item name="separator_color">@color/light_separator_color</item>
|
||||
<item name="contrast_background_color">@color/light_contrast_background_color</item>
|
||||
|
@ -66,7 +65,6 @@
|
|||
<item name="history">@drawable/ic_history_white_24dp</item>
|
||||
<item name="drag_handle">@drawable/ic_drag_handle_white_24dp</item>
|
||||
<item name="selected">@drawable/ic_fiber_manual_record_white_24dp</item>
|
||||
<item name="more_vertical">@drawable/ic_more_vert_white_24dp</item>
|
||||
|
||||
<item name="separator_color">@color/dark_separator_color</item>
|
||||
<item name="contrast_background_color">@color/dark_contrast_background_color</item>
|
||||
|
|