목록삽질/Android (2)
DreamFactory7 :: IT
제목 : 안드로이드 오류 Caused by: java.lang.NoSuchMethodException: 생성자(Context,AttributeSet)05-02 04:12:50.088: E/AndroidRuntime(338): FATAL EXCEPTION: main 05-02 04:12:50.088: E/AndroidRuntime(338): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.a05_2_1/com.example.a05_2_1.MainActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class com.ex..
문제 : public boolean onTouchEvent(MotionEvent event) { int action = event.getAction(); switch(action){ case MotionEvent.ACTION_DOWN: break; case MotionEvent.ACTION_MOVE: break; case MotionEvent.ACTION_UP: break; default : break; } //return super.onTouchEvent(event); //#1 return true; //#2 } #1처럼쓰면 DOWN이벤트만 된다. 해결 : 안드로이드에서 터치이벤트를 처리하는데 대부분 위와같은 코드를 쓸것이다 그런데 #1처럼쓰며면 MotionEvent.ACTION_DOWN만 작동된다. ..