Skip to content

Commit

Permalink
Merge pull request #133 from thequbit/master
Browse files Browse the repository at this point in the history
fixed organization name being too long
  • Loading branch information
thequbit committed Feb 23, 2015
2 parents 418c495 + fa534da commit 9b4a1d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
textViewPostCount.setTypeface(font);

textViewQuestionText.setText(this.assignments.get(position).question_text);
textViewOrganization.setText("Organization: " + this.assignments.get(position).organization);
textViewOrganization.setText("Organization: " + YellrUtils.ShortenString(this.assignments.get(position).organization));
textViewPostCount.setText(getString(R.string.fa_comments) + " " + String.valueOf(this.assignments.get(position).post_count));

return row;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ else if (milliSeconds < 15 * MINUTE) {
return retString;
}

public static String ShortenString(String str) {
String retString = str;
if ( str.length() > 20) {
retString = str.substring(0,20) + " ...";
}
return retString;
}

public static double[] getLocation(Context context) {

/*
Expand Down

0 comments on commit 9b4a1d6

Please sign in to comment.