mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 11:02:35 +01:00
tryna add cardview
This commit is contained in:
parent
2e4e993967
commit
36260dac18
@ -2,14 +2,14 @@ apply plugin: 'com.android.application'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "23.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "org.schabi.newpipe"
|
applicationId "org.schabi.newpipe"
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 23
|
targetSdkVersion 23
|
||||||
versionCode 6
|
versionCode 7
|
||||||
versionName "0.6.0"
|
versionName "0.6.1"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
@ -31,6 +31,8 @@ dependencies {
|
|||||||
compile 'com.android.support:appcompat-v7:23.1.1'
|
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||||
compile 'com.android.support:support-v4:23.1.1'
|
compile 'com.android.support:support-v4:23.1.1'
|
||||||
compile 'com.android.support:design:23.1.1'
|
compile 'com.android.support:design:23.1.1'
|
||||||
|
compile 'com.android.support:cardview-v7:23.1.1'
|
||||||
|
compile 'com.android.support:recyclerview-v7:23.1.1'
|
||||||
compile 'org.jsoup:jsoup:1.8.3'
|
compile 'org.jsoup:jsoup:1.8.3'
|
||||||
compile 'org.mozilla:rhino:1.7.7'
|
compile 'org.mozilla:rhino:1.7.7'
|
||||||
}
|
}
|
||||||
|
@ -1,67 +1,84 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical"
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="92dp"
|
android:layout_height="wrap_content">
|
||||||
android:padding="6dp">
|
|
||||||
|
|
||||||
<ImageView android:id="@+id/itemThumbnailView"
|
<android.support.v7.widget.CardView
|
||||||
android:contentDescription="@string/itemThumbnailViewDescription"
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="142dp"
|
android:id="@+id/card_view"
|
||||||
android:layout_height="80dp"
|
android:layout_gravity="center"
|
||||||
android:layout_marginEnd="6dp"
|
android:orientation="vertical"
|
||||||
android:layout_marginRight="6dp"
|
android:layout_width="match_parent"
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:src="@drawable/dummy_thumbnail"/>
|
|
||||||
|
|
||||||
<TextView android:id="@+id/itemVideoTitleView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
android:layout_toRightOf="@id/itemThumbnailView"
|
|
||||||
android:layout_toEndOf="@id/itemThumbnailView"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:textSize="@dimen/text_search_title_size"/>
|
|
||||||
|
|
||||||
<TextView android:id="@+id/itemUploaderView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="18dp"
|
|
||||||
android:layout_toRightOf="@id/itemThumbnailView"
|
|
||||||
android:layout_toEndOf="@id/itemThumbnailView"
|
|
||||||
android:layout_below="@id/itemVideoTitleView"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textSize="@dimen/text_search_uploader_size"/>
|
|
||||||
|
|
||||||
<TextView android:id="@+id/itemUploadDateView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toRightOf="@id/itemThumbnailView"
|
android:layout_margin="6dp"
|
||||||
android:layout_toEndOf="@id/itemThumbnailView"
|
card_view:cardCornerRadius="4dp" >
|
||||||
android:layout_below="@id/itemUploaderView"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textSize="@dimen/text_search_uploadtime_size"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView android:id="@+id/itemDurationView"
|
<RelativeLayout
|
||||||
android:layout_width="wrap_content"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
||||||
android:layout_alignBottom="@id/itemThumbnailView"
|
android:layout_width="match_parent"
|
||||||
android:layout_alignRight="@id/itemThumbnailView"
|
android:layout_height="92dp">
|
||||||
android:layout_alignEnd="@id/itemThumbnailView"
|
|
||||||
android:layout_marginRight="2dp"
|
|
||||||
android:layout_marginEnd="2dp"
|
|
||||||
android:layout_marginBottom="2dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:paddingRight="5dp"
|
|
||||||
android:paddingLeft="5dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textSize="@dimen/text_search_duration_size"
|
|
||||||
android:background="@color/durationBackground"
|
|
||||||
android:textColor="@color/durationText"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<ImageView android:id="@+id/itemThumbnailView"
|
||||||
|
android:contentDescription="@string/itemThumbnailViewDescription"
|
||||||
|
android:layout_width="142dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:src="@drawable/dummy_thumbnail"/>
|
||||||
|
|
||||||
|
<TextView android:id="@+id/itemVideoTitleView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_toRightOf="@id/itemThumbnailView"
|
||||||
|
android:layout_toEndOf="@id/itemThumbnailView"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:textSize="@dimen/text_search_title_size"/>
|
||||||
|
|
||||||
|
<TextView android:id="@+id/itemUploaderView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_toRightOf="@id/itemThumbnailView"
|
||||||
|
android:layout_toEndOf="@id/itemThumbnailView"
|
||||||
|
android:layout_below="@id/itemVideoTitleView"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textSize="@dimen/text_search_uploader_size"/>
|
||||||
|
|
||||||
|
<TextView android:id="@+id/itemUploadDateView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toRightOf="@id/itemThumbnailView"
|
||||||
|
android:layout_toEndOf="@id/itemThumbnailView"
|
||||||
|
android:layout_below="@id/itemUploaderView"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textSize="@dimen/text_search_uploadtime_size"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView android:id="@+id/itemDurationView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignBottom="@id/itemThumbnailView"
|
||||||
|
android:layout_alignRight="@id/itemThumbnailView"
|
||||||
|
android:layout_alignEnd="@id/itemThumbnailView"
|
||||||
|
android:layout_marginRight="2dp"
|
||||||
|
android:layout_marginEnd="2dp"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textSize="@dimen/text_search_duration_size"
|
||||||
|
android:background="@color/durationBackground"
|
||||||
|
android:textColor="@color/durationText"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user