본문 바로가기

전체 글

(16)
Bottom Naviogation Activity로 App을 생성하고 RecyclerView를 추가하면 위에 여백이 생기고 아래는 BottomNavigationView에 막혀 끝까지 스크롤되지 않는 현상 해결(삽질의 승리^^) 상황 환경: Android Studio 3.5 이상 1. 안드로이드 스튜디오를 실행하고, 2. 기본 Activity를 Bottom Navigation Activity로 선택하고, 프로젝트를 생성 3. HomeFragment를 WordFragment로 변경(layout과 ViewModel로 이름을 맞춰서 Refactoring) 4. fragment_word.xml에 RecyclerView 추가하고 실행하면 그림처럼 됩니다. - 꽉채워줬는데도 위가 비고, - 아래는 스크롤을 아무리해도 가려지는 부분이 생깁니다. 해결방법 아래의 해결방법이 정답인지는 잘 모르겠지만 일단 해결했습니다. 상단먹어주는 공간은 우연히 해결했습니다. 두번째 아래 스크롤은 stackoverflow를 뒤졌습니다. ^^ 1. 상단여백 없애기..
NavigationDrawer Activity 메뉴 만지작거리기(#1) 우선 Android Studio를 열고 NavigationDrawer Activity를 기본으로 프로젝트를 만들고 앱을 구동하면 처음에는 만족스럽습니다. 와우~~ 클릭 한 번으로 이런 기능이 만들어지네.... 아래 그림을 보시기 바랍니다. 이렇게 트랜디한 앱을 내가 클릭 몇번으로 만들다니.... 안드로이드 쉽구만.... ㅉㅉ 그러나 그 것은 곧 실망감으로 바뀌게 됩니다. 뭔가 해보려고 해도 잘 안됩니다. 우선 메뉴를 내 마음대로 바꾸고 싶은데 잘 안됩니다. 그 다음에는 Fragment에서 새로운 Fragment를 호출하고 싶은데, 잘 안됩니다. getSupportfragmentmanager ().getfragments ( )를 사용해서 뭔가를 하라고 자꾸 나오는데 저는 실패했습니다. 결국 다른 방법을 써..
오호라... 이글 좋네요... 요약하면.....(링크글은 아래에 있습니다.) 1. 샘플 프로젝트: 뭐 주말 프로젝트 겸 앱을 만들어보라는 이야기 ^^ 2. 경험을 나누는 블로그 작성 - 스크린샷과 코드 적극 활용 - 컨퍼런스에 참가하여 컨퍼런스 리포트 작성 - 트윗 임베드 - 사진 추가 - 스케치노트 추가 3. 강연: 요건 좀 어려울 수도 있겠으나, 적극적으로 활용하면 도움이 많이 될 것 같습니다... 개인적으로는 Open Source 프로젝트에 Contribute하는 것도 좋은 방법이라 생각됩니다. 안드로이드 전문가 되기 안드로이드 전문가가 되는 법 안드로이드 전문가가 제시하는 구체적인 단계를 통해 여러분의 지식을 공유하고 안드로이드 전문가가 되기 위한 자격을 쌓아보세요. academy.realm.io
Fragment에서 DataBinding 사용하기 1) App 수준 build.gradle에 다음을 추가 android{ ... dataBinding{ enabled = true } ... } 2) Fragment인 경우 - 원래는 이런 코드였는데... View root = inflater.inflate(R.layout.fragment_dict, container, false); - Fragment명이 DictFragment인 경우 Fragment와 연결된 layout의 명칭이 dict_fragment.xml이면 FragmentDictBinding으로 명명하여 바인딩 처리 - 결국 data binding을 사용하려면 layout xml 파일의 기존 내용을 ....으로 감싸게 되는데, 이것을 가지고 binding 객체의 이름을 지정하는 것임 private..
10분만에 끝내는 pandas (출처: https://pandas.pydata.org/pandas-docs/stable/10min.html#min)< 아래내용을 jupyter notebook으로 실행한 파일을 첨부하였습니다. 환경이 되는 분은 활용하시기 바랍니다) 10 Minutes to pandas이 문서는 pandas에 대한 간단한 소개이며, 처음 접하는 사용자를 위한 것이다. 더 복잡한 조리법(?)은 Cookbook을 보시기 바랍니다. Customarily, we import as follows:In [1]: import pandas as pd In [2]: import numpy as np In [3]: import matplotlib.pyplot as plt Object CreationSee the Data Structure..
__slots__ 3.3.2.3. __slots__By default, instances of classes have a dictionary for attribute storage. This wastes space for objects having very few instance variables. The space consumption can become acute when creating large numbers of instances.The default can be overridden by defining __slots__ in a class definition. The __slots__ declaration takes a sequence of instance variables and reserves just en..
PEP 3102 -- Keyword-Only Arguments keyword-only argumentsPEP 3102 -- Keyword-Only ArgumentsPEP:3102Title:Keyword-Only ArgumentsAuthor:Talin Status:FinalType:Standards TrackCreated:22-Apr-2006Python-Version:3.0Post-History:28-Apr-2006, May-19-2006ContentsAbstractRationaleSpecificationFunction Calling BehaviorBackwards CompatibilityCopyrightAbstractThis PEP proposes a change to the way that function arguments are assigned to named ..
__repr__() vs. __str__() Python에는 문자열관련 special method가 두개가 있습니다.__str__()과 __repr__()[공식문서의 내용을 볼까요?]__repr__()object.__repr__(self)Called by the repr() built-in function to compute the “official” string representation of an object. If at all possible, this should look like a valid Python expression that could be used to recreate an object with the same value (given an appropriate environment). If this is not possible,..