use of org.edx.mobile.user.GetProfileFormDescriptionTask in project edx-app-android by edx.
the class EditUserProfileFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
setHasOptionsMenu(true);
EventBus.getDefault().register(this);
final Activity activity = getActivity();
final TaskMessageCallback mCallback = activity instanceof TaskMessageCallback ? (TaskMessageCallback) activity : null;
getAccountCall = userService.getAccount(username);
getAccountCall.enqueue(new AccountDataUpdatedCallback(activity, username, // Disable default loading indicator, we have our own
null, mCallback, CallTrigger.LOADING_CACHED));
getProfileFormDescriptionTask = new GetProfileFormDescriptionTask(activity) {
@Override
protected void onSuccess(@NonNull FormDescription formDescription) throws Exception {
EditUserProfileFragment.this.formDescription = formDescription;
if (null != viewHolder) {
setData(account, formDescription);
}
}
};
getProfileFormDescriptionTask.setTaskProcessCallback(null);
getProfileFormDescriptionTask.execute();
}
Aggregations