From 2502fc2cf066937e3748e11af68a80dcab8d5833 Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sun, 11 Mar 2018 17:27:54 +0100 Subject: [PATCH 1/3] Readme update --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 16e2a42..3b2026f 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,16 @@ - [X] Endless scrolling - [X] Pull to refresh - [X] Very Basic Torrent playback +- [X] Change Server + + +# TODO - [ ] Video Playback via WebRTC -- [ ] Pick Server - [ ] Login - [ ] Like/dislike video - [ ] Comment video -- [ ] Lots more missing at this point... - -# TODO - [ ] Unit Tests - [ ] App Icon and assets +- [ ] Lots more missing at this point... 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 2/3] 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 + From 03520b55e7ebd6eb5c32d2dd8f31779acb8eff15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Wed, 14 Mar 2018 14:33:17 +0100 Subject: [PATCH 3/3] Added search button --- README.md | 1 + .../schueller/peertube/activity/VideoListActivity.java | 10 ++++++++++ .../net/schueller/peertube/adapter/VideoAdapter.java | 4 ---- app/src/main/res/menu/menu_main.xml | 7 +++++++ app/src/main/res/values/strings.xml | 1 + 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3b2026f..d2e0777 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ - [ ] Comment video - [ ] Unit Tests - [ ] App Icon and assets +- [ ] Search - [ ] Lots more missing at this point... diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java index f06aedc..233fc11 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java @@ -145,6 +145,11 @@ public class VideoListActivity extends AppCompatActivity { inflater.inflate(R.menu.menu_main, menu); // Set an icon in the ActionBar + menu.findItem(R.id.action_search).setIcon( + new IconDrawable(this, FontAwesomeIcons.fa_search) + .colorRes(R.color.cardview_light_background) + .actionBarSize()); + menu.findItem(R.id.action_settings).setIcon( new IconDrawable(this, FontAwesomeIcons.fa_cog) .colorRes(R.color.cardview_light_background) @@ -162,6 +167,11 @@ public class VideoListActivity extends AppCompatActivity { switch (item.getItemId()) { // action with ID action_refresh was selected + case R.id.action_search: + // TODO: implement + Toast.makeText(this, "Search Selected", Toast.LENGTH_SHORT).show(); + + return false; case R.id.action_settings: // Toast.makeText(this, "Login Selected", Toast.LENGTH_SHORT).show(); Intent intent = new Intent(this, SettingsActivity.class); 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 6b4debd..6d4ee3c 100644 --- a/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java +++ b/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java @@ -2,11 +2,8 @@ package net.schueller.peertube.adapter; import android.content.Context; import android.content.Intent; -import android.content.SharedPreferences; -import android.preference.PreferenceManager; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; -import android.text.format.DateUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -19,7 +16,6 @@ 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; diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index 1e92997..b2d252f 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -4,6 +4,13 @@ xmlns:tools="http://schemas.android.com/tools" tools:context="activity.VideoListActivity"> + + + + Search Settings