728x90
반응형

Android App 31

Service (백그라운드) in Android Studio

https://youtu.be/lOHku4NXpfA 안드로이드에서 앱을 백그라운드 실행을 시키기 위해서 Service를 이용할 수 있다. 1. Service Class 만들기 Service을 이용하기 위해서 먼저 Service를 상속받는 class를 만들어줘야 한다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 public class ServiceName extends Service { @Nullable @Override public IBinder onBind(Intent intent) {...} @Override public void onCreate() {...} @Override public int onStartCommand(Intent intent, int flags, int s..

Android App 2021.08.09

dialog (팝업창) in Android Studio

https://youtu.be/SmsshpB1O38 android에서 팝업창을 띄우기 위해서 dialog를 활용할 수 있다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 AlertDialog.Builder ad = new AlertDialog.Builder(MainActivity.this); ad.setIcon(R.mipmap.ic_launcher); ad.setTitle("테스트"); ad.setMessage("만두만두?"); final EditText et = new EditText(MainActivity.this); ad.setView(et); ad.setPositiveButton("확인", new DialogInterface.On..

Android App 2021.08.08

thread, handler (백그라운드) in Android Studio

https://youtu.be/aYjdfpit6lc android에서는 thread를 이용해서 백그라운드에서 실행될 부분들을 정의해줄 수 있다. 그리고 thread를 활용하면서 메인 실행부와 충동이 있을 수 있기 때문에 thread 안에서는 handler을 이용해서 UI 작업을 하는 것 같다. 1 2 3 4 5 6 7 8 9 10 11 12 13 thread = new Thread() { public void run() { while(isThread){ try { sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } handler.sendEmptyMessage(0); } } }; thread.start(); Colored by Co..

Android App 2021.08.08

java 주석, Log in Android Studio

Java 주석, Log https://youtu.be/gmZaayoaY3I 1. java 주석 보통 주석의 종류에는 프로그래밍 언어에 따라서 #, //, /* */ 등 되게 다양하기 때문에 헷갈린다. java에서는 c언어와 같이 //로 이 이후의 모든 것들을 주석 처리한다. 그리고 /* */를 통해서 그 사이의 모든 것들을 주석처리한다. 하지만 여기서 조심해야 하는 것이 /*에서부터 시작해서 */이 나올 때까지 모든 것을 주석 처리하는 것이기 때문에 "/* 안녕 /* 하 */ 세요 */ " 이런 식으로 이중으로 사용한다면 '안녕 /* 하'까지만 주석처리가 되고 "세요 */"는 주석처리가 되지 않는다. 2. androidStudio Log androidStudio에서는 Log.e(String tag, St..

Android App 2021.08.02

RecyclerViewWithEditText in Android Studio

RecyclerViewWithEditText https://yunseong.tistory.com/entry/Android-App-Study5-recyclerView Android App Study_5 (recyclerView) RecyclerView https://youtu.be/kNq9w1_nhL4 일단 recyclerView는 여러 정보들을 item으로 묶어서 각각 표시해주는 그런 것 같다. 예를 들어서 받은 이메일들이 위 아래로 쭉 정렬되있는 것등을 구현할 때 사용되. yunseong.tistory.com 위 링크의 페이지에서 만든 recyclerView에서는 정해져 있는 내용만 띄울 수 있었기 때문에 이번에 EditText를 이용해서 입력한 내용을 recyclerView에 띄울 수 있도록 했다. ..

Android App 2021.08.02

Fragment 전환 in Android Studio

Fragment 전환 https://youtu.be/3Th96mVEpyo 사실 아래 링크의 페이지에서 Fragment 전환과 거의 똑같다. https://yunseong.tistory.com/entry/Android-App-Study1 Android App Study_1 (Fragment 전환, layout, activity 전환) Android, Java에 대해서 잘 아는 것이 아니기 때문에 단어선택이 올바르지 않을 수도 있다. 1. 네비게이션 메뉴 바 https://www.youtube.com/watch?v=stwCk_f3sCw 화면 하단의 네비게이션 바와 fragment를 이용해.. yunseong.tistory.com 1 Fragment를 사용할 activity layout 만들기 먼저 main ..

Android App 2021.08.02

recyclerView in Android Studio

RecyclerView https://youtu.be/kNq9w1_nhL4 일단 recyclerView는 여러 정보들을 item으로 묶어서 각각 표시해주는 그런 것 같다. 예를 들어서 받은 이메일들이 위아래로 쭉 정렬돼있는 것 등을 구현할 때 사용되는 거 같다. recyclerView를 사용하기 위해서 build.gradle (:app)에 dependencies {}에 implementation 'androidx.recyclerview:recyclerview:1.2.1' 을 추가해서 그 토대를 만들어줬다. 1 메인 activity layout 만들기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Colored by Color Scripter cs recyclerview를 위한..

Android App 2021.08.02

camera, startActivityForResult() 대체, intent.resolveActivity(getPackageManager()) return null in Android Studio

Camera https://youtu.be/MAB8LEfRIG8 1 코드 1_1 토대 만들기 일단 먼저 activity_main.xml에 imageView와 button을 만들고 각각의 id 또한 부여했다. 그리고 camera와 storage에 접근에 대한 허가를 app\manifests\AndroidManifest.xml의 안에 아래 코드를 작성한다. 1 2 3 cs 그리고 권한을 묻는 창을 쉽게 띄우기 위해서 GradleScripts\build.gradle (:app)의 dependencies {} 안에 implementation 'gun0912.ted:tedpermission:2.0.0' 을 추가해준다. 1_2 권한 묻기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1..

Android App 2021.08.02

webViewWithEditText in Android Studio

WebViewWithEditText https://yunseong.tistory.com/entry/Android-App-Study2-sharedPreferences-webView-Navigation Android App Study_2 (sharedPreferences, webView, Navigation) 1. SharedPreferences https://youtu.be/-2QPmS4OWos SharedPreferences는 앱을 끄고 다시 키더라고 정보가 남아있도록 정보를 저장할 수 있는 것이다. 이것을 사용하는 방법은 1 2 3 4 SharedPreferences shared.. yunseong.tistory.com 위 페이지에서 만든 webView에다가 EditText를 이용해서 URL 입력 창을..

Android App 2021.08.02

sharedPreferences, webView, Navigation in Android Studio

1. SharedPreferences https://youtu.be/-2QPmS4OWos SharedPreferences는 앱을 끄고 다시 키더라고 정보가 남아있도록 정보를 저장할 수 있는 것이다. 이것을 사용하는 방법은 1 2 3 4 5 6 SharedPreferences sharedPreferences = getSharedPreferences(String fileName, 0); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putString("mandu", value); editor.commit; Colored by Color Scripter cs 위와 같이 SharedPreferences를 getSharedPreference..

Android App 2021.07.19
728x90
반응형