Updated string for empty list in people view

pull/14/head
Sam Bosley 14 years ago
parent 0e85cd2714
commit 63d6605898

@ -2,6 +2,7 @@ package com.todoroo.astrid.people;
import android.content.Intent;
import android.support.v4.view.Menu;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@ -51,8 +52,10 @@ public class PersonViewFragment extends TaskListFragment {
@Override
protected void initializeData() {
super.initializeData();
if (extras.containsKey(EXTRA_USER_ID_LOCAL))
if (extras.containsKey(EXTRA_USER_ID_LOCAL)) {
user = userDao.fetch(extras.getLong(EXTRA_USER_ID_LOCAL), User.PROPERTIES);
((TextView)taskListView.findViewById(android.R.id.empty)).setText(getEmptyDisplayString());
}
}
@Override
@ -106,9 +109,14 @@ public class PersonViewFragment extends TaskListFragment {
ContextManager.getContext().sendBroadcast(new Intent(AstridApiConstants.BROADCAST_EVENT_REFRESH));
else
refresh();
((TextView)taskListView.findViewById(android.R.id.empty)).setText(R.string.TLA_no_items);
((TextView)taskListView.findViewById(android.R.id.empty)).setText(getEmptyDisplayString());
}
}));
}
private String getEmptyDisplayString() {
String userName = user != null ? user.getDisplayName() : null;
return TextUtils.isEmpty(userName) ? getString(R.string.TLA_no_items) : getString(R.string.TLA_no_items_person, userName);
}
}

@ -100,6 +100,9 @@
<!-- Task List: Displayed instead of list when no items present -->
<string name="TLA_no_items">You have no tasks! \n Want to add something?</string>
<!-- Task List: Displayed instead of list when no items present in people view (%s-> person's name) -->
<string name="TLA_no_items_person">%s has no\ntasks shared with you</string>
<!-- Menu: Add-ons -->
<string name="TLA_menu_addons">Add-ons</string>

Loading…
Cancel
Save