mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 22:09:30 +00:00
Survey buttons are automatically disabled on click.
This commit is contained in:
parent
79f2fa3c2d
commit
dc324359c2
@ -947,6 +947,7 @@ public abstract class AbstractPostsListFragment extends AbstractFragment
|
|||||||
//Check for failure
|
//Check for failure
|
||||||
if(!success){
|
if(!success){
|
||||||
Toast.makeText(getActivity(), R.string.err_cancel_response, Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), R.string.err_cancel_response, Toast.LENGTH_SHORT).show();
|
||||||
|
mPostsAdapter.notifyDataSetChanged();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +103,9 @@ public class SurveyView extends BaseFrameLayoutView implements View.OnClickListe
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mCancelButton.setEnabled(true);
|
||||||
|
mResponseButton.setEnabled(true);
|
||||||
|
|
||||||
mCancelSurveyResponseForm.setVisibility(survey.hasUserResponded() ?
|
mCancelSurveyResponseForm.setVisibility(survey.hasUserResponded() ?
|
||||||
View.VISIBLE : View.GONE);
|
View.VISIBLE : View.GONE);
|
||||||
mSendResponseForm.setVisibility(survey.hasUserResponded() ?
|
mSendResponseForm.setVisibility(survey.hasUserResponded() ?
|
||||||
@ -139,6 +142,8 @@ public class SurveyView extends BaseFrameLayoutView implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
v.setEnabled(false);
|
||||||
|
|
||||||
//Cancel response to survey
|
//Cancel response to survey
|
||||||
if(v.equals(mCancelButton)){
|
if(v.equals(mCancelButton)){
|
||||||
if(mOnSurveyUpdateListener != null)
|
if(mOnSurveyUpdateListener != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user