안드로이드/실무프로젝트
[안드로이드]연습
GEE:)
2010. 10. 7. 05:03
이미지 버튼을 누르면
AlertDialog가 뜨는 간단한 프로그램
조금은 오랜만에 해서 그런지 헤맸다 ㅠㅠ
막혔던 점!
AlertDialog가 뜨는 간단한 프로그램
조금은 오랜만에 해서 그런지 헤맸다 ㅠㅠ
- new AlertDialog.Builder(this) 에 계속 계속 빨간 밑줄이 나오길래 이렇게도 저렇게도 해보다가
this앞에 myAc(액티피티이름) 을 붙이고 myAc.this 라구 했더니 됬다!!!!!!!!
정확한 이유는...잘 모르겠다 - 실행하면, 애뮬레이터는 실행이 되는데, 내가 짠게 실행이 되지않구
WARNING: Application does not specify an API level requirement!
Device API version is 7 (Android 2.1-update1)
라고만 뜨더라니!! AndroidManifest.xml에
<activity android:name=".myAc"
android:screenOrientation="portrait"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
를 써 넣으니 해결!!!!!android:screenOrientation="portrait"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>