Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
13 changed files with 207 additions and 31 deletions
-
1README.md
-
82app/src/main/java/awais/instagrabber/activities/StoryViewer.java
-
2app/src/main/java/awais/instagrabber/adapters/FeedAdapter.java
-
2app/src/main/java/awais/instagrabber/asyncs/DiscoverFetcher.java
-
1app/src/main/java/awais/instagrabber/asyncs/LocationFetcher.java
-
4app/src/main/java/awais/instagrabber/asyncs/PostFetcher.java
-
2app/src/main/java/awais/instagrabber/asyncs/PostsFetcher.java
-
21app/src/main/java/awais/instagrabber/asyncs/StoryStatusFetcher.java
-
52app/src/main/java/awais/instagrabber/models/PollModel.java
-
9app/src/main/java/awais/instagrabber/models/StoryModel.java
-
27app/src/main/java/awais/instagrabber/utils/Utils.java
-
32app/src/main/res/layout/activity_story_viewer.xml
-
3app/src/main/res/values/strings.xml
@ -0,0 +1,52 @@ |
|||
package awais.instagrabber.models; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
public final class PollModel implements Serializable { |
|||
private int leftcount, rightcount, mychoice; |
|||
private final String id, question, leftchoice, rightchoice; |
|||
|
|||
public PollModel(final String id, final String question, final String leftchoice, final int leftcount, |
|||
final String rightchoice, final int rightcount, final int mychoice) { |
|||
this.id = id; // only the poll id |
|||
this.question = question; |
|||
this.leftchoice = leftchoice; |
|||
this.leftcount = leftcount; |
|||
this.rightchoice = rightchoice; |
|||
this.rightcount = rightcount; |
|||
this.mychoice = mychoice; |
|||
} |
|||
|
|||
public String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public String getQuestion() { |
|||
return question; |
|||
} |
|||
|
|||
public String getLeftChoice() { |
|||
return leftchoice; |
|||
} |
|||
|
|||
public int getLeftCount() { |
|||
return leftcount; |
|||
} |
|||
|
|||
public String getRightChoice() { |
|||
return rightchoice; |
|||
} |
|||
|
|||
public int getRightCount() { |
|||
return rightcount; |
|||
} |
|||
|
|||
public int getMyChoice() { return mychoice; } |
|||
|
|||
public int setMyChoice(final int choice) { |
|||
this.mychoice = choice; |
|||
if (choice == 0) this.leftcount += 1; |
|||
else if (choice == 1) this.rightcount += 1; |
|||
return choice; |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue