We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi i am getting image and video in same string array and i want to split image and video by their extension and playing both in same story view
resources = new String[PostStory.length()]; for (int j = 0; j < PostStory.length(); j++) {
JSONObject object = PostStory.getJSONObject(j); getpostimage = object.getString("post_images"); AllStoryStatusModel allStoryStatusModel = new AllStoryStatusModel(); allStoryStatusModel.setImage_viedeo(object.getString("post_images")); allStoryStatusModel.setUser_id(object.getString("user_id")); datalist.add(allStoryStatusModel); resources[j] = getpostimage;
// extention = MimeTypeMap.getFileExtensionFromUrl(getpostimage); // if (extention.equals("mp4")){ // resources[j] = getpostimage; // // image.setVisibility(View.GONE); // // }else{ // videoview.setVisibility(View.GONE); // image.setVisibility(View.VISIBLE); // resources[j] = getpostimage; // // } }
if (resources[counter].endsWith("mp4")){ videoview.setVisibility(View.VISIBLE); videoview.setVideoURI(Uri.parse(resources[counter])); videoview.start(); }else{ Picasso.with(AllStatusStoryActivity.this) .load(resources[counter]) .skipMemoryCache() .into(image); }
@OverRide public void onNext() { S.E("data Mp4111" + resources[++counter]); if (resources[++counter].endsWith("mp4")){ videoview.setVisibility(View.VISIBLE); videoview.setVideoURI(Uri.parse(resources[++counter])); videoview.start(); }else{ Picasso.with(AllStatusStoryActivity.this) .load(resources[++counter]) .skipMemoryCache() .into(image); }
// videoview.setVisibility(View.VISIBLE); // videoview.setVideoURI(Uri.parse(resources[++counter])); // videoview.start(); }
@Override public void onPrev() { if ((counter - 1) < 0) return; S.E("data jpg222" + resources[--counter]); if (resources[--counter].endsWith("mp4")){ videoview.setVisibility(View.VISIBLE); videoview.setVideoURI(Uri.parse(resources[--counter])); videoview.start(); }else{ Picasso.with(AllStatusStoryActivity.this) .load(resources[--counter]) .skipMemoryCache() .into(image); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hi i am getting image and video in same string array and i want to split image and video by their extension and playing both in same story view
resources = new String[PostStory.length()];
for (int j = 0; j < PostStory.length(); j++) {
// extention = MimeTypeMap.getFileExtensionFromUrl(getpostimage);
// if (extention.equals("mp4")){
// resources[j] = getpostimage;
//
// image.setVisibility(View.GONE);
//
// }else{
// videoview.setVisibility(View.GONE);
// image.setVisibility(View.VISIBLE);
// resources[j] = getpostimage;
//
// }
}
@OverRide
public void onNext() {
S.E("data Mp4111" + resources[++counter]);
if (resources[++counter].endsWith("mp4")){
videoview.setVisibility(View.VISIBLE);
videoview.setVideoURI(Uri.parse(resources[++counter]));
videoview.start();
}else{
Picasso.with(AllStatusStoryActivity.this)
.load(resources[++counter])
.skipMemoryCache()
.into(image);
}
// videoview.setVisibility(View.VISIBLE);
// videoview.setVideoURI(Uri.parse(resources[++counter]));
// videoview.start();
}
The text was updated successfully, but these errors were encountered: