Issue
I have to develop one android webview application.
Here am getting the text from that webview.
How can i increase the textsize on these webview while clicking imageview???
This is my webview code:
String fullcontent = in.getStringExtra("FullContent");
content.loadDataWithBaseURL(null,fullcontent, "text/html", "UTF-8",null);
Here i have one imageview.i have to click these imageview means the textsize is increase automatically..how can i develop these ????
ImageView positive = (ImageView) findViewById(R.id.imageView3);
positive.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
WebSettings webSettings = fullcontent.getSettings();
webSettings.setTextSize(WebSettings.TextSize.SMALLEST);
}
});
Here the webview text is smallest.but i wish to display the text is automatically increase while clicking imgaeview..
Please give me some idea to develop these ...
Solution
try below code hope useful to you:-
int text_size=16;
ImageView positive = (ImageView) findViewById(R.id.imageView3);
positive.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
text_size++;
webview.getSettings().setDefaultFontSize(text_size);
}
});
this is below code to set text size in webview:-
webview.getSettings().setDefaultFontSize(22);
Answered By - duggu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.