This commit is contained in:
lishoujun 2018-12-30 10:00:36 +08:00
commit 4888429115
13 changed files with 49 additions and 34 deletions

View File

@ -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'])

View File

@ -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 =

View File

@ -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

View File

@ -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"

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -93,6 +93,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>