Question: I have 2 buttons for increasing and decreasing `TextView` font size:

```
    btnZoomin.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
           txtview.setTextSize(txtview.getTextSize()+1);
        }
    });
    btnZoomout.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            txtview.setTextSize(txtview.getTextSize()-1);
        }
    });

```

But are experiencing difficulty, as it will not work.

Answer: 
How can you see in the [DOCS](http://developer.android.com/reference/android/widget/TextView.html#setTextSize%28int,%20float%29) setTextSize needs 2 arguments: the [TypedValue](http://developer.android.com/reference/android/util/TypedValue.html) and the new size.

Your code is fine, you just have to add the TypedValue :

```
txtview.setTextSize(TypedValue.COMPLEX_UNIT_SP,txtview.getTextSize()-1);
txtview.setTextSize(TypedValue.COMPLEX_UNIT_SP,txtview.getTextSize()+1);

```
Use this `text.setTextSize(TypedValue.COMPLEX_UNIT_SP,14);`