拖动一个角增大textView面积

public class EditTextClass extends Activity implements OnTouchListener {     private EditText txt;     @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);         txt = (EditText) findViewById(YourEditTextId);         txt.setOnTouchListener(this);     }     @Override     public boolean onTouch(View v, MotionEvent event) {        if(event.getX() >= txt.getWidth() - 5 && event.getX() <= txt.getWidth()             event.getY() >= txt.getHeight() - 5 && event.getY() <= txt.getHeight()) {            txt.setWidth(event.getX());            txt.setHeight(event.getY());        }        return true;     } }

你可能感兴趣的:(textview)