Handler mAfterDown =
new
Handler(){
@Override
public
void
handleMessage(Message msg){
String html = (String)msg.obj;
try
{
int
Ncpos01 = html.indexOf(
"tmpContentsArea"
);
int
Ncpos02 = html.indexOf(
"boradReadFooter"
);
String tmp =
""
;
tmp = html.substring(Ncpos01,Ncpos02);
TextView test = (TextView)findViewById(R.id.NoticeContent_title);
String tmp2 =
""
;
BufferedReader reader1 =
new
BufferedReader(
new
StringReader(tmp));
String StrLine2 =
""
;
while
((StrLine2 = reader1.readLine()) !=
null
)
{
if
(StrLine2.contains(
"http"
)){
StrLine2 = StrLine2.substring(StrLine2.indexOf(
"http"
),StrLine2.indexOf(
"/p"
));
tmp2 += StrLine2 +
"\n"
;
}
}
reader1.close();
tmp2 = tmp2.replace(
"\" /><"
,
""
);
String[] Content;
Content = tmp2.split(
"\n"
);
WebView img1 = (WebView)findViewById(R.id.NCweb01);
WebView img2 = (WebView)findViewById(R.id.NCweb02);
img1.setWebViewClient(
new
WebViewClient());
img1.getSettings().setJavaScriptEnabled(
true
);
test.setText(Content[
0
]);
img1.loadUrl(Content[
0
]);
NcProgress.dismiss();
}
catch
(StringIndexOutOfBoundsException e){
Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show();
}
catch
(IOException e) {
e.printStackTrace();
}
}
};