Commits

Ville Saalo committed df85708

Show issue creator username when looking at the issue.

Also changed some variable names per the Java coding conventions (http://www.oracle.com/technetwork/java/codeconventions-135099.html).

  • Participants
  • Parent commits e6b22da

Comments (0)

Files changed (4)

File res/layout/issue.xml

                     </TextView>
 
                 </TableRow>
+                
+                <TableRow>
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/issueAuthorLabel"
+                        android:paddingRight="5dip" >
+                    </TextView>
+
+                    <TextView
+                        android:id="@+id/issueAuthor"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/nothing" >
+                    </TextView>
+
+                </TableRow>
 
             </TableLayout>
 

File res/values-fi/strings.xml

     <string name="issueStatusLabel">Tila:</string>
     <string name="issueTypeLabel">Tyyppi:</string>
     <string name="issuePriorityLabel">Prioriteetti:</string>
+    <string name="issueAuthorLabel">Lähettänyt:</string>
     
     <!-- LauncherActivity.java -->
     <string name="changeset_not_found">Muutoskokoelmaa ei löytynyt!</string>

File res/values/strings.xml

     <string name="issueStatusLabel">Status:</string>
     <string name="issueTypeLabel">Type:</string>
     <string name="issuePriorityLabel">Priority:</string>
+    <string name="issueAuthorLabel">Submitted by:</string>
     
     <!-- LauncherActivity.java -->
     <string name="changeset_not_found">Changeset not found!</string>

File src/com/saibotd/bitbeaker/IssueActivity.java

 	public void asyncLoaderDone(String result) {
 		super.asyncLoaderDone(result);
 		JSONObject jsonObject;
-		TextView issue_title = (TextView) findViewById(R.id.issue_title);
-		TextView issue_status = (TextView) findViewById(R.id.issueStatus);
-		TextView issue_type = (TextView) findViewById(R.id.issueType);
-		TextView issue_priority = (TextView) findViewById(R.id.issuePriority);
+		TextView issueTitle = (TextView) findViewById(R.id.issue_title);
+		TextView issueStatus = (TextView) findViewById(R.id.issueStatus);
+		TextView issueType = (TextView) findViewById(R.id.issueType);
+		TextView issuePriority = (TextView) findViewById(R.id.issuePriority);
+		TextView issueAuthor = (TextView) findViewById(R.id.issueAuthor);
 		issue_data = result;
 		try {
 			jsonObject = new JSONObject(result);
 
 			title = jsonObject.getString("title");
-			issue_title.setText(title);
+			issueTitle.setText(title);
 
-			issue_status.setText(Helper.translateApiString(jsonObject.getString("status")));
-			issue_type.setText(Helper.translateApiString(jsonObject.getJSONObject("metadata").getString("kind")));
-			issue_priority.setText(Helper.translateApiString(jsonObject.getString("priority")));
+			issueStatus.setText(Helper.translateApiString(jsonObject.getString("status")));
+			issueType.setText(Helper.translateApiString(jsonObject.getJSONObject("metadata").getString("kind")));
+			issuePriority.setText(Helper.translateApiString(jsonObject.getString("priority")));
+			issueAuthor.setText(jsonObject.getJSONObject("reported_by").getString("username"));
 
 			TextView issue_content = (TextView) listViewHeader.findViewById(R.id.issue_content);
 			TextView comments_count = (TextView) listViewHeader.findViewById(R.id.issue_comments_count);