1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-25 12:32:31 +01:00

update video detail layout

This commit is contained in:
chschtsch 2015-12-02 21:55:57 +03:00
parent 6ec2d91d91
commit 6c63841d0c
12 changed files with 77 additions and 84 deletions

View File

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="org.schabi.newpipe" > package="org.schabi.newpipe" >
<uses-permission android:name= "android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application <application
@ -15,7 +15,7 @@
tools:ignore="AllowBackup"> tools:ignore="AllowBackup">
<activity <activity
android:name=".VideoItemListActivity" android:name=".VideoItemListActivity"
android:label="@string/app_name" > android:label="@string/app_name">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@ -33,22 +33,20 @@
<ImageView android:id="@+id/detailThumbnailView" <ImageView android:id="@+id/detailThumbnailView"
android:contentDescription="@string/detailThumbnailViewDescription" android:contentDescription="@string/detailThumbnailViewDescription"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/video_item_detail_thumbnail_image_height"
android:scaleType="centerInside" android:scaleType="centerInside"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:background="@color/dark_image_background"
android:src="@drawable/dummy_thumbnail"/> android:src="@drawable/dummy_thumbnail"/>
<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/detailThumbnailView" android:layout_below="@id/detailThumbnailView"
android:paddingTop="5dp" android:padding="@dimen/video_item_detail_info_text_padding" >
android:paddingBottom="5dp"
android:paddingRight="5dp"
android:paddingLeft="5dp">
<TextView android:id="@+id/detailVideoTitleView" <TextView android:id="@+id/detailVideoTitleView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -62,8 +60,8 @@
<ImageView android:id="@+id/detailUploaderThumbnailView" <ImageView android:id="@+id/detailUploaderThumbnailView"
android:contentDescription="@string/detailUploaderThumbnailViewDescription" android:contentDescription="@string/detailUploaderThumbnailViewDescription"
android:layout_width="80dp" android:layout_width="@dimen/video_item_detail_uploader_image_size"
android:layout_height="80dp" android:layout_height="@dimen/video_item_detail_uploader_image_size"
android:layout_below="@id/detailVideoTitleView" android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
@ -157,22 +155,18 @@
<RelativeLayout android:id="@+id/detailNextVideoRootLayout" <RelativeLayout android:id="@+id/detailNextVideoRootLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="10dp" android:padding="@dimen/video_item_detail_info_text_padding"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_below="@id/detailVideoInfo" > android:layout_below="@id/detailVideoInfo" >
<TextView android:id="@+id/detailNextVideoTitle" <TextView android:id="@+id/detailNextVideoTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_centerHorizontal="true"
android:layout_alignParentStart="true" android:textSize="@dimen/video_item_detail_next_text_size"
android:textSize="@dimen/video_item_detail_upload_date_text_size"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:text="@string/nextVideoTitle" android:text="@string/nextVideoTitle"
/> android:textAllCaps="true" />
<RelativeLayout android:id="@+id/detailNextVidButtonAndContantLayout" <RelativeLayout android:id="@+id/detailNextVidButtonAndContantLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -190,15 +184,13 @@
android:layout_alignBottom="@id/detailNextVideoFrame" android:layout_alignBottom="@id/detailNextVideoFrame"
android:background="?attr/selectableItemBackground"/> android:background="?attr/selectableItemBackground"/>
</RelativeLayout> </RelativeLayout>
<Button android:id="@+id/detailShowSimilarButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/detailNextVidButtonAndContantLayout"
android:text="@string/showSimilarVideosButtonText"/>
</RelativeLayout> </RelativeLayout>
<Button android:id="@+id/detailShowSimilarButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_below="@id/detailNextVideoRootLayout"
android:text="@string/showSimilarVideosButtonText"/>
</RelativeLayout> </RelativeLayout>
</ScrollView> </ScrollView>

View File

