use of com.google.samples.apps.topeka.widget.quiz.AbsQuizView in project android-topeka by googlesamples.
the class QuizFragment method onSaveInstanceState.
@Override
public void onSaveInstanceState(Bundle outState) {
View focusedChild = mQuizView.getFocusedChild();
if (focusedChild instanceof ViewGroup) {
View currentView = ((ViewGroup) focusedChild).getChildAt(0);
if (currentView instanceof AbsQuizView) {
outState.putBundle(KEY_USER_INPUT, ((AbsQuizView) currentView).getUserInput());
}
}
super.onSaveInstanceState(outState);
}
use of com.google.samples.apps.topeka.widget.quiz.AbsQuizView in project android-topeka by googlesamples.
the class QuizAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final Quiz quiz = getItem(position);
if (convertView instanceof AbsQuizView) {
if (((AbsQuizView) convertView).getQuiz().equals(quiz)) {
return convertView;
}
}
convertView = getViewInternal(quiz);
return convertView;
}
Aggregations