Dev332 Android - Adapter 의 역활 Android - RecyclerView 에서 Adapter 의 역활 The adapter does create ViewHolder objects and inflates item views in its onCreateViewHolder function, it also returns the number of items in the data source, and binds data from the data source to each item (even if we pass the responsibility to the ViewHolder). It doesn't cache views associated with each item (that's the job of the ViewHolder class) nor d.. 2017. 3. 4. Android - URL 생성 / Developing Android Apps 수업 Android - URL 생성 / Developing Android Apps 수업 Android 에서 기본 라이브러리만 사용해서 URL 생성하는 방법기본적으로 Android 는 URI.builder framework class 를 이용해서 어려움 없이 잘 짜여진 URI 생성을 돕는다. 1234567891011121314151617181920212223public static URL buildUrl(String query) { Uri builtUri = Uri.parse("https://andfun-weather.udacity.com/staticweathe") .buildUpon() .appendQueryParameter("q", query) .appendQueryParameter("mode", "json.. 2017. 3. 3. RxJava - RxAndroid 공부 RxJava - RxAndroid 공부 RxJava 관련 다른 포스팅 - RxJava 의 combineLatest 사용 - EditText 이용 예제(링크) RxJava 를 공부하면서 몇가지 정리를 합니다.도움이 되거나 혹은 수정할 사항이 있을 경우 알려주시면 감사하겠습니다 :) 1. 크게 RxJava 에는 크게 2가지 개념을 기억하면 됩니다. Observable 과 Observer 입니다. 2. 간단하게 Observable 은 값을 보내고 Observer 는 subscribe() 라는 구독이라는 메서드를 통해서 보낸 데이터를 받아서 처리한다 라고 생각해볼 수 있습니다. 3. Observer 는 Observable 이 값을 보낼때, 값이 더이상 없을 때, 에러가 났을때 3가지 액션에 대해 반응을 합니다... 2017. 2. 22. [Android] 안드로이드 - 폴더 안의 파일 이름 가져오기 [Android] 안드로이드 - 폴더 안의 파일 이름 가져오기Android - get file name in folder 안드로이드 내장 저장소 어느 폴더의 파일 개수 혹은 파일 이름은 추출하는 방법입니다 1. 원하는 폴더명을 가져옵니다. 1String path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/폴더명"; 2. 해당폴더 안의 파일들을 File 객체에 담습니다.12File directory = new File(path);File[] files = directory.listFiles();cs 3. String 타입의 리스트에 담습니다.12345List filesNameList = new ArrayList(); for (int.. 2017. 2. 21. Android - RxAndroid/RxJava 의 combineLatest 예제 1 RxJava 의 combineLatest 사용 - EditText 이용 예제 1. Reactivex 사이트 - http://reactivex.io/documentation/operators/combinelatest.html2. Realm 참고 - https://realm.io/kr/news/rxandroid-3/ RxJava 의 combineLatest 를 사용해서 2개의 EditText 의 값을 받아서 버튼을 누르면 두개의 EditText 에 무엇인가가 들어갔을 경우 Toast 에서 "로그인" 혹은 "실패"를 띄우는 예제입니다. 1. Activity 생성123456789public class MainActivity extends AppCompatActivity { @Override protected v.. 2017. 2. 20. Android - Screen Capture / 스크린캡쳐 하기 안드로이드 스크린 캡쳐(스샷) 12345678910111213141516171819202122232425262728private void takeScreenshot() { try { // image naming and path to include sd card appending name you choose for file // 저장할 주소 + 이름 String mPath = Environment.getExternalStorageDirectory().toString() + "/" + now + ".jpg"; // create bitmap screen capture // 화면 이미지 만들기 View v1 = getActivity().getWindow().getDecorView().getRootView(); .. 2017. 2. 17. 이전 1 ··· 49 50 51 52 53 54 55 56 다음