选择后,有没有办法增加TextView
的文字大小?
答案 0 :(得分:0)
这对你有帮助吗?
包com.android.sample;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
public class SampleActivity extends Activity {
/** Called when the activity is first created. */
private TextView mTextView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mTextView = (TextView) findViewById(R.id.textview1);
mTextView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
mTextView.setTextSize(50);
}
});
}
}