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
- pem
- SQL
- spring
- Kibana
- PostgreSQL
- MongoDB
- Python
- github
- mysql
- oracle
- 리눅스
- pandas
- mssql
- Javascript
- 티스토리챌린지
- isempty
- Linux
- MariaDB
- analytics4
- 오블완
- java
- git
- DBMS
- IntelliJ
- 자바
- 명령어
- iBatis
- docker
- isNotEmpty
- 호이스팅
Archives
- Today
- Total
hanker
Android - URL 이동 본문
반응형
@Override
public void onClick(View v) {
switch(v.getId()) {
case R.id.btn1:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.hanke-r.tistory.com"));
startActivity(intent);
break;
case R.id.btn2:
...
}
}
App 화면에 버튼을 만들어 URL 이동을 하고 싶은 경우
Uri.parse("") 안에 이동하고싶은 URL 넣어서 startActivity 메서드 실행
반응형
'Android' 카테고리의 다른 글
Android - 다른 Activity를 생성하여 onClick 이벤트 처리 오류 (java.lang.IllegalStateException: Could not execute method for android:onClick 오류) (0) | 2021.08.05 |
---|---|
Android Studio - github 프로젝트 불러오기 (0) | 2021.04.26 |