From 3f93ccfc92638b9a528aefa2c4f6b6b03075ec44 Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sat, 29 Dec 2018 22:36:54 +0100 Subject: [PATCH] Replaced more icon with fonts --- app/build.gradle | 4 +- .../peertube/activity/VideoPlayActivity.java | 10 ++++- .../peertube/adapter/VideoAdapter.java | 9 ++++- .../res/drawable-hdpi/ic_action_more_vert.png | Bin 236 -> 0 bytes .../res/drawable-mdpi/ic_action_more_vert.png | Bin 156 -> 0 bytes .../drawable-xhdpi/ic_action_more_vert.png | Bin 323 -> 0 bytes .../drawable-xxhdpi/ic_action_more_vert.png | Bin 565 -> 0 bytes .../drawable-xxxhdpi/ic_action_more_vert.png | Bin 693 -> 0 bytes .../main/res/layout/activity_video_play.xml | 9 +++-- app/src/main/res/layout/row_video.xml | 11 +++--- .../res/layout/video_playback_controls.xml | 37 +++++++++--------- app/src/main/res/menu/menu_main.xml | 2 + app/src/main/res/values/strings.xml | 1 + 13 files changed, 49 insertions(+), 34 deletions(-) delete mode 100644 app/src/main/res/drawable-hdpi/ic_action_more_vert.png delete mode 100644 app/src/main/res/drawable-mdpi/ic_action_more_vert.png delete mode 100644 app/src/main/res/drawable-xhdpi/ic_action_more_vert.png delete mode 100644 app/src/main/res/drawable-xxhdpi/ic_action_more_vert.png delete mode 100644 app/src/main/res/drawable-xxxhdpi/ic_action_more_vert.png diff --git a/app/build.gradle b/app/build.gradle index acc917f..ce5ddcc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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']) diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java index cdfe2f0..b8f0699 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java @@ -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 = diff --git a/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java b/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java index 25f68e6..7bda3aa 100644 --- a/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java +++ b/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java @@ -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 { PopupMenu popup = new PopupMenu(context, v); @@ -147,9 +153,8 @@ public class VideoAdapter extends RecyclerView.Adapter|k1|%Oc%$NbBHha1_hD5l(y<*M9SVim2RNT)QK5N6^inW3Wwady_#)&`>(v} zcf19Eg>L^EcU{-pS+G&(SVw?ZvWrHyq0*J#Hr<9!x2A&l7C`=#qY{FzYVVc4y&UkK gWf8marj85jwV?*8YkyXj0iDm_>FVdQ&MBb@0O%iBz5oCK diff --git a/app/src/main/res/drawable-mdpi/ic_action_more_vert.png b/app/src/main/res/drawable-mdpi/ic_action_more_vert.png deleted file mode 100644 index 4ccef014d0615bc679f7ffc440497696019c22e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj$(}BbAs*hzDGLk}mTdgVqkNjl zmyNB>AY;P1q=bYWem);23Audb;o-Rx;Jn|+z`%shk~>4rs|7J)-iax`njxgN@xNA DU@0zt diff --git a/app/src/main/res/drawable-xhdpi/ic_action_more_vert.png b/app/src/main/res/drawable-xhdpi/ic_action_more_vert.png deleted file mode 100644 index 17428a44699b30189173b458b8d8d1b2311170ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 323 zcmV-J0lfZ+P)Js=W&~Cz_O_W91=mxkm| zle~Te;NJ|20Wo0gK(vIq_zz>9#p6)`7Qh-xF^cgsMvfvG%jkgD8g(C034se?Z0r=4A)Dmj(q#xoAMA~cgT~%opndeRUHJ0}+ z^s~adM9~1!N=RO4tQI3AlzNfL3yqad?^EK}yiyO3(yg zsea3AtK8i!jMx;g2y6iJ9iT_x9Jm2q%e9;Sq}qUHfz1xka4jFeEpP_hr?*z-j+%fh zIa|OAV59Zj)k8W4Udptb_LQ1{R)O7aq(ZAUNGHHmT5DyhYXaH>7MyK70Ef=nqGh!J z*+?A#lg@75f&Ch9w_1P=|l2MdVOdF?RwRDG!;_nkAqv&9#5tC7L#6(6h50Z?cgP)9|1Coql0;Hx&Thkp) z!Lh{%kd$j)D3u^3ND0a#pakXd(;1`$DM5JzB6oiR!HRxKd{oBw00000NkvXXu0mjf D|E}#D diff --git a/app/src/main/res/drawable-xxxhdpi/ic_action_more_vert.png b/app/src/main/res/drawable-xxxhdpi/ic_action_more_vert.png deleted file mode 100644 index cb4d006336a9c27dcb11072f26bf937912ffa9a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 693 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7Ro>V5;$SaSW-5dppO_kJ*vOwO+tf ze8KVs%bJxHyuA7jFbb$XVvuQ^Bvi=qVuj|5oeZW-CYRj2nx|}C`$zKAipL+H?X4(3 z7PnELK8%SwyKE9S<1=|iCV>RC1V4XPg#$hZ=FH=AXqeexX)D^mV9Z!trNzLQ#`Nq< z2m{j@mNPHi*Eihlygz+rvc=yHrf;gU-c}Q~nAd*x_k2GoPNlXbQ-aA|XoK?0lBWOH zOaJ=_%~PqBt~lps+10@I-|5oBS@%EqUi!-+=1Q0qvNQpCUM|5}wl*_UIl7usgO^rR#f>m%%Y{M~6AFkt*94 z7){yOTETIA$5hviyt>Yk@g2<(b7DPJ)^-T>>~zgI_VmY8*UNo+&NJgX8hz$HEL(rT z=f)d(Mh*jEgXPO1kzrrOx`Eg9PlH8=Y>Ro)F2zpSYP}+rl(PU0Zg;%`Er0jkp&`UTVsX diff --git a/app/src/main/res/layout/activity_video_play.xml b/app/src/main/res/layout/activity_video_play.xml index 84808ea..2a2d293 100644 --- a/app/src/main/res/layout/activity_video_play.xml +++ b/app/src/main/res/layout/activity_video_play.xml @@ -86,16 +86,19 @@ android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" /> - + android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" + /> - + android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" + /> diff --git a/app/src/main/res/layout/video_playback_controls.xml b/app/src/main/res/layout/video_playback_controls.xml index 98ff4be..7dd5b36 100644 --- a/app/src/main/res/layout/video_playback_controls.xml +++ b/app/src/main/res/layout/video_playback_controls.xml @@ -10,28 +10,27 @@ android:orientation="vertical" tools:targetApi="28"> - - - + + + + + - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b0f3616..8f8f546 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -93,6 +93,7 @@ {faw-check} {faw-expand} {faw-compress} + {faw-ellipsis-v} Background Playback If enabled, continues to play video in background. Local