Android
-
[admob] app-ads.txt 설정Android 2021. 1. 28. 13:40
여기까지 검색해서 오신분들은 애드몹에서 app-ads.txt 파일을 설정하라고 해서 오신 경우가 대부분일 것이라고 생각합니다. 결론부터 말씀드리자면 본인 홈페이지 app-ads.txt 파일을 올리면 되는데 홈페이지가 없거나 상황이 여의치 않은 분들은 다른 방법을 강구해야 합니다. 검색해보니 예전에는 티스토리에도 가능한 것 같았는데 지금은 안되는 듯 합니다. 그래서 구글 계정만 있으면 사용할 수 있는 구글 블로그를 이용하여 app-ads.txt를 업로드한 내용을 정리해 보았습니다. 순서 1. AdMob 사이트에서 APP-ADS.TXT 내용 확인 2. 구글 블로그(https://www.blogger.com/)에 해당 app-ads.txt 생성 3. 구글 플레이 개발자 콘솔에서 개발자 페이지에 웹사이트 주소 ..
-
[Android] EditText 키보드 Search(검색) 버튼 추가 Kotlin & JavaAndroid 2020. 12. 16. 10:10
editText.setOnEditorActionListener(object : TextView.OnEditorActionListener { override fun onEditorAction(v: TextView?, actionId: Int, event: KeyEvent?): Boolean { if (actionId == EditorInfo.IME_ACTION_SEARCH) { viewModel.requestAddressToLocation(binding.etAddress.text.toString()) return true } return false } }) editText.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override..
-
[Kotlin] HashMapAndroid 2020. 12. 16. 00:43
fun main(args: Array){ val hashMap:HashMap = HashMap() //define empty hashmap hashMap.put(1,"Ajay") hashMap.put(3,"Vijay") hashMap.put(4,"Praveen") hashMap.put(2,"Ajay") println(".....traversing hashmap.......") for(key in hashMap.keys){ println("Element at key $key = ${hashMap[key]}") } } Output: .....traversing hashmap....... Element at key 1 = Ajay Element at key 2 = Ajay Element at key 3 = V..