• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps increase the textSize in android webview

krishnaveni

Well-Known Member
Dec 16, 2011
158
0
chennai
I need to develop one android application. What I need here is, when I click on ImageView, size of text size automatically increased. How can I do this?

I have used below code:

[HIGH]String title = in.getStringExtra("Title");
lblName = (TextView) findViewById(R.id.title);
lblName.setText(title);
ImageView positive = (ImageView) findViewById(R.id.imageView3);
positive.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
lblName.setTextSize(TypedValue.COMPLEX_UNIT_PX, lblName.getTextSize() + 2);
}
}); [/HIGH]

Here the textSize is increased well on TextView..how can i increase the textSize on android webview...

please give me solution for these ???

[HIGH]WebView des = (WebView) findViewById(R.id.des);
String description = in.getStringExtra("Description");
des.loadDataWithBaseURL(null,description, "text/html", "UTF-8", null);[/HIGH]

How can i increase the textSize for these description ????

I have added below code:

[HIGH]WebSettings webSettings = des.getSettings();
webSettings.setTextSize(WebSettings.TextSize.SMALLEST);
[/HIGH]

I have to run the app which means am getting the text is smallest fontsize.but i wish to increase the fontsize while clicking imagview automatically...

NOTE:

Please see https://itunes.apple.com/gb/app/bbc-news/id377382255?mt=8. See the 2nd image at bottom -A and +A image is there. Clicking that images means automatically increase and decrease the whole app textview font size. How can I do this in android app?
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones