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; ...@@ -8,6 +8,7 @@ import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.view.MenuItem; import android.view.MenuItem;
import android.widget.ListView; import android.widget.ListView;
...@@ -74,18 +75,12 @@ public class MyIncidentScreen extends AppCompatActivity { ...@@ -74,18 +75,12 @@ public class MyIncidentScreen extends AppCompatActivity {
@OnItemClick(R.id.my_incidents_screen_list_view) @OnItemClick(R.id.my_incidents_screen_list_view)
void listViewOnClicked(int position) { void listViewOnClicked(int position) {
Incident incident = mIncidentList.get(position); Incident incident = mIncidentList.get(position);
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Number: "); String messageString = String.format(getResources().getString(R.string.incident_item_text_string),
stringBuilder.append(incident.getNumber()); incident.getNumber(), incident.getOpenedAt(), incident.getShortDescription());
stringBuilder.append("\n\n");
stringBuilder.append("Opened At: ");
stringBuilder.append(incident.getOpenedAt());
stringBuilder.append("\n\n");
stringBuilder.append("Short Description: ");
stringBuilder.append(incident.getShortDescription());
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(stringBuilder.toString()) builder.setMessage(Html.fromHtml(messageString))
.setCancelable(false) .setCancelable(false)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
<string name="variable_form_reference_dialog_title_string">Search \'%s\'</string> <string name="variable_form_reference_dialog_title_string">Search \'%s\'</string>
<string name="variable_form_radio_text_string">%d</string> <string name="variable_form_radio_text_string">%d</string>
<!--Catalogue Item Screen--> <!--Catalogue Item Screen-->
<string name="no_catalogue_item_string">No Catalogue Items&#8230;</string> <string name="no_catalogue_item_string">No Catalogue Items&#8230;</string>
...@@ -66,6 +65,7 @@ ...@@ -66,6 +65,7 @@
<string name="incident_form_impact_text_string">Impact</string> <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_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_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--> <!--My Incidents-->
<string name="my_incidents_text_string">My Incidents</string> <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