public LoadInstances(List<OdooInstance> instances) { mInstances.addAll(instances); OControls.setGone(mView, R.id.progressLoader); OControls.setVisible(mView, R.id.instanceList); mGridView = (ExpandableHeightGridView) mView.findViewById(R.id.gridInstances); mGridView.setExpanded(true); mGridView.setAdapter(mListAdapter); }
public CreateAccount(OdooInstance instance, Boolean selfHosted) { mOdooInstance = instance; mSelfHosted = selfHosted; OControls.setGone(mView, R.id.instanceList); OControls.setVisible(mView, R.id.progressLoader); OControls.setText( mView, R.id.progressStatus, getActivity().getResources().getString(R.string.title_account_create)); }
@Override protected void onPostExecute(Boolean result) { super.onPostExecute(result); if (result) { DatabaseCreate databaseCreate = new DatabaseCreate(); databaseCreate.execute(); } else { if (mOdooException != null) { OExceptionDialog dialog = new OExceptionDialog(getActivity(), true, mOdooException); dialog.show(); OControls.setVisible(mView, R.id.instanceList); OControls.setGone(mView, R.id.progressLoader); } } }
private void init(View view) { mTouch = scope.main().getTouchAttacher(); setHasSwipeRefreshView(view, R.id.swipe_container, this); mFab = (FloatingActionButton) view.findViewById(R.id.fabbutton); mailList = (ListView) view.findViewById(R.id.mail_list_view); mAdapter = new OCursorListAdapter(getActivity(), null, R.layout.mail_list_item); mAdapter.setOnViewBindListener(this); mAdapter.setBeforeBindUpdateData(this); mailList.setAdapter(mAdapter); mailList.setOnItemClickListener(this); mailList.setEmptyView(mView.findViewById(R.id.loadingProgress)); if (getPref().getBoolean("archive_with_swipe", false)) { if (mType != Type.Archives) mTouch.setSwipeableView(mailList, this); } mFab.listenTo(mailList); mFab.setOnClickListener(this); mAdapter.setOnRowViewClickListener(R.id.img_starred_mlist, this); OControls.setVisible(view, R.id.loadingProgress); OControls.setGone(view, R.id.emptyView); getLoaderManager().initLoader(0, null, this); }
@Override public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) { mAdapter.changeCursor(cursor); toggleEmptyView((cursor.getCount() == 0)); OControls.setGone(mView, R.id.loadingProgress); }