add play icon for videos
This commit is contained in:
parent
5df93fe9d6
commit
a0296da672
@ -658,6 +658,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
public TextView excerptView;
|
||||
public ImageView flavorImageView;
|
||||
public VideoView flavorVideoView;
|
||||
public ImageView flavorVideoPlayView;
|
||||
public TextView authorView;
|
||||
public TextView dateView;
|
||||
public CheckBox selectionBoxView;
|
||||
@ -825,6 +826,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
holder.excerptView = (TextView)v.findViewById(R.id.excerpt);
|
||||
holder.flavorImageView = (ImageView) v.findViewById(R.id.flavor_image);
|
||||
holder.flavorVideoView = (VideoView) v.findViewById(R.id.flavor_video);
|
||||
holder.flavorVideoPlayView = (ImageView) v.findViewById(R.id.flavor_video_play);
|
||||
holder.authorView = (TextView)v.findViewById(R.id.author);
|
||||
holder.dateView = (TextView) v.findViewById(R.id.date);
|
||||
holder.selectionBoxView = (CheckBox) v.findViewById(R.id.selected);
|
||||
@ -1030,6 +1032,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
holder.flavorImageView.setVisibility(View.VISIBLE);
|
||||
holder.flavorImageLoadingBar.setVisibility(View.VISIBLE);
|
||||
holder.flavorVideoView.setVisibility(View.GONE);
|
||||
holder.flavorVideoPlayView.setVisibility(View.GONE);
|
||||
|
||||
boolean videoFound = false;
|
||||
|
||||
@ -1046,6 +1049,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
holder.flavorImageLoadingBar.setVisibility(View.GONE);
|
||||
holder.flavorVideoView.setVisibility(View.VISIBLE);
|
||||
holder.flavorImageView.setVisibility(View.GONE);
|
||||
holder.flavorVideoPlayView.setVisibility(View.VISIBLE);
|
||||
|
||||
if (!streamUri.equals(holder.flavorVideoView.getTag())) {
|
||||
holder.flavorVideoView.setTag(streamUri);
|
||||
@ -1075,8 +1079,10 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
if (video.isPlaying()) {
|
||||
video.pause();
|
||||
holder.flavorVideoPlayView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
video.start();
|
||||
holder.flavorVideoPlayView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_youtube_play.png
Normal file
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_youtube_play.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 807 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_youtube_play.png
Normal file
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_youtube_play.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_youtube_play.png
Normal file
BIN
org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_youtube_play.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_youtube_play.png
Normal file
BIN
org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_youtube_play.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
@ -98,6 +98,14 @@
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/flavor_video_play"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_youtube_play"
|
||||
android:visibility="gone" />
|
||||
|
||||
<org.fox.ttrss.util.ArrowRight
|
||||
android:layout_marginRight="16dp"
|
||||
android:id="@+id/flavorImageArrow"
|
||||
|
@ -100,6 +100,14 @@
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/flavor_video_play"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_youtube_play"
|
||||
android:visibility="gone" />
|
||||
|
||||
<org.fox.ttrss.util.ArrowRight
|
||||
android:layout_marginRight="16dp"
|
||||
android:id="@+id/flavorImageArrow"
|
||||
|
Loading…
Reference in New Issue
Block a user