use of org.eyeseetea.sdk.presentation.views.CustomTextView in project pictureapp by EyeSeeTea.
the class ConfirmCounterSingleCustomViewStrategy method showQuestionText.
public void showQuestionText(Question questionCounter, View rootView) {
List<Option> questionOptions = questionCounter.getAnswer().getOptions();
if (questionOptions.get(0) != null) {
CustomTextView textCard = (CustomTextView) rootView.findViewById(R.id.questionTextRow);
textCard.setText(getInternationalizedName(questionOptions.get(0).getCode()));
textCard.setTextSize(questionOptions.get(0).getOptionAttribute().getText_size());
TextView subTitle = (TextView) rootView.findViewById(R.id.questionSubText);
subTitle.setText(getInternationalizedName(questionOptions.get(0).getName()));
subTitle.setTextSize(questionOptions.get(0).getOptionAttribute().getText_size());
}
}
use of org.eyeseetea.sdk.presentation.views.CustomTextView in project pictureapp by EyeSeeTea.
the class ConfirmCounterSingleCustomViewStrategy method configureNavigationButtons.
public void configureNavigationButtons(final View view, final Option selectedOption, final Question question, Question questionCounter, View rootView) {
//cancel
ImageButton previousButton = (ImageButton) rootView.findViewById(R.id.back_btn);
((LinearLayout) previousButton.getParent()).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (DynamicTabAdapter.isClicked) {
Log.d(TAG, "onClick ignored to avoid double click");
return;
} else {
Log.d(TAG, "onClick ignored to avoid double click NOT");
}
removeConfirmCounter(v);
mDynamicTabAdapter.notifyDataSetChanged();
DynamicTabAdapter.isClicked = false;
}
});
//confirm
ImageButton nextButton = (ImageButton) rootView.findViewById(R.id.next_btn);
((LinearLayout) nextButton.getParent()).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mDynamicTabAdapter.reloadingQuestionFromInvalidOption) {
Log.d(TAG, "onClick ignored to avoid double click");
return;
} else {
Log.d(TAG, "onClick");
}
mDynamicTabAdapter.navigationController.increaseCounterRepetitions(selectedOption);
removeConfirmCounter(v);
mDynamicTabAdapter.reloadingQuestionFromInvalidOption = true;
mDynamicTabAdapter.saveOptionValue(view, selectedOption, question, true);
if (selectedOption.getFactor() == Float.parseFloat(currentCounterValue)) {
ReviewFragment.mLoadingReviewOfSurveyWithMaxCounter = true;
}
}
});
List<Option> questionOptions = questionCounter.getAnswer().getOptions();
if (questionOptions.get(2) != null) {
CustomTextView textNextButton = (CustomTextView) rootView.findViewById(R.id.next_txt);
textNextButton.setText(getInternationalizedName(questionOptions.get(2).getCode()));
textNextButton.setTextSize(questionOptions.get(2).getOptionAttribute().getText_size());
}
}
use of org.eyeseetea.sdk.presentation.views.CustomTextView in project pictureapp by EyeSeeTea.
the class ConfirmCounterSingleCustomViewStrategy method showQuestionHeader.
private void showQuestionHeader(Question questionCounter, View rootView) {
final CustomTextView questionView = (CustomTextView) rootView.findViewById(question);
questionView.setText(getInternationalizedName(questionCounter.getForm_name()));
}
Aggregations