@Override public boolean onOptionsItemSelected(MenuItem item) { // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.Next) { boolean check = true; if (channelName.getText().toString().trim().length() == 0 || TextUtils.isEmpty(channelName.getText().toString())) { Toast.makeText(this, getResources().getString(R.string.applozic_enter_group_name), Toast.LENGTH_SHORT).show(); focus = channelName; focus.requestFocus(); check = false; } if (check) { Utils.toggleSoftKeyBoard(ChannelCreateActivity.this, true); if (alCustomizationSettings.getTotalRegisteredUserToFetch() > 0 && (alCustomizationSettings.isRegisteredUserContactListCall() || ApplozicSetting.getInstance(this).isRegisteredUsersContactCall()) && !userPreference.getWasContactListServerCallAlreadyDone()) { processDownloadRegisteredUsers(); } else { Intent intent = new Intent(ChannelCreateActivity.this, ContactSelectionActivity.class); intent.putExtra(ContactSelectionActivity.CHANNEL, channelName.getText().toString()); if (!TextUtils.isEmpty(groupIconImageLink)) { intent.putExtra(ContactSelectionActivity.IMAGE_LINK, groupIconImageLink); } intent.putExtra(ContactSelectionActivity.GROUP_TYPE, groupType); startActivity(intent); } } return true; } return super.onOptionsItemSelected(item); }
if (isUserPresent) { Utils.toggleSoftKeyBoard(ChannelInfoActivity.this, true); if (alCustomizationSettings.getTotalRegisteredUserToFetch() > 0 && (alCustomizationSettings.isRegisteredUserContactListCall() || ApplozicSetting.getInstance(this).isRegisteredUsersContactCall()) && !userPreference.getWasContactListServerCallAlreadyDone()) { processLoadRegisteredUsers(); } else {
@Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { if (loading && ((alCustomizationSettings.isRegisteredUserContactListCall() || ApplozicSetting.getInstance(getActivity()).isRegisteredUsersContactCall()) && Utils.isInternetAvailable(getActivity().getApplicationContext()) && TextUtils.isEmpty(userPreference.getContactsGroupId())) && (totalItemCount > previousTotal)) { loading = false; previousTotal = totalItemCount; currentPage++; } if ((!loading && (totalItemCount - visibleItemCount) <= (firstVisibleItem + visibleThreshold)) && (!ContactSelectionActivity.isSearching)) { // I load the next page of gigs using a background task, // but you can call any function here. processDownloadRegisteredUsers(); loading = true; } }
@Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { if (loading && ((alCustomizationSettings.isRegisteredUserContactListCall() || ApplozicSetting.getInstance(getActivity()).isRegisteredUsersContactCall()) && Utils.isInternetAvailable(getActivity().getApplicationContext()) && TextUtils.isEmpty(userPreference.getContactsGroupId())) && (totalItemCount > previousTotal)) { loading = false; previousTotal = totalItemCount; currentPage++; } if ((!loading && (totalItemCount - visibleItemCount) <= (firstVisibleItem + visibleThreshold)) && (!MobiComKitPeopleActivity.isSearching)) { // I load the next page of gigs using a background task, // but you can call any function here. processLoadRegisteredUsers(); loading = true; } }
public void startContactActivityForResult(final Message message, final String messageContent) { AlCustomizationSettings alCustomizationSettings; String jsonString = FileUtils.loadSettingsJsonFile(fragmentActivity.getApplicationContext()); if (!TextUtils.isEmpty(jsonString)) { alCustomizationSettings = (AlCustomizationSettings) GsonUtils.getObjectFromJson(jsonString, AlCustomizationSettings.class); } else { alCustomizationSettings = new AlCustomizationSettings(); } if (alCustomizationSettings.getTotalOnlineUsers() > 0 && Utils.isInternetAvailable(fragmentActivity)) { processLoadUsers(false, message, messageContent, alCustomizationSettings.getTotalRegisteredUserToFetch(), alCustomizationSettings.getTotalOnlineUsers()); } else if (alCustomizationSettings.getTotalRegisteredUserToFetch() > 0 && (alCustomizationSettings.isRegisteredUserContactListCall() || ApplozicSetting.getInstance(fragmentActivity).isRegisteredUsersContactCall()) && !userPreference.getWasContactListServerCallAlreadyDone()) { if (Utils.isInternetAvailable(fragmentActivity)) { processLoadUsers(true, message, messageContent, alCustomizationSettings.getTotalRegisteredUserToFetch(), alCustomizationSettings.getTotalOnlineUsers()); } } else { Intent intent = new Intent(fragmentActivity, MobiComKitPeopleActivity.class); startContactActivityForResult(intent, message, messageContent, null); } }