Merge branch 'develop' into Login
This commit is contained in:
commit
536dd626a9
@ -6,8 +6,8 @@ android {
|
||||
applicationId "net.schueller.peertube"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
versionCode 1016
|
||||
versionName "1.0.16"
|
||||
versionCode 1017
|
||||
versionName "1.0.17"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
@ -26,18 +26,18 @@ android {
|
||||
implementation 'com.mikepenz:fontawesome-typeface:5.3.1.1@aar'
|
||||
|
||||
// http client / REST
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
||||
|
||||
// image downloading and caching library
|
||||
implementation 'com.squareup.picasso:picasso:2.5.2'
|
||||
|
||||
// json decoder/encoder
|
||||
implementation 'com.google.code.gson:gson:2.8.2'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||||
implementation 'com.google.code.gson:gson:2.8.5'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
|
||||
|
||||
// Torrents and WebRTC
|
||||
implementation 'com.github.TorrentStream:TorrentStream-Android:2.5.0'
|
||||
implementation 'com.github.TorrentStream:TorrentStream-Android:2.6.1'
|
||||
// implementation "com.github.TorrentStream:TorrentStreamServer-Android:1.0.1"
|
||||
// implementation 'org.webrtc:google-webrtc:1.0.+'
|
||||
|
||||
|
@ -286,8 +286,8 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere
|
||||
TextView videoOwner = findViewById(R.id.videoOwner);
|
||||
TextView videoMeta = findViewById(R.id.videoMeta);
|
||||
ImageView avatarView = findViewById(R.id.avatar);
|
||||
ImageButton moreButton = findViewById(R.id.moreButton);
|
||||
ImageButton videoOptions = findViewById(R.id.exo_more);
|
||||
TextView moreButton = findViewById(R.id.moreButton);
|
||||
TextView videoOptions = findViewById(R.id.exo_more);
|
||||
|
||||
|
||||
Video video = response.body();
|
||||
@ -320,6 +320,9 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere
|
||||
);
|
||||
videoDescription.setText(video.getDescription());
|
||||
|
||||
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 -> {
|
||||
@ -336,6 +339,9 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere
|
||||
});
|
||||
|
||||
// video player options
|
||||
videoOptions.setText(R.string.video_more_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(videoOptions).build();
|
||||
|
||||
videoOptions.setOnClickListener(v -> {
|
||||
|
||||
VideoOptionsFragment videoOptionsFragment =
|
||||
|
@ -22,6 +22,8 @@ import android.content.Intent;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -29,6 +31,7 @@ import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mikepenz.iconics.Iconics;
|
||||
import com.squareup.picasso.Picasso;
|
||||
|
||||
import net.schueller.peertube.R;
|
||||
@ -111,6 +114,9 @@ public class VideoAdapter extends RecyclerView.Adapter<VideoAdapter.VideoViewHol
|
||||
|
||||
});
|
||||
|
||||
holder.moreButton.setText(R.string.video_more_icon);
|
||||
new Iconics.IconicsBuilder().ctx(context).on(holder.moreButton).build();
|
||||
|
||||
holder.moreButton.setOnClickListener(v -> {
|
||||
|
||||
PopupMenu popup = new PopupMenu(context, v);
|
||||
@ -147,9 +153,8 @@ public class VideoAdapter extends RecyclerView.Adapter<VideoAdapter.VideoViewHol
|
||||
|
||||
class VideoViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
TextView name, videoMeta, videoOwner;
|
||||
TextView name, videoMeta, videoOwner, moreButton;
|
||||
ImageView thumb, avatar;
|
||||
ImageButton moreButton;
|
||||
View mView;
|
||||
|
||||
VideoViewHolder(View itemView) {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 236 B |
Binary file not shown.
Before Width: | Height: | Size: 156 B |
Binary file not shown.
Before Width: | Height: | Size: 323 B |
Binary file not shown.
Before Width: | Height: | Size: 565 B |
Binary file not shown.
Before Width: | Height: | Size: 693 B |
@ -86,16 +86,19 @@
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
<TextView
|
||||
android:id="@+id/moreButton"
|
||||
android:layout_width="wrap_content"
|
||||
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:src="@drawable/ic_action_more_vert" />
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
|
@ -72,20 +72,19 @@
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
<TextView
|
||||
android:id="@+id/moreButton"
|
||||
android:layout_width="wrap_content"
|
||||
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:src="@drawable/ic_action_more_vert" />
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -10,28 +10,27 @@
|
||||
android:orientation="vertical"
|
||||
tools:targetApi="28">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:background="@null"
|
||||
android:paddingTop="0dp"
|
||||
android:src="@drawable/ic_action_more_vert"
|
||||
android:tint="#ffffff" />
|
||||
<FrameLayout
|
||||
android:id="@+id/exo_more_button"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="end">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_more"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:paddingTop="12dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:textColor="#FFBEBEBE"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
|
@ -9,12 +9,14 @@
|
||||
android:orderInCategory="300"
|
||||
android:title="@string/action_bar_title_search"
|
||||
app:showAsAction="always|collapseActionView"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="300"
|
||||
android:title="@string/action_bar_title_settings"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
59
app/src/main/res/values-zh-rCN/strings.xml
Normal file
59
app/src/main/res/values-zh-rCN/strings.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">PeerTube</string>
|
||||
<string name="action_sign_in_short">登录</string>
|
||||
<string name="action_sign_in">登录</string>
|
||||
<string name="title_activity_login">登录</string>
|
||||
<string name="prompt_server">服务</string>
|
||||
<string name="title_activity_settings">设置</string>
|
||||
<string name="action_bar_title_search">搜索</string>
|
||||
<string name="bottom_nav_title_home">主页</string>
|
||||
<string name="bottom_nav_title_trending">趋势</string>
|
||||
<string name="bottom_nav_title_subscriptions">订阅</string>
|
||||
<string name="bottom_nav_title_account">帐号</string>
|
||||
<string name="descr_overflow_button">更多</string>
|
||||
<string name="menu_share">分享</string>
|
||||
<string name="pref_title_peertube_server">PeerTube 服务器</string>
|
||||
<string name="pref_title_show_nsfw">显示NSFW</string>
|
||||
<string name="pref_title_version">版本</string>
|
||||
<string name="prompt_email">邮箱</string>
|
||||
<string name="prompt_password">密码(可选)</string>
|
||||
<string name="search_hint">建议</string>
|
||||
<string name="title_activity_search">搜索</string>
|
||||
<string name="video_speed_10">正常</string>
|
||||
<string name="video_speed_05">0.5倍速</string>
|
||||
<string name="video_speed_15">1.5倍速</string>
|
||||
<string name="video_speed_20">2倍速</string>
|
||||
<string name="yellow">黄色</string>
|
||||
<string name="red">红色</string>
|
||||
<string name="action_bar_title_settings">设置</string>
|
||||
<string name="error_invalid_email">邮箱格式错误</string>
|
||||
<string name="error_invalid_password">密码过短</string>
|
||||
<string name="error_incorrect_password">密码错误</string>
|
||||
<string name="pref_description_show_nsfw">点亮按钮以显示成人内容</string>
|
||||
<string name="pref_title_app_theme">主题</string>
|
||||
<string name="pref_description_app_theme">重启应用该主题</string>
|
||||
<string name="pref_description_dark_mode">重启进入夜间模式</string>
|
||||
<string name="pref_title_dark_mode">夜间模式</string>
|
||||
<string name="invalid_url">URL错误!</string>
|
||||
<string name="amber">琥珀色</string>
|
||||
<string name="pink">粉红</string>
|
||||
<string name="purple">紫色</string>
|
||||
<string name="deeppurple">暗绛红</string>
|
||||
<string name="indigo">靛青</string>
|
||||
<string name="blue">蓝色</string>
|
||||
<string name="lightblue">浅青</string>
|
||||
<string name="cyan">青色</string>
|
||||
<string name="teal">鸭翅绿</string>
|
||||
<string name="no_data_available">无结果</string>
|
||||
<string name="pref_title_license">许可</string>
|
||||
<string name="lightgreen">浅绿</string>
|
||||
<string name="green">正绿</string>
|
||||
<string name="lime">青柠色</string>
|
||||
<string name="orange">橙色</string>
|
||||
<string name="deeporange">深橙色</string>
|
||||
<string name="brown">褐色</string>
|
||||
<string name="gray">灰色</string>
|
||||
<string name="bluegray">蓝灰色</string>
|
||||
<string name="meta_data_views">次观看</string>
|
||||
</resources>
|
@ -94,6 +94,7 @@
|
||||
<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="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>
|
||||
|
Loading…
Reference in New Issue
Block a user