Merge branch 'develop' into stringlate-ru-9064
This commit is contained in:
commit
06e9715754
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,3 +1,13 @@
|
|||
### Version 1.0.21 Tag: v1.0.21 (2019-01-05)
|
||||
* Added more video meta data
|
||||
* Very basic like and dislike functionality
|
||||
* UI changes to video detail page
|
||||
* Torrent stream fatal fix (@lishoujun)
|
||||
* AR Strings update (@rex07)
|
||||
* ZH Strings update (@lishoujun)
|
||||
* RU Strings update (@ferhadnecef)
|
||||
* Refacturing (@lishoujun)
|
||||
|
||||
### Version 1.0.20 Tag: v1.0.20 (2019-01-02)
|
||||
* Added basic login framework
|
||||
* AR Strings update (@rex07)
|
||||
|
|
|
@ -6,8 +6,8 @@ android {
|
|||
applicationId "net.schueller.peertube"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
versionCode 1020
|
||||
versionName "1.0.20"
|
||||
versionCode 1021
|
||||
versionName "1.0.21"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
ext {
|
||||
libVersions = [
|
||||
|
|
|
@ -62,6 +62,7 @@ import com.google.android.exoplayer2.video.VideoRendererEventListener;
|
|||
import com.mikepenz.iconics.Iconics;
|
||||
import com.squareup.picasso.Picasso;
|
||||
import net.schueller.peertube.R;
|
||||
import net.schueller.peertube.fragment.VideoMetaDataFragment;
|
||||
import net.schueller.peertube.fragment.VideoOptionsFragment;
|
||||
import net.schueller.peertube.helper.APIUrlHelper;
|
||||
import net.schueller.peertube.helper.MetaDataHelper;
|
||||
|
@ -183,8 +184,9 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere
|
|||
torrentStream.addListener(new TorrentListener() {
|
||||
@Override
|
||||
public void onStreamReady(Torrent torrent) {
|
||||
Log.d(TAG, "Ready");
|
||||
mService.setCurrentStreamUrl(Uri.fromFile(torrent.getVideoFile()).toString());
|
||||
String videopath = Uri.fromFile(torrent.getVideoFile()).toString();
|
||||
Log.d(TAG, "Ready! torrentStream videopath:" + videopath);
|
||||
mService.setCurrentStreamUrl(videopath);
|
||||
startPlayer();
|
||||
}
|
||||
|
||||
|
@ -282,83 +284,22 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere
|
|||
|
||||
// TODO: remove this code duplication, similar code as in video list rows
|
||||
|
||||
TextView videoName = findViewById(R.id.name);
|
||||
TextView videoDescription = findViewById(R.id.description);
|
||||
TextView videoOwner = findViewById(R.id.videoOwner);
|
||||
TextView videoMeta = findViewById(R.id.videoMeta);
|
||||
ImageView avatarView = findViewById(R.id.avatar);
|
||||
TextView moreButton = findViewById(R.id.moreButton);
|
||||
TextView videoOptions = findViewById(R.id.exo_more);
|
||||
|
||||
|
||||
Video video = response.body();
|
||||
|
||||
mService.setCurrentVideo(video);
|
||||
|
||||
String baseUrl = APIUrlHelper.getUrl(context);
|
||||
|
||||
if(video == null){
|
||||
if (video == null){
|
||||
Toast.makeText(VideoPlayActivity.this, "Something went wrong...Please try later!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
Account account = video.getAccount();
|
||||
if(account == null){
|
||||
Toast.makeText(VideoPlayActivity.this, "Something went wrong...Please try later!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
Avatar avatar = account.getAvatar();
|
||||
if (avatar != null) {
|
||||
String avatarPath = avatar.getPath();
|
||||
Picasso.with(context)
|
||||
.load(baseUrl + avatarPath)
|
||||
.into(avatarView);
|
||||
}
|
||||
|
||||
videoName.setText(video.getName());
|
||||
videoMeta.setText(
|
||||
MetaDataHelper.getMetaString(
|
||||
video.getCreatedAt(),
|
||||
video.getViews(),
|
||||
getBaseContext()
|
||||
)
|
||||
);
|
||||
videoOwner.setText(
|
||||
MetaDataHelper.getOwnerString(video.getAccount().getName(),
|
||||
video.getAccount().getHost(),
|
||||
context
|
||||
)
|
||||
);
|
||||
videoDescription.setText(video.getDescription());
|
||||
VideoMetaDataFragment videoMetaDataFragment = (VideoMetaDataFragment)
|
||||
getSupportFragmentManager().findFragmentById(R.id.video_meta_data_fragment);
|
||||
|
||||
moreButton.setText(R.string.video_more_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(moreButton).build();
|
||||
assert videoMetaDataFragment != null;
|
||||
videoMetaDataFragment.updateVideoMeta(video, mService);
|
||||
|
||||
moreButton.setOnClickListener(v -> {
|
||||
PopupMenu popup = new PopupMenu(context, v);
|
||||
popup.setOnMenuItemClickListener(menuItem -> {
|
||||
switch (menuItem.getItemId()) {
|
||||
case R.id.menu_share:
|
||||
Intents.Share(context, video);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
});
|
||||
popup.inflate(R.menu.menu_video_row_mode);
|
||||
popup.show();
|
||||
});
|
||||
|
||||
// video player options
|
||||
videoOptions.setText(R.string.video_more_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(videoOptions).build();
|
||||
|
||||
videoOptions.setOnClickListener(v -> {
|
||||
|
||||
VideoOptionsFragment videoOptionsFragment =
|
||||
VideoOptionsFragment.newInstance(mService);
|
||||
videoOptionsFragment.show(getSupportFragmentManager(),
|
||||
"video_options_fragment");
|
||||
});
|
||||
Log.v(TAG, "url : " + video.getFiles().get(0).getFileUrl());
|
||||
|
||||
mService.setCurrentStreamUrl(video.getFiles().get(0).getFileUrl());
|
||||
|
|
|
@ -0,0 +1,278 @@
|
|||
package net.schueller.peertube.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.mikepenz.fontawesome_typeface_library.FontAwesome;
|
||||
import com.mikepenz.iconics.Iconics;
|
||||
import com.mikepenz.iconics.IconicsDrawable;
|
||||
import com.squareup.picasso.Picasso;
|
||||
|
||||
import net.schueller.peertube.R;
|
||||
import net.schueller.peertube.activity.VideoPlayActivity;
|
||||
import net.schueller.peertube.helper.APIUrlHelper;
|
||||
import net.schueller.peertube.helper.MetaDataHelper;
|
||||
import net.schueller.peertube.intents.Intents;
|
||||
import net.schueller.peertube.model.Account;
|
||||
import net.schueller.peertube.model.Avatar;
|
||||
import net.schueller.peertube.model.Video;
|
||||
import net.schueller.peertube.network.GetVideoDataService;
|
||||
import net.schueller.peertube.network.RetrofitInstance;
|
||||
import net.schueller.peertube.network.Session;
|
||||
import net.schueller.peertube.service.VideoPlayerService;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
||||
public class VideoMetaDataFragment extends Fragment {
|
||||
|
||||
private static final String TAG = "VideoMetaDataFragment";
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_video_meta, container, false);
|
||||
}
|
||||
|
||||
public void updateVideoMeta(Video video, VideoPlayerService mService) {
|
||||
|
||||
Context context = getContext();
|
||||
Activity activity = getActivity();
|
||||
|
||||
|
||||
// Thumbs up
|
||||
Button thumbsUpButton = activity.findViewById(R.id.video_thumbs_up);
|
||||
thumbsUpButton.setText(R.string.video_thumbs_up_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(thumbsUpButton).build();
|
||||
thumbsUpButton.setOnClickListener(v -> {
|
||||
|
||||
if (Session.getInstance().isLoggedIn()) {
|
||||
|
||||
// TODO: move this out helper/service
|
||||
RequestBody body = RequestBody.create(
|
||||
okhttp3.MediaType.parse("application/json"),
|
||||
"{\"rating\":\"like\"}"
|
||||
);
|
||||
|
||||
String apiBaseURL = APIUrlHelper.getUrlWithVersion(context);
|
||||
GetVideoDataService service = RetrofitInstance.getRetrofitInstance(apiBaseURL).create(GetVideoDataService.class);
|
||||
|
||||
Call<ResponseBody> call = service.rateVideo(video.getId(), body);
|
||||
|
||||
call.enqueue(new Callback<ResponseBody>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||
|
||||
Log.v(TAG, response.toString() );
|
||||
|
||||
// if 20x update likes
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ResponseBody> call, Throwable t) {
|
||||
Toast.makeText(context, "Rating Failed", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Toast.makeText(context, "You must login to use this service", Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
TextView thumbsUpButtonTotal = activity.findViewById(R.id.video_thumbs_up_total);
|
||||
thumbsUpButtonTotal.setText(video.getLikes().toString());
|
||||
|
||||
// Thumbs Down
|
||||
TextView thumbsDownButton = activity.findViewById(R.id.video_thumbs_down);
|
||||
thumbsDownButton.setText(R.string.video_thumbs_down_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(thumbsDownButton).build();
|
||||
thumbsDownButton.setOnClickListener(v -> {
|
||||
|
||||
if (Session.getInstance().isLoggedIn()) {
|
||||
|
||||
// TODO: move this out helper/service
|
||||
RequestBody body = RequestBody.create(
|
||||
okhttp3.MediaType.parse("application/json"),
|
||||
"{\"rating\":\"dislike\"}"
|
||||
);
|
||||
|
||||
String apiBaseURL = APIUrlHelper.getUrlWithVersion(context);
|
||||
GetVideoDataService service = RetrofitInstance.getRetrofitInstance(apiBaseURL).create(GetVideoDataService.class);
|
||||
|
||||
Call<ResponseBody> call = service.rateVideo(video.getId(), body);
|
||||
|
||||
call.enqueue(new Callback<ResponseBody>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||
|
||||
// if 20x update likes
|
||||
|
||||
Log.v(TAG, response.toString() );
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ResponseBody> call, Throwable t) {
|
||||
Toast.makeText(context, "Rating Failed", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Toast.makeText(context, "You must login to use this service", Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
TextView thumbsDownButtonTotal = activity.findViewById(R.id.video_thumbs_down_total);
|
||||
thumbsDownButtonTotal.setText(video.getDislikes().toString());
|
||||
|
||||
// Share
|
||||
TextView videoShareButton = activity.findViewById(R.id.video_share);
|
||||
videoShareButton.setText(R.string.video_share_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(videoShareButton).build();
|
||||
videoShareButton.setOnClickListener(v -> Intents.Share(context, video));
|
||||
|
||||
// Download
|
||||
TextView videoDownloadButton = activity.findViewById(R.id.video_download);
|
||||
videoDownloadButton.setText(R.string.video_download_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(videoDownloadButton).build();
|
||||
videoDownloadButton.setOnClickListener(v -> Toast.makeText(context, "Not Implemented", Toast.LENGTH_SHORT).show());
|
||||
|
||||
// add to playlist
|
||||
TextView videoSaveButton = activity.findViewById(R.id.video_save);
|
||||
videoSaveButton.setText(R.string.video_save_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(videoSaveButton).build();
|
||||
videoSaveButton.setOnClickListener(v -> Toast.makeText(context, "Not Implemented", Toast.LENGTH_SHORT).show());
|
||||
|
||||
|
||||
Account account = video.getAccount();
|
||||
|
||||
// owner / creator Avatar
|
||||
Avatar avatar = account.getAvatar();
|
||||
if (avatar != null) {
|
||||
ImageView avatarView = activity.findViewById(R.id.avatar);
|
||||
String baseUrl = APIUrlHelper.getUrl(context);
|
||||
String avatarPath = avatar.getPath();
|
||||
Picasso.with(context)
|
||||
.load(baseUrl + avatarPath)
|
||||
.into(avatarView);
|
||||
}
|
||||
|
||||
|
||||
// title / name
|
||||
TextView videoName = activity.findViewById(R.id.name);
|
||||
videoName.setText(video.getName());
|
||||
|
||||
// created at / views
|
||||
TextView videoMeta = activity.findViewById(R.id.videoMeta);
|
||||
videoMeta.setText(
|
||||
MetaDataHelper.getMetaString(
|
||||
video.getCreatedAt(),
|
||||
video.getViews(),
|
||||
context
|
||||
)
|
||||
);
|
||||
|
||||
// owner / creator
|
||||
TextView videoOwner = activity.findViewById(R.id.videoOwner);
|
||||
videoOwner.setText(
|
||||
MetaDataHelper.getOwnerString(video.getAccount().getName(),
|
||||
video.getAccount().getHost(),
|
||||
context
|
||||
)
|
||||
);
|
||||
|
||||
// description
|
||||
TextView videoDescription = activity.findViewById(R.id.description);
|
||||
videoDescription.setText(video.getDescription());
|
||||
|
||||
|
||||
// video privacy
|
||||
TextView videoPrivacy = activity.findViewById(R.id.video_privacy);
|
||||
videoPrivacy.setText(video.getPrivacy().getLabel());
|
||||
|
||||
// video category
|
||||
TextView videoCategory = activity.findViewById(R.id.video_category);
|
||||
videoCategory.setText(video.getCategory().getLabel());
|
||||
|
||||
// video privacy
|
||||
TextView videoLicense = activity.findViewById(R.id.video_license);
|
||||
videoLicense.setText(video.getLicence().getLabel());
|
||||
|
||||
// video langauge
|
||||
TextView videoLanguage = activity.findViewById(R.id.video_language);
|
||||
videoLanguage.setText(video.getLanguage().getLabel());
|
||||
|
||||
// video privacy
|
||||
TextView videoTags = activity.findViewById(R.id.video_tags);
|
||||
videoTags.setText(android.text.TextUtils.join(", ", video.getTags()));
|
||||
|
||||
|
||||
// more button
|
||||
TextView moreButton = activity.findViewById(R.id.moreButton);
|
||||
moreButton.setText(R.string.video_more_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(moreButton).build();
|
||||
|
||||
moreButton.setOnClickListener(v -> {
|
||||
PopupMenu popup = new PopupMenu(context, v);
|
||||
popup.setOnMenuItemClickListener(menuItem -> {
|
||||
switch (menuItem.getItemId()) {
|
||||
case R.id.video_more_report:
|
||||
Log.v(TAG, "Report" );
|
||||
Toast.makeText(context, "Not Implemented", Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
case R.id.video_more_blacklist:
|
||||
Log.v(TAG, "Blacklist" );
|
||||
Toast.makeText(context, "Not Implemented", Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
});
|
||||
popup.inflate(R.menu.menu_video_more);
|
||||
popup.show();
|
||||
});
|
||||
|
||||
// video player options
|
||||
TextView videoOptions = activity.findViewById(R.id.exo_more);
|
||||
videoOptions.setText(R.string.video_more_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(videoOptions).build();
|
||||
|
||||
videoOptions.setOnClickListener(v -> {
|
||||
|
||||
VideoOptionsFragment videoOptionsFragment =
|
||||
VideoOptionsFragment.newInstance(mService);
|
||||
videoOptionsFragment.show(getActivity().getSupportFragmentManager(),
|
||||
"video_options_fragment");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -22,8 +22,13 @@ import net.schueller.peertube.model.VideoList;
|
|||
|
||||
import java.util.Set;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.PUT;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
|
@ -53,4 +58,11 @@ public interface GetVideoDataService {
|
|||
@Query("filter") String filter,
|
||||
@Query("languageOneOf") Set<String> languages
|
||||
);
|
||||
|
||||
@PUT("videos/{id}/rate")
|
||||
Call<ResponseBody> rateVideo(
|
||||
@Path(value = "id", encoded = true) Integer id,
|
||||
@Body RequestBody params
|
||||
);
|
||||
|
||||
}
|
|
@ -35,6 +35,7 @@ import androidx.annotation.Nullable;
|
|||
import android.support.v4.media.MediaDescriptionCompat;
|
||||
import android.support.v4.media.session.MediaSessionCompat;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.ExoPlayerFactory;
|
||||
|
@ -82,6 +83,8 @@ public class VideoPlayerService extends Service {
|
|||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
Log.v(TAG, "onCreate...");
|
||||
|
||||
super.onCreate();
|
||||
|
||||
player = ExoPlayerFactory.newSimpleInstance(getApplicationContext(), new DefaultTrackSelector());
|
||||
|
@ -136,7 +139,11 @@ public class VideoPlayerService extends Service {
|
|||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
Context context = this;
|
||||
Log.v(TAG, "onStartCommand...");
|
||||
if(currentStreamUrl == null){
|
||||
Toast.makeText(context, "currentStreamUrl must not null", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
playVideo();
|
||||
return START_STICKY;
|
||||
}
|
||||
|
@ -150,7 +157,7 @@ public class VideoPlayerService extends Service {
|
|||
|
||||
public void setCurrentStreamUrl(String streamUrl)
|
||||
{
|
||||
Log.v(TAG, "setCurrentStreamUrl...");
|
||||
Log.v(TAG, "setCurrentStreamUrl..." + streamUrl);
|
||||
currentStreamUrl = streamUrl;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="250dp"
|
||||
android:background="@color/videoBackgroundColor"
|
||||
app:resize_mode="fixed_width"
|
||||
app:controller_layout_id="@layout/video_playback_controls"
|
||||
app:resize_mode="fixed_width"
|
||||
|
||||
/>
|
||||
|
||||
|
@ -32,89 +32,26 @@
|
|||
android:indeterminate="false"
|
||||
android:max="100" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/progress"
|
||||
android:padding="6dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="0dp"
|
||||
android:contentDescription="@string/video_row_account_avatar"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
<ScrollView
|
||||
android:id="@+id/login_form"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/videoMeta"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/name"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/videoOwner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/videoMeta"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_toEndOf="@id/avatar"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/moreButton"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_below="@+id/thumb"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="-16dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_toEndOf="@+id/name"
|
||||
android:background="@null"
|
||||
android:contentDescription="@string/descr_overflow_button"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/videoMeta"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Body1" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment android:name="net.schueller.peertube.fragment.VideoMetaDataFragment"
|
||||
android:id="@+id/video_meta_data_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -0,0 +1,375 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="0dp"
|
||||
android:contentDescription="@string/video_row_account_avatar"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/videoMeta"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/name"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_toEndOf="@+id/avatar"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/videoOwner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/videoMeta"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_toEndOf="@id/avatar"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/moreButton"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="-16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_toEndOf="@+id/name"
|
||||
android:background="@null"
|
||||
android:contentDescription="@string/descr_overflow_button"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/video_actions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/videoOwner"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/video_thumbs_up"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_thumbs_up_total"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/video_thumbs_down"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_thumbs_down_total"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/video_share"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_share_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Share"
|
||||
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/video_download"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_download_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Download"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/video_save"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_save_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Save"
|
||||
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/video_actions"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Body1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/description"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Privacy"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead" />
|
||||
|
||||
<Space
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_privacy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Category"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead" />
|
||||
|
||||
<Space
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_category"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="License"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead" />
|
||||
|
||||
<Space
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_license"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Language"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead" />
|
||||
|
||||
<Space
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_language"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Tags"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Subhead" />
|
||||
|
||||
<Space
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_tags"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/video_more_report"
|
||||
android:title="@string/menu_video_more_report" />
|
||||
<item
|
||||
android:id="@+id/video_more_blacklist"
|
||||
android:title="@string/menu_video_more_blacklist" />
|
||||
</menu>
|
|
@ -286,10 +286,16 @@
|
|||
<string name="video_speed_20">2x</string>
|
||||
|
||||
|
||||
<string name="video_speed_active_icon">{faw-check}</string>
|
||||
<string name="video_expand_icon">{faw-expand}</string>
|
||||
<string name="video_compress_icon">{faw-compress}</string>
|
||||
<string name="video_more_icon">{faw-ellipsis-v}</string>
|
||||
<string name="video_speed_active_icon" translatable="false">{faw-check}</string>
|
||||
<string name="video_expand_icon" translatable="false">{faw-expand}</string>
|
||||
<string name="video_compress_icon" translatable="false">{faw-compress}</string>
|
||||
<string name="video_more_icon" translatable="false">{faw-ellipsis-v}</string>
|
||||
<string name="video_thumbs_up_icon" translatable="false">{faw-thumbs-up}</string>
|
||||
<string name="video_thumbs_down_icon" translatable="false">{faw-thumbs-down}</string>
|
||||
<string name="video_share_icon" translatable="false">{faw-share}</string>
|
||||
<string name="video_download_icon" translatable="false">{faw-download}</string>
|
||||
<string name="video_save_icon" translatable="false">{faw-save}</string>
|
||||
|
||||
<string name="pref_title_background_play">Background Playback</string>
|
||||
<string name="pref_description_background_play">If enabled, continues to play video in background.</string>
|
||||
<string name="bottom_nav_title_local">Local</string>
|
||||
|
@ -297,11 +303,13 @@
|
|||
<string name="title_activity_account">Account</string>
|
||||
|
||||
<!-- Constants, Don't translate -->
|
||||
<string name="pref_token_access">pref_token_access</string>
|
||||
<string name="pref_token_refresh">pref_token_refresh</string>
|
||||
<string name="pref_token_expiration">pref_token_expiration</string>
|
||||
<string name="pref_token_type">pref_token_type</string>
|
||||
<string name="pref_auth_username">pref_auth_username</string>
|
||||
<string name="pref_auth_password">pref_auth_password</string>
|
||||
<string name="pref_token_access" translatable="false">pref_token_access</string>
|
||||
<string name="pref_token_refresh" translatable="false">pref_token_refresh</string>
|
||||
<string name="pref_token_expiration" translatable="false">pref_token_expiration</string>
|
||||
<string name="pref_token_type" translatable="false">pref_token_type</string>
|
||||
<string name="pref_auth_username" translatable="false">pref_auth_username</string>
|
||||
<string name="pref_auth_password" translatable="false">pref_auth_password</string>
|
||||
<string name="menu_video_more_report">Report</string>
|
||||
<string name="menu_video_more_blacklist">Blacklist</string>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue