Code example for WebView: Displaying local web pages

Methods: loadData, getVisibility, setVisibility

0
		question.setOnClickListener(new View.OnClickListener() { 
			@SuppressLint("NewApi") @Override 
			public void onClick(View v) {
//				Log.i("question", question.toString()); 
//				Log.i("answer", answer.toString()); 
				answer.loadData(resultString[num], "text/html; charset=UTF-8", null);
				if(answer.getVisibility() == View.GONE){
					answer.setVisibility(View.VISIBLE);
					Log.wtf("language", language);
					if(language.contains("ar")){						
						question.setCompoundDrawablesWithIntrinsicBounds(up, null, null, null);
					} 
					else{						 
						question.setCompoundDrawablesWithIntrinsicBounds(null, null, up, null);
					} 
				} 
				else{ 
					answer.setVisibility(View.GONE);
					if(language.contains("ar")){						
						question.setCompoundDrawablesWithIntrinsicBounds(down, null, null, null);
					}else{						 
						question.setCompoundDrawablesWithIntrinsicBounds(null, null, down, null);
					} 
Stop searching for code, let great code find you!  Add Codota to your java IDE