@ -33,22 +33,20 @@
<ImageView android:id="@+id/detailThumbnailView" <ImageView android:id="@+id/detailThumbnailView"
android:contentDescription="@string/detailThumbnailViewDescription" android:contentDescription="@string/detailThumbnailViewDescription"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/video_item_detail_thumbnail_image_height"
android:scaleType="centerInside" android:scaleType="centerInside"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:background="@color/dark_image_background"
android:src="@drawable/dummy_thumbnail"/> android:src="@drawable/dummy_thumbnail"/>
<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/detailThumbnailView" android:layout_below="@id/detailThumbnailView"
android:paddingTop="5dp" android:padding="@dimen/video_item_detail_info_text_padding" >
android:paddingBottom="5dp"
android:paddingRight="5dp"
android:paddingLeft="5dp">
<TextView android:id="@+id/detailVideoTitleView" <TextView android:id="@+id/detailVideoTitleView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -62,8 +60,8 @@
<ImageView android:id="@+id/detailUploaderThumbnailView" <ImageView android:id="@+id/detailUploaderThumbnailView"
android:contentDescription="@string/detailUploaderThumbnailViewDescription" android:contentDescription="@string/detailUploaderThumbnailViewDescription"
android:layout_width="80dp" android:layout_width="@dimen/video_item_detail_uploader_image_size"
android:layout_height="80dp" android:layout_height="@dimen/video_item_detail_uploader_image_size"
android:layout_below="@id/detailVideoTitleView" android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
@ -157,22 +155,18 @@
<RelativeLayout android:id="@+id/detailNextVideoRootLayout" <RelativeLayout android:id="@+id/detailNextVideoRootLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="10dp" android:padding="@dimen/video_item_detail_info_text_padding"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_below="@id/detailVideoInfo" > android:layout_below="@id/detailVideoInfo" >
<TextView android:id="@+id/detailNextVideoTitle" <TextView android:id="@+id/detailNextVideoTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_centerHorizontal="true"
android:layout_alignParentStart="true" android:textSize="@dimen/video_item_detail_next_text_size"
android:textSize="@dimen/video_item_detail_upload_date_text_size"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:text="@string/nextVideoTitle" android:text="@string/nextVideoTitle"
/> android:textAllCaps="true" />
<RelativeLayout android:id="@+id/detailNextVidButtonAndContantLayout" <RelativeLayout android:id="@+id/detailNextVidButtonAndContantLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -190,15 +184,13 @@
android:layout_alignBottom="@id/detailNextVideoFrame" android:layout_alignBottom="@id/detailNextVideoFrame"
android:background="?attr/selectableItemBackground"/> android:background="?attr/selectableItemBackground"/>
</RelativeLayout> </RelativeLayout>
<Button android:id="@+id/detailShowSimilarButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/detailNextVidButtonAndContantLayout"
android:text="@string/showSimilarVideosButtonText"/>
</RelativeLayout> </RelativeLayout>
<Button android:id="@+id/detailShowSimilarButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_below="@id/detailNextVideoRootLayout"
android:text="@string/showSimilarVideosButtonText"/>
</RelativeLayout> </RelativeLayout>
</ScrollView> </ScrollView>

View File

@ -10,6 +10,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".VideoItemListActivity" tools:context=".VideoItemListActivity"
tools:layout="@android:layout/list_content"/> tools:layout="@android:layout/list_content" />
</LinearLayout> </LinearLayout>

View File

@ -33,22 +33,20 @@
<ImageView android:id="@+id/detailThumbnailView" <ImageView android:id="@+id/detailThumbnailView"
android:contentDescription="@string/detailThumbnailViewDescription" android:contentDescription="@string/detailThumbnailViewDescription"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="@dimen/video_item_detail_thumbnail_image_height"
android:scaleType="centerInside" android:scaleType="centerInside"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:background="@color/dark_image_background"
android:src="@drawable/dummy_thumbnail"/> android:src="@drawable/dummy_thumbnail"/>
<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/detailThumbnailView" android:layout_below="@id/detailThumbnailView"
android:paddingTop="5dp" android:padding="@dimen/video_item_detail_info_text_padding" >
android:paddingBottom="5dp"
android:paddingRight="5dp"
android:paddingLeft="5dp">
<TextView android:id="@+id/detailVideoTitleView" <TextView android:id="@+id/detailVideoTitleView"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -62,8 +60,8 @@
<ImageView android:id="@+id/detailUploaderThumbnailView" <ImageView android:id="@+id/detailUploaderThumbnailView"
android:contentDescription="@string/detailUploaderThumbnailViewDescription" android:contentDescription="@string/detailUploaderThumbnailViewDescription"
android:layout_width="80dp" android:layout_width="@dimen/video_item_detail_uploader_image_size"
android:layout_height="80dp" android:layout_height="@dimen/video_item_detail_uploader_image_size"
android:layout_below="@id/detailVideoTitleView" android:layout_below="@id/detailVideoTitleView"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
@ -157,22 +155,18 @@
<RelativeLayout android:id="@+id/detailNextVideoRootLayout" <RelativeLayout android:id="@+id/detailNextVideoRootLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="10dp" android:padding="@dimen/video_item_detail_info_text_padding"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_below="@id/detailVideoInfo" > android:layout_below="@id/detailVideoInfo" >
<TextView android:id="@+id/detailNextVideoTitle" <TextView android:id="@+id/detailNextVideoTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_centerHorizontal="true"
android:layout_alignParentStart="true" android:textSize="@dimen/video_item_detail_next_text_size"
android:textSize="@dimen/video_item_detail_upload_date_text_size"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:text="@string/nextVideoTitle" android:text="@string/nextVideoTitle"
/> android:textAllCaps="true" />
<RelativeLayout android:id="@+id/detailNextVidButtonAndContantLayout" <RelativeLayout android:id="@+id/detailNextVidButtonAndContantLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -190,15 +184,13 @@
android:layout_alignBottom="@id/detailNextVideoFrame" android:layout_alignBottom="@id/detailNextVideoFrame"
android:background="?attr/selectableItemBackground"/> android:background="?attr/selectableItemBackground"/>
</RelativeLayout> </RelativeLayout>
<Button android:id="@+id/detailShowSimilarButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/detailNextVidButtonAndContantLayout"
android:text="@string/showSimilarVideosButtonText"/>
</RelativeLayout> </RelativeLayout>
<Button android:id="@+id/detailShowSimilarButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_below="@id/detailNextVideoRootLayout"
android:text="@string/showSimilarVideosButtonText"/>
</RelativeLayout> </RelativeLayout>
</ScrollView> </ScrollView>

