commit
50c1118ad1
@ -6,8 +6,8 @@ android {
|
|||||||
applicationId "net.schueller.peertube"
|
applicationId "net.schueller.peertube"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 1016
|
versionCode 1017
|
||||||
versionName "1.0.16"
|
versionName "1.0.17"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
@ -286,8 +286,8 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere
|
|||||||
TextView videoOwner = findViewById(R.id.videoOwner);
|
TextView videoOwner = findViewById(R.id.videoOwner);
|
||||||
TextView videoMeta = findViewById(R.id.videoMeta);
|
TextView videoMeta = findViewById(R.id.videoMeta);
|
||||||
ImageView avatarView = findViewById(R.id.avatar);
|
ImageView avatarView = findViewById(R.id.avatar);
|
||||||
ImageButton moreButton = findViewById(R.id.moreButton);
|
TextView moreButton = findViewById(R.id.moreButton);
|
||||||
ImageButton videoOptions = findViewById(R.id.exo_more);
|
TextView videoOptions = findViewById(R.id.exo_more);
|
||||||
|
|
||||||
|
|
||||||
Video video = response.body();
|
Video video = response.body();
|
||||||
@ -320,6 +320,9 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere
|
|||||||
);
|
);
|
||||||
videoDescription.setText(video.getDescription());
|
videoDescription.setText(video.getDescription());
|
||||||
|
|
||||||
|
moreButton.setText(R.string.video_more_icon);
|
||||||
|
new Iconics.IconicsBuilder().ctx(context).on(moreButton).build();
|
||||||
|
|
||||||
moreButton.setOnClickListener(v -> {
|
moreButton.setOnClickListener(v -> {
|
||||||
PopupMenu popup = new PopupMenu(context, v);
|
PopupMenu popup = new PopupMenu(context, v);
|
||||||
popup.setOnMenuItemClickListener(menuItem -> {
|
popup.setOnMenuItemClickListener(menuItem -> {
|
||||||
@ -336,6 +339,9 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere
|
|||||||
});
|
});
|
||||||
|
|
||||||
// video player options
|
// video player options
|
||||||
|
videoOptions.setText(R.string.video_more_icon);
|
||||||
|
new Iconics.IconicsBuilder().ctx(context).on(videoOptions).build();
|
||||||
|
|
||||||
videoOptions.setOnClickListener(v -> {
|
videoOptions.setOnClickListener(v -> {
|
||||||
|
|
||||||
VideoOptionsFragment videoOptionsFragment =
|
VideoOptionsFragment videoOptionsFragment =
|
||||||
|
@ -22,6 +22,8 @@ import android.content.Intent;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.widget.PopupMenu;
|
import androidx.appcompat.widget.PopupMenu;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -29,6 +31,7 @@ import android.widget.ImageButton;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.mikepenz.iconics.Iconics;
|
||||||
import com.squareup.picasso.Picasso;
|
import com.squareup.picasso.Picasso;
|
||||||
|
|
||||||
import net.schueller.peertube.R;
|
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 -> {
|
holder.moreButton.setOnClickListener(v -> {
|
||||||
|
|
||||||
PopupMenu popup = new PopupMenu(context, v);
|
PopupMenu popup = new PopupMenu(context, v);
|
||||||
@ -147,9 +153,8 @@ public class VideoAdapter extends RecyclerView.Adapter<VideoAdapter.VideoViewHol
|
|||||||
|
|
||||||
class VideoViewHolder extends RecyclerView.ViewHolder {
|
class VideoViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
TextView name, videoMeta, videoOwner;
|
TextView name, videoMeta, videoOwner, moreButton;
|
||||||
ImageView thumb, avatar;
|
ImageView thumb, avatar;
|
||||||
ImageButton moreButton;
|
|
||||||
View mView;
|
View mView;
|
||||||
|
|
||||||
VideoViewHolder(View itemView) {
|
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"
|
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ImageButton
|
<TextView
|
||||||
android:id="@+id/moreButton"
|
android:id="@+id/moreButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="45dp"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
|
android:layout_below="@+id/thumb"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginStart="-16dp"
|
android:layout_marginStart="-16dp"
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
android:layout_toEndOf="@+id/name"
|
android:layout_toEndOf="@+id/name"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:contentDescription="@string/descr_overflow_button"
|
android:contentDescription="@string/descr_overflow_button"
|
||||||
android:src="@drawable/ic_action_more_vert" />
|
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||||
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/description"
|
android:id="@+id/description"
|
||||||
|
@ -72,20 +72,19 @@
|
|||||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ImageButton
|
<TextView
|
||||||
android:id="@+id/moreButton"
|
android:id="@+id/moreButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="45dp"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:layout_below="@+id/thumb"
|
android:layout_below="@+id/thumb"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginStart="-16dp"
|
android:layout_marginStart="-16dp"
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
|
|
||||||
android:layout_toEndOf="@+id/name"
|
android:layout_toEndOf="@+id/name"
|
||||||
|
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:contentDescription="@string/descr_overflow_button"
|
android:contentDescription="@string/descr_overflow_button"
|
||||||
android:src="@drawable/ic_action_more_vert" />
|
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||||
|
/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
@ -10,28 +10,27 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:targetApi="28">
|
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
|
<FrameLayout
|
||||||
android:id="@+id/exo_more"
|
android:id="@+id/exo_more_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="32dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="32dp"
|
||||||
android:background="@null"
|
android:layout_gravity="end">
|
||||||
android:paddingTop="0dp"
|
|
||||||
android:src="@drawable/ic_action_more_vert"
|
<TextView
|
||||||
android:tint="#ffffff" />
|
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
|
<View
|
||||||
|
@ -9,12 +9,14 @@
|
|||||||
android:orderInCategory="300"
|
android:orderInCategory="300"
|
||||||
android:title="@string/action_bar_title_search"
|
android:title="@string/action_bar_title_search"
|
||||||
app:showAsAction="always|collapseActionView"
|
app:showAsAction="always|collapseActionView"
|
||||||
|
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||||
app:actionViewClass="androidx.appcompat.widget.SearchView" />
|
app:actionViewClass="androidx.appcompat.widget.SearchView" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_settings"
|
android:id="@+id/action_settings"
|
||||||
android:orderInCategory="300"
|
android:orderInCategory="300"
|
||||||
android:title="@string/action_bar_title_settings"
|
android:title="@string/action_bar_title_settings"
|
||||||
|
android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
</menu>
|
</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>
|
@ -93,6 +93,7 @@
|
|||||||
<string name="video_speed_active_icon">{faw-check}</string>
|
<string name="video_speed_active_icon">{faw-check}</string>
|
||||||
<string name="video_expand_icon">{faw-expand}</string>
|
<string name="video_expand_icon">{faw-expand}</string>
|
||||||
<string name="video_compress_icon">{faw-compress}</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_title_background_play">Background Playback</string>
|
||||||
<string name="pref_description_background_play">If enabled, continues to play video in background.</string>
|
<string name="pref_description_background_play">If enabled, continues to play video in background.</string>
|
||||||
<string name="bottom_nav_title_local">Local</string>
|
<string name="bottom_nav_title_local">Local</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user