From 7145f04375d6190a2703e7a7a1d7c58bf6d4a8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Wed, 14 Mar 2018 14:26:36 +0100 Subject: [PATCH] Added Avatar to video list, added config model. --- app/build.gradle | 2 + .../peertube/adapter/VideoAdapter.java | 19 ++++++- .../net/schueller/peertube/model/Config.java | 16 ++++++ .../net/schueller/peertube/model/Video.java | 18 ------ .../network/GetConfigDataService.java | 12 ++++ app/src/main/res/layout/row_video.xml | 56 ++++++++++++------- app/src/main/res/values/strings.xml | 7 +++ 7 files changed, 88 insertions(+), 42 deletions(-) create mode 100644 app/src/main/java/net/schueller/peertube/model/Config.java create mode 100644 app/src/main/java/net/schueller/peertube/network/GetConfigDataService.java diff --git a/app/build.gradle b/app/build.gradle index 1162fec..3630f22 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -48,6 +48,8 @@ dependencies { // implementation "com.github.TorrentStream:TorrentStreamServer-Android:1.0.1" // implementation 'com.devbrackets.android:exomedia:4.1.0' + implementation 'de.hdodenhof:circleimageview:2.2.0' + implementation 'com.android.support:support-v4:27.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' diff --git a/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java b/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java index 21f492f..6b4debd 100644 --- a/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java +++ b/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java @@ -19,6 +19,8 @@ import net.schueller.peertube.R; import net.schueller.peertube.activity.TorrentVideoPlayActivity; import net.schueller.peertube.helper.APIUrlHelper; import net.schueller.peertube.helper.MetaDataHelper; +import net.schueller.peertube.model.Account; +import net.schueller.peertube.model.Avatar; import net.schueller.peertube.model.Video; import java.util.ArrayList; @@ -55,6 +57,16 @@ public class VideoAdapter extends RecyclerView.Adapter getConfigData(); + +} \ No newline at end of file diff --git a/app/src/main/res/layout/row_video.xml b/app/src/main/res/layout/row_video.xml index 35e15d7..609a759 100644 --- a/app/src/main/res/layout/row_video.xml +++ b/app/src/main/res/layout/row_video.xml @@ -1,50 +1,64 @@ - - + - + android:orientation="vertical" + android:padding="12dp"> + - + + + + + android:layout_below="@id/name" + android:layout_toEndOf="@id/avatar" + android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" /> + android:layout_below="@id/videoMeta" + android:layout_toEndOf="@id/avatar" + android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" /> - + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 654b888..a33c5fe 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -29,6 +29,8 @@ Account + 1.0.0-alpha.7 + https://troll.tv PeerTube Server @@ -38,4 +40,9 @@ \u0020Views \@ + + + Video Thumbnail + Account Avatar +