View File

@ -33,8 +33,8 @@
<ImageView android:id="@+id/itemThumbnailView" <ImageView android:id="@+id/itemThumbnailView"
android:contentDescription="@string/itemThumbnailViewDescription" android:contentDescription="@string/itemThumbnailViewDescription"
android:layout_width="@dimen/video_item_search_image_width" android:layout_width="@dimen/video_item_search_thumbnail_image_width"
android:layout_height="@dimen/video_item_search_image_height" android:layout_height="@dimen/video_item_search_thumbnail_image_height"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
@ -64,7 +64,7 @@
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="@dimen/video_item_search_image_height" android:layout_height="@dimen/video_item_search_thumbnail_image_height"
android:layout_toRightOf="@id/itemThumbnailViewContainer"> android:layout_toRightOf="@id/itemThumbnailViewContainer">
<TextView android:id="@+id/itemVideoTitleView" <TextView android:id="@+id/itemVideoTitleView"

View File

@ -9,8 +9,8 @@
<dimen name="video_item_search_uploader_text_size">18sp</dimen> <dimen name="video_item_search_uploader_text_size">18sp</dimen>
<dimen name="video_item_search_upload_date_text_size">18sp</dimen> <dimen name="video_item_search_upload_date_text_size">18sp</dimen>
<!-- Elements Size --> <!-- Elements Size -->
<dimen name="video_item_search_image_width">210dp</dimen> <dimen name="video_item_search_thumbnail_image_width">210dp</dimen>
<dimen name="video_item_search_image_height">130dp</dimen> <dimen name="video_item_search_thumbnail_image_height">130dp</dimen>
<!-- Paddings & Margins --> <!-- Paddings & Margins -->
<dimen name="video_item_search_card_vertical_margin">3dp</dimen> <dimen name="video_item_search_card_vertical_margin">3dp</dimen>
<dimen name="video_item_search_card_horizontal_margin">10dp</dimen> <dimen name="video_item_search_card_horizontal_margin">10dp</dimen>
@ -32,4 +32,9 @@
<dimen name="video_item_detail_uploader_text_size">18sp</dimen> <dimen name="video_item_detail_uploader_text_size">18sp</dimen>
<dimen name="video_item_detail_upload_date_text_size">18sp</dimen> <dimen name="video_item_detail_upload_date_text_size">18sp</dimen>
<dimen name="video_item_detail_description_text_size">18sp</dimen> <dimen name="video_item_detail_description_text_size">18sp</dimen>
<!-- Elements Size -->
<dimen name="video_item_detail_thumbnail_image_height">240dp</dimen>
<dimen name="video_item_detail_uploader_image_size">100dp</dimen>
<!-- Paddings & Margins -->
<dimen name="video_item_detail_info_text_padding">10sp</dimen>
</resources> </resources>

View File

