'method startStories in class StoriesProgressView cannot be applied to given types
I'm creating a social media app that has a Story feature like facebook then I encounter this problem
'startStories()' in 'jp.shts.android.storiesprogressview.StoriesProgressView' cannot be applied to '(int)'
error: method startStories in class StoriesProgressView cannot be applied to given types;
storiesProgressView.startStories(counter);
^
required: no arguments
found: int
reason: actual and formal argument lists differ in length
Here's my code
private void getStories(String userid){
images = new ArrayList<>();
storyids = new ArrayList<>();
DatabaseReference reference = FirebaseDatabase.getInstance().getReference("Story")
.child(userid);
reference.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot snapshot) {
images.clear();
storyids.clear();
for (DataSnapshot snapshot1 : snapshot.getChildren()){
ModelStory modelStory = snapshot1.getValue(ModelStory.class);
long timecurrent = System.currentTimeMillis();
images.add(modelStory.imageUri);
storyids.add(modelStory.storyid);
}
storiesProgressView.setStoriesCount(images.size());
storiesProgressView.setStoryDuration(5000L);
storiesProgressView.setStoriesListener(StoryChatViewActivity.this);
storiesProgressView.startStories(counter);
Glide.with(getApplicationContext()).load(images.get(counter)).into(imageView);
addView(storyids.get(counter));
seenNumber(storyids.get(counter));
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
}
});
}
PLease help me finding the solution here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
