-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add feedback dialog modal * Add fab for feedback and reverse countdown progress bar * < API 21 support for theme colors * Adjust for landscape layouts * Handle landscape layout with GridLayoutManager * Create click listener and callback to determine which feedback is clicked * Add updated feedback icons * Feedback System (#405) * Method Creation - started method creation for handling feedback events - need to test reroute solution and move on to update and cancel functionality * Add feedback types * Update + Cancel - added functionality for update and cancel methods - still needs testing and tweaking * Tweak code to match reroute - code now matches how reroute functions - may add handling of multiple feedback events at once later in the system * Checkstyle fix from conflict resolution - fixed sisngle line checkstyle issue * Fix merge conflict * Dismiss the dialog when an item is clicked * Remove item size check * Add feedback item and update how we send via service * Update bottomsheet toast * Feedback Queue Update - renamed method - added feedback location collect to onLocation listener - created new methods to handle updating feedback and reroute queues * Location -> RingBuffer - change from using Location in updateFeedbackQueue and updateRerouteQueue to using a Ringbuffer * Add event to queue + rerouteDate - change sessionstate method name to match variable - add feedbackevent to queue - update reroute date when creating sessionstate * Location Timestamps + EventLocation - make test data timestamps the current time for the events - use sessionstate.eventLocation to store location at time fo feedback event trigger * Set Feedback Created - force set of feedback created to event trigger - tested multiple events * FeedbackID + UserID fixes - send feedbackID to feedbackevent creation - obtain and send vendorID as User ID for feedbackevents * isMocked setting - set isMocked to appropriate setting based on conditions for feedbackevents * Update icons / telem * Return if location null
- Loading branch information
1 parent
884af21
commit cc9eef8
Showing
63 changed files
with
917 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
.../src/main/java/com/mapbox/services/android/navigation/ui/v5/feedback/FeedbackAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package com.mapbox.services.android.navigation.ui.v5.feedback; | ||
|
||
import android.support.v7.widget.RecyclerView; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.mapbox.services.android.navigation.ui.v5.R; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static com.mapbox.services.android.navigation.v5.navigation.FeedbackEvent.FEEDBACK_TYPE_CONFUSING_INSTRUCTION; | ||
import static com.mapbox.services.android.navigation.v5.navigation.FeedbackEvent.FEEDBACK_TYPE_GENERAL_ISSUE; | ||
import static com.mapbox.services.android.navigation.v5.navigation.FeedbackEvent.FEEDBACK_TYPE_NOT_ALLOWED; | ||
import static com.mapbox.services.android.navigation.v5.navigation.FeedbackEvent.FEEDBACK_TYPE_REPORT_TRAFFIC; | ||
import static com.mapbox.services.android.navigation.v5.navigation.FeedbackEvent.FEEDBACK_TYPE_ROAD_CLOSED; | ||
import static com.mapbox.services.android.navigation.v5.navigation.FeedbackEvent.FEEDBACK_TYPE_ROUTING_ERROR; | ||
|
||
public class FeedbackAdapter extends RecyclerView.Adapter<FeedbackViewHolder> { | ||
|
||
private List<FeedbackItem> feedbackItems = new ArrayList<>(); | ||
|
||
FeedbackAdapter() { | ||
feedbackItems.add(new FeedbackItem("Road\nClosed", | ||
R.drawable.ic_road_closed, FEEDBACK_TYPE_ROAD_CLOSED, "")); | ||
feedbackItems.add(new FeedbackItem("Not\nAllowed", | ||
R.drawable.ic_no_turn_allowed, FEEDBACK_TYPE_NOT_ALLOWED, "")); | ||
feedbackItems.add(new FeedbackItem("Report\nTraffic", | ||
R.drawable.ic_traffic, FEEDBACK_TYPE_REPORT_TRAFFIC, "")); | ||
feedbackItems.add(new FeedbackItem("Confusing\nInstruction", | ||
R.drawable.ic_confusing_directions, FEEDBACK_TYPE_CONFUSING_INSTRUCTION, "")); | ||
feedbackItems.add(new FeedbackItem("General\nIssue", | ||
R.drawable.ic_map_error, FEEDBACK_TYPE_GENERAL_ISSUE, "")); | ||
feedbackItems.add(new FeedbackItem("Bad\nRoute", | ||
R.drawable.ic_wrong_directions, FEEDBACK_TYPE_ROUTING_ERROR, "")); | ||
} | ||
|
||
@Override | ||
public FeedbackViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { | ||
View view = LayoutInflater.from(parent.getContext()) | ||
.inflate(R.layout.feedback_viewholder_layout, parent, false); | ||
return new FeedbackViewHolder(view); | ||
} | ||
|
||
@Override | ||
public void onBindViewHolder(FeedbackViewHolder viewHolder, int position) { | ||
viewHolder.setFeedbackImage(feedbackItems.get(position).getFeedbackImageId()); | ||
viewHolder.setFeedbackText(feedbackItems.get(position).getFeedbackText()); | ||
} | ||
|
||
@Override | ||
public int getItemCount() { | ||
return feedbackItems.size(); | ||
} | ||
|
||
FeedbackItem getFeedbackItem(int feedbackPosition) { | ||
if (feedbackPosition < feedbackItems.size()) { | ||
return feedbackItems.get(feedbackPosition); | ||
} else { | ||
return null; | ||
} | ||
} | ||
} |
Oops, something went wrong.