@ -10,4 +10,9 @@
<dimen name="video_item_detail_uploader_text_size">16sp</dimen> <dimen name="video_item_detail_uploader_text_size">16sp</dimen>
<dimen name="video_item_detail_upload_date_text_size">16sp</dimen> <dimen name="video_item_detail_upload_date_text_size">16sp</dimen>
<dimen name="video_item_detail_description_text_size">16sp</dimen> <dimen name="video_item_detail_description_text_size">16sp</dimen>
<!-- Elements Size -->
<dimen name="video_item_detail_thumbnail_image_height">300dp</dimen>
<dimen name="video_item_detail_uploader_image_size">110dp</dimen>
<!-- Paddings & Margins -->
<dimen name="video_item_detail_info_text_padding">10sp</dimen>
</resources> </resources>

View File

@ -30,7 +30,7 @@
<style name="VideoPlayerActionBarTheme" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse" > <style name="VideoPlayerActionBarTheme" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse" >
<item name="android:displayOptions">showHome</item> <item name="android:displayOptions">showHome</item>
<item name="displayOptions">showHome</item> <item name="displayOptions">showHome</item>
<item name="android:background">@color/black_overlay</item> <item name="android:background">@color/dark_overlay</item>
<item name="background">@color/black_overlay</item> <item name="background">@color/dark_overlay</item>
</style> </style>
</resources> </resources>

View File

@ -2,8 +2,9 @@
<resources> <resources>
<color name="primaryColorYoutube">#cd322e</color> <color name="primaryColorYoutube">#cd322e</color>
<color name="primaryColorDarkYoutube">#bc211d</color> <color name="primaryColorDarkYoutube">#bc211d</color>
<color name="accentColorYoutube">#000000</color> <color name="accentColorYoutube">#000</color>
<color name="durationBackground">#aa000000</color> <color name="durationBackground">#a000</color>
<color name="durationText">#eeffffff</color> <color name="durationText">#efff</color>
<color name="black_overlay">#66000000</color> <color name="dark_overlay">#6000</color>
<color name="dark_image_background">#222</color>
</resources> </resources>

View File

@ -9,8 +9,8 @@
<dimen name="video_item_search_uploader_text_size">12sp</dimen> <dimen name="video_item_search_uploader_text_size">12sp</dimen>
<dimen name="video_item_search_upload_date_text_size">12sp</dimen> <dimen name="video_item_search_upload_date_text_size">12sp</dimen>
<!-- Elements Size --> <!-- Elements Size -->
<dimen name="video_item_search_image_width">140dp</dimen> <dimen name="video_item_search_thumbnail_image_width">140dp</dimen>
<dimen name="video_item_search_image_height">80dp</dimen> <dimen name="video_item_search_thumbnail_image_height">85dp</dimen>
<!-- Paddings & Margins --> <!-- Paddings & Margins -->
<dimen name="video_item_search_card_vertical_margin">2dp</dimen> <dimen name="video_item_search_card_vertical_margin">2dp</dimen>
<dimen name="video_item_search_card_horizontal_margin">6dp</dimen> <dimen name="video_item_search_card_horizontal_margin">6dp</dimen>
@ -32,5 +32,11 @@
<dimen name="video_item_detail_uploader_text_size">14sp</dimen> <dimen name="video_item_detail_uploader_text_size">14sp</dimen>
<dimen name="video_item_detail_upload_date_text_size">14sp</dimen> <dimen name="video_item_detail_upload_date_text_size">14sp</dimen>
<dimen name="video_item_detail_description_text_size">14sp</dimen> <dimen name="video_item_detail_description_text_size">14sp</dimen>
<dimen name="video_item_detail_next_text_size">16sp</dimen>
<!-- Elements Size -->
<dimen name="video_item_detail_thumbnail_image_height">200dp</dimen>
<dimen name="video_item_detail_uploader_image_size">80dp</dimen>
<!-- Paddings & Margins -->
<dimen name="video_item_detail_info_text_padding">6sp</dimen>
</resources> </resources>

View File

@ -28,7 +28,7 @@
<style name="VideoPlayerActionBarTheme" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse" > <style name="VideoPlayerActionBarTheme" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse" >
<item name="android:displayOptions">showHome</item> <item name="android:displayOptions">showHome</item>
<item name="displayOptions">showHome</item> <item name="displayOptions">showHome</item>
<item name="android:background">@color/black_overlay</item> <item name="android:background">@color/dark_overlay</item>
<item name="background">@color/black_overlay</item> <item name="background">@color/dark_overlay</item>
</style> </style>
</resources> </resources>