퀴즈 게임이며 대답은 텍스트 또는 이미지 일 수 있습니다. 길드 이미지를 사용하여로드하지만 일부 사용자의 경우 인터넷이 좋더라도 이미지를로드 할 수 없습니다. 이미지 품질이 낮습니다.글라이드 이미지가 가끔로드되지 않습니다.
나는 길드 문제인지 아닌지 전혀 모르므로 모든 코드를 복사합니다.
if (AppConstant.arQuestionList.get(questionid).getArAnswer().get(i).getAtype()
.equalsIgnoreCase("image")) {
txtOption = new ImageView(this);
try {
Glide.with(QuestionActivity.this).load(AppConstant.arQuestionList.get(questionid)
.getArAnswer().get(i).getAnswer()).override(60, 60).into((ImageView)
txtOption);
}catch (OutOfMemoryError e){
e.printStackTrace();
}
txtOption.setPadding(5, 5, 5, 5);
} else {
txtOption = new TextView(this);
((TextView) txtOption).setText(AppConstant.arQuestionList.get(questionid)
.getArAnswer().get
(i).getAnswer());
((TextView) txtOption).setTextColor(getResources().getColor(R.color.answer_color));
((TextView) txtOption).setTypeface(tf, Typeface.BOLD);
((TextView) txtOption).setGravity(Gravity.CENTER);
txtOption.setPadding(10, 20, 10, 20);
}
레이아웃
<LinearLayout
android:id="@+id/answerwrap"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_30"
android:layout_marginRight="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_30"
android:orientation="vertical">
</LinearLayout>
시도했지만 여전히 작동하지 않습니다. –