|
|
@ -4,12 +4,19 @@ import android.view.View;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
|
|
|
|
|
|
|
|
import com.timsu.astrid.R;
|
|
|
|
import com.timsu.astrid.R;
|
|
|
|
|
|
|
|
import com.todoroo.andlib.service.Autowired;
|
|
|
|
import com.todoroo.astrid.activity.TaskListFragment;
|
|
|
|
import com.todoroo.astrid.activity.TaskListFragment;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.dao.UserDao;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.data.User;
|
|
|
|
|
|
|
|
|
|
|
|
public class PersonViewFragment extends TaskListFragment {
|
|
|
|
public class PersonViewFragment extends TaskListFragment {
|
|
|
|
|
|
|
|
|
|
|
|
public static final String EXTRA_USER_ID_LOCAL = "user_local_id"; //$NON-NLS-1$
|
|
|
|
public static final String EXTRA_USER_ID_LOCAL = "user_local_id"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired UserDao userDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private User user;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected View getListBody(ViewGroup root) {
|
|
|
|
protected View getListBody(ViewGroup root) {
|
|
|
|
ViewGroup parent = (ViewGroup) getActivity().getLayoutInflater().inflate(R.layout.task_list_body_person, root, false);
|
|
|
|
ViewGroup parent = (ViewGroup) getActivity().getLayoutInflater().inflate(R.layout.task_list_body_person, root, false);
|
|
|
@ -20,10 +27,18 @@ public class PersonViewFragment extends TaskListFragment {
|
|
|
|
return parent;
|
|
|
|
return parent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
protected void initializeData() {
|
|
|
|
|
|
|
|
super.initializeData();
|
|
|
|
|
|
|
|
if (extras.containsKey(EXTRA_USER_ID_LOCAL))
|
|
|
|
|
|
|
|
user = userDao.fetch(extras.getLong(EXTRA_USER_ID_LOCAL), User.PROPERTIES);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void setupQuickAddBar() {
|
|
|
|
protected void setupQuickAddBar() {
|
|
|
|
super.setupQuickAddBar();
|
|
|
|
super.setupQuickAddBar();
|
|
|
|
quickAddBar.setUsePeopleControl(false);
|
|
|
|
quickAddBar.setUsePeopleControl(false);
|
|
|
|
|
|
|
|
quickAddBar.getQuickAddBox().setHint(getString(R.string.TLA_quick_add_hint_assign, user.getDisplayName()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|