Front end edit video
This commit is contained in:
parent
5143c54359
commit
e9e4f51d56
|
@ -88,5 +88,6 @@ dependencies {
|
||||||
implementation 'com.google.android.exoplayer:exoplayer:2.9.3'
|
implementation 'com.google.android.exoplayer:exoplayer:2.9.3'
|
||||||
implementation "com.github.TorrentStream:TorrentStream-Android:$torrentstreamVersion"
|
implementation "com.github.TorrentStream:TorrentStream-Android:$torrentstreamVersion"
|
||||||
implementation "net.gotev:uploadservice:$uploadServiceVersion"
|
implementation "net.gotev:uploadservice:$uploadServiceVersion"
|
||||||
|
implementation 'com.github.mabbas007:TagsEditText:1.0.5'
|
||||||
playstoreImplementation "io.github.kobakei:ratethisapp:$ratethisappLibraryVersion"
|
playstoreImplementation "io.github.kobakei:ratethisapp:$ratethisappLibraryVersion"
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ import static fr.gouv.etalab.mastodon.helper.Helper.THEME_LIGHT;
|
||||||
public class PeertubeEditUploadActivity extends BaseActivity implements OnRetrievePeertubeInterface {
|
public class PeertubeEditUploadActivity extends BaseActivity implements OnRetrievePeertubeInterface {
|
||||||
|
|
||||||
|
|
||||||
private Button set_upload_file, set_upload_submit;
|
private Button set_upload_submit;
|
||||||
private Spinner set_upload_privacy, set_upload_channel;
|
private Spinner set_upload_privacy, set_upload_channel;
|
||||||
private TextView set_upload_file_name;
|
private TextView set_upload_file_name;
|
||||||
private HashMap<String, String> channels;
|
private HashMap<String, String> channels;
|
||||||
|
@ -98,15 +98,15 @@ public class PeertubeEditUploadActivity extends BaseActivity implements OnRetrie
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
toolbar_title.setText(R.string.action_about);
|
toolbar_title.setText(R.string.update_video);
|
||||||
if (theme == THEME_LIGHT){
|
if (theme == THEME_LIGHT){
|
||||||
Toolbar toolbar = actionBar.getCustomView().findViewById(R.id.toolbar);
|
Toolbar toolbar = actionBar.getCustomView().findViewById(R.id.toolbar);
|
||||||
Helper.colorizeToolbar(toolbar, R.color.black, PeertubeEditUploadActivity.this);
|
Helper.colorizeToolbar(toolbar, R.color.black, PeertubeEditUploadActivity.this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setContentView(R.layout.activity_peertube_upload);
|
setContentView(R.layout.activity_peertube_edit);
|
||||||
|
|
||||||
|
|
||||||
set_upload_file = findViewById(R.id.set_upload_file);
|
|
||||||
set_upload_file_name = findViewById(R.id.set_upload_file_name);
|
set_upload_file_name = findViewById(R.id.set_upload_file_name);
|
||||||
set_upload_channel = findViewById(R.id.set_upload_channel);
|
set_upload_channel = findViewById(R.id.set_upload_channel);
|
||||||
set_upload_privacy = findViewById(R.id.set_upload_privacy);
|
set_upload_privacy = findViewById(R.id.set_upload_privacy);
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class PeertubeUploadActivity extends BaseActivity implements OnRetrievePe
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
toolbar_title.setText(R.string.action_about);
|
toolbar_title.setText(R.string.upload_video);
|
||||||
if (theme == THEME_LIGHT){
|
if (theme == THEME_LIGHT){
|
||||||
Toolbar toolbar = actionBar.getCustomView().findViewById(R.id.toolbar);
|
Toolbar toolbar = actionBar.getCustomView().findViewById(R.id.toolbar);
|
||||||
Helper.colorizeToolbar(toolbar, R.color.black, PeertubeUploadActivity.this);
|
Helper.colorizeToolbar(toolbar, R.color.black, PeertubeUploadActivity.this);
|
||||||
|
|
|
@ -0,0 +1,245 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2019 Thomas Schneider
|
||||||
|
|
||||||
|
This file is a part of Mastalab
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
Mastalab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with Mastalab; if not,
|
||||||
|
see <http://www.gnu.org/licenses>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:TagsEditText="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_marginLeft="@dimen/fab_margin"
|
||||||
|
android:layout_marginStart="@dimen/fab_margin"
|
||||||
|
android:layout_marginRight="@dimen/fab_margin"
|
||||||
|
android:layout_marginEnd="@dimen/fab_margin"
|
||||||
|
tools:context=".activities.PeertubeUploadActivity">
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- Video title -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:labelFor="@+id/p_video_title"
|
||||||
|
android:text="@string/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/p_video_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="text" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Video tags -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:labelFor="@+id/p_video_tags"
|
||||||
|
android:text="@string/tags"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
<mabbas007.tagsedittext.TagsEditText
|
||||||
|
android:id="@+id/p_video_tags"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
TagsEditText:allowSpaceInTag="true"
|
||||||
|
TagsEditText:tagsCloseImageRight="@drawable/tag_close"
|
||||||
|
TagsEditText:tagsTextColor="?colorAccent"
|
||||||
|
TagsEditText:tagsTextSize="@dimen/defaultTagsTextSize"
|
||||||
|
TagsEditText:tagsCloseImagePadding="@dimen/defaultTagsCloseImagePadding"
|
||||||
|
android:inputType="text" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- video description -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:labelFor="@+id/p_video_description"
|
||||||
|
android:text="@string/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/p_video_description"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:lines="5"
|
||||||
|
android:maxLines="5"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="text" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Videos channels -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/channel"/>
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/set_upload_channel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:baselineAligned="false">
|
||||||
|
|
||||||
|
<!-- Videos categories -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/category"/>
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/set_upload_categories"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Videos licences -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/license"/>
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/set_upload_licenses"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:baselineAligned="false">
|
||||||
|
|
||||||
|
<!-- Videos languages -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/language"/>
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/set_upload_languages"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Videos Privacy -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<TextView
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/action_privacy"/>
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/set_upload_privacy"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- More options -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/set_upload_nsfw"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:text="@string/peertube_nsfw"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/set_upload_enable_comments"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:text="@string/peertube_enable_comments"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Videos upload edit submit -->
|
||||||
|
<Button
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:id="@+id/set_upload_submit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="false"
|
||||||
|
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||||
|
android:text="@string/update_video" />
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
|
@ -36,6 +36,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:textSize="16sp"
|
||||||
style="@style/Base.Widget.AppCompat.Button.Colored"
|
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||||
android:text="@string/file_to_upload" />
|
android:text="@string/file_to_upload" />
|
||||||
|
|
||||||
|
@ -58,10 +59,12 @@
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<TextView
|
<TextView
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:textSize="16sp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/channel"/>
|
android:text="@string/channel"/>
|
||||||
<Spinner
|
<Spinner
|
||||||
|
android:textSize="16sp"
|
||||||
android:id="@+id/set_upload_channel"
|
android:id="@+id/set_upload_channel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
@ -78,10 +81,12 @@
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<TextView
|
<TextView
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:textSize="16sp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/action_privacy"/>
|
android:text="@string/action_privacy"/>
|
||||||
<Spinner
|
<Spinner
|
||||||
|
android:textSize="16sp"
|
||||||
android:id="@+id/set_upload_privacy"
|
android:id="@+id/set_upload_privacy"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
@ -91,6 +96,7 @@
|
||||||
<Button
|
<Button
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="40dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:textSize="18sp"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:id="@+id/set_upload_submit"
|
android:id="@+id/set_upload_submit"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -800,6 +800,14 @@
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
<string name="file_to_upload">Select the file to upload</string>
|
<string name="file_to_upload">Select the file to upload</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
|
<string name="title">Title</string>
|
||||||
|
<string name="categories">Categories</string>
|
||||||
|
<string name="license">License</string>
|
||||||
|
<string name="category">Category</string>
|
||||||
|
<string name="language">Language</string>
|
||||||
|
<string name="peertube_nsfw">This video contains mature or explicit content</string>
|
||||||
|
<string name="peertube_enable_comments">Enable video comments</string>
|
||||||
|
<string name="update_video">Update video</string>
|
||||||
<!-- end languages -->
|
<!-- end languages -->
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue