mirror of
https://github.com/whyorean/AuroraStore.git
synced 2026-06-19 13:08:59 -04:00
Add a play button for videps
This commit is contained in:
@@ -7,6 +7,7 @@ import android.net.Uri;
|
||||
import android.text.ClipboardManager;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.github.yeriomin.yalpstore.ContextUtil;
|
||||
@@ -41,10 +42,13 @@ public class Video extends Abstract {
|
||||
String vID =getID(app.getVideoUrl());
|
||||
String URL="https://img.youtube.com/vi/"+vID+"/maxresdefault.jpg";
|
||||
|
||||
ImageView imageView = activity.findViewById(R.id.app_video);
|
||||
ImageView imageView = activity.findViewById(R.id.thumbnail);
|
||||
Picasso.with(activity).load(URL).into(imageView);
|
||||
|
||||
imageView.setOnClickListener(new View.OnClickListener() {
|
||||
activity.findViewById(R.id.app_video).setVisibility(View.VISIBLE);
|
||||
|
||||
ImageView play = activity.findViewById(R.id.thumbnail);
|
||||
play.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
try {
|
||||
|
||||
5
app/src/main/res/drawable/ic_play.xml
Normal file
5
app/src/main/res/drawable/ic_play.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:viewportHeight="496.158"
|
||||
android:viewportWidth="496.158" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#000" android:pathData="M496.2,248.1c0,-137 -111.1,-248.1 -248.1,-248.1C111.1,0 0,111.1 0,248.1c0,137 111.1,248.1 248.1,248.1C385.1,496.2 496.2,385.1 496.2,248.1z"/>
|
||||
<path android:fillColor="#FFF" android:pathData="M370.8,235.2L195.9,127.8c-4.8,-2.9 -11.1,-3.1 -16,-0.3c-5,2.8 -8.1,8.1 -8.1,13.8v214c0,5.7 3.1,11 8,13.8c2.4,1.3 5,2 7.7,2c2.9,0 5.7,-0.8 8.2,-2.3l174.9,-106.6c4.7,-2.8 7.6,-8 7.6,-13.4C378.3,243.3 375.5,238.1 370.8,235.2z"/>
|
||||
</vector>
|
||||
@@ -25,12 +25,29 @@
|
||||
android:padding="5dp"
|
||||
android:visibility="gone" />
|
||||
<!--App Video -->
|
||||
<ImageView
|
||||
<RelativeLayout
|
||||
android:id="@+id/app_video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@color/gray"/>
|
||||
android:layout_height="300dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@color/gray" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/play_button"
|
||||
android:layout_width="@dimen/icon_size"
|
||||
android:layout_height="@dimen/icon_size"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_play"
|
||||
android:alpha="0.7"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- App Icon & Name -->
|
||||
<LinearLayout
|
||||
android:id="@+id/main"
|
||||
|
||||
Reference in New Issue
Block a user