krishnaveni
Well-Known Member
I have to develop one android application.Here i have to increase ans decrease the fontSize for android webview.
Initially i have declared the text_default,text_max,text_min size like :
I have to write the condition for increase the fontsize maximum while clikcing positive image:
[HIGH]positive = (ImageView) findViewById(R.id.imageView3);
positive.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
if (text_size < 22)
{
content.getSettings().setDefaultFontSize(text_size += 1);
text_max= text_size++;
j = text_max;
}} });[/HIGH]
I have wrote the condition for decrease the textSize while clicking negative image:
[HIGH]negative = (ImageView) findViewById(R.id.imageView4);
negative.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
if (j > 10)
{
content.getSettings().setDefaultFontSize(j -= 1);
int k= j--;
text_min = k;
}} });
[/HIGH]
Now i have to run the application and directly click the positive image means the textsize will be increase 3 times.after that i have to click the negative image means the textsize will be decrease the 5 times.its worked well...
But i have to run the application and directly click the negative image means the textsize will be decrease the textsize 3 times like bbc news reader application(A+,A- functionality).
How can i do ??? please give me some idea to develop ???
Initially i have declared the text_default,text_max,text_min size like :
HTML:
int text_size=16;
int text_max=22;
int text_min=10;
I have to write the condition for increase the fontsize maximum while clikcing positive image:
[HIGH]positive = (ImageView) findViewById(R.id.imageView3);
positive.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
if (text_size < 22)
{
content.getSettings().setDefaultFontSize(text_size += 1);
text_max= text_size++;
j = text_max;
}} });[/HIGH]
I have wrote the condition for decrease the textSize while clicking negative image:
[HIGH]negative = (ImageView) findViewById(R.id.imageView4);
negative.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
if (j > 10)
{
content.getSettings().setDefaultFontSize(j -= 1);
int k= j--;
text_min = k;
}} });
[/HIGH]
Now i have to run the application and directly click the positive image means the textsize will be increase 3 times.after that i have to click the negative image means the textsize will be decrease the 5 times.its worked well...
But i have to run the application and directly click the negative image means the textsize will be decrease the textsize 3 times like bbc news reader application(A+,A- functionality).
How can i do ??? please give me some idea to develop ???