Merge pull request #3289 from B0pol/grid_moreinfo

add upload date on stream grid items
This commit is contained in:
Tobias Groza 2020-03-29 23:49:39 +02:00 committed by GitHub
commit 5f549a8fc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import android.view.ViewGroup;
import org.schabi.newpipe.R; import org.schabi.newpipe.R;
import org.schabi.newpipe.info_list.InfoItemBuilder; import org.schabi.newpipe.info_list.InfoItemBuilder;
public class StreamGridInfoItemHolder extends StreamMiniInfoItemHolder { public class StreamGridInfoItemHolder extends StreamInfoItemHolder {
public StreamGridInfoItemHolder(InfoItemBuilder infoItemBuilder, ViewGroup parent) { public StreamGridInfoItemHolder(InfoItemBuilder infoItemBuilder, ViewGroup parent) {
super(infoItemBuilder, R.layout.list_stream_grid_item, parent); super(infoItemBuilder, R.layout.list_stream_grid_item, parent);

View File

@ -40,7 +40,11 @@ public class StreamInfoItemHolder extends StreamMiniInfoItemHolder {
public final TextView itemAdditionalDetails; public final TextView itemAdditionalDetails;
public StreamInfoItemHolder(InfoItemBuilder infoItemBuilder, ViewGroup parent) { public StreamInfoItemHolder(InfoItemBuilder infoItemBuilder, ViewGroup parent) {
super(infoItemBuilder, R.layout.list_stream_item, parent); this(infoItemBuilder, R.layout.list_stream_item, parent);
}
public StreamInfoItemHolder(InfoItemBuilder infoItemBuilder, int layoutId, ViewGroup parent) {
super(infoItemBuilder, layoutId, parent);
itemAdditionalDetails = itemView.findViewById(R.id.itemAdditionalDetails); itemAdditionalDetails = itemView.findViewById(R.id.itemAdditionalDetails);
} }

View File

@ -67,6 +67,19 @@
android:textSize="@dimen/video_item_search_uploader_text_size" android:textSize="@dimen/video_item_search_uploader_text_size"
tools:text="Uploader"/> tools:text="Uploader"/>
<TextView
android:id="@+id/itemAdditionalDetails"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/itemUploaderView"
android:layout_alignStart="@id/itemUploaderView"
android:layout_alignEnd="@id/itemUploaderView"
android:ellipsize="end"
android:lines="1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="@dimen/video_item_search_upload_date_text_size"
tools:text="2 years ago • 10M views"/>
<org.schabi.newpipe.views.AnimatedProgressBar <org.schabi.newpipe.views.AnimatedProgressBar
android:id="@+id/itemProgressView" android:id="@+id/itemProgressView"
style="@style/Widget.AppCompat.ProgressBar.Horizontal" style="@style/Widget.AppCompat.ProgressBar.Horizontal"