Commit 89670068 by Kunj Gupta

UOFLMA-84: Fix - My Incidents item, description dialogue UI issue.

parent 1b66e05a
......@@ -8,6 +8,7 @@ import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.view.MenuItem;
import android.widget.ListView;
......@@ -74,18 +75,12 @@ public class MyIncidentScreen extends AppCompatActivity {
@OnItemClick(R.id.my_incidents_screen_list_view)
void listViewOnClicked(int position) {
Incident incident = mIncidentList.get(position);
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Number: ");
stringBuilder.append(incident.getNumber());
stringBuilder.append("\n\n");
stringBuilder.append("Opened At: ");
stringBuilder.append(incident.getOpenedAt());
stringBuilder.append("\n\n");
stringBuilder.append("Short Description: ");
stringBuilder.append(incident.getShortDescription());
String messageString = String.format(getResources().getString(R.string.incident_item_text_string),
incident.getNumber(), incident.getOpenedAt(), incident.getShortDescription());
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(stringBuilder.toString())
builder.setMessage(Html.fromHtml(messageString))
.setCancelable(false)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
......
......@@ -52,7 +52,6 @@
<string name="variable_form_reference_dialog_title_string">Search \'%s\'</string>
<string name="variable_form_radio_text_string">%d</string>
<!--Catalogue Item Screen-->
<string name="no_catalogue_item_string">No Catalogue Items&#8230;</string>
......@@ -66,6 +65,7 @@
<string name="incident_form_impact_text_string">Impact</string>
<string name="incident_form_incident_successful_submission_string">Your Incident has been reported successfully</string>
<string name="incident_form_describe_your_issue_text_string">Please Describe Your Issue below</string>
<string name="incident_item_text_string"><![CDATA[<b>Number: </b>%1$s<br><br><b>Opened: </b>%2$s<br><br><b>Short Description: </b>%3$s]]></string>
<!--My Incidents-->
<string name="my_incidents_text_string">My Incidents</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment