Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- c++
- windows terminal
- Linux
- SetWindowTextW
- 장치 데이터 오류
- audio station버그
- truncated
- SSL 인증서가 변경되었습니다
- 시놀로지 색인
- formatting failed
- clp 325wk
- 주석 숨김
- git
- cloudstation
- 라즈베리파이
- Wraith Spire
- Eclipse
- quickconnect
- linearlaout
- synology
- JSON
- setonkeylistener
- github
- java.net.bindexception
- ds cloud
- cloud station
- IntelliJ
- 이클립스 주석
- MFC
- urllib3
Archives
- Today
- Total
목록fragment (1)
딸기스무디
Fragment에서 Toast, Button 사용 예제
Fragment에서는 Activity에서 사용하던 방식(?)으로 사용하면 동작하지 않습니다. context인자로 this를 주면 이런 오류메시지를 출력합니다. error: no suitable method found for makeText(,String,int) Toast Toast.makeText(getActivity(), "myText", Toast.LENGTH_SHORT).show(); toast는 context인자로 this가 아닌 getActivity()를 넘겨주어야 합니다. 나머지 length나 text사용법은 동일합니다. Button public class mainFragment extends Fragment{ // ... @Override public View onCreateView(Lay..
android
2020. 10. 3. 23:03