마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

괄호 때매 에러뜨네여 ㅜㅜ [closed]

0 추천
package com.example.doit2;

import java.io.UnsupportedEncodingException;

import android.app.Activity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;



public class MainActivity extends Activity {
	
	EditText INPUT;
	TextView COUNT;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		INPUT=(EditText)findViewById(R.id.INPUT);
		COUNT=(TextView)findViewById(R.id.COUNT);
		
		
		
		Button button01 =(Button) findViewById(R.id.button01);
		button01.setOnClickListener(new OnClickListener(){
			public void onClick(View v){
				String message = INPUT.getText().toString();
				Toast.makeText(getApplicationContext(),"You input\n\n"+message,Toast.LENGTH_LONG).show();
			}
		});
		
		
		Button button02 =(Button) findViewById(R.id.button02);
		button02.setOnClickListener(new OnClickListener(){
			public void onClick(View v){
				finish();
			}
		});
		
		TextWatcher watcher= new TextWatcher(){
			public void onTextChanged(CharSequence str, int start, int before, int count){
				byte[] bytes=null;
				try{
					bytes = str.toString().getBytes();
					int strCount=bytes.length;
					INPUT.setText(strCount+"/80 bytes");
				}
				catch(UnsupportedEncodingException ex){
					ex.printStackTrace();
				}
			}
			
			public void beforeTextChanged(CharSequence s, int start, int count, int after){
			}
			
			public void afterTextChanged(Editable strEditable){
				String str = strEditable.toString();
				try{
					byte[] strBytes=str.getBytes();
					if(strBytes.length>80){
						strEditable.delete(strEditable.length()-2,strEditable.length()-1);
					}
				}
				catch(Exception ex){
					ex.printStackTrace();
				}}
	
			
		
		
		
		
		}
		
				}

마지막 괄호 두개에 에러가 뜹니다;;

손으로 세어도 봤는데 왜 그런지 모르겟어여 ㅠㅜㅜ

질문을 종료한 이유:
spock (250 포인트) 님이 2014년 3월 16일 질문
spock님이 2014년 3월 16일 closed
...