<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Boki</title>
    <description>Github Pages와 Jekyll을 이용한 깃헙 블로그</description>
    <link>https://lsb530.github.io/</link>
    <atom:link href="https://lsb530.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sun, 08 May 2022 16:56:17 +0000</pubDate>
    <lastBuildDate>Sun, 08 May 2022 16:56:17 +0000</lastBuildDate>
    <generator>Jekyll v3.9.2</generator>
    
      <item>
        <title>LiveTemplate</title>
        <description>&lt;h1 id=&quot;이거-왜-안써-jetbrains사의-live-template&quot;&gt;이거 왜 안써? JetBrains사의 Live Template&lt;/h1&gt;

&lt;h2 id=&quot;intellij-webstorm-phpstrom-등등&quot;&gt;IntelliJ, WebStorm, PhpStrom 등등…&lt;/h2&gt;

&lt;h3 id=&quot;어느날-책을-보면서-공부하다가-vscode의-snipet에선-복잡하게-돌아가는걸-발견했다&quot;&gt;어느날 책을 보면서 공부하다가 VsCode의 Snipet에선 복잡하게 돌아가는걸 발견했다…!!&lt;/h3&gt;

&lt;h3 id=&quot;그래서-웹스톰인텔리제이도-됨에서는-그런기능이-없을까-찾아보다보니-live-template이란-것을-발견했다&quot;&gt;그래서 웹스톰(인텔리제이도 됨)에서는 그런기능이 없을까 찾아보다보니.. Live Template이란 것을 발견했다.&lt;/h3&gt;

&lt;h3 id=&quot;자-결론을-좋아하는-한국인들을-위해-사진-투척&quot;&gt;자 결론을 좋아하는 한국인들을 위해 사진 투척&lt;/h3&gt;

&lt;h4 id=&quot;파일이름-testjs-일때-z를-치고-엔터를-치면&quot;&gt;파일이름: test.js 일때 z를 치고 엔터를 치면&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107855897-91668000-6e68-11eb-8e11-621bc60432e1.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107855908-a4795000-6e68-11eb-8014-99ae53bb9ac9.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;파일이름-i_love_yousomuchs2js-일때-z를-치고-엔터를-치면&quot;&gt;파일이름: I_Love_youSoMuchS2.js 일때 z를 치고 엔터를 치면&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107855930-cf63a400-6e68-11eb-9273-207002a478fe.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107855935-d25e9480-6e68-11eb-905d-087c33088cf0.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;추가로-한글-명령어도-가능하다-왜냐-내가-추가해놨으니까&quot;&gt;추가로 한글 명령어도 가능하다 왜냐? 내가 추가해놨으니까^^&lt;/h3&gt;

&lt;h4 id=&quot;리액트-라고-치고-엔터를-치면&quot;&gt;리액트 라고 치고 엔터를 치면&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856081-2e291d80-6e69-11eb-9add-57e63681f93b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;뿅-기본-틀이-완성된다&quot;&gt;뿅! 기본 틀이 완성된다&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856084-33866800-6e69-11eb-9cc3-b43f13be1dfe.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;한글은-바로-추가툴팁이-뜨지는-않지만-잘-작동한다&quot;&gt;한글은 바로 추가툴팁이 뜨지는 않지만 잘 작동한다.&lt;/h4&gt;

&lt;h2 id=&quot;-how-&quot;&gt;[ How? ]&lt;/h2&gt;

&lt;p&gt;우리는 단축키를 사랑하는 민족이니까 나만 따라오시라. 대신 윈도우 기준으로 설명하겠다..
맥.. 부러워 갖고싶어..ㅠ 거지라서..
Ctrl + Alt + S를 누르면 Settins 창이 뜬다. 여기에서 Live라고 치고 Live Template을 선택해준다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856154-a5f74800-6e69-11eb-86b2-15cf92d51c10.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;우측 상단의 + 버튼을 눌러서 템플릿 그룹을 추가한다. 그냥 자기 이름으로 하자
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856166-c3c4ad00-6e69-11eb-8293-b77ae6db65d3.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;난 boki로 만들어줬고 5개의 명령어를 추가해줬다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856200-fc648680-6e69-11eb-9563-a3d22c917a82.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856210-09817580-6e6a-11eb-945b-38ff757d857e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;z를 살펴보면… ㅋ로 할수도 있었지만, 코드를 치는순간 영문이 더 쓰이는 경우가 많을거같아서 z로했다.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856290-7eed4600-6e6a-11eb-9ee5-f1cee68eabc4.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;우측 상단의 +를 눌러서 이번에는 1번으로 추가를 해준다(그룹 x)
Abbreviation에는 명령어를, Description에는 말그대로 설명을 적으면된다. 한글도 상관없다.
근데 명령어는 한글이면 설명툴팁이 안뜬다..&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856305-8e6c8f00-6e6a-11eb-8a30-684b0a69b305.png&quot; alt=&quot;image&quot; /&gt;
그리고 밑에 Template Text에 코드를 적는다.
코드를 적으면 흰색으로 뜬다.
그럴때는 밑에 Define을 눌러서 어떤 형식의코드인지 알려줘야 한다. 리액트를 할것이기 때문에 나는 JavaScript and TypeScript라고 정했다. 그러면 코드에 색이 입혀지면서 적용되는 것을 알 수 있다.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856480-c32d1600-6e6b-11eb-8867-3137ce24954b.png&quot; alt=&quot;image&quot; /&gt;
옆에 Expand With는 이 명령어를 치고 활성화시킬 동작들이다. 나는 탭보다는 엔터가 편해서 엔터로 전부 다 설정했다. Default는 Tab이다.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856383-279ba580-6e6b-11eb-9ece-e750c0bb7f7d.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;추가로 변수를 알아보자
변수는 $ $사이에다가 아무내용이나 적으면 EDIT VARIABLES 버튼이 활성화가 되면서 입력이 가능하다
날짜도 가능하고, 파일명, 확장자를 포함하지 않는 파일명 등등 엄청 다양하다.
추가로 내 스타일 컴포넌트 하나 설정을 알려주고 글을 마칠까한다..&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;react&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;styled&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;styled-components&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$FILENAME$Block&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;styled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;``&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$FILENAME$&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;$FILENAME$Block&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/$FILENAME$Block&amp;gt;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$FILENAME$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;이 명령어를 스컴 이라고 등록했다. 스타일드 컴포넌트의 줄임말이다. $$뒤에 변수명이 와도 상관없다. 어차피 텍스트로 인식될거니깐(여기는 셋팅환경 안이다)&lt;/p&gt;

&lt;h2 id=&quot;스컴의-결과&quot;&gt;스컴의 결과&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856546-3040ab80-6e6c-11eb-8cb9-aff715b3b63e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/107856547-333b9c00-6e6c-11eb-81d7-8dc434ee9aee.png&quot; alt=&quot;image&quot; /&gt;
겁나 긴 파일이름명을 따라서 만들어진것을 볼 수 있다!&lt;/p&gt;

&lt;h1 id=&quot;모두-intellij-webstrom-쓰세요-ㅋㅋ&quot;&gt;모두 IntelliJ, WebStrom 쓰세요!! ㅋㅋ&lt;/h1&gt;
</description>
        <pubDate>Sun, 14 Feb 2021 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2021/02/14/LiveTemplate/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2021/02/14/LiveTemplate/</guid>
        
        <category>IntelliJ</category>
        
        <category>WebStorm</category>
        
        <category>Live</category>
        
        <category>Template</category>
        
        
        <category>IDE</category>
        
      </item>
    
      <item>
        <title>tomcat</title>
        <description>&lt;h1 id=&quot;톰캣-실행에러-쉽게-처리하자feat-내가만든-프로그램&quot;&gt;톰캣 실행에러 쉽게 처리하자!(feat. 내가만든 프로그램…)&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106701330-d0573300-6629-11eb-810e-4b100bcd0995.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106701352-da793180-6629-11eb-8d38-5f0e225a0b00.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;이클립스-또는-스프링으로-톰캣을-돌리다-보면-이런-에러를-가끔-마주하곤-한다&quot;&gt;이클립스 또는 스프링으로 톰캣을 돌리다 보면 이런 에러를 가끔 마주하곤 한다.&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Starting Tomcat v 8.5 Server at localhost …&lt;/li&gt;
  &lt;li&gt;Port 8080 is already in use …&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;-나는-포트를-webxml에서-변경해주는-식의-포스팅은-아니다&quot;&gt;※ 나는 포트를 web.xml에서 변경해주는 식의 포스팅은 아니다&lt;/h3&gt;

&lt;p&gt;논외로 오라클을 먼저 설치하고 톰캣을 설치한 경우에는 포트번호가 충돌하기때문에 web.xml에서 포트번호를 바꿔야 한다. 하지만 여기에서는 이 내용을 다루지 않는다.&lt;/p&gt;

&lt;h2 id=&quot;분명히-사용하던-ide이클립스-인텔리j-등등을-다-껐는데도-톰캣을-실행하면-오류가-난다-이런-경우는-실행되고-있는-톰캣을-직접-꺼줘야한다&quot;&gt;분명히 사용하던 IDE(이클립스, 인텔리J 등등)을 다 껐는데도 톰캣을 실행하면 오류가 난다. 이런 경우는 실행되고 있는 톰캣을 직접 꺼줘야한다.&lt;/h2&gt;

&lt;p&gt;뭐 cmd창을 열고 netstat에 등등..뭐 말이 많지만… 나는 방법론적인거보다 결과를 툭 던져드리겠다.
계속 이 오류를 마주칠 때마다 netstat ano find ~ 언제치고있을것인가..?
직접 만든 windows10 Batch(실행)파일을 첨부한다.&lt;/p&gt;

&lt;p&gt;유튜브&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://youtu.be/mT1RFsL7cZ0&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/mT1RFsL7cZ0/0.jpg&quot; alt=&quot;유튜브&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;파일&lt;/p&gt;

&lt;p&gt;https://drive.google.com/file/d/1jBel3k-H3CFjl4PC3z07Q1XcF4kcHN6H/view?usp=sharing&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702441-b61e5480-662b-11eb-9cba-59e92c636415.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;실행 화면이다 출력된 그대로 ‘80’이 붙은 실행 중인 포트들을 출력한다. 나는 톰캣을 켜놓지 않은 상태라 없다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702492-ca625180-662b-11eb-85a6-4e7a9e0cff5a.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;기본포트인 8080 그대로 사용중이고, 종료하고 싶다면 그냥 엔터를 치면 된다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702517-d51ce680-662b-11eb-8049-98728989cb09.png&quot; alt=&quot;image&quot; /&gt;
2-1. 다른 포트로 변경했다면(Ex: 나는 오라클이랑 충돌나서 8090포트로 변경했다) 다음줄에 포트번호를 입력한다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702552-e0701200-662b-11eb-9773-a3cfc0f42ad4.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;2초뒤 그 포트를 가진 프로세스를 죽인다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702587-eebe2e00-662b-11eb-9cd5-ccbbc4af8925.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;결과화면을 보면 성공or오류 표시가 뜨지 않은 것을 볼수있다. 이 경우 실행중인 프로세스를 종료한 것이 아니기 때문이다.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;실제-테스트&quot;&gt;실제 테스트&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702668-1a411880-662c-11eb-8c18-9971f4e14d96.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;톰캣이 설치된 곳으로가서 bin 폴더에서 startup 파일을 실행시켜준다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702721-32189c80-662c-11eb-9638-edfb5fd8d12f.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;한글이깨지는건 무시…) 하고 잘 동작중인것을 알 수 있다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702862-69874900-662c-11eb-895f-2a1914279a06.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702819-5b392d00-662c-11eb-9637-7b632561b044.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;톰캣 kill 배치파일을 실행시켜서 8090포트(나의경우)가 실행중인 것을 확인 후 8090을 입력해주자
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/106702909-80c63680-662c-11eb-9fe8-6b5b0eec768e.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;뒤에 떠있던 프로세스가 죽고 성공과 오류 메세지를 볼 수 있다. 오류메세지는 반복문으로 돌리느라 표시된 것이니 걱정말자!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;결론&quot;&gt;결론&lt;/h2&gt;

&lt;p&gt;그냥 내가 만든거 쓰자. 혹시나 불안하면 배치파일 까보면 된다 별거없다 ㅎㅎ
색깔 바뀌는건 귀엽게 추가해봤다. 많이 사용해주신다면 감사하겠다!!!
https://drive.google.com/file/d/1jBel3k-H3CFjl4PC3z07Q1XcF4kcHN6H/view?usp=sharing&lt;/p&gt;
</description>
        <pubDate>Wed, 03 Feb 2021 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2021/02/03/tomcatKill/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2021/02/03/tomcatKill/</guid>
        
        <category>tomcat</category>
        
        <category>port</category>
        
        <category>IDE</category>
        
        
        <category>debug</category>
        
      </item>
    
      <item>
        <title>Oracle JDBC DAO debug</title>
        <description>&lt;h1 id=&quot;oracle-jdbc-dao-debug&quot;&gt;Oracle JDBC DAO debug&lt;/h1&gt;

&lt;h2 id=&quot;db-insert-안됨&quot;&gt;DB insert 안됨…&lt;/h2&gt;

&lt;h3 id=&quot;1-개요&quot;&gt;1. 개요&lt;/h3&gt;

&lt;p&gt;자바랑 DB랑 연동해서 처리해보다가 진짜 죽어도 안되서 이곳저곳 찾다가도 안되서 4시간 벙쪄있다가 해결책을 찾았다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/105951133-ece7ee00-60b2-11eb-8908-fca663d933dd.png&quot; alt=&quot;image&quot; /&gt;
문제가 있는 코드같은가..?
휴… 사실 하나 추가한게 있다면 28번째 줄에 conn.commit(); 이 부분이다.&lt;/p&gt;

&lt;h3 id=&quot;2-how-to&quot;&gt;2. How To&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/105951447-5e27a100-60b3-11eb-9695-c4415c6411c6.png&quot; alt=&quot;image&quot; /&gt;
사실 추가로 SQL develop를 켜서 DB에 데이터가 잘 들어갔나 테스트를 하고 있었는데 문제는 여기에 있었다. SELECT를 제외한 나머지 INSERT, DELETE, UPDATE는 무엇을 필요로 하는지 아는가?
바로 commit이다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/105951526-88795e80-60b3-11eb-85da-2d9ed37da382.png&quot; alt=&quot;image&quot; /&gt;
작업을 할때 F11을 눌러서 커밋이나 혹은 롤백을 시켜주는 습관을 들이자.
혹은 다른 방법으로 autocommit을 on시켜주는 방법이 있는데,
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/105951619-b363b280-60b3-11eb-9bec-55a9529d6010.png&quot; alt=&quot;image&quot; /&gt;
이런 방식으로 사용이 가능하다. 혼자 mock데이터(가짜 데이터) 혹은 서비스하지 않고 local에서 개발하는단계라면 모를까 실 서비스하는 데이터를 갖고 autocommit을 켜두기에는 위험부담이 클거같다. commit이나 rollback을 습관화하거나 autocimmit을 하는 습관을 갖자!
추가로 JAVA에서도 conn.commit();코드를 작성해두는 것이 좋을 것 같다.&lt;/p&gt;
</description>
        <pubDate>Wed, 27 Jan 2021 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2021/01/27/javaJDBC_debug/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2021/01/27/javaJDBC_debug/</guid>
        
        <category>java</category>
        
        <category>JAVA</category>
        
        <category>JDBC</category>
        
        <category>debug</category>
        
        <category>error</category>
        
        <category>commit</category>
        
        
        <category>debug</category>
        
      </item>
    
      <item>
        <title>IntelliJ(+WebStorm) 주석 커스터마이징</title>
        <description>&lt;h1 id=&quot;intellijwebstorm-주석-커스터마이징&quot;&gt;IntelliJ(+WebStorm) 주석 커스터마이징&lt;/h1&gt;

&lt;h2 id=&quot;intellij-webstorm-comment-customizing&quot;&gt;IntelliJ, WebStorm comment customizing&lt;/h2&gt;

&lt;h3 id=&quot;1-개요&quot;&gt;1. 개요&lt;/h3&gt;

&lt;p&gt;알고리즘으로는 파이참(파이썬), Node.js로는 vscode, 스프링으로는 인텔리J, 그리고 리액트로는 이번에 최근에 웹스톰을 쓰게되었다. (C로는 Visual Studio..)
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/105783444-d90c9100-5fb9-11eb-973f-7d23c781e99a.png&quot; alt=&quot;image&quot; /&gt;
파이썬을 보면 주석이 “”” “&quot;”와 # 두가지가 있는 것을 볼 수가 있다.
나는 주석이 언어자체에만 있는건줄 알았다. C언어를 배울때 //와 /* */를 배웠고, HTML을 배울때는 &lt;!-- --&gt; 를 배웠으니 말이다.
하지만 코드 작성시, 동작은 하지 않지만, 이 코드를 메모로, 혹은 버그로, 혹은 기타 등등으로 표시하고 싶을때가 있다. 표시는 할 수 있지만 에디터에서 눈에 띄지 않는 회색으로 처리되는게 싫었다.&lt;/p&gt;

&lt;h3 id=&quot;2-how-to&quot;&gt;2. How To&lt;/h3&gt;

&lt;p&gt;이번에 리액트를 공부하면서 JetBrains사의 WebStorm IDE를 쓰게 되었는데, 주석을 커스터마이징 할 수 있다는 것을 알았다
(+기타 JetBrains의 모든 IDE가능&amp;lt;Ex: intelliJ&amp;gt;)&lt;/p&gt;

&lt;p&gt;결과화면
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/105783605-3c96be80-5fba-11eb-92ce-4bc83ff5f875.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;File-Settings를 들어가준다. 윈도우 기준 단축키는 Ctrl+Alt+S이다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/105783716-81baf080-5fba-11eb-9ba6-cac43d6f1a87.png&quot; alt=&quot;image&quot; /&gt;
todo를 쳐서 검색해준 후 밑에 +를 눌러 하나씩 추가해준다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/105783861-dcece300-5fba-11eb-835d-101ffb4ad67c.png&quot; alt=&quot;image&quot; /&gt;
위에보면 원래 있던 // todo와 // fixme를 볼 수 있을 것이다.참고로 이건 이클립스에도 있다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/105784064-5ab0ee80-5fbb-11eb-9250-03d80b1d4add.png&quot; alt=&quot;image&quot; /&gt; +를 눌러서 위에 패턴을 그대로 따라 쳐준다. 가운데 추가하고 싶은 단어만 추가하고 Use color scheme TODO default colors만 체크를 해제해준 후 밑에서 색상이나 Effects 등 추가해서 바꿔주면된다!&lt;/p&gt;
</description>
        <pubDate>Tue, 26 Jan 2021 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2021/01/26/comment_cus/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2021/01/26/comment_cus/</guid>
        
        <category>IDE</category>
        
        <category>intelliJ</category>
        
        <category>WebStorm</category>
        
        
        <category>IDE</category>
        
      </item>
    
      <item>
        <title>윈도우10에서 작업표시줄 아이콘 작게하기</title>
        <description>&lt;h1 id=&quot;윈도우10에서-작업표시줄-아이콘-작게하기&quot;&gt;윈도우10에서 작업표시줄 아이콘 작게하기&lt;/h1&gt;

&lt;h4 id=&quot;일단-mac노트북이-없는-사람으로써-윈도우-개발에-대해-얘기하려고한다&quot;&gt;일단 Mac노트북이 없는 사람으로써 윈도우 개발에 대해 얘기하려고한다.&lt;/h4&gt;

&lt;h4 id=&quot;대학교4년을-거치고-졸업을-하고-여러인강을-들으면서-참-쓸데없는-혹은-언젠가는-쓸지도-모르는-개발툴들을-많이-설치했더랬다&quot;&gt;대학교4년을 거치고 졸업을 하고 여러인강을 들으면서 참 쓸데없는 혹은 언젠가는 쓸지도 모르는 개발툴들을 많이 설치했더랬다.&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103430675-cea0e680-4c09-11eb-9da2-5ffcc915fe5d.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h6 id=&quot;크롬웨일카톡안드로이드-스튜디오유니티코드블럭비쥬얼스튜디오mysql-cli-vsc-intellij-ultimate이건-학생라이센스가-끝나서-유료라-더이상-안쓴다-intellij-community-pycharm-아나콘다-cli-sublime-text-메모지-엑셀-넷플릭스-프리미어프로-디스코드-스크래치-알송-brackets-이클립스-heidisql-robo3tmongodb-잔디-postman-노션-git-bash까지&quot;&gt;크롬,웨일,카톡,안드로이드 스튜디오,유니티,코드블럭,비쥬얼스튜디오,Mysql CLI, VSC, IntelliJ Ultimate(이건 학생라이센스가 끝나서 유료라 더이상 안쓴다), IntelliJ Community, Pycharm, 아나콘다 CLI, Sublime Text, 메모지, 엑셀, 넷플릭스, 프리미어프로, 디스코드, 스크래치, 알송, Brackets, 이클립스, HeidiSQL, Robo3T(MongoDB), 잔디, Postman, 노션, Git Bash까지…&lt;/h6&gt;

&lt;h5 id=&quot;사실-필요없는거-지우면-되지만-뭔가-나는-바로바로-정리를-안하는-성격이고-언젠가는-쓸지도-모른다고-생각해서-남겨두는편이다&quot;&gt;사실 필요없는거 지우면 되지만 뭔가 나는 바로바로 정리를 안하는 성격이고 언젠가는 쓸지도 모른다고 생각해서 남겨두는편이다.&lt;/h5&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103430676-d06aaa00-4c09-11eb-8766-eebbff644c8e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h5 id=&quot;여기서-문제점은-몇개를-열때마다-작업표시줄자체에서-다음창으로-넘겨주는-것이었다-나는-그래서-무슨-창이-열리고-닫힌지-확인을-하려면-다시-back을-해야했다매우불편&quot;&gt;여기서 문제점은 몇개를 열때마다 작업표시줄자체에서 다음창으로 넘겨주는 것이었다. 나는 그래서 무슨 창이 열리고 닫힌지 확인을 하려면 다시 back을 해야했다.(매우불편)&lt;/h5&gt;

&lt;h5 id=&quot;그래서-찾은것이-바로-작은-작업표시줄-아이콘-표시였다&quot;&gt;그래서 찾은…것이 바로 작은 작업표시줄 아이콘 표시였다!&lt;/h5&gt;

&lt;h5 id=&quot;1-작업표시줄에서-마우스-우클릭을-해서-작업-표시줄-설정에-들어간다&quot;&gt;1. 작업표시줄에서 마우스 우클릭을 해서 작업 표시줄 설정에 들어간다.&lt;/h5&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103430678-d3659a80-4c09-11eb-8398-ac19a5b94d7c.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h5 id=&quot;2-작은-작업-표시줄-단추-사용을-눌러서-으로-바꿔준다&quot;&gt;2. 작은 작업 표시줄 단추 사용을 눌러서 &lt;켬&gt;으로 바꿔준다.&lt;/켬&gt;&lt;/h5&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103430680-d5c7f480-4c09-11eb-9221-c0dae922977a.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;확인해보니-엄청-작은-작업표시줄로-바꼈다-아마-프로그램-설치를-할때-아이콘을-기본-아이콘과-작은-아이콘을-윈도우에-제공하는게-있나보다-특정-프로그램들은-아이콘-모양이-아예-바꼈다&quot;&gt;확인해보니 엄청 작은 작업표시줄로 바꼈다. 아마 프로그램 설치를 할때 아이콘을 기본 아이콘과 작은 아이콘을 윈도우에 제공하는게 있나보다. 특정 프로그램들은 아이콘 모양이 아예 바꼈다!&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103430682-d791b800-4c09-11eb-82f7-f7a1c5460436.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;나름-깔끔해져서-보기좋고-이제-딱히-제거하지-않아도-전부-다-볼수있게-되서-행복하다&quot;&gt;나름 깔끔해져서 보기좋고, 이제 딱히 제거하지 않아도 전부 다 볼수있게 되서 행복하다!&lt;/h4&gt;

&lt;h2 id=&quot;끗&quot;&gt;끗!&lt;/h2&gt;
</description>
        <pubDate>Fri, 01 Jan 2021 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2021/01/01/workDisplayLine/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2021/01/01/workDisplayLine/</guid>
        
        <category>작업표시줄</category>
        
        <category>아이콘</category>
        
        
        <category>Windows10</category>
        
      </item>
    
      <item>
        <title>윈도우10에서 Git Bash alias 설정</title>
        <description>&lt;h1 id=&quot;윈도우10에서-git-bash-alias-설정&quot;&gt;윈도우10에서 Git Bash alias 설정&lt;/h1&gt;

&lt;h4 id=&quot;윈도우10에서-nodejs와-reactjs를-개발하면서-작성된파일을-git-bash를-통해-깃허브에-올려야될때-cd-경로를-다시-쳐야하는게-불편했다&quot;&gt;윈도우10에서 Node.js와 React.js를 개발하면서 작성된파일을 Git Bash를 통해 깃허브에 올려야될때 cd 경로를 다시 쳐야하는게 불편했다&lt;/h4&gt;

&lt;h5 id=&quot;예를-들어-react의-경로는-cusersbokidesktopdo-it-reactnvm-setupreactdo_it를-가지고있었기에-불편했었다&quot;&gt;예를 들어 React의 경로는 C:\Users\Boki\Desktop\do-it-react\nvm-setup\React\do_it를 가지고있었기에 불편했었다&lt;/h5&gt;

&lt;h4 id=&quot;git-bash가-리눅스-명령어로-동작을해서-bash_profile-또는-bashrc에-alias를-추가하면-될것-같았다&quot;&gt;git bash가 리눅스 명령어로 동작을해서 .bash_profile 또는 .bashrc에 alias를 추가하면 될것 같았다&lt;/h4&gt;

&lt;h5 id=&quot;1-git-bash를-실행한다-그리고-cd-를-입력해준다-여기가-어디냐면-cusers본인이설정한컴퓨터이름의-경로이다&quot;&gt;1. Git bash를 실행한다 그리고 cd ~를 입력해준다 여기가 어디냐면 c:/Users/본인이설정한컴퓨터이름의 경로이다&lt;/h5&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt;
/c/Users/Boki
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h5 id=&quot;2vim-bash_profile-파일에-alias를-추가해준다&quot;&gt;2.vim .bash_profile 파일에 alias를 추가해준다&lt;/h5&gt;

&lt;h5 id=&quot;내부에서는-i가-입력모드-esc가-명령모드가-된다-i를-눌러-입력모드로-바꿔주자&quot;&gt;내부에서는 i가 입력모드, esc가 명령모드가 된다. i를 눌러 입력모드로 바꿔주자&lt;/h5&gt;

&lt;h5 id=&quot;내부에서는-이-주석이된다-alias-이름을-입력해주면된다&quot;&gt;내부에서는 #이 주석이된다. alias 이름=’‘을 입력해주면된다&lt;/h5&gt;

&lt;h5 id=&quot;나는-favorte-path로-입력을-해주고-밑에-alias-reactcd-desktopdo-it-reactnvm-setupreactdo_it라고-입력을-해줬다&quot;&gt;나는 #favorte path로 입력을 해주고 밑에 alias React=’cd ~/Desktop/do-it-react/nvm-setup/React/do_it’라고 입력을 해줬다.&lt;/h5&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;vim .bash_profile

&amp;lt;.bash_profile 내부&amp;gt;
&lt;span class=&quot;c&quot;&gt;# generated by Git for Windows&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; ~/.profile &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; ~/.profile
&lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; ~/.bashrc &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; ~/.bashrc
&lt;span class=&quot;c&quot;&gt;# favorite path&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;alias &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'cd ~/Desktop/do-it-react/nvm-setup/React/do_it'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h5 id=&quot;저장은-다시-esc키를-눌러서-wq라고-입력해준다저장-후-나간다는-뜻&quot;&gt;저장은 다시 esc키를 눌러서 :wq라고 입력해준다(저장 후 나간다는 뜻)&lt;/h5&gt;

&lt;h5 id=&quot;이제-react라는-명령어를-입력해주고-pwd로-현재경로를-확인해보자&quot;&gt;이제 React라는 명령어를 입력해주고 pwd로 현재경로를 확인해보자&lt;/h5&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;React
/c/Users/Boki/Desktop/do-it-react/nvm-setup/React/do_it
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103427651-d3fc3200-4c05-11eb-9a6a-df00db8416c6.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103427656-d9597c80-4c05-11eb-919d-1d8ae61085fb.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103427661-dbbbd680-4c05-11eb-8243-a032fe28b9b8.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;아주-잘-작동한다-앞으로-블로그경로-reactjs나-nodejs-스프링-프로젝트를-할때-사실-ide와-git-bash가-연동이된다면-혹은-cmd창-내부에서도-git이-명령어로-동작을-하기에-현재-프로젝트-경로를-잡아주는-ide로-개발을-한다면-필요없을지도-모르지만-cmd창-내부에서는-git에-대한-명령어를-깔쌈하게-쓸수없기때문에-간편하게-만들어보았다&quot;&gt;아주 잘 작동한다. 앞으로 블로그경로, React.js나 Node.js, 스프링 프로젝트를 할때 사실 IDE와 git bash가 연동이된다면 혹은 cmd창 내부에서도 git이 명령어로 동작을 하기에 현재 프로젝트 경로를 잡아주는 IDE로 개발을 한다면 필요없을지도 모르지만 cmd창 내부에서는 git에 대한 명령어를 &lt;em&gt;깔쌈&lt;/em&gt;하게 쓸수없기때문에 간편하게 만들어보았다.&lt;/h4&gt;

&lt;h4 id=&quot;추가로-git-bash-내부에서의-복사는-ctrlinsert-붙여넣기는-shiftinsert이다&quot;&gt;추가로 git bash 내부에서의 복사는 Ctrl+Insert, 붙여넣기는 Shift+Insert이다.&lt;/h4&gt;
</description>
        <pubDate>Fri, 01 Jan 2021 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2021/01/01/windowsAndgitbash/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2021/01/01/windowsAndgitbash/</guid>
        
        <category>Git</category>
        
        <category>Bash</category>
        
        <category>깃</category>
        
        
        <category>Git</category>
        
      </item>
    
      <item>
        <title>윈도우10에서 Git Bash 배경 투명하게</title>
        <description>&lt;h1 id=&quot;윈도우10에서-git-bash-배경-투명하게-설정하기&quot;&gt;윈도우10에서 Git Bash 배경 투명하게 설정하기&lt;/h1&gt;

&lt;h4 id=&quot;윈도우10에서-우리가-주로-하는것은-유튜브보기이다-인정하는가ㅋㅋㅋ&quot;&gt;윈도우10에서 우리가 주로 하는것은 유튜브…보기이다 인정하는가??ㅋㅋㅋ&lt;/h4&gt;

&lt;h5 id=&quot;그래서-착안한게-집에서-git-작업을-잠깐이나마-할때-또는-ide위에서-코드까지-보면서-작업하고싶은경우-꿀팁이다&quot;&gt;그래서 착안한게 집에서 git 작업을 잠깐이나마 할때 또는 IDE위에서 코드까지 보면서 작업하고싶은경우 꿀팁이다.&lt;/h5&gt;

&lt;h4 id=&quot;1git-bash를-실행한-후-배경화면에서-마우스오른쪽을-클릭하자&quot;&gt;1.git Bash를 실행한 후 배경화면에서 마우스오른쪽을 클릭하자.&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103430468-c778d900-4c07-11eb-8194-726965270abc.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h5 id=&quot;보이는-메뉴중에-options를-선택하고-바로-보이는-looks탭의-transparency투명도옵션을-high로-바꿔주고-apply-또는-save까지-눌러주자-그럼-git-bash-배경이-투명해질것이다&quot;&gt;보이는 메뉴중에 Options를 선택하고 바로 보이는 Looks탭의 Transparency(투명도)옵션을 High로 바꿔주고 apply 또는 save까지 눌러주자. 그럼 git bash 배경이 투명해질것이다!&lt;/h5&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103430471-cc3d8d00-4c07-11eb-8038-eda4e0a93746.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;2-자-이제-보고싶은-유튜브영상을-틀어주자나는-최대화까지했다&quot;&gt;2. 자 이제 보고싶은 유튜브영상을 틀어주자(나는 최대화까지했다)&lt;/h4&gt;

&lt;blockquote&gt;
  &lt;p&gt;워크맨의 네오플탐방을 틀었다..&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5 id=&quot;git-bash를-켜서-altenter로-최대화를-해주고-작업을-해주면된다다시-원래-창크기로-돌아오는것도-altenter&quot;&gt;git bash를 켜서 Alt+Enter로 최대화를 해주고 작업을 해주면된다(다시 원래 창크기로 돌아오는것도 Alt+Enter)&lt;/h5&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/103430482-e11a2080-4c07-11eb-8e40-e38f46390456.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;3-컨택트contact-시대가-아닌-언택트untact-시대에-걸맞게-재택근무가-늘어나는데-작업화면을-100-다-공유해야되는것이-아닌이상-이렇게-놀면서작업까지-동시에-해보는것은-어떨까&quot;&gt;3. 컨택트(Contact) 시대가 아닌 언택트(Untact) 시대에 걸맞게 재택근무가 늘어나는데 작업화면을 100% 다 공유해야되는것이 아닌이상 이렇게 놀면서+작업까지 동시에 해보는것은 어떨까?&lt;/h4&gt;

&lt;h2 id=&quot;끗&quot;&gt;끗!&lt;/h2&gt;
</description>
        <pubDate>Fri, 01 Jan 2021 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2021/01/01/gitbashBackground/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2021/01/01/gitbashBackground/</guid>
        
        <category>Git</category>
        
        <category>Bash</category>
        
        <category>깃</category>
        
        
        <category>Git</category>
        
      </item>
    
      <item>
        <title>스크래치 7강 - balloon pop</title>
        <description>&lt;h2 id=&quot;7강-풍선-터트리기-게임을-만들어볼거에요&quot;&gt;7강! 풍선 터트리기 게임을 만들어볼거에요&lt;/h2&gt;
&lt;h2 id=&quot;출처-이-강의들은-코드클럽sw교육기부단-자료를-토대로-재구성하였습니다&quot;&gt;출처-이 강의들은 코드클럽SW교육기부단 자료를 토대로 재구성하였습니다.&lt;/h2&gt;
&lt;h2 id=&quot;완성사진&quot;&gt;완성사진&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101196871-aa062d00-36a4-11eb-8b3d-99a71a57a0f6.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;조준도 랜덤, 풍선 움직임도 랜덤. 스페이스를 타이밍에 맞게 눌러주세요!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1 id=&quot;그림-크기가-너무-작아서-안보인다하시는분들은-그림에-마우스-우측클릭-새-탭에서-이미지-열기를-눌러주시거나-맨-밑에-코드-완성본이-있습니다&quot;&gt;그림 크기가 너무 작아서 안보인다하시는분들은 그림에 마우스 우측클릭-&amp;gt;새 탭에서 이미지 열기를 눌러주시거나 맨 밑에 코드 완성본이 있습니다.&lt;/h1&gt;

&lt;h4 id=&quot;스크래치를-켜줍니다-이번-강의부터는-조금더-빠르게-갈거에요&quot;&gt;스크래치를 켜줍니다! 이번 강의부터는 조금더 빠르게 갈거에요!!&lt;/h4&gt;
&lt;h4 id=&quot;안쓰는-고양이를-삭제하고-배경에서-night-city를-골라주고-스프라이트는-직접-그릴거에요&quot;&gt;안쓰는 고양이를 삭제하고, 배경에서 Night City를 골라주고, 스프라이트는 직접 그릴거에요!&lt;/h4&gt;
&lt;h4 id=&quot;스프라이트-그리기-그리기를-클릭하고-굵기는-25로해서-조준점모양을-자기마음대로-그려봐요-가운데--모양에-조준점을-맞춰주세요&quot;&gt;스프라이트 그리기-&amp;gt;그리기를 클릭하고 굵기는 25로해서 조준점모양을 자기마음대로 그려봐요. 가운데 + 모양에 조준점을 맞춰주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-맵에-너무-크게-나타났다싶으면-크기를-3060정도로-조절해서-바꿔주세요&quot;&gt;그리고 맵에 너무 크게 나타났다싶으면 크기를 30~60정도로 조절해서 바꿔주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101197153-13863b80-36a5-11eb-8a3a-f21928ff37c9.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101197158-15e89580-36a5-11eb-976f-bfb84f30c7f1.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;그리고-balloon-스프라이트를-추가해주세요&quot;&gt;그리고 balloon 스프라이트를 추가해주세요&lt;/h4&gt;
&lt;h4 id=&quot;추가로-복사를-해서-스프라이트가-총-3개가-되도록-만들어주세요-각각-풍선의-색을-바꿔주세요&quot;&gt;추가로 복사를 해서 스프라이트가 총 3개가 되도록 만들어주세요 각각 풍선의 색을 바꿔주세요!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101197597-ab842500-36a5-11eb-8542-5e90f2f5ccd3.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;변수-탭에가서-점수시간을-추가해주세요&quot;&gt;변수 탭에가서 점수,시간을 추가해주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-스프라이트1저희가-만든을-눌러서-클릭했을때-x0y0으로이동하기를-밑에-붙여주시고&quot;&gt;그리고 스프라이트1(저희가 만든)을 눌러서 클릭했을때-&amp;gt;x:0,y:0으(로)이동하기를 밑에 붙여주시고&lt;/h4&gt;
&lt;h4 id=&quot;점수를-0으로-정하기-시간을-15로-정하기-그리고-시간0까지-반복-1초-기다리고-시간을--1만큼-바꾸고-끝부분에-멈추기-모두-아시죠&quot;&gt;점수를 0으로 정하기, 시간을 15로 정하기. 그리고 시간=0까지 반복. 1초 기다리고 시간을 -1만큼 바꾸고 끝부분에 멈추기-모두! 아시죠?&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101197816-f56d0b00-36a5-11eb-8905-8dc5a419cfae.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그-옆에-클릭했을-때-블록을새로-만들어줘요&quot;&gt;그 옆에 클릭했을 때 블록을새로 만들어줘요&lt;/h4&gt;
&lt;h4 id=&quot;밑에-무한-반복하기-그-안에-동작-1초-동안-무작위-위치로-이동하기를-끌어서-두세요-그리고-시간을-1초에서-08초로-바꿔주세요&quot;&gt;밑에 무한 반복하기, 그 안에 동작-&amp;gt;1초 동안 무작위 위치로 이동하기를 끌어서 두세요. 그리고 시간을 1초에서 0.8초로 바꿔주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-실행해보세요-조준점이-계속-움직이나요&quot;&gt;그리고 실행해보세요. 조준점이 계속 움직이나요?&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101198042-35cc8900-36a6-11eb-80af-7e8bd0beb0e7.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그-옆에다가-또-만들어줄거에요-이벤트-스페이스를-눌렀을-때를-따로-새로운-블럭으로-끌어다-놓아주세요&quot;&gt;그 옆에다가 또 만들어줄거에요 이벤트-&amp;gt;스페이스를 눌렀을 때를 따로 새로운 블럭으로 끌어다 놓아주세요&lt;/h4&gt;
&lt;h4 id=&quot;그-밑에-만약-라면-블록을-두고-시간--0이라면을-만들어줍니다연산과-변수를-이용하면돼요&quot;&gt;그 밑에 만약 ~라면 블록을 두고 시간 &amp;gt; 0이라면을 만들어줍니다(연산과 변수를 이용하면돼요)&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101198263-89d76d80-36a6-11eb-9036-dba11ad4d952.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;시간0이라면-블록-안에-제어-만약라면을-3개-겹치지-않게-놓아주세요&quot;&gt;시간&amp;gt;0이라면 블록 안에 제어-&amp;gt;만약~라면을 3개 겹치지 않게 놓아주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-각각-ballono123에-닿았는가로-바꿔주세요감지&quot;&gt;그리고 각각 Ballono1/2/3에 닿았는가?로 바꿔주세요(감지)&lt;/h4&gt;
&lt;h4 id=&quot;풍선1에-닿았다면감지-점수를-5만큼-바꾸고변수-5점을-1초동안-말할거에요형태&quot;&gt;풍선1에 닿았다면(감지) 점수를 5만큼 바꾸고(변수), 5점!을 1초동안 말할거에요(형태)&lt;/h4&gt;
&lt;h4 id=&quot;같은-방법으로-풍선2에-닿았다면감지-점수를-10만큼-바꾸고변수-10점을-1초동안-말할거에요형태&quot;&gt;같은 방법으로 풍선2에 닿았다면(감지) 점수를 10만큼 바꾸고(변수), 10점!을 1초동안 말할거에요(형태)&lt;/h4&gt;
&lt;h4 id=&quot;같은-방법으로-풍선3에-닿았다면감지-점수를-15만큼-바꾸고변수-15점을-1초동안-말할거에요형태&quot;&gt;같은 방법으로 풍선3에 닿았다면(감지) 점수를 15만큼 바꾸고(변수), 15점!을 1초동안 말할거에요(형태)&lt;/h4&gt;
&lt;h4 id=&quot;추가로-각-풍선제어문의-중간-혹은-끝에-이벤트-메세지1보내기를-끌어서-넣어주고-새로운메세지를-만들어서-풍선1풍선2풍선3으로-바꿔주세요&quot;&gt;추가로 각 풍선제어문의 중간 혹은 끝에 이벤트-메세지1보내기를 끌어서 넣어주고 새로운메세지를 만들어서 풍선1,풍선2,풍선3으로 바꿔주세요!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101198660-26017480-36a7-11eb-96e0-e46f17fb15d7.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;자-이제-각-풍선마다-터뜨려졌을-때의-터진-모습을-추가해볼거에요-아시죠-모양에서-복사-누르고-복사본을-찢어주시면-됩니다&quot;&gt;자 이제 각 풍선마다 터뜨려졌을 때의 터진 모습을 추가해볼거에요. 아시죠? 모양에서 복사 누르고 복사본을 찢어(?)주시면 됩니다.&lt;/h4&gt;
&lt;h4 id=&quot;다른-색-풍선-3개-다-똑같이-만들어줄게요&quot;&gt;다른 색 풍선 3개 다 똑같이 만들어줄게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101198775-56491300-36a7-11eb-8d7c-9e16afde86fc.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101198779-58ab6d00-36a7-11eb-85e6-9daea7939480.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101198786-5b0dc700-36a7-11eb-8f1a-df88daae8a1c.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-다시-첫번째-풍선을-클릭하고-코드로-돌아와서-클릭했을-때를-끌어서-놓아주세요&quot;&gt;그리고 다시 첫번째 풍선을 클릭하고 코드로 돌아와서 클릭했을 때를 끌어서 놓아주세요&lt;/h4&gt;
&lt;h4 id=&quot;처음의-모양은-안터진-형태가-되어야겠죠-형태탭에서-모양을-balloon1-a로-바꾸기를-붙여주세요&quot;&gt;처음의 모양은 안터진 형태가 되어야겠죠? 형태탭에서 모양을 balloon1-a로 바꾸기를 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;형태-보이기를-그-다음에-붙여주시고-제어-무한반복하기-동작-1초동안-무작위-위치로-이동하기를-해주세요&quot;&gt;형태-보이기를 그 다음에 붙여주시고, 제어-무한반복하기, 동작-1초동안 무작위 위치로 이동하기를 해주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101198993-a1632600-36a7-11eb-8138-ff7a98ebfb38.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이벤트-풍선1-신호를-받았을때를-끌어서-옆의-블록으로-새로-만들어주세요&quot;&gt;이벤트-풍선1 신호를 받았을때를 끌어서 옆의 블록으로 새로 만들어주세요&lt;/h4&gt;
&lt;h4 id=&quot;터진-상황이니-형태에서-모양을-balloon1-a2로-바꾸기를-해주시고-펑을-1초동안-말하기-숨기기를-해주세요&quot;&gt;터진 상황이니 형태에서 모양을 balloon1-a2로 바꾸기를 해주시고, 펑!을 1초동안 말하기, 숨기기를 해주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101199129-d1122e00-36a7-11eb-8321-b8d569065732.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이것처럼-똑같이-풍선-2와-3도-만들어주세요&quot;&gt;이것처럼 똑같이 풍선 2와 3도 만들어주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101199184-e1c2a400-36a7-11eb-9dcb-521c0b612f8d.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101199212-e8511b80-36a7-11eb-83af-7a667d03222f.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;이제-게임-시작을-해서-클리어를-해볼까요-순전히-운빨일수도있지만-순발력도-있어야하는-게임이랍니다-15초-내에-풍선-3개를-다-터뜨릴수있을까요&quot;&gt;이제 게임 시작을 해서 클리어를 해볼까요? 순전히 운빨일수도있지만, 순발력도 있어야하는 게임이랍니다. 15초 내에 풍선 3개를 다 터뜨릴수있을까요!???&lt;/h3&gt;
&lt;h2 id=&quot;모두-고생많았어요-여기까지-마무리해볼게요-이-파일은-자기-컴퓨터에-저장해서-스크래치-홈페이지에-로그인하고-파일-올려서-자기만의-작업실에-업데이트하는거를-추천합니다&quot;&gt;모두 고생많았어요. 여기까지 마무리해볼게요!! 이 파일은 자기 컴퓨터에 저장해서 스크래치 홈페이지에 로그인하고 파일 올려서 자기만의 작업실에 업데이트하는거를 추천합니다!&lt;/h2&gt;
&lt;h2 id=&quot;코드-완성본&quot;&gt;코드 완성본&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101199448-3ebe5a00-36a8-11eb-840e-e424599aeb08.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101199460-4251e100-36a8-11eb-8b88-4f7e54f6db1e.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101199466-43830e00-36a8-11eb-86a9-8287d8395dee.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101199475-45e56800-36a8-11eb-8067-5d5765a924a6.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;영상입니다&quot;&gt;영상입니다.&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=Kc952ECLNsw&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/Kc952ECLNsw/0.jpg&quot; alt=&quot;유튜브&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 16 Nov 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/11/16/ballonpop/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/11/16/ballonpop/</guid>
        
        <category>스크래치</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title>스크래치 6강 - fallingballs</title>
        <description>&lt;h2 id=&quot;6강-공피하기-게임을-만들어볼거에요&quot;&gt;6강! 공피하기 게임을 만들어볼거에요&lt;/h2&gt;
&lt;h2 id=&quot;출처-이-강의들은-코드클럽sw교육기부단-자료를-토대로-재구성하였습니다&quot;&gt;출처-이 강의들은 코드클럽SW교육기부단 자료를 토대로 재구성하였습니다.&lt;/h2&gt;
&lt;h2 id=&quot;완성사진&quot;&gt;완성사진&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101172884-18d38e00-3685-11eb-91bd-84fd88caddfa.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;키보드로 하는 공피하기 게임을 만들어보겠습니다&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1 id=&quot;그림-크기가-너무-작아서-안보인다하시는분들은-그림에-마우스-우측클릭-새-탭에서-이미지-열기를-눌러주시거나-맨-밑에-코드-완성본이-있습니다&quot;&gt;그림 크기가 너무 작아서 안보인다하시는분들은 그림에 마우스 우측클릭-&amp;gt;새 탭에서 이미지 열기를 눌러주시거나 맨 밑에 코드 완성본이 있습니다.&lt;/h1&gt;

&lt;h2 id=&quot;약간-4강과-5강을-조합한-프로그램입니다&quot;&gt;약간 4강과 5강을 조합한 프로그램입니다!&lt;/h2&gt;
&lt;h4 id=&quot;스크래치를-켜줍니다-이번-강의부터는-조금더-빠르게-갈거에요&quot;&gt;스크래치를 켜줍니다! 이번 강의부터는 조금더 빠르게 갈거에요!!&lt;/h4&gt;
&lt;h4 id=&quot;안쓰는-고양이를-삭제하고-배경에서-beach-malibu을-골라주고-스프라이트고르기에서-crab을-선택했어요-그리고-crab의-크기를-40으로-바꿔줍니다&quot;&gt;안쓰는 고양이를 삭제하고, 배경에서 Beach Malibu을 골라주고, 스프라이트고르기에서 Crab을 선택했어요. 그리고 Crab의 크기를 40으로!! 바꿔줍니다.&lt;/h4&gt;
&lt;h4 id=&quot;시작은항상-이벤트-클릭했을때-그리고-그-밑에-동작-x-y로-이동하기를-선택하시고요&quot;&gt;시작은항상 이벤트-클릭했을때, 그리고 그 밑에 동작-x, y로 이동하기를 선택하시고요!&lt;/h4&gt;
&lt;h4 id=&quot;x는-0-y는--170으로-바꿔주고-실행해봅니다-꽃게가-맵의-중간-가장-아래로-이동했나요&quot;&gt;x는 0, y는 -170으로 바꿔주고 실행해봅니다. 꽃게가 맵의 중간, 가장 아래로 이동했나요?&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101173191-87b0e700-3685-11eb-9483-b274d1b563d4.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-이번에는-시간-변수말고-점수변수만-만들어줍니다-그리고-꽃게-시작했을때-밑에-점수를-0으로-정하기를-추가해주세요&quot;&gt;그리고 이번에는 시간 변수말고 점수변수만 만들어줍니다! 그리고 꽃게 시작했을때 밑에 점수를 0으로 정하기를 추가해주세요&lt;/h4&gt;
&lt;h4 id=&quot;상어게임을-만들었을때처럼-이벤트에서-스페이스를-눌렀을때를-끌어다-놓고-스페이스를-왼쪽-화살표-키를-눌렀을-때로-바꿔줄게요&quot;&gt;상어게임을 만들었을때처럼, 이벤트에서 스페이스를 눌렀을때를 끌어다 놓고, 스페이스를 왼쪽 화살표 키를 눌렀을 때로 바꿔줄게요&lt;/h4&gt;
&lt;h4 id=&quot;그-밑에-동작에서--10만큼-움직이기를-추가해주세요&quot;&gt;그 밑에 동작에서 -10만큼 움직이기를 추가해주세요.&lt;/h4&gt;
&lt;h4 id=&quot;꽃게는-좌우로밖에-이동못하죠-또-우측-화살표-키를-눌렀을-때-동작에서-10만큼-움직이기를-붙여주세요&quot;&gt;꽃게는 좌우로밖에 이동못하죠? 또 우측 화살표 키를 눌렀을 때, 동작에서 10만큼 움직이기를 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;추가로-스페이스를-눌렀을때도-만들어줄거에요-스페이스를-눌렀을때는-x-200부터-200사이의-난수-y-170으로-이동하기를-해주세요&quot;&gt;추가로! 스페이스를 눌렀을때도 만들어줄거에요. 스페이스를 눌렀을때는 x:-200부터 200사이의 난수, y:-170으로 이동하기를 해주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101173867-7a482c80-3686-11eb-9734-bf47b876daf5.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;5강처럼-line스프라이트도-추가해주세요-그리고-line-스프라이트를-클릭해서-작성해줍니다&quot;&gt;5강처럼 Line스프라이트도 추가해주세요. 그리고 Line 스프라이트를 클릭해서 작성해줍니다.&lt;/h4&gt;
&lt;h4 id=&quot;클릭했을-때-x0-y-180으로-이동하기&quot;&gt;클릭했을 때 x:0, y:-180으로 이동하기!&lt;/h4&gt;
&lt;h4 id=&quot;line이-맵-맨-아래로-이동한것을-체크하셨나요&quot;&gt;Line이 맵 맨 아래로 이동한것을 체크하셨나요?&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101174112-c4311280-3686-11eb-9c85-441d0b5a6c54.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;이제-추가-스프라이트로-노란색-ball을-추가해주세요-그리고-크기를-60으로-바꿔주세요&quot;&gt;이제 추가 스프라이트로 노란색 Ball을 추가해주세요. 그리고 크기를 60으로!! 바꿔주세요.&lt;/h4&gt;
&lt;h4 id=&quot;클릭했을때-x-230부터-230사이의-난수-y170으로-이동하기로-해주세요&quot;&gt;클릭했을때 x:-230부터 230사이의 난수, y:170(으)로 이동하기로 해주세요&lt;/h4&gt;
&lt;h4 id=&quot;그-밑에-무한-반복하기&quot;&gt;그 밑에 무한 반복하기&lt;/h4&gt;
&lt;h4 id=&quot;무한반복하기-안에-동작-y좌표를-10만큼-바꾸기를-끌어서-y좌표를--5만큼-바꾸기로-숫자를-바꿔주세요정하기가-아니라-바꾸기에요&quot;&gt;무한반복하기 안에 동작-y좌표를 10만큼 바꾸기를 끌어서 y좌표를 -5만큼 바꾸기로 숫자를 바꿔주세요(정하기가 아니라 바꾸기에요)&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101174476-4588a500-3687-11eb-8c75-c614f7c54bf7.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-무한-반복하기-안에-제어-만약-라면을-5개를-놓아주세요-겹치지않게요&quot;&gt;그리고 무한 반복하기 안에 제어-만약 ~라면을 5개를 놓아주세요! 겹치지않게요&lt;/h4&gt;
&lt;h4 id=&quot;첫번째-제어문에는-감지-line에-닿았는가로-바꿔주시고-닿았다면-점수를-1만큼-바꾸기-그리고-x-230230사이의-난수-y170으로-이동하기를-해주세요&quot;&gt;첫번째 제어문에는 감지-Line에 닿았는가로 바꿔주시고, 닿았다면 점수를 1만큼 바꾸기. 그리고 x:-230~230사이의 난수 y:170으로 이동하기를 해주세요&lt;/h4&gt;
&lt;h4 id=&quot;두번째-제어문에는-점수5이라면-y좌표를--1만큼-바꾸기-세번째-제어문에는-점수15이라면-y좌표를--1만큼-바꾸기&quot;&gt;두번째 제어문에는 점수&amp;gt;5이라면 y좌표를 -1만큼 바꾸기. 세번째 제어문에는 점수&amp;gt;15이라면 y좌표를 -1만큼 바꾸기&lt;/h4&gt;
&lt;h4 id=&quot;네번째-제어문에서는-점수25이라면-y좌표를--3만큼-바꾸기-마지막-제어문에는-감지에서-crab에-닿았다면-제어-멈추기-모두를-해주세요&quot;&gt;네번째 제어문에서는 점수&amp;gt;25이라면 y좌표를 -3만큼 바꾸기. 마지막 제어문에는 감지에서 Crab에 닿았다면 제어-멈추기 모두를 해주세요!!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101174950-e2e3d900-3687-11eb-92f1-6e142c411f78.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;이제-ball을-총-4개까지-만들어볼거에요-어떻게했죠-스프라이트에서-마우스-오른쪽키에서-복사를-해주세요-ball4까지-만들어질때까지-계속-복사해주세요&quot;&gt;이제 Ball을 총 4개까지 만들어볼거에요. 어떻게했죠? 스프라이트에서 마우스 오른쪽키에서 복사를 해주세요. Ball4까지 만들어질때까지 계속 복사해주세요.&lt;/h4&gt;
&lt;h4 id=&quot;바꿔줄-부분이있습니다-ball2에서는-무한-반복하기-위에-제어-05초-기다리기-ball3에서는-무한-반복하기-위에-제어-1초-기다리기를-추가해주세요&quot;&gt;바꿔줄 부분이있습니다! Ball2에서는 무한 반복하기 위에 제어-0.5초 기다리기, Ball3에서는 무한 반복하기 위에 제어-1초 기다리기를 추가해주세요.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101175294-5554b900-3688-11eb-8fbe-3e55837de2cb.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101175302-57b71300-3688-11eb-9a37-03f8e3d4b14c.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101175327-61407b00-3688-11eb-92c8-bfa811618eea.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;ball4를-클릭해주고-모양으로-가서-노란색-공이-아닌-자기가-원하는-색의-공으로-바꿔주세요-그리고-다시-코드탭으로-돌아옵니다&quot;&gt;Ball4를 클릭해주고 모양으로 가서 노란색 공이 아닌 자기가 원하는 색의 공으로 바꿔주세요!! 그리고 다시 코드탭으로 돌아옵니다.&lt;/h4&gt;
&lt;h4 id=&quot;제대로-복사를-했다면-ball4에는-x초-기다리기가-없을거에요-이건-건들지마시고-무한-반복하기-안에서-점수5-점수15-점수25-제어문-3개를-없애주세요&quot;&gt;제대로 복사를 했다면 Ball4에는 x초 기다리기가 없을거에요. 이건 건들지마시고, 무한 반복하기 안에서 점수&amp;gt;5, 점수&amp;gt;15, 점수&amp;gt;25 제어문 3개를 없애주세요.&lt;/h4&gt;
&lt;h4 id=&quot;마지막-crab에-닿았는가에서-멈추기-모두를-없애주시고-점수를-1부터-5사이의-난수로-바꾸기-그리고-x-230230까지-난수-y170으로-이동하기를-해주세요&quot;&gt;마지막 Crab에 닿았는가?에서 멈추기-모두를 없애주시고 점수를 1부터 5사이의 난수로 바꾸기. 그리고 x:-230~230까지 난수, y:170(으)로 이동하기를 해주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101175735-de6bf000-3688-11eb-93e3-cf8992525b04.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h3 id=&quot;이제-게임-시작을-해서-친구와-점수경쟁을-해보세요-키보드-좌우키로-노란공은-피하고-다른색깔저의경우는-초록색공은-먹어주면서-위험한-상황에는-스페이스키를-눌러서-임의의곳으로-탈출하는-거에요&quot;&gt;이제 게임 시작을 해서 친구와 점수경쟁을 해보세요! 키보드 좌우키로 노란공은 피하고, 다른색깔(저의경우는 초록색)공은 먹어주면서 위험한 상황에는 스페이스키를 눌러서 임의의곳으로 탈출하는 거에요&lt;/h3&gt;

&lt;h2 id=&quot;모두-고생많았어요-여기까지-마무리해볼게요-이-파일은-자기-컴퓨터에-저장해서-스크래치-홈페이지에-로그인하고-파일-올려서-자기만의-작업실에-업데이트하는거를-추천합니다&quot;&gt;모두 고생많았어요. 여기까지 마무리해볼게요!! 이 파일은 자기 컴퓨터에 저장해서 스크래치 홈페이지에 로그인하고 파일 올려서 자기만의 작업실에 업데이트하는거를 추천합니다!&lt;/h2&gt;
&lt;h2 id=&quot;코드-완성본&quot;&gt;코드 완성본&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101175993-386cb580-3689-11eb-897c-8e1877196863.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101176001-3b67a600-3689-11eb-93e9-556b6100d440.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101176013-3dca0000-3689-11eb-8e6c-d6b4b887cf48.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101176020-402c5a00-3689-11eb-9eb9-b78e962ae873.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101176028-41f61d80-3689-11eb-9cde-6056fdbc5497.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101176033-44587780-3689-11eb-8a14-e2643f36092b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;영상입니다&quot;&gt;영상입니다.&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=ANFMR28VgRk&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/ANFMR28VgRk/0.jpg&quot; alt=&quot;유튜브&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 09 Nov 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/11/09/fallingballs/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/11/09/fallingballs/</guid>
        
        <category>스크래치</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title>스크래치 5강 - boundingballs</title>
        <description>&lt;h2 id=&quot;5강-공튀기기-게임을-만들어볼거에요&quot;&gt;5강! 공튀기기 게임을 만들어볼거에요&lt;/h2&gt;
&lt;h2 id=&quot;출처-이-강의들은-코드클럽sw교육기부단-자료를-토대로-재구성하였습니다&quot;&gt;출처-이 강의들은 코드클럽SW교육기부단 자료를 토대로 재구성하였습니다.&lt;/h2&gt;
&lt;h2 id=&quot;완성사진&quot;&gt;완성사진&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101164599-98a72b80-3678-11eb-9af2-914ce650b3db.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;마우스로 하는 공 튀기기 게임을 만들어볼거에요!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1 id=&quot;그림-크기가-너무-작아서-안보인다하시는분들은-그림에-마우스-우측클릭-새-탭에서-이미지-열기를-눌러주시거나-맨-밑에-코드-완성본이-있습니다&quot;&gt;그림 크기가 너무 작아서 안보인다하시는분들은 그림에 마우스 우측클릭-&amp;gt;새 탭에서 이미지 열기를 눌러주시거나 맨 밑에 코드 완성본이 있습니다.&lt;/h1&gt;

&lt;h4 id=&quot;스크래치를-켜줍니다-이번-강의부터는-조금더-빠르게-갈거에요&quot;&gt;스크래치를 켜줍니다! 이번 강의부터는 조금더 빠르게 갈거에요!!&lt;/h4&gt;
&lt;h4 id=&quot;안쓰는-고양이를-삭제하고-배경에서-neon-tunnel을-골라주고-스프라이트고르기에서-button2를-선택했어요-그리고-버튼-크기를-80으로-바꿔줍니다&quot;&gt;안쓰는 고양이를 삭제하고, 배경에서 Neon Tunnel을 골라주고, 스프라이트고르기에서 Button2를 선택했어요. 그리고 버튼 크기를 80으로 바꿔줍니다.&lt;/h4&gt;
&lt;h4 id=&quot;시작은항상-이벤트-클릭했을때-그리고-그-밑에-무한-반복하기를-놓고-그-안에-동작-x-y로-이동하기를-선택하시고요&quot;&gt;시작은항상 이벤트-클릭했을때, 그리고 그 밑에 무한 반복하기를 놓고, 그 안에 동작-x, y로 이동하기를 선택하시고요!&lt;/h4&gt;
&lt;h4 id=&quot;x는-감지에-있는-마우스의x좌표-y는--150으로-바꿔주고-실행해봅니다-버튼이-가장-밑쪽에서-마우스를-계속-따라다니죠&quot;&gt;x는 감지에 있는 마우스의x좌표, y는 -150으로 바꿔주고 실행해봅니다. 버튼이 가장 밑쪽에서 마우스를 계속 따라다니죠!???&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101163463-f9356900-3676-11eb-8429-ffdb2135b426.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;그리고-스프라이트-추가에서-line을-검색해서-추가해줍니다-line스프라이트를-클릭하고-클릭했을때-x0-y-180으로-이동하기를-밑에-붙여주세요&quot;&gt;그리고 스프라이트 추가에서 Line을 검색해서 추가해줍니다. Line스프라이트를 클릭하고 클릭했을때, x:0, y:-180(으)로 이동하기를 밑에 붙여주세요.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101163544-15390a80-3677-11eb-9041-841a035ea4e3.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;변수에서-점수시간이라는-2개-변수를-추가해주세요&quot;&gt;변수에서 점수,시간이라는 2개 변수를 추가해주세요.&lt;/h4&gt;
&lt;h4 id=&quot;그리고-어느-스프라이트든-상관없어요-전-button2에다-만들게요&quot;&gt;그리고 어느 스프라이트든 상관없어요. 전 Button2에다 만들게요.&lt;/h4&gt;
&lt;h4 id=&quot;클릭했을-때를-새로-만들어주고-점수는-0-시간은-15로-정하기&quot;&gt;클릭했을 때를 새로 만들어주고, 점수는 0, 시간은 15로 정하기.&lt;/h4&gt;
&lt;h4 id=&quot;시간0까지-반복하기-1초-기다리기-시간을--1만큼-바꾸기-맨-밑은-멈추기-모두-이정도는-이제-할줄알겠죠&quot;&gt;시간=0까지 반복하기, 1초 기다리기, 시간을 -1만큼 바꾸기. 맨 밑은 멈추기 모두!! 이정도는 이제 할줄알겠죠?&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101164062-ea9b8180-3677-11eb-986d-0685bb79026d.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;스프라이트-고르기에서-ball이라는-노란색-공을-추가해주세요&quot;&gt;스프라이트 고르기에서 Ball이라는 노란색 공을 추가해주세요.&lt;/h4&gt;
&lt;h4 id=&quot;클릭했을-때-x0-y0으로-이동하기-그리고-밑에-동작-90도-방향보기를-끌어서-90도-방향을--45부터-45까지의-난수로-바꿔주세요&quot;&gt;클릭했을 때, x:0 y:0으로 이동하기. 그리고 밑에 동작-90도 방향보기를 끌어서. 90도 방향을 -45부터 45까지의 난수로 바꿔주세요.&lt;/h4&gt;
&lt;h4 id=&quot;그-밑에-무한-반복하기-안쪽에-동작-20만큼-움직이기-벽에-닿으면-튕기기-이렇게까지-하고-실행해볼게요&quot;&gt;그 밑에 무한 반복하기, 안쪽에 동작-20만큼 움직이기. 벽에 닿으면 튕기기 이렇게까지 하고 실행해볼게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101164781-eb80e300-3678-11eb-8a86-afc06bd4a61e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;밑에-만약-라면을-2개-추가해주세요-하나는-button2에-닿았을때-나머지-하나는-line에-닿았을때-처리해줄거에요&quot;&gt;밑에 만약 ~라면을 2개 추가해주세요. 하나는 Button2에 닿았을때, 나머지 하나는 Line에 닿았을때 처리해줄거에요.&lt;/h4&gt;
&lt;h4 id=&quot;감지-마우스포인터에-닿았는가를-끌어서-위에쪽은-button2-밑은-line에-닿았을-때로-바꿔주세요&quot;&gt;감지-마우스포인터에 닿았는가?를 끌어서 위에쪽은 Button2, 밑은 Line에 닿았을 때로 바꿔주세요.&lt;/h4&gt;
&lt;h4 id=&quot;노란공에-닿으면-점수를-1올려주고정하기가-아니라-바꾸기에요--60부터-60까지의-난수-도-방향-바라보기를-해주세요-클릭했을때-밑의-두번째-블록이랑-똑같이-하면됩니다&quot;&gt;노란공에 닿으면 점수를 1올려주고(정하기가 아니라 바꾸기에요), -60부터 60까지의 난수 도 방향 바라보기를 해주세요. 클릭했을때 밑의 두번째 블록이랑 똑같이 하면됩니다.&lt;/h4&gt;
&lt;h4 id=&quot;실행해서-button에-닿으면-튕기고-점수가-1점-올라가는지-테스트해보세요&quot;&gt;실행해서 Button에 닿으면 튕기고 점수가 1점 올라가는지 테스트해보세요!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101165304-c640a480-3679-11eb-93b9-df4ef1b45e83.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이젠-line에-닿았을때를-처리해줄거에요-line에-닿았다면-점수를--2만큼-바꾸기를-하고-제어-1초기다리기를-03초-기다리기로-바꿔주세요&quot;&gt;이젠 Line에 닿았을때를 처리해줄거에요. Line에 닿았다면, 점수를 -2만큼 바꾸기를 하고, 제어-1초기다리기를 0.3초 기다리기로 바꿔주세요.&lt;/h4&gt;
&lt;h4 id=&quot;그리고-처음의-위치인-x0-y0로-이동시키고-맨-위처럼--45부터-45사이의-난수도-방향보기를-해주세요-실행해서-테스트를-해볼까요&quot;&gt;그리고 처음의 위치인 x:0, y:0로 이동시키고 맨 위처럼 -45부터 45사이의 난수도 방향보기를 해주세요! 실행해서 테스트를 해볼까요?&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101165655-5e3e8e00-367a-11eb-9951-d65d09d86fb2.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그럼-이제-공-2개를-더-추가해볼거에요-어떻게했죠-스프라이트-마우스-오른쪽-키-복사를-2번해주세요&quot;&gt;그럼 이제 공 2개를 더 추가해볼거에요! 어떻게했죠? 스프라이트 마우스 오른쪽 키-&amp;gt;복사를 2번해주세요.&lt;/h4&gt;
&lt;h4 id=&quot;그리고-ball2-ball3을-모양에-가서-노란색이-아닌-각각-다른색으로-바꿔주세요-전-두번째는-파란색-세번째는-분홍색-공으로-바꿨어요&quot;&gt;그리고 Ball2, Ball3을 모양에 가서 노란색이 아닌 각각 다른색으로 바꿔주세요. 전 두번째는 파란색, 세번째는 분홍색 공으로 바꿨어요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101165772-91811d00-367a-11eb-8b2f-405ac97044bb.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;각-공이-다-똑같이-움직이면-재미없겠죠-ball2파란색-공을-클릭해서-무한반복하기-밑에-20만큼-움직이기를-10만큼-움직이기로-바꿔주세요&quot;&gt;각 공이 다 똑같이 움직이면 재미없겠죠? Ball2(파란색 공)을 클릭해서 무한반복하기 밑에 20만큼 움직이기를 10만큼 움직이기로 바꿔주세요.&lt;/h4&gt;
&lt;h4 id=&quot;그리고-button2에-닿았을때-점수를-1점이-아닌--2점으로-바꿔줄게요-그리고-line에-닿았을때는-점수를--2가-아닌-1로-바꿔줄게요-한마디로-파란색-공은-피하라는-거죠&quot;&gt;그리고 Button2에 닿았을때 점수를 1점이 아닌 -2점으로 바꿔줄게요. 그리고 Line에 닿았을때는 점수를 -2가 아닌 1로 바꿔줄게요. 한마디로 파란색 공은 피하라는 거죠!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101166147-28e67000-367b-11eb-9b04-4ee90af9e08b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;마지막-분홍색-공은-시간을-바꿔주는-공이에요-가장-느린-5만큼-움직이기로-바꿔주시고-button2에-닿으면-점수가-아닌-시간을-1로-바꾸기로-해주세요&quot;&gt;마지막 분홍색 공은 시간을 바꿔주는 공이에요. 가장 느린 5만큼 움직이기로 바꿔주시고, Button2에 닿으면 점수가 아닌 시간을 1로 바꾸기로 해주세요.&lt;/h4&gt;
&lt;h4 id=&quot;그리고-line에-닿으면-점수가-아닌-시간을--1로-바꿔주세요&quot;&gt;그리고 Line에 닿으면 점수가 아닌 시간을 -1로 바꿔주세요!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101166322-7367ec80-367b-11eb-86f0-e01b5cb53707.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;추가로-해야될게-있어요-line즉-땅에-닿으면-공이-뭔가-어색하죠-그래서-부딪혀서-깨지는-모양을-만들어줄게요&quot;&gt;추가로 해야될게 있어요. Line즉 땅에 닿으면 공이 뭔가 어색하죠? 그래서 부딪혀서 깨지는 모양을 만들어줄게요&lt;/h4&gt;
&lt;h4 id=&quot;각각-공을-클릭하고-모양을-눌러서-그-공-색이-아닌-나머지-밑에-다른색들은-휴지통-버튼을-눌러서-없애주세요-이렇게요&quot;&gt;각각 공을 클릭하고 모양을 눌러서 그 공 색이 아닌 나머지 밑에 다른색들은 휴지통 버튼을 눌러서 없애주세요!! 이렇게요!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101166539-c8a3fe00-367b-11eb-9bda-b09f2ab38a36.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101166548-ccd01b80-367b-11eb-8e80-cffe8d94ce73.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101166557-cf327580-367b-11eb-9aa3-86a89e856651.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-모양에서-왼쪽-위에-공에서-마우스-오른쪽을-눌러서-복사를-해주세요-같은색으로-된-공이-2개가-생길거에요&quot;&gt;그리고 모양에서 왼쪽 위에 공에서 마우스 오른쪽을 눌러서 복사를 해주세요! 같은색으로 된 공이 2개가 생길거에요.&lt;/h4&gt;
&lt;h4 id=&quot;나머지-파란색과-분홍색-공에도-똑같이-만들어주세요&quot;&gt;나머지 파란색과 분홍색 공에도 똑같이 만들어주세요.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101166816-3ea86500-367c-11eb-8102-def7117d9b88.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101166822-410abf00-367c-11eb-925a-e86f8be41aff.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101166872-554ebc00-367c-11eb-8861-bc172a91985d.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101166877-57b11600-367c-11eb-9ce2-c28edf16819f.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;ball노란색-공을-클릭해보면-ball-a는-처음-모양이고-ball-a2가-부딪혔을때-모양이-될거에요-꼭-이거-알아주시고-a2를-눌러주세요&quot;&gt;Ball(노란색 공)을 클릭해보면 ball-a는 처음 모양이고 ball-a2가 부딪혔을때 모양이 될거에요. 꼭! 이거 알아주시고 a2를 눌러주세요.&lt;/h4&gt;
&lt;h4 id=&quot;그리고-처음에-swim-할때처럼-찢어-줄거에요-가운데-비트맵으로-바꾸기를-눌러주시고-저기-우측맨아래-네모를-클릭해주세요&quot;&gt;그리고 처음에 swim 할때처럼 찢어(?) 줄거에요. 가운데 비트맵으로 바꾸기를 눌러주시고 저기 우측맨아래 네모를 클릭해주세요&lt;/h4&gt;
&lt;h4 id=&quot;영역-드래그를-해서-따로따로-분해해주면-끝&quot;&gt;영역 드래그를 해서 따로따로 분해해주면 끝!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101167078-b5ddf900-367c-11eb-8368-441c69d6e4e2.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101167088-b8d8e980-367c-11eb-8d74-9bf1a6c8ea5a.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101167133-cdb57d00-367c-11eb-8335-5dace9ca0a82.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;나머지-ball2와-ball3에서도-ball-b2와-ball-c2가-잘-선택되었나-확인하고-똑같이-찢어주세요&quot;&gt;나머지 Ball2와 Ball3에서도 ball-b2와 ball-c2가 잘 선택되었나 확인하고! 똑같이 찢어(?)주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101167299-0a817400-367d-11eb-8633-9eacec0645c4.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;자-실행해보면-ㅋㅋ-부서진채로-계속-공이-튀길거에요-이현상을-고쳐주기위해-코딩을-몇개-더해줘야해요&quot;&gt;자, 실행해보면..? ㅋㅋ 부서진채로 계속 공이 튀길거에요. 이현상을 고쳐주기위해 코딩을 몇개 더해줘야해요.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101167445-3b61a900-367d-11eb-8a1e-d7e6400542b5.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;똑똑한분들은-아-어떻게-해야겠다하고-감이-오실거에요-코드탭을-눌러주세요&quot;&gt;똑똑한분들은 아 어떻게 해야겠다!하고 감이 오실거에요. 코드탭을 눌러주세요.&lt;/h4&gt;
&lt;h4 id=&quot;일단-노란색-공을-클릭하고-무한-반복하기-이전에-클릭하기-밑에-형태-모양을-ball-a로-바꾸기를-추가해주세요&quot;&gt;일단 노란색 공을 클릭하고 무한 반복하기 이전에 클릭하기 밑에 형태-모양을 ball-a로 바꾸기를 추가해주세요.&lt;/h4&gt;
&lt;h4 id=&quot;그리고-line에-닿았는가-밑에-형태-모양을-ball-a2로-바꾸기를-추가해주세요&quot;&gt;그리고 Line에 닿았는가? 밑에 형태-모양을 ball-a2로 바꾸기를 추가해주세요.&lt;/h4&gt;
&lt;h4 id=&quot;또-다시-원래-모양으로-돌려줘야겠죠-맨-밑에-모양을-ball-a로-바꾸기를-추가해주세요-이렇게요&quot;&gt;또 다시 원래 모양으로 돌려줘야겠죠? 맨 밑에 모양을 ball-a로 바꾸기를 추가해주세요! 이렇게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101167893-f0946100-367d-11eb-9bf9-fb78eda7fc5b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;파란색-공과-분홍색-공도-똑같이-바꿔주세요&quot;&gt;파란색 공과 분홍색 공도 똑같이 바꿔주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101168016-25081d00-367e-11eb-9d22-dad5aa55cb91.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101168022-28030d80-367e-11eb-9de5-df2840753f47.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이제-bgm같은거를-추가해서-게임을-즐겨보세요&quot;&gt;이제 bgm같은거를 추가해서 게임을 즐겨보세요!&lt;/h4&gt;

&lt;h2 id=&quot;모두-고생많았어요-여기까지-마무리해볼게요-이-파일은-자기-컴퓨터에-저장해서-스크래치-홈페이지에-로그인하고-파일-올려서-자기만의-작업실에-업데이트하는거를-추천합니다&quot;&gt;모두 고생많았어요. 여기까지 마무리해볼게요!! 이 파일은 자기 컴퓨터에 저장해서 스크래치 홈페이지에 로그인하고 파일 올려서 자기만의 작업실에 업데이트하는거를 추천합니다!&lt;/h2&gt;
&lt;h2 id=&quot;코드-완성본&quot;&gt;코드 완성본&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101168239-7b755b80-367e-11eb-8817-86cfb535566e.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101168254-829c6980-367e-11eb-9679-f9f34f7b7f1d.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101168269-89c37780-367e-11eb-82db-ef1ba80a164f.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101168286-91831c00-367e-11eb-81af-78a744f0b042.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101168301-9778fd00-367e-11eb-8211-792e9f6ae3a0.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;영상입니다&quot;&gt;영상입니다.&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=a-mo-ws7AEI&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/a-mo-ws7AEI/0.jpg&quot; alt=&quot;유튜브&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 02 Nov 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/11/02/boundingballs/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/11/02/boundingballs/</guid>
        
        <category>스크래치</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title>스크래치 4강 - shark</title>
        <description>&lt;h2 id=&quot;4강-물고기-잡아먹는-상어게임을-만들어볼거에요&quot;&gt;4강! 물고기 잡아먹는 상어게임을 만들어볼거에요&lt;/h2&gt;
&lt;h2 id=&quot;출처-이-강의들은-코드클럽sw교육기부단-자료를-토대로-재구성하였습니다&quot;&gt;출처-이 강의들은 코드클럽SW교육기부단 자료를 토대로 재구성하였습니다.&lt;/h2&gt;
&lt;h2 id=&quot;완성사진&quot;&gt;완성사진&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101119653-25c59280-362f-11eb-9a09-484c6d6995ff.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;키보드를 이용해 물고기를 잡아먹는 상어를 만들어봅시다&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1 id=&quot;그림-크기가-너무-작아서-안보인다하시는분들은-그림에-마우스-우측클릭-새-탭에서-이미지-열기를-눌러주시거나-맨-밑에-코드-완성본이-있습니다&quot;&gt;그림 크기가 너무 작아서 안보인다하시는분들은 그림에 마우스 우측클릭-&amp;gt;새 탭에서 이미지 열기를 눌러주시거나 맨 밑에 코드 완성본이 있습니다.&lt;/h1&gt;

&lt;h4 id=&quot;스크래치를-켜줍니다-이번-강의부터는-조금더-빠르게-갈거에요&quot;&gt;스크래치를 켜줍니다! 이번 강의부터는 조금더 빠르게 갈거에요!!&lt;/h4&gt;
&lt;h4 id=&quot;안쓰는-고양이를-삭제하고-배경에서-underwater2를-골라주고-스프라이트고르기에서-shark2를-선택했어요&quot;&gt;안쓰는 고양이를 삭제하고, 배경에서 underwater2를 골라주고, 스프라이트고르기에서 shark2를 선택했어요.&lt;/h4&gt;
&lt;h4 id=&quot;시작은항상-이벤트-클릭했을때-그리고-그-밑에-동작-x0y0으로-이동하기를-붙여주세요&quot;&gt;시작은항상 이벤트-클릭했을때, 그리고 그 밑에 동작-x:0,y:0(으)로 이동하기를 붙여주세요.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101119691-3b3abc80-362f-11eb-9181-378aab23df85.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101119703-3fff7080-362f-11eb-9b9d-af934411d9ad.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;이벤트에-스페이스-키를-눌렀을때-를-끌어서-밑에-붙이지말고-빈-곳으로-끌어줍니다&quot;&gt;이벤트에 스페이스 키를 눌렀을때 를 끌어서 밑에 붙이지말고 빈 곳으로 끌어줍니다.&lt;/h4&gt;
&lt;h4 id=&quot;그리고-스페이스를-왼쪽-화살표-키를-눌렀을-때로-바꿔주고-동작에서--90도-방향보기-15만큼-움직이기&quot;&gt;그리고 스페이스를 왼쪽 화살표 키를 눌렀을 때로 바꿔주고 동작에서 -90도 방향보기, 15만큼 움직이기&lt;/h4&gt;
&lt;h4 id=&quot;추가로-이-블럭을-클릭하고-ctrlc-ctrlv를-누른다음복사붙여넣기&quot;&gt;추가로 이 블럭을 클릭하고 Ctrl+C, Ctrl+V를 누른다음(복사,붙여넣기)….&lt;/h4&gt;
&lt;h4 id=&quot;오른쪽-화살표-키를-눌렀을때-90도-방향보기로-바꿔주세요&quot;&gt;오른쪽 화살표 키를 눌렀을때, 90도 방향보기로 바꿔주세요.&lt;/h4&gt;
&lt;h4 id=&quot;왼쪽방향키를-눌렀을때-상어가-이상하게-갈거에요-이거를-방지해주기위해서-x0y0으로-이동하기-밑에-동작-회전방식을-왼쪽-오른쪽으로-정하기를-붙여주세요&quot;&gt;왼쪽방향키를 눌렀을때 상어가 이상하게 갈거에요. 이거를 방지해주기위해서, x:0,y:0으로 이동하기 밑에 동작-회전방식을 왼쪽-오른쪽으로 정하기를 붙여주세요.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101132000-9083c780-3649-11eb-88f2-d69b0cab3a61.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;테스트는 깃발을 안누르고도 가능합니다. 방향키만 눌러서 상어움직임을 테스트해봐요!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;추가로-위쪽화살표키를-눌렀을때는-y좌표를-15만큼-바꾸기를-하시고-아래쪽-방향키를-눌렀을때는-y좌표를--15만큼-바꾸기를-해주세요&quot;&gt;추가로 위쪽화살표키를 눌렀을때는 y좌표를 15만큼 바꾸기를 하시고, 아래쪽 방향키를 눌렀을때는 y좌표를 -15만큼 바꾸기를 해주세요&lt;/h4&gt;
&lt;h4 id=&quot;여기까지-완성본&quot;&gt;여기까지 완성본&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101134325-8a8fe580-364d-11eb-8f51-99664fe2d1ae.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;이제는-시간변수를-만들어볼거에요-변수에서-시간변수를-만들어주시고-클릭했을때를-끌어서-새로-다른블럭을-만들어주세요&quot;&gt;이제는 시간변수를 만들어볼거에요. 변수에서 시간변수를 만들어주시고, 클릭했을때를 끌어서 새로 다른블럭을 만들어주세요&lt;/h4&gt;
&lt;h4 id=&quot;처음에-시간을-15로-정하고-시간이-0이될때까지-반복하고-1초-기다리고-시간을--1만큼-바꿔주기를-하고-반복이-끝나면-멈추기-모두를-할거에요&quot;&gt;처음에 시간을 15로 정하고, 시간이 0이될때까지 반복하고, 1초 기다리고 시간을 -1만큼 바꿔주기를 하고 반복이 끝나면 멈추기-모두를 할거에요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101135487-384fc400-364f-11eb-925c-16ecdacb33d5.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;추가로-점수라는-변수도-미리-만들어주세요&quot;&gt;추가로 점수라는 변수도 미리 만들어주세요!@!@&lt;/h4&gt;
&lt;h4 id=&quot;그리고-1강에서-했던것처럼-소리eggs를-무한반복하기-안에다-넣어줘서-끝까지-재생하기로-하고-새로운-블럭으로-만들어주세요&quot;&gt;그리고 1강에서 했던것처럼 소리Eggs를 무한반복하기 안에다 넣어줘서 끝까지 재생하기로 하고 새로운 블럭으로 만들어주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101135591-5f0dfa80-364f-11eb-8d80-f0a8ec81f47f.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이제-스프라이트-고르기에서-fish를-검색해서-추가해주세요-그리고-fish를-클릭해서-코드를-만들어볼거에요&quot;&gt;이제 스프라이트 고르기에서 Fish를 검색해서 추가해주세요. 그리고 Fish를 클릭해서 코드를 만들어볼거에요&lt;/h4&gt;
&lt;h4 id=&quot;이벤트-클릭했을-때를-끌어다-놓아주시고-형태-보이기를-밑에-붙여주세요&quot;&gt;이벤트-클릭했을 때를 끌어다 놓아주시고, 형태-보이기를 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-상어처럼-동작-회전-방식을-왼쪽-오른쪽으로-정하기를-밑에-붙여주세요&quot;&gt;그리고 상어처럼 동작-회전 방식을 왼쪽-오른쪽(으)로 정하기를 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;그-밑에-제어-무한-반복하기를-붙여주세요&quot;&gt;그 밑에 제어-무한 반복하기를 붙여주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101135958-ef4c3f80-364f-11eb-9186-1bf385f8da3e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이제부터-무한-반복하기-안에-들어갈-내용들이에요&quot;&gt;이제부터 무한 반복하기 안에 들어갈 내용들이에요&lt;/h4&gt;
&lt;h4 id=&quot;동작-10만큼-움직이기-오른쪽화살표-방향으로-15도-회전하기를-붙여주고-안에-110사이의-난수-도-회전하기로-바꿔주세요&quot;&gt;동작-10만큼 움직이기, 오른쪽화살표 방향으로 15도 회전하기를 붙여주고, 안에 1~10사이의 난수 도 회전하기로 바꿔주세요&lt;/h4&gt;
&lt;h4 id=&quot;제어-01초-기다리기-동작-벽에-닿으면-튕기기여기까지-일단-해볼게요&quot;&gt;제어-0.1초 기다리기, 동작-벽에 닿으면 튕기기..여기까지 일단 해볼게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101137807-bc577b00-3652-11eb-98bf-76c764aa7bac.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이어서-달려봅시다-제어-만약-라면-그리고-라면-안에-감지-마우스-포인터에-닿았는가를-끌어서-마우스-포인터를-shark2로-바꿔주세요&quot;&gt;이어서 달려봅시다. 제어-만약 ~라면, 그리고 ~라면 안에 감지-마우스 포인터에 닿았는가를 끌어서 마우스 포인터를 Shark2로 바꿔주세요.&lt;/h4&gt;
&lt;h4 id=&quot;상어에-닿으면-점수를-바꿔줘야겠죠-변수-나의-변수를-1만큼-바꾸기를-끌어서-나의-변수를-점수-로-바꿔주세요&quot;&gt;상어에 닿으면 점수를 바꿔줘야겠죠? 변수-나의 변수를 1만큼 바꾸기를 끌어서 나의 변수를 점수 로 바꿔주세요!&lt;/h4&gt;
&lt;h4 id=&quot;그리고-형태-숨기기-제어-1초-기다리기-동작-x--y-로-이동하기-그리고-x는--240부터-240사이의-난수로-y는--180부터-180-사이의-난수로-바꿔주세요&quot;&gt;그리고 형태-숨기기, 제어-1초 기다리기, 동작-x: ~, y: ~로 이동하기. 그리고 x는 -240부터 240사이의 난수로, y는 -180부터 180 사이의 난수로 바꿔주세요&lt;/h4&gt;
&lt;h4 id=&quot;형태-크기를-100로-정하기를-끌어다가-100안에-80부터-100사이의-난수로-바꿔주시고&quot;&gt;형태-크기를 100%로 정하기를 끌어다가 100%안에 80부터 100사이의 난수로 바꿔주시고&lt;/h4&gt;
&lt;h4 id=&quot;다시-보이기를-추가해주세요-밑에-완성본&quot;&gt;다시 보이기를 추가해주세요. 밑에 완성본&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101138301-5ddecc80-3653-11eb-8128-9c02127677ed.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이렇게-만들어진-물고기에서-마우스-오른쪽키를-눌러서-복사를-해주세요-총-3마리-더-복사해서-fish14가-될수있도록이요&quot;&gt;이렇게 만들어진 물고기에서 마우스 오른쪽키를 눌러서 복사를 해주세요 총 3마리 더 복사해서 Fish1~4가 될수있도록이요!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101138365-70590600-3653-11eb-950d-dde62241b839.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101138607-c4fc8100-3653-11eb-913d-01ac42b71417.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이렇게-되었으면-fish-234-모양을-바꿔줍시다-모양탭에-들어가서-각각-다른-물고기로-바꿔주세요&quot;&gt;이렇게 되었으면 Fish 2,3,4 모양을 바꿔줍시다. 모양탭에 들어가서 각각 다른 물고기로 바꿔주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101138689-e0678c00-3653-11eb-90ce-86d924c15d88.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;코드까지-복사가-되었지만-이제-몇몇-부분을-바꿔줄거에요-일단-fish2에서-바꿀-부분은-점수를-1이-아니라-2만큼-바꾸고-크기를-40부터-60으로-바꿔줄게요&quot;&gt;코드까지 복사가 되었지만, 이제 몇몇 부분을 바꿔줄거에요. 일단 Fish2에서 바꿀 부분은 점수를 1이 아니라 2만큼 바꾸고, 크기를 40부터 60으로 바꿔줄게요&lt;/h4&gt;
&lt;h4 id=&quot;fish3에서는-점수를-3으로-바꾸고-크기를-20부터-40까지의-난수로-바꿔주세요&quot;&gt;Fish3에서는 점수를 3으로 바꾸고, 크기를 20부터 40까지의 난수로 바꿔주세요.&lt;/h4&gt;
&lt;h4 id=&quot;마지막-fish4-물고기는-점수를--5로-바꾸고-크기-바꾸기는-삭제-해줍시다&quot;&gt;마지막 Fish4 물고기는 점수를 -5로 바꾸고, 크기 바꾸기는 삭제 해줍시다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101144671-04c76680-365c-11eb-862e-f4934f9ef334.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101144675-0729c080-365c-11eb-8cb9-75b7d2e0b91c.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101144683-08f38400-365c-11eb-932f-1b22e4688bfa.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;다시-상어를-클릭해주시고-이-코드를-밑에-만들어볼게요-그동안-했었던-게-있으니-사진보고-똑같이-만들수있겠죠&quot;&gt;다시 상어를 클릭해주시고 이 코드를 밑에 만들어볼게요. 그동안 했었던 게 있으니 사진보고 똑같이 만들수있겠죠!?&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101153179-6d681080-3667-11eb-87d0-f1eff3dade9b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;깃발을-눌러서-게임을-시작해볼까요-노란물고기가--5점이니-15초-내로-노란물고기를-제외한-나머지물고기들을-마구-먹어줍시다잔인&quot;&gt;깃발을 눌러서 게임을 시작해볼까요? 노란물고기가 -5점이니 15초 내로 노란물고기를 제외한 나머지물고기들을 마구 먹어줍시다!(잔인..)&lt;/h4&gt;

&lt;h3 id=&quot;드디어-끝났어요-오류가-있다면-이-완성본을-보기전에-자기힘으로-먼저-에러를-찾아보는것을-권장합니다&quot;&gt;드디어 끝났어요! 오류가 있다면 이 완성본을 보기전에 자기힘으로 먼저 에러를 찾아보는것을 권장합니다!&lt;/h3&gt;
&lt;h2 id=&quot;모두-고생많았어요-여기까지-마무리해볼게요-이-파일은-자기-컴퓨터에-저장해서-스크래치-홈페이지에-로그인하고-파일-올려서-자기만의-작업실에-업데이트하는거를-추천합니다&quot;&gt;모두 고생많았어요. 여기까지 마무리해볼게요!! 이 파일은 자기 컴퓨터에 저장해서 스크래치 홈페이지에 로그인하고 파일 올려서 자기만의 작업실에 업데이트하는거를 추천합니다!&lt;/h2&gt;
&lt;h2 id=&quot;코드-완성본-꽃게는-한번-본인이-스스로-만들어보도록해요&quot;&gt;코드 완성본-꽃게는 한번 본인이 스스로 만들어보도록해요!&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101153711-229ac880-3668-11eb-9636-a705621be766.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101153740-2af30380-3668-11eb-96bb-c036536760a2.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101153760-2dedf400-3668-11eb-80bf-047feb1a82dd.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101153771-30504e00-3668-11eb-885d-6c73b103df65.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/101153782-32b2a800-3668-11eb-9d4e-253967c9a9ee.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;영상입니다&quot;&gt;영상입니다.&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=yg9o02UFOLM&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/yg9o02UFOLM/0.jpg&quot; alt=&quot;유튜브&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 26 Oct 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/10/26/shark/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/10/26/shark/</guid>
        
        <category>스크래치</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title>스크래치 3강 - 페인트(그림그리기)</title>
        <description>&lt;h2 id=&quot;3강까지-왔어요-잘하고있어요-이제-스크래치가-뭔지-뭘-할-수-있는지-감을-조금-잡았죠&quot;&gt;3강까지 왔어요 잘하고있어요 이제 스크래치가 뭔지, 뭘 할 수 있는지 감을 조금 잡았죠?&lt;/h2&gt;
&lt;h2 id=&quot;이번시간에는-아주간단한-2색-그림판을-만들어볼거에요-그리고-방송-호출-기능을-배워볼거에요&quot;&gt;이번시간에는 아주간단한 2색 그림판을 만들어볼거에요. 그리고 방송, 호출 기능을 배워볼거에요&lt;/h2&gt;
&lt;h2 id=&quot;출처-이-강의들은-코드클럽sw교육기부단-자료를-토대로-재구성하였습니다&quot;&gt;출처-이 강의들은 코드클럽SW교육기부단 자료를 토대로 재구성하였습니다.&lt;/h2&gt;
&lt;h2 id=&quot;완성사진&quot;&gt;완성사진&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100639356-6942a700-3378-11eb-917e-a99144d31e68.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;두가지 색으로 이용해서 간단하게 그림판을 만들어봅니다&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1 id=&quot;그림-크기가-너무-작아서-안보인다하시는분들은-그림에-마우스-우측클릭-새-탭에서-이미지-열기를-눌러주시거나-맨-밑에-코드-완성본이-있습니다&quot;&gt;그림 크기가 너무 작아서 안보인다하시는분들은 그림에 마우스 우측클릭-&amp;gt;새 탭에서 이미지 열기를 눌러주시거나 맨 밑에 코드 완성본이 있습니다.&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://scratch.mit.edu/projects/281956054/editor&quot; target=&quot;_blank&quot;&gt;링크 : rpf.io/paint-box-on&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;시작-전에-위의-링크에-들어가줍니다-그리고-영어들은-무시하고-우측-아래에-pencil과-eraser만-봐주세요&quot;&gt;시작 전에 위의 링크에 들어가줍니다. 그리고 영어들은 무시하고 우측 아래에 Pencil과 Eraser만 봐주세요.&lt;/h3&gt;
&lt;h3 id=&quot;각각-마우스-오른쪽-클릭을-눌러서-export를-눌러준다음에-다른-이름으로-저장을-눌러서-자기가-원하는-경로에-2개-파일을-다운받아주세요&quot;&gt;각각 마우스 오른쪽 클릭을 눌러서 Export를 눌러준다음에 다른 이름으로 저장을 눌러서 자기가 원하는 경로에 2개 파일을 다운받아주세요.&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100640253-8f1c7b80-3379-11eb-90ac-2b8e9cad9fb7.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-스크래치를-켜줍니다&quot;&gt;그리고 스크래치를 켜줍니다!&lt;/h4&gt;
&lt;h4 id=&quot;우측-아래에-스프라이트-고르기-스프라이트-업로드를-눌러서-아까-다운받은-파일2개를-열어줍니다&quot;&gt;우측 아래에 스프라이트 고르기-&amp;gt;스프라이트 업로드를 눌러서 아까 다운받은 파일2개를 열어줍니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100642182-cdb33580-337b-11eb-81b6-fcaf720adf37.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;원래-했던것처럼-첫번째-고양이-스프라이트1은-휴지통부분을-클릭해서-지워줍니다&quot;&gt;원래 했던것처럼 첫번째 고양이 스프라이트1은 휴지통부분을 클릭해서 지워줍니다&lt;/h4&gt;
&lt;h4 id=&quot;그리고-왼쪽-아래-확장-기능-추가하기-클릭-후-펜을-클릭해주세요&quot;&gt;그리고 왼쪽 아래 확장 기능 추가하기 클릭 후 펜을 클릭해주세요&lt;/h4&gt;
&lt;h4 id=&quot;그럼-왼쪽-메뉴에-펜을-쓸-수-있는-메뉴들이-생성됩니다&quot;&gt;그럼 왼쪽 메뉴에 펜을 쓸 수 있는 메뉴들이 생성됩니다.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100643617-a52c3b00-337d-11eb-8a9f-01d091418ec6.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100643855-ee7c8a80-337d-11eb-9949-2402a2d1861e.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100643859-f1777b00-337d-11eb-8117-d7beedc2f287.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100643868-f3d9d500-337d-11eb-86d3-26b77cbe63ee.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;지우개-말고-파란색-연필-pencil을-클릭해줍니다&quot;&gt;지우개 말고, 파란색 연필 pencil을 클릭해줍니다!!!&lt;/h4&gt;
&lt;h4 id=&quot;자-프로그램의-시작은-무엇-클릭했을때-이벤트-클릭했을-때를-끌어서-가운데다-둡니다&quot;&gt;자 프로그램의 시작은 무엇? 클릭했을때~~ 이벤트-클릭했을 때를 끌어서 가운데다 둡니다&lt;/h4&gt;
&lt;h4 id=&quot;그리고-새로-생성된-펜-메뉴를-클릭해서-모두-지우기를-끌어서-밑에-붙여줍니다&quot;&gt;그리고 새로 생성된 펜 메뉴를 클릭해서 모두 지우기를 끌어서 밑에 붙여줍니다&lt;/h4&gt;
&lt;h4 id=&quot;밑에-무한-반복하기를-추가해줍니다-그리고-동작-무작위-위치으로-이동하기를-끌어서-반복문-안에-놓아줄게요&quot;&gt;밑에 무한 반복하기를 추가해줍니다. 그리고 동작-무작위 위치으(로) 이동하기를 끌어서 반복문 안에 놓아줄게요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-무작위-위치를-클릭해서-마우스-포인터로-바꿔줍니다&quot;&gt;그리고 무작위 위치를 클릭해서 마우스 포인터로 바꿔줍니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100644436-a873f680-337e-11eb-86e9-1bd63584bcd9.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100644442-ab6ee700-337e-11eb-8c8f-339da16ad794.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100644457-add14100-337e-11eb-9fdf-8260439f53e1.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;펜이 세워져있다거나 하는 경우는 방향을 90도로 바꿔주세요!!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100644734-09033380-337f-11eb-80fb-6ee558e1a471.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;실행해서-움직여보면-마우스포인터를-잘-따라가는걸-볼수있을거에요&quot;&gt;실행해서 움직여보면 마우스포인터를 잘 따라가는걸 볼수있을거에요&lt;/h4&gt;
&lt;h4 id=&quot;만약-마우스포인터랑-위치가-안맞는다면-모양을-눌러주세요&quot;&gt;만약 마우스포인터랑 위치가 안맞는다면… 모양을 눌러주세요.&lt;/h4&gt;
&lt;h4 id=&quot;저-십자-모양-점이랑-연필-모서리랑-똑같이-닿아있어야-정확하게-마우스포인터를-따라움직여요&quot;&gt;저 십자 모양 점이랑 연필 모서리랑 똑같이 닿아있어야 정확하게 마우스포인터를 따라움직여요&lt;/h4&gt;
&lt;h4 id=&quot;그걸-맞춰주기-위해서-연필-전체를-드래그해서-연필심-부분-모양쪽으로-드래그해주세요&quot;&gt;그걸 맞춰주기 위해서… 연필 전체를 드래그해서 연필심 부분 +모양쪽으로 드래그해주세요!!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100645147-9cd4ff80-337f-11eb-8e88-7de9e49b17e3.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100645157-a0688680-337f-11eb-847f-c83e55b04d77.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100645163-a2cae080-337f-11eb-9566-6223a91f9b90.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-다시-실행을-해보면-정확히-마우스랑-연필심쪽이-닿아있는걸-볼수있을거에요&quot;&gt;그리고 다시 실행을 해보면 정확히 마우스랑 연필심쪽이 닿아있는걸 볼수있을거에요!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100645256-c2fa9f80-337f-11eb-927e-1a8d5b56e599.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;자-빨간-버튼을-눌러서-중지시키고-다시-코드로돌아와서-마우스-포인터로-이동하기-밑에-제어-만약라면-아니면-2중블록을-붙여주세요&quot;&gt;자 빨간 버튼을 눌러서 중지시키고 다시 코드로돌아와서 마우스 포인터로 이동하기 밑에 제어-만약~라면, 아니면 2중블록을 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-감지-마우스를-클릭했는가를-끌어서-만약-라면-안에다-넣어줄게요&quot;&gt;그리고 감지-마우스를 클릭했는가?를 끌어서 만약 ~라면 안에다 넣어줄게요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-펜에-가서-펜-내리기를-움푹-패인곳-안에-넣어주세요-이-블록은-조건이-참진실일때-수행하는-블록이에요&quot;&gt;그리고 펜에 가서 펜 내리기를 움푹 패인곳 안에 넣어주세요. 이 블록은 조건이 참(진실)일때 수행하는 블록이에요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-반대의미인-펜-올리기를-아니면-안쪽에-넣어주세요&quot;&gt;그리고 반대의미인 펜 올리기를 아니면 안쪽에 넣어주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100645659-546a1180-3380-11eb-8ee2-06d7333546f2.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;이제-변수로-가서-변수-만들기를-눌러서-굵기라는-변수를-하나-만들어주세요&quot;&gt;이제 변수로 가서 변수 만들기를 눌러서 굵기라는 변수를 하나 만들어주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-펜에-가서-펜-굵기를-1으로-정하기를-끌어서-만약-위에-둘게요&quot;&gt;그리고 펜에 가서 펜 굵기를 1으(로) 정하기를 끌어서 만약 위에 둘게요&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;펜 굵기를 1만큼 바꾸기가 아니에요!!! 정하기입니다&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;변수-탭에-가서-굵기-변수를-끌어서-숫자로-옮겨주세요&quot;&gt;변수 탭에 가서 굵기 변수를 끌어서 숫자로 옮겨주세요&lt;/h4&gt;
&lt;h4 id=&quot;추가로-우측화면-위에-굵기-변수를-마우스-오른쪽클릭해서-슬라이더-사용하기를-눌러주세요&quot;&gt;추가로 우측화면 위에 굵기 변수를 마우스 오른쪽클릭해서 슬라이더 사용하기를 눌러주세요&lt;/h4&gt;
&lt;h4 id=&quot;그럼-굵기-변수를-움직이는것만으로도-바꿀-수-있게됩니다&quot;&gt;그럼 굵기 변수를 움직이는것만으로도 바꿀 수 있게됩니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100646087-ec67fb00-3380-11eb-8ce3-2d280bed6695.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100646098-ef62eb80-3380-11eb-992b-bdadaa3f3783.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100646151-01448e80-3381-11eb-9315-8e316be866d8.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이제-실행을-해서-대충-그려볼까요-굵기에-따라-파란색-선이-더-두껍고-얇게-그려지는것을-알-수-있습니다&quot;&gt;이제 실행을 해서 대충 그려볼까요? 굵기에 따라 파란색 선이 더 두껍고 얇게 그려지는것을 알 수 있습니다&lt;/h4&gt;

&lt;h4 id=&quot;이번엔-pencil을-선택한-채로-모양으로-가볼게요&quot;&gt;이번엔 pencil을 선택한 채로 모양으로 가볼게요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-pencil-a를-우클릭해서-복사를-해줍니다&quot;&gt;그리고 pencil-a를 우클릭해서 복사를 해줍니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100646483-6ac49d00-3381-11eb-9675-11871207aee7.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100646492-6d26f700-3381-11eb-95be-bf6c1adc6f5e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이런식으로-pencil-a--pencil-b가-되었을텐데-pencil-blue--pencil-green으로-이름을-바꿔줍니다&quot;&gt;이런식으로 pencil-a / pencil-b가 되었을텐데, pencil-blue / pencil-green으로 이름을 바꿔줍니다.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100646616-98a9e180-3381-11eb-8d7c-f60deef2d14a.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;왜-이름을-바꿨을까요-네네-두번째-연필은-초록색이-나오도록-해줄거에요&quot;&gt;왜 이름을 바꿨을까요? 네네 두번째 연필은 초록색이 나오도록 해줄거에요&lt;/h4&gt;
&lt;h4 id=&quot;세번째-페인트-통을-클릭하고-채우기색을-클릭해서-적당히-초록색을-찾아줍니다&quot;&gt;세번째 페인트 통을 클릭하고 채우기색을 클릭해서 적당히 초록색을 찾아줍니다&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;이 작업은 pencil-green에서 하고있어야됩니다. pencil-blue는 바뀌는게없습니다.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;그리고-연필-몸을-클릭해서-초록색으로-바꿔주세요&quot;&gt;그리고 연필 몸을 클릭해서 초록색으로 바꿔주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100646928-1110a280-3382-11eb-913e-928f0823f48b.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100646936-1372fc80-3382-11eb-8141-e600efbc1d1b.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100646943-153cc000-3382-11eb-838e-f4f68f9a90aa.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;자-이제-다시-코드로-눌러서-돌아와주세요&quot;&gt;자 이제 다시 코드로 눌러서 돌아와주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-형태로-가서-모양을-로-바꾸기를-끌어서-클릭했을때-모두-지우기-사이에-넣어주고-pencil-blue로-바꿔줄게요&quot;&gt;그리고 형태로 가서 모양을 ~로 바꾸기를 끌어서 클릭했을때~ 모두 지우기 사이에 넣어주고 pencil-blue로 바꿔줄게요&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;처음 색은 파란색으로 하겠다는 뜻!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647053-49b07c00-3382-11eb-86c2-df7aab5932b0.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;스프라이트-그리기-그리기를-눌러주세요&quot;&gt;스프라이트 그리기-&amp;gt;그리기를 눌러주세요&lt;/h4&gt;
&lt;h4 id=&quot;왼쪽-맨-아래의-직사각형을-누르고-가운데-에-맞춰서-직사각형을-그려주세요&quot;&gt;왼쪽 맨 아래의 직사각형을 누르고 가운데 +에 맞춰서 직사각형을 그려주세요&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;안그려지시는 분들은 아마 비트맵일거에요. 벡터로 바꾸기를 눌러서 작업해주세요&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;오른쪽-실행창에-엄청-크게-혹은-작게-사각형이-생겼을거에요-이거를-크기를-바꿔줘서-왼쪽-아래로-이쁘게-옮겨놓을게요&quot;&gt;오른쪽 실행창에 엄청 크게 혹은 작게 사각형이 생겼을거에요 이거를 크기를 바꿔줘서 왼쪽 아래로 이쁘게 옮겨놓을게요&lt;/h4&gt;
&lt;h4 id=&quot;이-스프라이트에서-마우스-우클릭을-해서-복사를-해줍니다&quot;&gt;이 스프라이트에서 마우스 우클릭을 해서 복사를 해줍니다.&lt;/h4&gt;
&lt;h4 id=&quot;새로-생긴-스프라이트2도-1처럼-왼쪽아래에-놓아주세요1번-오른쪽에&quot;&gt;새로 생긴 스프라이트2도 1처럼 왼쪽아래에 놓아주세요(1번 오른쪽에)&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647593-1cb09900-3383-11eb-8daa-575e5cccb17a.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647609-1fab8980-3383-11eb-8dff-c932b0ce6f8b.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647617-220de380-3383-11eb-902a-a9091cdb05e7.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647635-25a16a80-3383-11eb-9e45-4693b824a7d2.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647643-2803c480-3383-11eb-920b-818150b96d17.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647648-29cd8800-3383-11eb-9015-095be0ad5ea1.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647652-2c2fe200-3383-11eb-9a70-1b537f4b59ab.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;스프라이트-1을-클릭하고-모양에-가서-채우기-색을-파란색으로-바꿔줍니다&quot;&gt;스프라이트 1을 클릭하고 모양에 가서 채우기 색을 파란색으로 바꿔줍니다&lt;/h4&gt;
&lt;h4 id=&quot;그리고-아까-썼던-물통-버튼을-클릭하고-상자를-눌러서-파란색-상자로-만들어줍니다&quot;&gt;그리고 아까 썼던 물통 버튼을 클릭하고 상자를 눌러서 파란색 상자로 만들어줍니다&lt;/h4&gt;
&lt;h4 id=&quot;추가로-스프라이트1-이름은-blue-스프라이트2-이름은-green으로-바꿔줍니다&quot;&gt;추가로 스프라이트1 이름은 blue, 스프라이트2 이름은 green으로 바꿔줍니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647967-9b0d3b00-3383-11eb-8b5e-776e5670562a.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647978-9d6f9500-3383-11eb-9fad-2ad9baed4275.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647984-9f395880-3383-11eb-8917-bc941a503721.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647986-a19bb280-3383-11eb-8ff9-cfc878a7eebb.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100647992-a3657600-3383-11eb-98f7-981275d2362d.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;거의-다왔어요-조금만-더-힘냅시다&quot;&gt;거의 다왔어요 조금만 더 힘냅시다!!&lt;/h3&gt;
&lt;h4 id=&quot;이번엔-스프라이트-고르기를-눌러서-x라고-검색해서-block-x를-추가해줄게요&quot;&gt;이번엔 스프라이트 고르기를 눌러서 X라고 검색해서 Block-X를 추가해줄게요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-block-x의-주황색을-빨간색으로-바꿔줄거에요-앞에서했던-것처럼-하면돼요&quot;&gt;그리고 Block-X의 주황색을 빨간색으로 바꿔줄거에요 앞에서했던 것처럼 하면돼요&lt;/h4&gt;
&lt;h4 id=&quot;왼쪽-아래에-이쁘게-x자도-정렬해줄게요-옮겨서&quot;&gt;왼쪽 아래에 이쁘게 X자도 정렬해줄게요 옮겨서&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100648250-0820d080-3384-11eb-86b8-5fd4be4f8925.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100648264-0b1bc100-3384-11eb-9e99-646aaa4b515d.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100648270-0ce58480-3384-11eb-80d9-edaf70ddd1e5.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100648292-166eec80-3384-11eb-840a-380f54c1531f.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100648301-1969dd00-3384-11eb-9a53-ca963b7db29c.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100648505-5a61f180-3384-11eb-82c9-4a4314162f46.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;이제-코드로-돌아가볼게요-코드가-없네요-당황하지-마시고-pencil을-눌러주세요&quot;&gt;이제 코드로 돌아가볼게요. 코드가 없네요!!? 당황하지 마시고 pencil을 눌러주세요&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;첫날에 제가말했죠? 각 스프라이트마다 동작하는 코드가 다 다르답니다^^&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;이번엔-eraser라는-스프라이트를-클릭하고-보이기눈-모양을-클릭해줘서-x자-옆으로-옮길거에요&quot;&gt;이번엔 eraser라는 스프라이트를 클릭하고 보이기(눈) 모양을 클릭해줘서 X자 옆으로 옮길거에요&lt;/h4&gt;
&lt;h4 id=&quot;실행-화면에-나타난-지우개-모양도-왼쪽-아래-가지란히-정렬시켜주세요&quot;&gt;실행 화면에 나타난 지우개 모양도 왼쪽 아래 가지란히 정렬시켜주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100648719-ab71e580-3384-11eb-9484-ab8879c1bf40.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100648724-add43f80-3384-11eb-8826-eabb41fe8173.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;스프라이트-중에서-blue를-클릭해주세요&quot;&gt;스프라이트 중에서 blue를 클릭해주세요&lt;/h4&gt;
&lt;h4 id=&quot;이벤트-이-스프라이트를-클릭했을-때를-끌어다-놓아주세요&quot;&gt;이벤트-이 스프라이트를 클릭했을 때를 끌어다 놓아주세요&lt;/h4&gt;
&lt;h4 id=&quot;그-밑에-이벤트-메시지1-신호-보내기를-끌어다-밑에-붙여주세요&quot;&gt;그 밑에 이벤트-메시지1 신호 보내기를 끌어다 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-메시지1을-클릭해서-새로운-메시지를-눌러서-blue라고-이름만들어줄게요&quot;&gt;그리고 메시지1을 클릭해서 새로운 메시지를 눌러서 blue라고 이름만들어줄게요&lt;/h4&gt;
&lt;h4 id=&quot;똑같이-green도-해줄게요-스프라이트-green을-눌러서-green-신호를-보내야하는거에요-blue가-아니에요&quot;&gt;똑같이 green도 해줄게요 스프라이트 green을 눌러서 green 신호를 보내야하는거에요! blue가 아니에요&lt;/h4&gt;
&lt;h4 id=&quot;이번엔-eraser-스프라이트를-클릭해서-이-스프라이트를-클릭했을-때-erase라는-새로운-메세지를-보내는걸-만들어주세요&quot;&gt;이번엔 eraser 스프라이트를 클릭해서 이 스프라이트를 클릭했을 때-&amp;gt;erase라는 새로운 메세지를 보내는걸 만들어주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100649240-7d40d580-3385-11eb-8357-bbe649f146e1.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100649247-7fa32f80-3385-11eb-91a6-a5339cd71def.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100649251-816cf300-3385-11eb-8125-be13fcae02a5.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100649254-83cf4d00-3385-11eb-924d-5e6b321a8ace.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100649258-85991080-3385-11eb-8924-6948d1b4e4db.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;마지막으로-block-x-스프라이트를-클릭해서-이-스프라이트를-클릭했을-때-밑에&quot;&gt;마지막으로 block-X 스프라이트를 클릭해서 이 스프라이트를 클릭했을 때 밑에&lt;/h4&gt;
&lt;h4 id=&quot;펜-탭에가서-모두-지우기를-밑에붙여줍니다&quot;&gt;펜 탭에가서 모두 지우기를 밑에붙여줍니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100649382-b4af8200-3385-11eb-8520-a247398ae3d5.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;다시-pensil-스프라이트클-클릭해주세요&quot;&gt;다시 pensil 스프라이트클 클릭해주세요&lt;/h4&gt;
&lt;h4 id=&quot;이벤트-신호를-받았을때를-새로운-블럭으로-만들게요-그리고-그-신호는-blue-신호로-바꿔주세요&quot;&gt;이벤트-~~신호를 받았을때를 새로운 블럭으로 만들게요 그리고 그 신호는 blue 신호로 바꿔주세요&lt;/h4&gt;
&lt;h4 id=&quot;형태-모양을-pencile-blue로-바꾸기로-바꿔서-밑에-붙여주세요&quot;&gt;형태-모양을 pencile-blue로 바꾸기로 바꿔서 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-펜-탭에-가서-펜-색깔을-으로-정하기를-밑에-붙여주세요&quot;&gt;그리고 펜 탭에 가서 펜 색깔을 ~으로 정하기를 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;이제-다-아시죠-스포이드-모양-클릭해서-실행창에-파란색-상자를-찝어주세요&quot;&gt;이제 다 아시죠? 스포이드 모양 클릭해서 실행창에 파란색 상자를 찝어주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100649897-75356580-3386-11eb-83b6-c3ca96797243.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100649907-79fa1980-3386-11eb-9de7-5e3d3dd39143.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;이제-blue-했으니-green과-erase도-같은-작업을-해줍니다&quot;&gt;이제 blue 했으니 green과 erase도 같은 작업을 해줍니다&lt;/h4&gt;
&lt;h4 id=&quot;green과-erase에는-모양과-색깔도-각각-달라야합니다&quot;&gt;green과 erase에는 모양과 색깔도 각각 달라야합니다!!!&lt;/h4&gt;
&lt;h4 id=&quot;erase의-경우에는-색깔을-배경인-하얀색으로-찍으시면됩니다&quot;&gt;erase의 경우에는 색깔을 배경인 하얀색으로 찍으시면됩니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100650074-bfb6e200-3386-11eb-97b1-5dadf9b9f222.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h3 id=&quot;이제-자기가-그리고싶은거를-그리고-지우고-하면-됩니다&quot;&gt;이제 자기가 그리고싶은거를 그리고 지우고 하면 됩니다!!&lt;/h3&gt;

&lt;h3 id=&quot;드디어-끝났어요-오류가-있다면-이-완성본을-보기전에-자기힘으로-먼저-에러를-찾아보는것을-권장합니다&quot;&gt;드디어 끝났어요! 오류가 있다면 이 완성본을 보기전에 자기힘으로 먼저 에러를 찾아보는것을 권장합니다!&lt;/h3&gt;
&lt;h2 id=&quot;모두-고생많았어요-여기까지-마무리해볼게요-이-파일은-자기-컴퓨터에-저장해서-스크래치-홈페이지에-로그인하고-파일-올려서-자기만의-작업실에-업데이트하는거를-추천합니다&quot;&gt;모두 고생많았어요. 여기까지 마무리해볼게요!! 이 파일은 자기 컴퓨터에 저장해서 스크래치 홈페이지에 로그인하고 파일 올려서 자기만의 작업실에 업데이트하는거를 추천합니다!&lt;/h2&gt;
&lt;h2 id=&quot;코드-완성본&quot;&gt;코드 완성본&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100650262-04db1400-3387-11eb-8060-6b18118d851b.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100650346-23410f80-3387-11eb-95bb-6abdbfc5994d.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100650362-29cf8700-3387-11eb-93e6-ca55088efb84.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100650379-305dfe80-3387-11eb-8890-d08cf2ccb2be.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100650389-348a1c00-3387-11eb-9882-7ea2ce098869.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;영상입니다&quot;&gt;영상입니다.&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=yOIj0MFYiIw&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/yOIj0MFYiIw/0.jpg&quot; alt=&quot;유튜브&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 19 Oct 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/10/19/paint/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/10/19/paint/</guid>
        
        <category>스크래치</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title>스크래치 2강 - 귀신 잡기</title>
        <description>&lt;h2 id=&quot;1강에-이어서-2강-시작&quot;&gt;1강에 이어서 2강 시작!&lt;/h2&gt;
&lt;h2 id=&quot;출처-이-강의들은-코드클럽sw교육기부단-자료를-토대로-재구성하였습니다&quot;&gt;출처-이 강의들은 코드클럽SW교육기부단 자료를 토대로 재구성하였습니다.&lt;/h2&gt;
&lt;h2 id=&quot;완성사진&quot;&gt;완성사진&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100595246-03392e00-333e-11eb-8726-27bf552d54f6.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;마우스 클릭으로 몬스터(귀신)을 잡는 게임입니다!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1 id=&quot;그림-크기가-너무-작아서-안보인다하시는분들은-그림에-마우스-우측클릭-새-탭에서-이미지-열기를-눌러주시거나-맨-밑에-코드-완성본이-있습니다&quot;&gt;그림 크기가 너무 작아서 안보인다하시는분들은 그림에 마우스 우측클릭-&amp;gt;새 탭에서 이미지 열기를 눌러주시거나 맨 밑에 코드 완성본이 있습니다.&lt;/h1&gt;

&lt;h4 id=&quot;그리고-스프라이트1은-안쓸거기때문에-저기-휴지통-부분을-클릭해서-지워주세요&quot;&gt;그리고 스프라이트1은 안쓸거기때문에 저기 휴지통 부분을 클릭해서 지워주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423438-55c0e300-30cf-11eb-9dd3-503be3d2c52b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;우측-아래-배경고르기-배경-고르기를-눌러서-woods를-검색해서-배경을-클릭해서-추가해줍니다&quot;&gt;우측 아래 배경고르기-&amp;gt;배경 고르기를 눌러서 Woods를 검색해서 배경을 클릭해서 추가해줍니다.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100595674-95413680-333e-11eb-855a-f48049eec167.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;배경1은-안-쓸-예정이므로-배경1을-클릭해서-아까-스프라이트를-지워준것처럼-지워줍니다&quot;&gt;배경1은 안 쓸 예정이므로 배경1을 클릭해서 아까 스프라이트를 지워준것처럼 지워줍니다.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100595871-d6d1e180-333e-11eb-933c-14aefc0b6fac.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;다시-코드탭을-눌러주세요&quot;&gt;다시 코드탭을 눌러주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100596193-3af4a580-333f-11eb-9e9e-db3ca9616196.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;우측-하단의-고양이모양스프라이트에-마우스를-가져다대고-위에-나오는-메뉴중에-스프라이트-고르기를-눌러주세요&quot;&gt;우측 하단의 고양이모양(스프라이트)에 마우스를 가져다대고 위에 나오는 메뉴중에 스프라이트 고르기를 눌러주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100596273-52339300-333f-11eb-8b1a-582ecb8c74fc.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;위에-검색-칸에-gho까지-쳐서-ghost-스프라이트를-골라주세요&quot;&gt;위에 검색 칸에 Gho까지 쳐서 Ghost 스프라이트를 골라주세요.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100596551-a63e7780-333f-11eb-9da1-30276226bed1.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이벤트-클릭했을때를-쭈욱-끌어서-가운데-빈화면에-옮겨주세요&quot;&gt;이벤트-클릭했을때를 쭈욱 끌어서 가운데 빈화면에 옮겨주세요&lt;/h4&gt;
&lt;h4 id=&quot;이-버튼이-프로그램을-시작하는기능입니다-다른-프로그래밍-언어에서는-main함수라고-부른답니다&quot;&gt;이 버튼이 프로그램을 시작하는기능입니다! 다른 프로그래밍 언어에서는 main함수라고 부른답니다.&lt;/h4&gt;
&lt;h4 id=&quot;제어-무한-반복하기를-끌어다가-밑에-붙여주세요&quot;&gt;제어-무한 반복하기를 끌어다가 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-무한-반복하기-안에다가-형태-숨기기를-넣어주세요&quot;&gt;그리고 무한 반복하기 안에다가 형태-숨기기를 넣어주세요&lt;/h4&gt;
&lt;h4 id=&quot;다시-제어-1초-기다리기를-숨기기-밑에-붙여주세요&quot;&gt;다시 제어-1초 기다리기를 숨기기 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-다시-형태-보이기를-1초-기다리기-밑에-붙여주세요&quot;&gt;그리고 다시 형태-보이기를 1초 기다리기 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;다시-제어-1초-기다리기를-숨기기-밑에-붙여주세요-1&quot;&gt;다시 제어-1초 기다리기를 숨기기 밑에 붙여주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100599216-13074100-3343-11eb-8f37-0988427fad51.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;동작-x--y-으로-이동하기를-보이기-위에다-놓아주세요&quot;&gt;동작-x: ~, y:~ (으)로 이동하기를 보이기 위에다 놓아주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-연산-1부터-10까지의-난수를-끌어다가-x와-y부분에-2번-원-안에-들어가게-놓아주세요&quot;&gt;그리고 연산-1부터 10까지의 난수를 끌어다가 x와 y부분에 2번 원 안에 들어가게 놓아주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-x와-y-둘다--150부터-150까지로-바꿔줄게요&quot;&gt;그리고 x와 y 둘다 -150부터 150까지로 바꿔줄게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100599549-8741e480-3343-11eb-9551-0066e6fc132a.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;다음으로-형태-크기를-100로-정하기10만큼-바꾸기-아님을-끌어다가-그-밑에다-붙여주세요&quot;&gt;다음으로 형태-크기를 100%로 정하기(10만큼 바꾸기 아님)을 끌어다가 그 밑에다 붙여주세요.&lt;/h4&gt;
&lt;h4 id=&quot;위에서-한것처럼-연산-1부터-10까지의-난수를-끌어서-안에다-넣어주고-숫자를-10부터-200사이의-난수로-바꿔줄게요&quot;&gt;위에서 한것처럼 연산-1부터 10까지의 난수를 끌어서 안에다 넣어주고 숫자를 10부터 200사이의 난수로 바꿔줄게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100599853-e3a50400-3343-11eb-8cbf-88e884dc620b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이쯤했으면-실행을-한번-해볼까요-우측에-깃발을-눌러서-동작을-확인해볼게요&quot;&gt;이쯤했으면 실행을 한번 해볼까요? 우측에 깃발을 눌러서 동작을 확인해볼게요&lt;/h4&gt;
&lt;h4 id=&quot;오-1초-간격으로-랜덤한-곳에서-나왔다가-사라졌다가-반복하고있죠-일단-빨간색을-눌러서-종료시켜줄게요&quot;&gt;오 1초 간격으로 랜덤한 곳에서 나왔다가 사라졌다가 반복하고있죠? 일단 빨간색을 눌러서 종료시켜줄게요&lt;/h4&gt;
&lt;h4 id=&quot;자-이젠-변수탭에-가서-변수-만들기를-누르고-시간-점수-2개의-변수를-만들어줄거에요&quot;&gt;자 이젠 변수탭에 가서 변수 만들기를 누르고 시간, 점수 2개의 변수를 만들어줄거에요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100600182-49918b80-3344-11eb-88c7-b21341e60e6c.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이번엔-또-다른-클릭했을-때를-만들어볼게요-위에-블럭에-이어붙이지-말고-다른곳으로-끌어서-이벤트-클릭했을-때를-만들어주세요&quot;&gt;이번엔 또 다른 클릭했을 때를 만들어볼게요. 위에 블럭에 이어붙이지 말고 다른곳으로 끌어서 이벤트-클릭했을 때를 만들어주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-변수탭에-들어가서-나의-변수을를-0로-정하기를-끌어다가-2번-밑에-붙여주세요&quot;&gt;그리고 변수탭에 들어가서 나의 변수을(를) 0로 정하기를 끌어다가 2번 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-시간을-15로-바꿔줄게요&quot;&gt;그리고 시간을 15로 바꿔줄게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100600399-970df880-3344-11eb-9081-e420e11f6672.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100600430-a0976080-3344-11eb-889a-b8717b9faaa0.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100600451-a55c1480-3344-11eb-97d3-8945480215a0.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100600537-c1f84c80-3344-11eb-88e9-f023c8f4baae.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;제어-까지-반복하기를-끌어다가-밑에-붙여주세요&quot;&gt;제어-~까지 반복하기를 끌어다가 밑에 붙여주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100600651-e5bb9280-3344-11eb-87b9-55c18d075476.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;연산에서---50을-끌어다가-까지-반복하기의-에-넣어주세요-그리고-숫자를-0으로-바꿔주세요&quot;&gt;연산에서 ~ = 50을 끌어다가 ~까지 반복하기의 ~에 넣어주세요 그리고 숫자를 0으로 바꿔주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-변수-시간을-끌어다가-앞에--부분에-집어넣을게요&quot;&gt;그리고 변수-시간을 끌어다가 앞에 ~ 부분에 집어넣을게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100600905-44810c00-3345-11eb-8dab-bd6cdb049280.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;제어-1초-기다리기를-끌어서-시간까지-반복하기-안쪽에-넣어주세요&quot;&gt;제어-1초 기다리기를 끌어서 시간=까지 반복하기 안쪽에 넣어주세요&lt;/h4&gt;
&lt;h4 id=&quot;변수-나의-변수를-1만큼-바꾸기정하기-아님을-끌어다-그밑에-놓고-변수를-시간으로-바꾸고-숫자를--1으로-할거에요&quot;&gt;변수-나의 변수를 1만큼 바꾸기(정하기 아님!)을 끌어다 그밑에 놓고 변수를 시간으로 바꾸고 숫자를 -1으로 할거에요&lt;/h4&gt;
&lt;h4 id=&quot;이제-시간이-다-지나면-멈춰야되기때문에-제어-멈추기모두를-끌어다가-그-밑에-붙여주세요&quot;&gt;이제 시간이 다 지나면 멈춰야되기때문에 제어-멈추기(모두)를 끌어다가 그 밑에 붙여주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100601301-c1ac8100-3345-11eb-84b6-89f6bf7d6d5d.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;한번-실행해보고-15초-동안-시간이-줄고있다가-0이되면-프로그램이-멈추는걸-확인할-수-있습니다&quot;&gt;한번 실행해보고 15초 동안 시간이 줄고있다가 0이되면 프로그램이 멈추는걸 확인할 수 있습니다.&lt;/h4&gt;
&lt;h4 id=&quot;이제-클릭했을때-잡히는-동작을-구현해볼거에요&quot;&gt;이제 클릭했을때 잡히는 동작을 구현해볼거에요&lt;/h4&gt;
&lt;h4 id=&quot;제어-이-스프라이트를-클릭했을-때를-끌어다가-새로운-블럭을-만들어주세요&quot;&gt;제어-이 스프라이트를 클릭했을 때를 끌어다가 새로운 블럭을 만들어주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100602846-c96d2500-3347-11eb-9be2-07a47271cadd.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;변수-나의-변수를-1만큼-바꾸기를-끌어서-밑에-붙여주고-나의변수를-클릭해서-점수로-바꿔줍니다&quot;&gt;변수-나의 변수를 1만큼 바꾸기를 끌어서 밑에 붙여주고 나의변수를 클릭해서 점수로 바꿔줍니다&lt;/h4&gt;
&lt;h4 id=&quot;형태-모양을-으로-바꾸기를-끌어다가-붙여줍니다&quot;&gt;형태-모양을 ~(으)로 바꾸기를 끌어다가 붙여줍니다&lt;/h4&gt;
&lt;h4 id=&quot;그리고-ghost-a를-ghost-c로-바꿔줍니다&quot;&gt;그리고 ghost-a를 ghost-c로 바꿔줍니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100604512-020dfe00-334a-11eb-91a2-6b096fb18d01.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100604548-09350c00-334a-11eb-9610-8f6bfa84b278.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그대로-안녕을-2초동안-말하기를-끌어다가-안녕을-으악으로-바꿔주고-03초로-바꿔줍니다&quot;&gt;그대로 안녕!을 2초동안 말하기를 끌어다가 안녕!을 으악!으로 바꿔주고 0.3초로 바꿔줍니다!&lt;/h4&gt;
&lt;h4 id=&quot;그리고-형태-숨기기를-밑에-붙이고-다시-ghost-a으로-바꾸기-블록을-끌어다-놓아줍니다&quot;&gt;그리고 형태-숨기기를 밑에 붙이고 다시 ghost-a(으)로 바꾸기 블록을 끌어다 놓아줍니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100606446-cb85b280-334c-11eb-9f89-d5f3b996b3a2.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이제-한번-깃발을-눌러서-실행해볼까요-이번에는-스프라이트를-클릭하면-사라지고-점수가-올라갑니다&quot;&gt;이제 한번 깃발을 눌러서 실행해볼까요? 이번에는 스프라이트를 클릭하면 사라지고 점수가 올라갑니다!!&lt;/h4&gt;
&lt;h3 id=&quot;1차-완성본&quot;&gt;1차 완성본&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100606528-ee17cb80-334c-11eb-9350-96680d975db5.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;스프라이트-고르기를-눌러서-하나-더추가해줍니다-마음에-드는-아무거나-해도-돼요-전-dot이라는-우주강아지로-골랐어요&quot;&gt;스프라이트 고르기를 눌러서 하나 더추가해줍니다. 마음에 드는 아무거나 해도 돼요! 전 Dot이라는 우주강아지?로 골랐어요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100606695-2a4b2c00-334d-11eb-9766-a2ad69c4dd1c.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;자-이제-여기서-팁-들어갑니다-첫번째-스프라이트-ghost를-클릭해주세요&quot;&gt;자 이제 여기서 팁 들어갑니다! 첫번째 스프라이트 Ghost를 클릭해주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-맨-위에-블럭을-한번-클릭한-후에-ctrlc-키를-눌러줍니다&quot;&gt;그리고 맨 위에 블럭을 한번 클릭한 후에 Ctrl+C 키를 눌러줍니다&lt;/h4&gt;
&lt;h4 id=&quot;dot-스프라이트를-다시-눌러서-ctrlv를-눌러볼까요&quot;&gt;Dot 스프라이트를 다시 눌러서 Ctrl+V를 눌러볼까요?&lt;/h4&gt;
&lt;h4 id=&quot;와-블럭이-똑같이-복사됐네요&quot;&gt;와 블럭이 똑같이 복사됐네요!&lt;/h4&gt;
&lt;h4 id=&quot;그리고-1초-기다리기-위와-아래-2블록을-07초로-바꿔줍니다&quot;&gt;그리고 1초 기다리기 위와 아래 2블록을 0.7초로 바꿔줍니다.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100607143-d5f47c00-334d-11eb-8b50-c9c3b23ffa10.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100607152-d9880300-334d-11eb-8572-e4b1965d5ed6.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100607177-e278d480-334d-11eb-8a4d-3247244a032d.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;다시-또-고스트-스프라이트를-누르고-이번에는-우측-이-스프라이트-클릭했을때를-클릭해서-ctrlc를-해주고&quot;&gt;다시 또 고스트 스프라이트를 누르고 이번에는 우측 이 스프라이트 클릭했을때를 클릭해서 Ctrl+C를 해주고&lt;/h4&gt;
&lt;h4 id=&quot;옆에-두번째-스프라이트를-눌러서-ctrlv를-해줍니다&quot;&gt;옆에 두번째 스프라이트를 눌러서 Ctrl+V를 해줍니다&lt;/h4&gt;
&lt;h4 id=&quot;도중에-실수했다고치면-ctrlz를-눌러서-뒤로가기를-해주면됩니다&quot;&gt;도중에 실수했다고치면 Ctrl+Z를 눌러서 뒤로가기를 해주면됩니다!^^&lt;/h4&gt;
&lt;h4 id=&quot;이번에는-점수를-2점으로-바꾸고-모양을-dot-d로-바꾸고-맨-밑에-모양을-dot-a로-바꿔줍니다&quot;&gt;이번에는 점수를 2점으로 바꾸고, 모양을 dot-d로 바꾸고, 맨 밑에 모양을 dot-a로 바꿔줍니다.&lt;/h4&gt;
&lt;h4 id=&quot;아-참-으악을-말하기에서-멍멍으로-말하기로-바꿔줬어요ㅎㅎ&quot;&gt;아 참! 으악!을 말하기에서 멍멍!으로 말하기로 바꿔줬어요ㅎㅎ&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100607562-78acfa80-334e-11eb-8a71-ae5c583b78da.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100607576-7e0a4500-334e-11eb-82e6-3ae1c86687e7.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100607755-bd389600-334e-11eb-946a-b945fa56f00f.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h3 id=&quot;처음-ghost를-잡으면-1점-두번째-dot을-잡으면-2점이-올라가요-근데-얘는-07초만-나오고-사라져서-빨리사라지는거에요&quot;&gt;처음 Ghost를 잡으면 1점, 두번째 Dot을 잡으면 2점이 올라가요. 근데 얘는 0.7초만 나오고 사라져서 빨리사라지는거에요!!&lt;/h3&gt;
&lt;h4 id=&quot;이제-마지막-함정-스프라이트를-만들어줄거에요&quot;&gt;이제 마지막 함정 스프라이트를 만들어줄거에요&lt;/h4&gt;
&lt;h4 id=&quot;스프라이트-고르기에서-또-하나를-골라주세요-저는-wizard-toad라는-마법개구리를-골랐어요&quot;&gt;스프라이트 고르기에서 또 하나를 골라주세요. 저는 Wizard-toad라는 마법개구리를 골랐어요&lt;/h4&gt;
&lt;h4 id=&quot;이번에도-아까처럼-2번째-스프라이트에서-왼쪽-오른쪽-블록을-두번-복사-붙여넣기-해줍시다동시에는-안돼요&quot;&gt;이번에도 아까처럼 2번째 스프라이트에서 왼쪽 오른쪽 블록을 두번 복사 붙여넣기 해줍시다(동시에는 안돼요)&lt;/h4&gt;
&lt;h4 id=&quot;이번엔-개구리를-클릭했을-때-점수를--1로-바꿔줄게요&quot;&gt;이번엔 개구리를 클릭했을 때 점수를 -1로 바꿔줄게요.&lt;/h4&gt;
&lt;h4 id=&quot;모양은-wizard-toad-b로-바꿔주고-멍멍에서-개굴로-바꿔주고-맨-밑에-모양을-wizard-toad-a로-바꿔줍니다&quot;&gt;모양은 wizard-toad-b로 바꿔주고, 멍멍!에서 개굴!로 바꿔주고 맨 밑에 모양을 wizard-toad-a로 바꿔줍니다.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100608164-5d8eba80-334f-11eb-9099-5de4a1e78095.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h3 id=&quot;휴-이제-끝났어요-오류가-있다면-이-완성본을-보기전에-자기힘으로-먼저-에러를-찾아보는것을-권장합니다&quot;&gt;휴 이제 끝났어요! 오류가 있다면 이 완성본을 보기전에 자기힘으로 먼저 에러를 찾아보는것을 권장합니다!&lt;/h3&gt;
&lt;h2 id=&quot;그럼-모두-고생많았어요-여기까지-마무리해볼게요-이-파일은-자기-컴퓨터에-저장해서-스크래치-홈페이지에-로그인하고-파일-올려서-자기만의-작업실에-업데이트하는거를-추천합니다&quot;&gt;그럼 모두 고생많았어요. 여기까지 마무리해볼게요. 이 파일은 자기 컴퓨터에 저장해서 스크래치 홈페이지에 로그인하고 파일 올려서 자기만의 작업실에 업데이트하는거를 추천합니다!&lt;/h2&gt;
&lt;h2 id=&quot;코드-완성본&quot;&gt;코드 완성본&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100608425-b6f6e980-334f-11eb-8431-9aa29ae1af8e.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100608435-bbbb9d80-334f-11eb-8169-cb55a8cdbdb7.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100608441-beb68e00-334f-11eb-90d3-59ace5c922f1.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;추가로-1강에서-배웠던-배경음을-추가해보는것도-좋습니다&quot;&gt;추가로 1강에서 배웠던 배경음을 추가해보는것도 좋습니다!&lt;/h4&gt;
&lt;h2 id=&quot;영상입니다&quot;&gt;영상입니다.&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=_48e5Cp1PZM&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/_48e5Cp1PZM/0.jpg&quot; alt=&quot;유튜브&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 12 Oct 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/10/12/ghost/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/10/12/ghost/</guid>
        
        <category>스크래치</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title>스크래치 1강 - 바다 수영</title>
        <description>&lt;h2 id=&quot;자-드디어-1강-시작&quot;&gt;자 드디어 1강 시작!&lt;/h2&gt;
&lt;h2 id=&quot;출처-이-강의들은-코드클럽sw교육기부단-자료를-토대로-재구성하였습니다&quot;&gt;출처-이 강의들은 코드클럽SW교육기부단 자료를 토대로 재구성하였습니다.&lt;/h2&gt;
&lt;h2 id=&quot;완성사진&quot;&gt;완성사진&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100595189-eef53100-333d-11eb-9119-1979ff38f70f.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;상어와 벽 충돌을 피해 끝까지 도달하는 게임입니다!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;시작하기에-앞서-밑의-스크래치-바다수영-배경사진을-다운로드-받아주세요&quot;&gt;시작하기에 앞서 밑의 스크래치 바다수영 배경사진을 다운로드 받아주세요.&lt;/h2&gt;
&lt;h4 id=&quot;다른-이름으로-저장하기에-눌러서-바탕화면-혹은-자기가-원하는-위치에-받아주세요&quot;&gt;다른 이름으로 저장하기에 눌러서 바탕화면 혹은 자기가 원하는 위치에 받아주세요&lt;/h4&gt;

&lt;h4 id=&quot;스크래치-강의-바다수영-배경&quot;&gt;스크래치 강의 바다수영 배경&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423387-40e44f80-30cf-11eb-9f8e-5dc292713d36.png&quot; alt=&quot;보트&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;그림-크기가-너무-작아서-안보인다하시는분들은-그림에-마우스-우측클릭-새-탭에서-이미지-열기를-눌러주시거나-맨-밑에-코드-완성본이-있습니다&quot;&gt;그림 크기가 너무 작아서 안보인다하시는분들은 그림에 마우스 우측클릭-&amp;gt;새 탭에서 이미지 열기를 눌러주시거나 맨 밑에 코드 완성본이 있습니다.&lt;/h1&gt;
&lt;h4 id=&quot;하얀색-부분에-닿으면-빨라지고-초록색-이끼에-닿으면-느려지게-만들겁니다&quot;&gt;하얀색 부분에 닿으면 빨라지고, 초록색 이끼에 닿으면 느려지게 만들겁니다.&lt;/h4&gt;
&lt;h4 id=&quot;스크래치를-실행해주세요&quot;&gt;스크래치를 실행해주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-스프라이트1은-안쓸거기때문에-저기-휴지통-부분을-클릭해서-지워주세요&quot;&gt;그리고 스프라이트1은 안쓸거기때문에 저기 휴지통 부분을 클릭해서 지워주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423438-55c0e300-30cf-11eb-9dd3-503be3d2c52b.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423515-72f5b180-30cf-11eb-9f8a-a8d0e6961638.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;우측-아래-배경고르기-배경-업로드를-눌러서-아까-받은-배경파일을-불러와주세요&quot;&gt;우측 아래 배경고르기-&amp;gt;배경 업로드를 눌러서 아까 받은 배경파일을 불러와주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423552-830d9100-30cf-11eb-868d-4bafa53d5330.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그럼-이-화면이-뜰텐데-위에-배경1은-안-쓸-예정이므로-배경1을-클릭해서-아까-스프라이트를-지워준것처럼-지워줍니다&quot;&gt;그럼 이 화면이 뜰텐데, 위에 배경1은 안 쓸 예정이므로 배경1을 클릭해서 아까 스프라이트를 지워준것처럼 지워줍니다.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423584-902a8000-30cf-11eb-92ae-371ccf90bce8.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;다시-코드탭을-눌러주세요&quot;&gt;다시 코드탭을 눌러주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423636-a5071380-30cf-11eb-8c89-a69334700437.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423646-a9cbc780-30cf-11eb-9377-a661c9ea3575.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;우측-하단의-고양이모양스프라이트에-마우스를-가져다대고-위에-나오는-메뉴중에-스프라이트-고르기를-눌러주세요&quot;&gt;우측 하단의 고양이모양(스프라이트)에 마우스를 가져다대고 위에 나오는 메뉴중에 스프라이트 고르기를 눌러주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423675-b9e3a700-30cf-11eb-9b98-3b5fae925b11.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;여기에서-오늘-저희가-이동할-캐릭터스프라이트를-골라줄거에요-전-조금-내려서-diver1을-고를게요&quot;&gt;여기에서 오늘 저희가 이동할 캐릭터(스프라이트)를 골라줄거에요! 전 조금 내려서 Diver1을 고를게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423716-c9fb8680-30cf-11eb-903d-c9dbe4b9d09e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그럼-우측-화면에-다이버가-화면-한가득-차지하고-있을거에요-엄청-크니까-크기를-줄여줄게요-16정도로-만들어주세요&quot;&gt;그럼 우측 화면에 다이버가 화면 한가득 차지하고 있을거에요 엄청 크니까 크기를 줄여줄게요 16정도로 만들어주세요&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;너무 작게 보이지만 어차피 최대화를 해서 게임을 할거기때문에 괜찮습니다!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423758-ded81a00-30cf-11eb-84b5-57cb69741f9f.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-가운데에-있는-다이버를-끌어서-맵-왼쪽-아래-시작점으로-옮겨주겠습니다&quot;&gt;그리고 가운데에 있는 다이버를 끌어서 맵 왼쪽 아래 시작점으로 옮겨주겠습니다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423783-e7c8eb80-30cf-11eb-8cad-d4b5eebe2692.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그럼-이-사진-상태가-되실거에요-이제-코드블럭들을-옮겨가면서-프로그램을-만들어보겠습니다&quot;&gt;그럼 이 사진 상태가 되실거에요 이제 코드블럭들을 옮겨가면서 프로그램을 만들어보겠습니다!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423804-f4e5da80-30cf-11eb-8649-6794aa95f74a.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이벤트-클릭했을때를-쭈욱-끌어서-가운데-빈화면에-옮겨주세요&quot;&gt;이벤트-클릭했을때를 쭈욱 끌어서 가운데 빈화면에 옮겨주세요&lt;/h4&gt;
&lt;h4 id=&quot;이-버튼이-프로그램을-시작하는기능입니다-다른-프로그래밍-언어에서는-main함수라고-부른답니다&quot;&gt;이 버튼이 프로그램을 시작하는기능입니다! 다른 프로그래밍 언어에서는 main함수라고 부른답니다.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423830-0202c980-30d0-11eb-9fb7-f4cc5fd1a611.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423837-04fdba00-30d0-11eb-81ef-797571a9a4e6.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;시작하면-일단-0도를-바라보게-만들거에요-동작-탭에-가서-90도-방향-보기를-끌어서-0으로-바꿔주세요&quot;&gt;시작하면 일단 0도를 바라보게 만들거에요 동작 탭에 가서 90도 방향 보기를 끌어서 0으로 바꿔주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423870-15159980-30d0-11eb-8b78-e5144fdf6129.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-처음-시작점에서-시작할-수-있게-만들어줄거에요-x-y-으로-이동하기를-끌어서-그-밑에-붙여주세요&quot;&gt;그리고 처음 시작점에서 시작할 수 있게 만들어줄거에요. x:~, y: (으)로 이동하기를 끌어서 그 밑에 붙여주세요&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;현재 위치가 자동으로 적용이 돼요. 혹시나 캐릭터가 아직 맵 중앙에 있는 사람들은 캐릭터를 끌어서 시작점으로 옮겨주신 후, 그 x,y값으로 바꿔주세요!!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;그-다음에는-주황색-제어-블록에-들어가서-무한-반복하기를-끌어서-밑에-붙여주세요&quot;&gt;그 다음에는 주황색 제어 블록에 들어가서 무한 반복하기를 끌어서 밑에 붙여주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423887-2068c500-30d0-11eb-897b-74046af28a8c.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그-밑에-만약-라면-블록을-드래그해서-무한-반복하기-안에다-넣어줄게요&quot;&gt;그 밑에 만약 ~라면 블록을 드래그해서 무한 반복하기 안에다 넣어줄게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423912-2b235a00-30d0-11eb-8347-a731dbc50d92.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;초록색-연산-블록에-들어가서-x--50-블록을-드래그해서-저기-만약-라면-블록-안에다-넣어줄게요하얗게-색이-변해야-안에-들어가져요&quot;&gt;초록색 연산 블록에 들어가서 x &amp;gt; 50 블록을 드래그해서 저기 만약 ~라면 블록 안에다 넣어줄게요(하얗게 색이 변해야 안에 들어가져요)&lt;/h4&gt;
&lt;h4 id=&quot;50을-5로-바꿔주세요&quot;&gt;50을 5로 바꿔주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100423940-35ddef00-30d0-11eb-89e9-f2f51dc129c9.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이번엔-하늘색-감지-탭에-들어가서-마우스-포인터까지의-거리를-끌어서-x--5-에서-x부분에-정확히-넣어주세요하얀색-체크&quot;&gt;이번엔 하늘색 감지 탭에 들어가서 마우스 포인터까지의 거리를 끌어서 x &amp;gt; 5 에서 x부분에 정확히 넣어주세요(하얀색 체크!)&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424010-527a2700-30d0-11eb-975d-e24d36cce0a7.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;다시-파란색-동작-탭을-눌러서-마우스-포인터-쪽-보기랑-10만큼-움직이기를-끌어서-만약라면-블록-안에-넣어주시고-10을-1로-바꿔주세요&quot;&gt;다시 파란색 동작 탭을 눌러서 마우스 포인터 쪽 보기랑 10만큼 움직이기를 끌어서 만약~라면 블록 안에 넣어주시고 10을 1로 바꿔주세요!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424050-602fac80-30d0-11eb-9240-d7f7e34ce4dc.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424058-63c33380-30d0-11eb-8c90-0dd6cec19e03.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;우측-상단의-초록색-깃발을-눌러서-실행해보세요-마우스를-따라서-움직이는걸-확인할-수-있을거에요&quot;&gt;우측 상단의 초록색 깃발을 눌러서 실행해보세요 마우스를 따라서 움직이는걸 확인할 수 있을거에요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-추가로-맨오른쪽의-4방향-화살표를-누르면-최대화가-되어서-큰화면에서-테스트해볼수있어요&quot;&gt;그리고 추가로 맨오른쪽의 4방향 화살표를 누르면 최대화가 되어서 큰화면에서 테스트해볼수있어요&lt;/h4&gt;
&lt;h4 id=&quot;확인했으면-옆에-빨간색을-눌러서-정지해주세요&quot;&gt;확인했으면 옆에 빨간색을 눌러서 정지해주세요&lt;/h4&gt;
&lt;h4 id=&quot;이제-충돌을-만들거에요&quot;&gt;이제 충돌을 만들거에요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424095-7178b900-30d0-11eb-8441-335961fb1f90.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424137-82292f00-30d0-11eb-8d1f-c08a04e5be9d.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424172-8c4b2d80-30d0-11eb-9fa3-a656b089f339.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;모양-을-눌러주세요-그리고-diver1을-마우스-오른쪽-클릭에서-복사를-해주세요다른-캐릭터로-한-친구들도-똑같이-해주세요&quot;&gt;모양 을 눌러주세요 그리고 diver1을 마우스 오른쪽 클릭에서 복사를 해주세요(다른 캐릭터로 한 친구들도 똑같이 해주세요)&lt;/h4&gt;
&lt;h4 id=&quot;그리고-이름을-crush로-바꿔줄게요-그리고-비트맵으로-바꾸기를-눌러주세요&quot;&gt;그리고 이름을 crush로 바꿔줄게요!! 그리고 비트맵으로 바꾸기를 눌러주세요&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;벡터로 바꾸기라고 되어있는 분들은 안눌러도돼요 (이미 비트맵임)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424202-979e5900-30d0-11eb-896a-24643800cf58.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424218-9c630d00-30d0-11eb-9f40-4aa6f52364c7.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-오른쪽아래-사각형이-선택되어있는-상태로-이제우리-다이버를-찢어줄게요&quot;&gt;그리고 오른쪽아래 사각형이 선택되어있는 상태로 이제….우리 다이버를 찢..(!?!?)어..줄게요&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;벽에 충돌했을때 모양을 나타낼거에요 사각형으로 드래그해서 놓아주면됩니다&lt;/li&gt;
  &lt;li&gt;맘에 안들면 Ctrl+Z를 눌러서 뒤로가기해서 다시하면돼요!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;전-이렇게-3단분리를-해줬어요&quot;&gt;전 이렇게 3단분리(?)를 해줬어요&lt;/h4&gt;
&lt;h4 id=&quot;그럼-다시-코드-탭을-눌러서-돌아올게요&quot;&gt;그럼 다시 코드 탭을 눌러서 돌아올게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424279-b0a70a00-30d0-11eb-9fa7-010082735cd5.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;제어-탭에-만약-라면을-드래그해서-밑에-붙여주세요&quot;&gt;제어 탭에 만약 ~라면을 드래그해서 밑에 붙여주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424310-be5c8f80-30d0-11eb-84f9-eb88e12ceeef.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;자-이제-하늘색-감지-탭에서--색에-닿았는가를-끌어서-만약라면에-쪽에-끌어다-놓아주세요&quot;&gt;자 이제 하늘색 감지 탭에서 ~ 색에 닿았는가?를 끌어서 만약~라면에 ~쪽에 끌어다 놓아주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424342-cae0e800-30d0-11eb-8508-10dead644a4a.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424346-ce746f00-30d0-11eb-98e4-0e5b65a8ae26.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424358-d2a08c80-30d0-11eb-8069-4e6dc53068dd.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-안에-색상을-클릭하고-밑에-스포이드를-클릭해주시면-이렇게-맵-화면이-집중될거에요-여기서-벽-색깔인-갈색을-콕-찝어주세요&quot;&gt;그리고 안에 색상을 클릭하고 밑에 스포이드를 클릭해주시면 이렇게 맵 화면이 집중될거에요 여기서 벽 색깔인 갈색을 콕 찝어주세요!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424418-e946e380-30d0-11eb-9e9e-f1b88cd88c55.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그리고-보라색-모양-탭에-들어가서-모양을-crush로-바꾸기를-끌어서-블록-안에-끌어놓아주세요&quot;&gt;그리고 보라색 모양 탭에 들어가서 모양을 crush로 바꾸기를 끌어서 블록 안에 끌어놓아주세요&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;아까 충돌모양을 만들고 이름을 안바꾼 사람들은 crush가 아닐수도있어요! 보통 원래이름2 가 붙습니다. 당황하지마세요!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424482-02e82b00-30d1-11eb-9b2a-f5b2163d1eeb.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;추가로-맨-위에-안녕을-2초-동안-말하기를-그-밑에-드래그해주고-안녕을-안돼로-바꿔주세요&quot;&gt;추가로 맨 위에 안녕!을 2초 동안 말하기를 그 밑에 드래그해주고 안녕!을 안돼!로 바꿔주세요&lt;/h4&gt;
&lt;h4 id=&quot;충돌-후-모양을-원래-모양으로-바꾸고-처음-위치로-돌려보내주고-0도를-바라보게-해줄거에요&quot;&gt;충돌 후 모양을 원래 모양으로 바꾸고, 처음 위치로 돌려보내주고 0도를 바라보게 해줄거에요.&lt;/h4&gt;
&lt;h4 id=&quot;모양탭에서-crush를-끌어서-crush를-클릭해서-그-위에-원래-모양을-클릭해주고-동작-탭에-들어가서-0도-방향보기-x-y-으로-이동하기&quot;&gt;모양탭에서 crush를 끌어서 crush를 클릭해서 그 위에 원래 모양을 클릭해주고, 동작 탭에 들어가서 0도 방향보기, x:~, y:~ (으)로 이동하기&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;x,y는 처음 위치로 가줘야 하기 때문에 초기값으로 바꿔주세요&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424514-0da2c000-30d1-11eb-8a7f-aebd97f8930a.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그럼-최대화를-시켜서-다시-실행해볼까요-와-이제-게임처럼-된거같아요&quot;&gt;그럼 최대화를 시켜서 다시 실행해볼까요? 와 이제 게임처럼 된거같아요&lt;/h4&gt;
&lt;h4 id=&quot;이제는-목적지에-도착한-경우를-만들어볼게요&quot;&gt;이제는 목적지에 도착한 경우를 만들어볼게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424563-1b584580-30d1-11eb-9db8-9a6c076d0ccb.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;위와-같이-1제어-만약라면-2감지-색에-닿았는가-색을-클릭하고-스포이드를-클릭해-우측아래-살색깔을-클릭해줘서-색을-바꿔준다&quot;&gt;위와 같이 1.제어-만약~라면 2.감지-색에 닿았는가? 색을 클릭하고 스포이드를 클릭해 우측아래 살색깔을 클릭해줘서 색을 바꿔준다&lt;/h4&gt;
&lt;h4 id=&quot;3형태-안녕을-2초동안-말하기를-끌어서-안녕을-도착으로-바꿔주고-제어-탭에들어가서-멈추기를-끌어서-그-밑에-드래그해줄게요&quot;&gt;3.형태-안녕!을 2초동안 말하기를 끌어서 안녕!을 도착!으로 바꿔주고, 제어 탭에들어가서 멈추기&lt;모두&gt;를 끌어서 그 밑에 드래그해줄게요&lt;/모두&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424597-28753480-30d1-11eb-939f-db50d0fbd53b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;자-이제-다시-실행해서큰화면-추천-끝에-도착하면-정말-도착이라고-말하면서-프로그램이-멈추는지-테스트해볼게요&quot;&gt;자, 이제 다시 실행해서(큰화면 추천) 끝에 도착하면 정말 도착!이라고 말하면서 프로그램이 멈추는지 테스트해볼게요&lt;/h4&gt;
&lt;h4 id=&quot;전-잘-작동하네요-오류가-있으시면-댓글-달아주세요&quot;&gt;전 잘 작동하네요^^ 오류가 있으시면 댓글 달아주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-이렇게만-하면-뭔가-아쉽죠-추가로-시간을-줄거고-맵에-보시면-하얀색-화살표와-초록색-이끼들이-보일거에요-그거를-또-활용해줄거에요&quot;&gt;그리고 이렇게만 하면 뭔가 아쉽죠? 추가로 시간을 줄거고, 맵에 보시면 하얀색 화살표와 초록색 이끼들이 보일거에요. 그거를 또 활용해줄거에요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424629-362aba00-30d1-11eb-8005-04328d924210.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;주황색-변수-탭에-들어가서-변수-만들기를-누르고-시간이라고-치고-엔터를-눌러줄게요&quot;&gt;주황색 변수 탭에 들어가서 변수 만들기를 누르고 시간이라고 치고 엔터를 눌러줄게요&lt;/h4&gt;
&lt;h4 id=&quot;그럼-이벤트-탭에-들어가서-클릭했을때를-끌어서-이번엔-2번째-블록을-만들어주세요옆에&quot;&gt;그럼 이벤트 탭에 들어가서 클릭했을때를 끌어서 이번엔 2번째 블록을 만들어주세요(옆에)&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424652-3d51c800-30d1-11eb-8332-991cecb8d87d.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424661-40e54f00-30d1-11eb-9cbd-4afd365f5d32.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424668-4347a900-30d1-11eb-8333-1457adce705a.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424675-46db3000-30d1-11eb-9fb6-d96b3289a9f7.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;그-밑에-변수를-눌러서-나의변수을를-0로-정하기를-끌어서-그-밑에-붙여주세요&quot;&gt;그 밑에 변수를 눌러서 나의변수을(를) 0로 정하기를 끌어서 그 밑에 붙여주세요&lt;/h4&gt;
&lt;h4 id=&quot;그리고-나의변수를-클릭해서-아까-만든-시간으로-바꿔주세요중요&quot;&gt;그리고 나의변수를 클릭해서 아까 만든 시간으로 바꿔주세요!!(중요)&lt;/h4&gt;
&lt;h4 id=&quot;추가로-제어-탭에-들어가서-무한-반복하기-그리고-안쪽에-1초-기다리기--변수-탭에-들어가서-나의-변수를-1만큼-바꾸기를-밑에-두고-똑같이-시간으로-바꿔주세요&quot;&gt;추가로 제어 탭에 들어가서 무한 반복하기, 그리고 안쪽에 1초 기다리기 / 변수 탭에 들어가서 나의 변수를 1만큼 바꾸기를 밑에 두고 똑같이 시간으로 바꿔주세요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424694-4cd11100-30d1-11eb-8735-4e1522f1bf9a.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;다시-실행해서-살펴보면-시간이-1초마다-증가하는걸-볼수있을거에요&quot;&gt;다시 실행해서 살펴보면 시간이 1초마다 증가하는걸 볼수있을거에요!&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;여기에서 안바뀐다면 &lt;나의변수&gt;가 아니라 &lt;시간&gt;으로 되어있나 확인해보세요!&lt;/시간&gt;&lt;/나의변수&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100429221-5e69e700-30d8-11eb-8738-aa6a68a771ad.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;자-이제-빠르게-진행-1제어-만약-라면-2감지-색에-닿았는가스포이트-클릭-흰색-화살표로-색-바꿔주기-3동작-10만큼-움직이기를-끌어서-3만큼-움직이기로-바꿔줄게요-하얀-화살표에-닿으면-빠르게-갈수있게만들어줄거에요&quot;&gt;자 이제 빠르게 진행! 1.제어-만약 ~라면 2.감지-~색에 닿았는가?(스포이트 클릭, 흰색 화살표로 색 바꿔주기) 3.동작-10만큼 움직이기를 끌어서 3만큼 움직이기로 바꿔줄게요 하얀 화살표에 닿으면 빠르게 갈수있게만들어줄거에요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424869-8f92e900-30d1-11eb-8828-b9e77ff0bf19.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424900-9d486e80-30d1-11eb-99ea-f7c8c698bf69.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;위에서-했던것처럼-반복해서-초록색-이끼-구현-1제어-만약-라면-2감지-색에-닿았는가이끼색으로-변경-3제어-1초-기다리기를-004초-기다리기로-변경&quot;&gt;위에서 했던것처럼 반복해서 초록색 이끼 구현 1.제어-만약 ~라면 2.감지-~색에 닿았는가?(이끼색으로 변경) 3.제어-1초 기다리기를 0.04초 기다리기로 변경&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;1초로 하면 캐릭터가 진행을 못해요 ㅋ큐ㅠㅠㅠ&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;게임이-너무-쉬우면-스프라이트-크기를-키우고-어렵다면-크기를-줄이면-됩니다&quot;&gt;게임이 너무 쉬우면 스프라이트 크기를 키우고, 어렵다면 크기를 줄이면 됩니다!&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424937-ac2f2100-30d1-11eb-92c5-631463fe3fd4.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424943-af2a1180-30d1-11eb-8e71-0cf5c949e4ba.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이제-bgm배경음악을-넣을거에요-왼쪽-위에-코드-탭이-아닌-소리-탭을-클릭해주세요&quot;&gt;이제 bgm(배경음악)을 넣을거에요 왼쪽 위에 코드 탭이 아닌 소리 탭을 클릭해주세요&lt;/h4&gt;
&lt;h4 id=&quot;왼쪽-아래에-스피커-모양을-클릭해서-소리-고르기를-눌러주세요-그리고-bonk-cave-tada를-찾아서-추가해주세요&quot;&gt;왼쪽 아래에 스피커 모양을 클릭해서 소리 고르기를 눌러주세요. 그리고 Bonk, Cave, Tada를 찾아서 추가해주세요!!&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;임의의 소리를 듣고 추가해도 상관없습니다.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424971-b8b37980-30d1-11eb-9a77-7527dd313d8c.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100424982-be10c400-30d1-11eb-8865-d418782d1b26.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;다-하시면-이렇게-됐을텐데-다시-코드로-돌아옵니다&quot;&gt;다 하시면 이렇게 됐을텐데 다시 코드로 돌아옵니다.&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100425006-c963ef80-30d1-11eb-8b50-81c1a63d377c.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;이번에도-시간을-했을때처럼-밑에블록추가가-아닌-옆에다-둘거에요-1이벤트-클릭했을때-2제어-무한반복하기-3소리-cave를-끝까지-재생하기&quot;&gt;이번에도 시간을 했을때처럼 밑에블록추가가 아닌 옆에다 둘거에요. 1.이벤트-클릭했을때 2.제어-무한반복하기 3.소리-Cave를 *끝까지 재생하기&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Cave가 아니라면 클릭해서 Cave로 바꿔주세요! 이거를 배경음으로 쓸거랍니다.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100425045-da146580-30d1-11eb-8bd8-fb00010da5eb.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;cave처럼-소리에서-이번엔-끝까지-재생하기가-아닌-재생하기를-끌고와서-색에-닿았는가-밑에-각각-옮겨주시고-bonktada로-바꿀게요&quot;&gt;Cave처럼 소리에서 이번엔 끝까지 재생하기가 아닌 재생하기를 끌고와서 색에 닿았는가 밑에 각각 옮겨주시고 Bonk,Tada로 바꿀게요&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100425107-f2848000-30d1-11eb-9174-73b27a3d5153.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h4 id=&quot;시작할때-부서진-모양-상태에서-실행되면-안되기때문에-이렇게-처음에-모양을-기본-모양으로-시작되도록-바꿔주세요&quot;&gt;시작할때 부서진 모양 상태에서 실행되면 안되기때문에 이렇게 처음에 모양을 기본 모양으로 시작되도록 바꿔주세요.&lt;/h4&gt;
&lt;h4 id=&quot;그리고-다시-실행해볼게요-벽에-닿았을-때-소리와-도착했을-때-소리가-나죠-이제-진짜-게임같네요&quot;&gt;그리고 다시 실행해볼게요!! 벽에 닿았을 때 소리와 도착했을 때 소리가 나죠? 이제 진짜 게임같네요.&lt;/h4&gt;
&lt;h2 id=&quot;그럼-모두-고생많았어요-여기까지-마무리해볼게요-이-파일은-자기-컴퓨터에-저장해서-스크래치-홈페이지에-로그인하고-파일-올려서-자기만의-작업실에-업데이트하는거를-추천합니다&quot;&gt;그럼 모두 고생많았어요. 여기까지 마무리해볼게요. 이 파일은 자기 컴퓨터에 저장해서 스크래치 홈페이지에 로그인하고 파일 올려서 자기만의 작업실에 업데이트하는거를 추천합니다!&lt;/h2&gt;
&lt;h2 id=&quot;코드-완성본&quot;&gt;코드 완성본&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100425945-7428dd80-30d3-11eb-8d58-eddccb105b56.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;h2 id=&quot;추가로-상어와-돌아가는-막대를-추가한-영상입니다&quot;&gt;추가로 상어와 돌아가는 막대를 추가한 영상입니다.&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=q5tLenXgD2Q&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/q5tLenXgD2Q/0.jpg&quot; alt=&quot;유튜브&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Thu, 01 Oct 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/10/01/swim/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/10/01/swim/</guid>
        
        <category>스크래치</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title>스크래치 프로그램 사용법 간단 소개</title>
        <description>&lt;h2 id=&quot;자-오늘은-스크래치-프로그램-사용법을-간단하게-소개하겠습니다&quot;&gt;자 오늘은 스크래치 프로그램 사용법을 간단하게 소개하겠습니다.&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100429081-2c588500-30d8-11eb-93c1-9b944bec086a.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;1번은 어떤 코드를 쓸건지 메뉴형식의 버튼으로 구분되어있는 탭이에요&lt;/li&gt;
  &lt;li&gt;2번은 실제 코드블럭들이 있는 탭으로, 저 코드들을 3번 탭으로 끌어주면 코드가 동작해요&lt;/li&gt;
  &lt;li&gt;3번은 실제로 코드를 짜주는 곳이에요. 나중에 설명할텐데 코드는 각 스프라이트(캐릭터) 마다 동작해요&lt;/li&gt;
  &lt;li&gt;4번은 실행화면이에요 위에 초록색 깃발을 누르면 실행하고 빨간색 네모버튼을 누르면 정지해요 그리고 우측의 확대,축소,보통버튼으로 크기를 조절할 수 있어요&lt;/li&gt;
  &lt;li&gt;5번은 스프라이트(캐릭터)가 오는 곳이에요&lt;/li&gt;
  &lt;li&gt;6번은 배경이 오는 곳이에요&lt;/li&gt;
  &lt;li&gt;7번은 스프라이트의 모양이나 배경모양, 소리등을 바꿀 수 있는 곳이에요&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;마지막으로-파일을-눌러서-나오는-것-설명&quot;&gt;마지막으로 파일을 눌러서 나오는 것 설명&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;새로 만들기는 프로젝트를 새로 만드는 메뉴!&lt;/li&gt;
  &lt;li&gt;Load from your computer는 친구가 만들거나 다운로드 받은 스크래치 프로젝트 파일을 여는 메뉴에요&lt;/li&gt;
  &lt;li&gt;컴퓨터에 저장하기는 내가 만든 프로젝트를 컴퓨터에 파일로 저장하는거에요
    &lt;blockquote&gt;
      &lt;p&gt;프로젝트를 만들고 꼭 저장을 해주고 홈페이지에 로그인해서 자신의 작업실에 파일을 올려요!&lt;/p&gt;
    &lt;/blockquote&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Wed, 30 Sep 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/09/30/introduce/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/09/30/introduce/</guid>
        
        <category>스크래치</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title>스크래치 가입</title>
        <description>&lt;h2 id=&quot;먼저-스크래치를-배우기에-앞서-홈페이지에-가입하자&quot;&gt;먼저 스크래치를 배우기에 앞서, 홈페이지에 가입하자&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://scratch.mit.edu/&quot;&gt;스크래치 사이트&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;우측 상단의 스크래치 가입 버튼을 누른다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100150950-ce634c00-2ee3-11eb-9b8a-734fac1403f9.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;아이디와 비밀번호를 입력한다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100150960-d15e3c80-2ee3-11eb-8a53-83bc7581bf5b.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100150972-d4592d00-2ee3-11eb-8b8e-fcd386a9422d.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;화살표를 누르고 K를 입력해 Korea, Republic of를 선택해준다. 참고로 위에 Korea, Democratic ~~는 북한이다 ㅋㅋㅋ
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100150983-d7541d80-2ee3-11eb-9d95-9be739a4bd6e.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100150993-d9b67780-2ee3-11eb-8904-afffd470198a.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;태어난 날짜를 선택한다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100151000-dc18d180-2ee3-11eb-8cac-69f9475a81cb.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;성별을 선택한다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100151005-df13c200-2ee3-11eb-9070-d4842ffe9090.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;이메일을 입력하고 계정 만들기를 누른다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100151011-e1761c00-2ee3-11eb-994e-cfe082268afc.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;자신의 이메일로 계정 인증 메일이 날라오는데, 계정 인증 버튼을 눌러주자
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100151016-e4710c80-2ee3-11eb-99bc-f9cc54e84023.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;로그인-이후에-우측-상단-아이디를-클릭해-내-작업실에-들어가면-내가-컴퓨터로-만든-스크래치-파일을-올릴-수-있다&quot;&gt;로그인 이후에 우측 상단 아이디를 클릭해, 내 작업실에 들어가면 내가 컴퓨터로 만든 스크래치 파일을 올릴 수 있다.&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;집이 아닌 다른 장소(학교 컴퓨터실)에서 작업을 하고 파일로 저장을 하고 업로드를 하면 계속 유지할 수 있다는 뜻이다.
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100151867-251d5580-2ee5-11eb-8636-eaa392df4e41.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100151870-277faf80-2ee5-11eb-8b13-aaa7689ed5a9.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Tue, 29 Sep 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/09/29/join/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/09/29/join/</guid>
        
        <category>스크래치</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title>스크래치 설치</title>
        <description>&lt;h2 id=&quot;스크래치를-pc에-설치하기&quot;&gt;스크래치를 PC에 설치하기&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://scratch.mit.edu/download&quot;&gt;스크래치 다운로드 사이트&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100147666-06b45b80-2edf-11eb-9736-95c57a22d79a.png&quot; alt=&quot;image&quot; /&gt;
여기 밑에 윈도우, 맥중에 선택해서 밑에 바로 다운로드 버튼을 누른다(열기 혹은 다운로드로 다운로드한다)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100147911-55fa8c00-2edf-11eb-839c-0c8fd6cefdac.png&quot; alt=&quot;image&quot; /&gt;
Only for me를 선택한 후 설치를 한다&lt;/p&gt;
&lt;h2 id=&quot;설치가-다-끝나면&quot;&gt;설치가 다 끝나면…&lt;/h2&gt;
&lt;p&gt;바탕화면에 바로가기 파일을 더블클릭 해주거나, 못찾겠으면 Ctrl키와 Alt사이에 윈도우키를 눌러서 Scra라고 입력해주고
Scratch Desktop을 열어준다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100148051-8e9a6580-2edf-11eb-9ba8-9c9580dd1c94.png&quot; alt=&quot;image&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100148079-9b1ebe00-2edf-11eb-8b0a-924680200b00.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;실행한-화면&quot;&gt;실행한 화면&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100148288-e5a03a80-2edf-11eb-88f0-0ea5cb303444.png&quot; alt=&quot;image&quot; /&gt;
간혹가다 한글이 아닌 경우엔 저기 버튼을 눌러서 한국어를 눌러주자
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/100148307-ea64ee80-2edf-11eb-9477-688b02b341ed.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 28 Sep 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/09/28/scratch_install/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/09/28/scratch_install/</guid>
        
        <category>스크래치</category>
        
        <category>scratch</category>
        
        
        <category>scratch</category>
        
      </item>
    
      <item>
        <title> Youtube Computer Recoding with Cover(컴퓨터로 유튜브 영상을 녹화할때 보이고싶지 않은 부분을 가려주는 프로그램) </title>
        <description>&lt;h2 id=&quot;youtube-computer-recoding-with-cover&quot;&gt;Youtube Computer Recoding with Cover&lt;/h2&gt;

&lt;h4 id=&quot;컴퓨터로-유튜브-영상을-녹화할때-보이고싶지-않은-부분을-가려주는-프로그램입니다&quot;&gt;컴퓨터로 유튜브 영상을 녹화할때 보이고싶지 않은 부분을 가려주는 프로그램입니다!!&lt;/h4&gt;
&lt;h4 id=&quot;프로그램-종료시-크기를-기억하며-도움창을-다시-열지-않음-눌렀음에도-2일동안-프로그램을-사용하지-않는다면-다시-창이-뜨게-됩니다-계속-사용해주세요&quot;&gt;프로그램 종료시 크기를 기억하며, 도움창을 다시 열지 않음 눌렀음에도, 2일동안 프로그램을 사용하지 않는다면 다시 창이 뜨게 됩니다! 계속 사용해주세요&lt;/h4&gt;
&lt;h4 id=&quot;프로그램-문의-광고-문의는-lsb530navercom로-주시면-됩니다&quot;&gt;프로그램 문의, 광고 문의는 lsb530@naver.com로 주시면 됩니다^^&lt;/h4&gt;
&lt;h3 id=&quot;다운로드-링크-첨부-밑에&quot;&gt;다운로드 링크 첨부 밑에!!!&lt;/h3&gt;

&lt;h3 id=&quot;coverareaforyoutuber-아래-클릭&quot;&gt;CoverAreaForYoutuber 아래 클릭&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/lsb530/lsb530.github.io/files/4588701/CoverAreaForYoutuber.zip&quot;&gt;CoverAreaForYoutuber.zip&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 03 May 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/05/03/coverForYoutuber/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/05/03/coverForYoutuber/</guid>
        
        <category>c#</category>
        
        <category>youtube</category>
        
        <category>thumb</category>
        
        <category>유튜브</category>
        
        <category>썸네일</category>
        
        
        <category>c#</category>
        
      </item>
    
      <item>
        <title> 개발자의 길을 포기했다가 한쪽 발만 담그고 걸어가고있다 </title>
        <description>&lt;h2 id=&quot;2020년에-대학교를-졸업을-하면서&quot;&gt;2020년에 대학교를 졸업을 하면서…&lt;/h2&gt;

&lt;h4 id=&quot;c언어를-시작으로-개발을-배웠지만&quot;&gt;C언어를 시작으로 개발을 배웠지만…&lt;/h4&gt;
&lt;p&gt;막상 졸업을 하고나니까 보니까 가볍게 본다면 쉬운 분야도 많고 노가다같은 분야도 많고
쉽게 돈 벌수 있는 길도 있다. 하지만 깊게 보고 큰 기업을 가고싶다면 개발은 어렵고 복잡한 일이 맞는것 같다.
그리고 학점도 잘 나온 편이 아니고 그동안 코딩테스트를 위한 알고리즘을 판 것도, 엄청난 수상 내역도, 대단한 인턴 경험이 있는것도 아니다.
그래서 나는 두려운 사기업을 놓고 공기업을 준비하려고 계획했었다.
토익, 토익스피킹, 한국사, 기사자격증, NCS, 면접준비, 자소서, 인턴경험 이정도가 공기업을 위한 스펙이다.
필수는 아니지만 다 가산점이 있어서 고고익선, 다다익선이라고 불리며 필요한 것들이다.
2학년 말부터 잘 준비를 해왔고 학점도 괜찮았다면 사기업으로 준비를 했을텐데 후후후…&lt;/p&gt;

&lt;h4 id=&quot;그러다가-지인의-요청으로-작은-온라인마켓을-도와주게-되었다&quot;&gt;그러다가 지인의 요청으로 작은 온라인마켓을 도와주게 되었다.&lt;/h4&gt;
&lt;p&gt;이제 오퍼가 들어온 상황이고 나는 ok를 하였지만, 개발책 다 집어던지고 오래된거 버리고 중고책으로 팔고 있는 시기에 콜이왔네?
그냥저냥하는 열정없는 개발자보다는 잘할 자신이 있었지만, 단순히 면접어필만 하고 회사를 들어가기 싫었던 나라서 개발직 던지고 블라인드를 위한
공기업을 준비하고 있었는데 다시 개발의 길로 걸으란다. 그렇게 엄청 어렵지도 그러나 쉽지도 않겠지만 잘되서 이쪽길로 간다면
쉽게쉽게 돈을 벌 수 있는 아이디어는 구상해놓았긴 했다.&lt;/p&gt;

&lt;h3 id=&quot;2020년-1월말-코로나로-인해-마비된-대한민국&quot;&gt;2020년 1월말 코로나로 인해 마비된 대한민국&lt;/h3&gt;
&lt;p&gt;속에서 열심히 일도 하고 공부도 해서 개발쪽으로 뜻을 두던, 공기업으로 취업을 하던 나 자신한테 응원의 메세지를 보내는 3월 5일이 될것같다.
화이팅하자. Boki!!!! 아자아자&lt;/p&gt;
</description>
        <pubDate>Thu, 05 Mar 2020 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2020/03/05/coming/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2020/03/05/coming/</guid>
        
        <category>daily</category>
        
        <category>job</category>
        
        <category>future</category>
        
        
        <category>daily</category>
        
      </item>
    
      <item>
        <title> 뷰 플리퍼를 이용하여 자동 사진보기 앱을 만들어보자 </title>
        <description>&lt;h2 id=&quot;뷰플리퍼를-이용하여-자동-사진-보기앱-예제&quot;&gt;뷰플리퍼를 이용하여 자동 사진 보기앱 예제&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;자동으로 돌아가는 사진앱이다&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70378462-f456b000-1963-11ea-8a13-ee945c28c905.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;미리-자신이-준비한-그림파일들을-drawble-폴더에-넣어주자&quot;&gt;미리 자신이 준비한 그림파일들을 drawble 폴더에 넣어주자&lt;/h3&gt;
&lt;h4 id=&quot;파일-ctrlc-해주고-자기만의-ide에서-drawable-폴더를-선택한-채로-ctrlv해주면-된다&quot;&gt;파일 Ctrl+C 해주고 자기만의 IDE에서 drawable 폴더를 선택한 채로 Ctrl+V해주면 된다&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;이름을 클릭하면 원본 크기로 파일을 다운받을 수 있다&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384498-a58c3300-19c2-11ea-8fdc-4c0ba5f375e5.jpg&quot; alt=&quot;honeycomb&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384498-a58c3300-19c2-11ea-8fdc-4c0ba5f375e5.jpg&quot;&gt;honeycomb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384499-a58c3300-19c2-11ea-9bb5-6bb83265f3f0.jpg&quot; alt=&quot;cupcake&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384499-a58c3300-19c2-11ea-9bb5-6bb83265f3f0.jpg&quot;&gt;cupcake&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384500-a624c980-19c2-11ea-8c19-e5842244252e.jpg&quot; alt=&quot;donut&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384500-a624c980-19c2-11ea-8c19-e5842244252e.jpg&quot;&gt;donut&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384501-a624c980-19c2-11ea-90bd-6d17f2bd8b7c.jpg&quot; alt=&quot;eclair&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384501-a624c980-19c2-11ea-90bd-6d17f2bd8b7c.jpg&quot;&gt;eclair&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;horizontal&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnStart&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_weight=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;사진보기 시작&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnStop&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_weight=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;사진보기 정지&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;ViewFlipper&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/viewFlipper1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/imageView1&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/cupcake&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/imageView2&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/donut&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/imageView3&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/eclair&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/imageView4&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/honeycomb&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/ViewFlipper&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;package-부분은-개개인마다-다르므로-import-구문부터-복사하는-것을-권장한다&quot;&gt;package 부분은 개개인마다 다르므로 import 구문부터 복사하는 것을 권장한다&lt;/h4&gt;
&lt;h4 id=&quot;추가로-mainactivity이름도-다를-수-있기때문에-주의해서-복사하고-복사보다는-직접-쳐보는-것을-권장하는-바이다&quot;&gt;추가로 MainActivity이름도 다를 수 있기때문에 주의해서 복사하고, 복사보다는 직접 쳐보는 것을 권장하는 바이다&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.viewflipper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.ViewFlipper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnStart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnStop&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ViewFlipper&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;viewFlipper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnStart&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnStart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;btnStop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnStop&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;viewFlipper&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ViewFlipper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;viewFlipper1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;viewFlipper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setFlipInterval&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnStart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;viewFlipper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;startFlipping&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;btnStop&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;viewFlipper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;stopFlipping&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;결과-화면&quot;&gt;결과 화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70378508-67602680-1964-11ea-9f98-93502590f655.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70378512-76df6f80-1964-11ea-8085-602e739eb4c9.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/viewFlipper/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/viewFlipper/</guid>
        
        <category>ViewFlipper</category>
        
        <category>ViewContainer</category>
        
        <category>Flipping</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> 간단 웹 뷰 만들어보기 </title>
        <description>&lt;h2 id=&quot;간단한-웹뷰를-만들어봅니다&quot;&gt;간단한 웹뷰를 만들어봅니다&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379009-00923b80-196b-11ea-96b2-9ed0513c70b5.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379013-0851e000-196b-11ea-9197-0845107d8ecd.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;manifests-androidmanifestxml에서-추가시켜주자&quot;&gt;manifests-&amp;gt;AndroidManifest.xml에서 추가시켜주자&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;&amp;lt;application 행 위에 다음 한 행을 추가한다 - 인터넷 사용권한을 허용해주는 코드이다&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AndroidManifest.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;manifest&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;package=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;com.example.boki.simplewebbrowser&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.permission.INTERNET&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;application&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:allowBackup=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:icon=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/emo_im_cool&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:label=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;웹브라우저&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:logo=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/web&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:roundIcon=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/web&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:theme=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@style/AppTheme&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;activity&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:label=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;간단 웹브라우저&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;intent-filter&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;action&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.intent.action.MAIN&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

                &lt;span class=&quot;nt&quot;&gt;&amp;lt;category&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.intent.category.LAUNCHER&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/intent-filter&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/activity&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/application&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/linearLayout1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;horizontal&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;EditText&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/edtUrl&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_weight=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:hint=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;URL을 입력하세요.&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:singleLine=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnGo&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;이동&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnBack&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;이전&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;WebView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/webView1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:clickable=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/WebView&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;package-부분은-개개인마다-다르므로-import-구문부터-복사하는-것을-권장한다&quot;&gt;package 부분은 개개인마다 다르므로 import 구문부터 복사하는 것을 권장한다&lt;/h4&gt;
&lt;h4 id=&quot;추가로-mainactivity이름도-다를-수-있기때문에-주의해서-복사하고-복사보다는-직접-쳐보는-것을-권장하는-바이다&quot;&gt;추가로 MainActivity이름도 다를 수 있기때문에 주의해서 복사하고, 복사보다는 직접 쳐보는 것을 권장하는 바이다&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.simplewebbrowser&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.webkit.WebResourceRequest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.webkit.WebSettings&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.webkit.WebView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.webkit.WebViewClient&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@SuppressWarnings&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;deprecation&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;edtUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnGo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnBack&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;WebView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;web&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;edtUrl&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;edtUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;btnGo&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnGo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;btnBack&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnBack&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;web&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;WebView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;webView1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;web&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setWebViewClient&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;CookWebViewClient&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;WebSettings&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;webSet&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;web&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getSettings&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;webSet&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setBuiltInZoomControls&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnGo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;web&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;loadUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;edtUrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnBack&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;web&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;goBack&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;CookWebViewClient&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;WebViewClient&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;shouldOverrideUrlLoading&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;WebView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;shouldOverrideUrlLoading&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379117-063c5100-196c-11ea-93be-9a05f86728cf.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;결과-화면&quot;&gt;결과 화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379125-15bb9a00-196c-11ea-8c8f-99804129b168.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379137-2cfa8780-196c-11ea-886f-d3cd79b1f244.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/simpleWebView/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/simpleWebView/</guid>
        
        <category>WebView</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> 간단한 일기장 앱 만들기 </title>
        <description>&lt;h2 id=&quot;내장-메모리-파일-처리를-이용한다&quot;&gt;내장 메모리 파일 처리를 이용한다&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383700-905cd780-19b5-11ea-81cf-4e61f77a9054.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;DatePicker&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/datePicker1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:datePickerMode=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;spinner&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:calendarViewShown=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;false&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;/DatePicker&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;EditText&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/edtDiary&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_weight=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:background=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;#00FF00&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:lines=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;8&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnWrite&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:enabled=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;false&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Button&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;package-부분은-개개인마다-다르므로-import-구문부터-복사하는-것을-권장한다&quot;&gt;package 부분은 개개인마다 다르므로 import 구문부터 복사하는 것을 권장한다&lt;/h4&gt;
&lt;h4 id=&quot;추가로-mainactivity이름도-다를-수-있기때문에-주의해서-복사하고-복사보다는-직접-쳐보는-것을-권장하는-바이다&quot;&gt;추가로 MainActivity이름도 다를 수 있기때문에 주의해서 복사하고, 복사보다는 직접 쳐보는 것을 권장하는 바이다&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.simplediary&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.Context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.DatePicker&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.io.FileInputStream&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.io.FileOutputStream&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.io.IOException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.util.Calendar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nc&quot;&gt;DatePicker&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;editDiary&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnWrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fileName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;간단 일기장&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;dp&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;DatePicker&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;datePicker1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;editDiary&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;edtDiary&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;btnWrite&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnWrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;//Todo 데이트피커 설정&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Calendar&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cal&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Calendar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getInstance&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cYear&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cal&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Calendar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;YEAR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cMonth&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cal&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Calendar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;MONTH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cDay&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cal&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Calendar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;DAY_OF_MONTH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;dp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cYear&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cMonth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cDay&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;DatePicker&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnDateChangedListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onDateChanged&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;DatePicker&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;year&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;monthOfYear&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dayOfMonth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;fileName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;year&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;_&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;monthOfYear&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;_&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dayOfMonth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;.txt&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;// month는 0부터 시작이 되어서 우리가 10을 선택해도 9가 되기때문에 1을 더해줬다&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;str&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;readDiary&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fileName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 현재 날짜의 파일을 읽어오는 메소드&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;editDiary&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;btnWrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setEnabled&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;//Todo 버튼 클릭 리스너&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;btnWrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nc&quot;&gt;FileOutputStream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;outFs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;openFileOutput&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fileName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;MODE_PRIVATE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;str&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;editDiary&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;outFs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getBytes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;outFs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
                    &lt;span class=&quot;nc&quot;&gt;Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;makeText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getApplicationContext&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fileName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; 이 저장됨&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;LENGTH_SHORT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;readDiary&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fileName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;IOException&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

                &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;//Todo 현재 날짜의 파일을 얻어 일기 내용을 반환&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;readDiary&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;diaryStr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;FileInputStream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inputStream&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;inputStream&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;openFileInput&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;byte&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;txt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;byte&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;];&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;inputStream&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;txt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;inputStream&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;diaryStr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;txt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;trim&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;btnWrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;수정하기&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;IOException&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;editDiary&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setHint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;일기 없음&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;btnWrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;새로 저장&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;diaryStr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;실행화면&quot;&gt;실행화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383763-97d0b080-19b6-11ea-8c2e-29e4a663d6f0.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383767-adde7100-19b6-11ea-87ed-3268362b843d.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383775-b46ce880-19b6-11ea-8934-7fe31376f801.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/simpleDiary/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/simpleDiary/</guid>
        
        <category>Diary</category>
        
        <category>DatePicker</category>
        
        <category>File</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> 미니 포토샵 앱 만들기 </title>
        <description>&lt;h2 id=&quot;view를-상속받은-클래스를-만들어서-inflate를-해준다&quot;&gt;View를 상속받은 클래스를 만들어서 inflate를 해준다&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383869-c51e5e00-19b8-11ea-86f8-2b31aa47c791.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383872-d1a2b680-19b8-11ea-85fa-bf891d5e57b5.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;미리-자신이-준비한-그림파일들을-drawble-폴더에-넣어주자&quot;&gt;미리 자신이 준비한 그림파일들을 drawble 폴더에 넣어주자&lt;/h3&gt;
&lt;h4 id=&quot;파일-ctrlc-해주고-자기만의-ide에서-drawable-폴더를-선택한-채로-ctrlv해주면-된다&quot;&gt;파일 Ctrl+C 해주고 자기만의 IDE에서 drawable 폴더를 선택한 채로 Ctrl+V해주면 된다&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;이름을 클릭하면 원본 크기로 파일을 다운받을 수 있다&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384604-88f0fa80-19c4-11ea-8e3c-766019db5063.jpg&quot; alt=&quot;lena256&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384604-88f0fa80-19c4-11ea-8e3c-766019db5063.jpg&quot;&gt;lena256&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384608-93ab8f80-19c4-11ea-8b59-e0be7f7e34ce.png&quot; alt=&quot;bright&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384608-93ab8f80-19c4-11ea-8b59-e0be7f7e34ce.png&quot;&gt;bright&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384610-93ab8f80-19c4-11ea-997d-10ee4a637621.png&quot; alt=&quot;dark&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384610-93ab8f80-19c4-11ea-997d-10ee4a637621.png&quot;&gt;dark&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384611-94442600-19c4-11ea-9a5f-d4861cb37cc4.png&quot; alt=&quot;gray&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384611-94442600-19c4-11ea-9a5f-d4861cb37cc4.png&quot;&gt;gray&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384612-94442600-19c4-11ea-9e2c-fea1277a8b07.png&quot; alt=&quot;rotate&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384612-94442600-19c4-11ea-9e2c-fea1277a8b07.png&quot;&gt;rotate&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384613-94442600-19c4-11ea-9c7d-22e420219dd6.png&quot; alt=&quot;zoom_in&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384613-94442600-19c4-11ea-9c7d-22e420219dd6.png&quot;&gt;zoom_in&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384614-94442600-19c4-11ea-9398-826bbad4bdb8.png&quot; alt=&quot;zoom_out&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384614-94442600-19c4-11ea-9398-826bbad4bdb8.png&quot;&gt;zoom_out&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AndroidManifest.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;manifest&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;package=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;com.example.boki.miniphotoshop&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;application&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:allowBackup=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:icon=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/lena256&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:hardwareAccelerated=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;false&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:label=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@string/app_name&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:roundIcon=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@mipmap/ic_launcher_round&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:supportsRtl=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:theme=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@style/AppTheme&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;activity&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;intent-filter&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;action&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.intent.action.MAIN&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

                &lt;span class=&quot;nt&quot;&gt;&amp;lt;category&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.intent.category.LAUNCHER&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/intent-filter&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/activity&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/application&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/iconLayout&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0dip&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_weight=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;horizontal&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageButton&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/ibZoomin&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/zoom_in&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageButton&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/ibZoomout&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/zoom_out&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageButton&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/ibRotate&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/rotate&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageButton&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/ibBright&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/bright&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageButton&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/ibDark&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/dark&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageButton&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/ibGray&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/gray&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/pictureLayout&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0dip&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_weight=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;9&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;horizontal&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;package-부분은-개개인마다-다르므로-import-구문부터-복사하는-것을-권장한다&quot;&gt;package 부분은 개개인마다 다르므로 import 구문부터 복사하는 것을 권장한다&lt;/h4&gt;
&lt;h4 id=&quot;추가로-mainactivity이름도-다를-수-있기때문에-주의해서-복사하고-복사보다는-직접-쳐보는-것을-권장하는-바이다&quot;&gt;추가로 MainActivity이름도 다를 수 있기때문에 주의해서 복사하고, 복사보다는 직접 쳐보는 것을 권장하는 바이다&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.miniphotoshop&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.Context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.Bitmap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.BitmapFactory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.Canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.ColorMatrix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.ColorMatrixColorFilter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.Paint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.ImageButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.LinearLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nc&quot;&gt;ImageButton&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ibZoomin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ibZoomout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ibRotate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ibBright&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ibDark&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ibGray&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;MyGraphicView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;graphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scaleX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scaleY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;angle&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;satur&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;미니 포토샵&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;LinearLayout&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pictureLayout&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;LinearLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;pictureLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;graphicView&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MyGraphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MyGraphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;pictureLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;addView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;graphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//        setContentView(new MyGraphicView(this));&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;clickIcons&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 6개 아이콘을 클릭했을 때 수행할 기능을 메소드로 정의함&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;//onCreate&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;clickIcons&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;ibZoomin&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ImageButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ibZoomin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;ibZoomin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;scaleX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.2f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;scaleY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.2f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;graphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;invalidate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 확대아이콘 클릭리스너&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;ibZoomout&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ImageButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ibZoomout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;ibZoomout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;scaleX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.2f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;scaleY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.2f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;graphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;invalidate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 축소아이콘 클릭리스너&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;ibRotate&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ImageButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ibRotate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;ibRotate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;angle&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;graphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;invalidate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 회전아이콘 클릭리스너&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;ibBright&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ImageButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ibBright&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;ibBright&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.2f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;graphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;invalidate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 밝기아이콘 클릭리스너&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;ibDark&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ImageButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ibDark&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;ibDark&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.2f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;graphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;invalidate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 어둡게아이콘 클릭리스너&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;ibGray&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ImageButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ibGray&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;ibGray&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;satur&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;satur&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;satur&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;graphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;invalidate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 흑백아이콘 클릭리스너&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;//TODO 임의 View클래스 만들기&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MyGraphicView&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;MyGraphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Context&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onDraw&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onDraw&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cenX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getWidth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cenY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getHeight&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;scale&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scaleX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scaleY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cenX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cenY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;angle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cenX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cenY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;nc&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Paint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;array&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
                    &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
                    &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
                    &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
                            &lt;span class=&quot;o&quot;&gt;};&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;ColorMatrix&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cm&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ColorMatrix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;satur&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;cm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setSaturation&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;satur&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;paint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setColorFilter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ColorMatrixColorFilter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;));&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// paint 이게 satur 밑에 있어야 작동함!&lt;/span&gt;

            &lt;span class=&quot;nc&quot;&gt;Bitmap&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;BitmapFactory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;decodeResource&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getResources&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;lena256&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getWidth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getWidth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getHeight&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getHeight&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawBitmap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;paint&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;recycle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;실행화면&quot;&gt;실행화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383917-7624f880-19b9-11ea-8a82-fd9c17cab815.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/miniPhotoShop/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/miniPhotoShop/</guid>
        
        <category>iconLayout</category>
        
        <category>pictureLayout</category>
        
        <category>Bitmap</category>
        
        <category>inflate</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> ListDialog를 써서 사용자 정보 입력 앱 만들기 </title>
        <description>&lt;h2 id=&quot;listdialog를-이용한다&quot;&gt;listDialog를 이용한다&lt;/h2&gt;

&lt;h3 id=&quot;미리-자신이-준비한-그림파일들을-drawble-폴더에-넣어주자&quot;&gt;미리 자신이 준비한 그림파일들을 drawble 폴더에 넣어주자&lt;/h3&gt;
&lt;h4 id=&quot;파일-ctrlc-해주고-자기만의-ide에서-drawable-폴더를-선택한-채로-ctrlv해주면-된다&quot;&gt;파일 Ctrl+C 해주고 자기만의 IDE에서 drawable 폴더를 선택한 채로 Ctrl+V해주면 된다&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;이름을 클릭하면 원본 크기로 파일을 다운받을 수 있다&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384660-b25e5600-19c5-11ea-814e-5a49d5648dfe.png&quot; alt=&quot;icon1&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384660-b25e5600-19c5-11ea-814e-5a49d5648dfe.png&quot;&gt;icon1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379552-61bd0d80-1971-11ea-9537-fb7548abbe87.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379556-77323780-1971-11ea-96d4-86ac9592a8a8.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;추가로 dialog1.xml, toast1.xml을 만들어준다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379564-93ce6f80-1971-11ea-9b72-5bab44ea07b9.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dialog1.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;TextView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;사용자 이름&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;EditText&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/dlgEdt1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;TextView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;이메일&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;EditText&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/dlgEdt2&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;toast1.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;horizontal&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:background=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;#FF0000&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/icon1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;TextView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/toastText1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;TextView&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:textSize=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;20dp&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@drawable/icon1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;`activity_main.xml&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center_horizontal&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;TextView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/tvName&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;사용자 이름&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;TextView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/tvEmail&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;이메일&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/button1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;여기를 클릭&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;package-부분은-개개인마다-다르므로-import-구문부터-복사하는-것을-권장한다&quot;&gt;package 부분은 개개인마다 다르므로 import 구문부터 복사하는 것을 권장한다&lt;/h4&gt;
&lt;h4 id=&quot;추가로-mainactivity이름도-다를-수-있기때문에-주의해서-복사하고-복사보다는-직접-쳐보는-것을-권장하는-바이다&quot;&gt;추가로 MainActivity이름도 다를 수 있기때문에 주의해서 복사하고, 복사보다는 직접 쳐보는 것을 권장하는 바이다&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.listdialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.DialogInterface&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AlertDialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.TextView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nc&quot;&gt;TextView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tvName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tvEmail&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;button1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dlgEdtName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dlgEdtEmail&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;TextView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;toastText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dialogView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;toastView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;사용자 정보 입력&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;tvName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;TextView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;tvName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;tvEmail&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;TextView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;tvEmail&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;button1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;button1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;button1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;dialogView&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;inflate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;dialog1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// dialog1.xml파일을 inflate하여 dialogView에 대입&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;AlertDialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;Builder&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AlertDialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;Builder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;사용자 정보 입력&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setIcon&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;icon1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dialogView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 인플레이트한 뷰를 대화상자로 사용&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setPositiveButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;확인&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;DialogInterface&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
                    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;DialogInterface&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;which&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;dlgEdtName&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dialogView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;dlgEdt1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;dlgEdtEmail&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dialogView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;dlgEdt2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;tvName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dlgEdtName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;tvEmail&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dlgEdtEmail&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
                    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setNegativeButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;취소&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;DialogInterface&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
                    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;DialogInterface&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;which&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;nc&quot;&gt;Toast&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;toast&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;toastView&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;inflate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toast1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// toast1.xml파일을 inflate하여 toastView에 대입&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;toastText&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;TextView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;toastView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toastText1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;toastText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;취소했습니다&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;toastView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
                    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;결과-화면&quot;&gt;결과 화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379616-2c64ef80-1972-11ea-8771-50d8d56eef1f.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379619-3f77bf80-1972-11ea-9b96-00fab8b7ee1e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379624-47cffa80-1972-11ea-9a03-2ef06012a713.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379627-51596280-1972-11ea-9d01-67d6abd55e79.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/listDialog/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/listDialog/</guid>
        
        <category>ContextMenu</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> (명시적 인텐트)Intent를 이용해 다른 액티비티와 데이터 송수신2 </title>
        <description>&lt;h2 id=&quot;intent를-이용해서-두-액티비티-간에-데이터를-전송하고-계산된-값을-넘겨본다2&quot;&gt;intent를 이용해서 두 액티비티 간에 데이터를 전송하고 계산된 값을 넘겨본다2&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384181-301e6380-19be-11ea-9ce3-0d935c96816b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;EditText&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/editNum1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:hint=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;숫자1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:inputType=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;number&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;EditText&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/editNum2&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:hint=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;숫자2&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:inputType=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;number&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnCalc&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;두 숫자의 곱 계산&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_sub.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;TextView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/textNum1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:hint=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;숫자1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:textSize=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;16dp&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;TextView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/textNum2&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:hint=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;숫자2&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:textSize=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;16dp&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnQuit&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;화면 닫기&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.datatrans&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.annotation.Nullable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.util.Log&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mEditNum1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mEditNum2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnCalc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;mEditNum1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;editNum1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;mEditNum2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;editNum2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;btnCalc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnCalc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnCalc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getApplicationContext&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SubActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;num1&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;parseInt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mEditNum1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()));&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;num2&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;parseInt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mEditNum2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()));&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;startActivityForResult&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onActivityResult&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;requestCode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;resultCode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nd&quot;&gt;@Nullable&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;requestCode&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;resultCode&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;RESULT_OK&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getIntExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;result&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;makeText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;두 숫자의 곱: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;LENGTH_SHORT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onActivityResult&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;requestCode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;resultCode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SubActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.datatrans&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.app.Activity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.TextView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.util.Locale&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SubActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Activity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_sub&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;TextView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;textNum1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;TextView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;textNum1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;TextView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;textNum2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;TextView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;textNum2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnQuit&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnQuit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;getIntent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;num1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getIntExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;num1&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;num2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getIntExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;num2&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;textNum1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Locale&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;KOREAN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;숫자1: %d&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;textNum2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Locale&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;KOREAN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;숫자2: %d&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;));&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnQuit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;result&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;setResult&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;RESULT_OK&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;finish&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AndroidManifest.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    package=&quot;com.example.boki.datatrans&quot;&amp;gt;

    &amp;lt;application
        android:allowBackup=&quot;true&quot;
        android:icon=&quot;@mipmap/ic_launcher&quot;
        android:label=&quot;@string/app_name&quot;
        android:roundIcon=&quot;@mipmap/ic_launcher_round&quot;
        android:supportsRtl=&quot;true&quot;
        android:theme=&quot;@style/AppTheme&quot;&amp;gt;
        &amp;lt;activity android:name=&quot;.MainActivity&quot;&amp;gt;
            &amp;lt;intent-filter&amp;gt;
                &amp;lt;action android:name=&quot;android.intent.action.MAIN&quot; /&amp;gt;

                &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt;
            &amp;lt;/intent-filter&amp;gt;
        &amp;lt;/activity&amp;gt;
        &amp;lt;activity android:name=&quot;.SubActivity&quot;/&amp;gt;
    &amp;lt;/application&amp;gt;

&amp;lt;/manifest&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;실행화면&quot;&gt;실행화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384406-5560a100-19c1-11ea-9b90-7d56d0c7e531.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384411-5c87af00-19c1-11ea-82a8-3f40a1f37096.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384414-63aebd00-19c1-11ea-9bb1-5db81d9429a5.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/intentData2/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/intentData2/</guid>
        
        <category>Activity</category>
        
        <category>Intent</category>
        
        <category>data</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> (명시적 인텐트)Intent를 이용해 다른 액티비티와 데이터 송수신1 </title>
        <description>&lt;h2 id=&quot;intent를-이용해서-두-액티비티-간에-데이터를-전송하고-계산된-값을-넘겨본다&quot;&gt;intent를 이용해서 두 액티비티 간에 데이터를 전송하고 계산된 값을 넘겨본다&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384136-5394de80-19bd-11ea-81f9-2819d473d62a.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;이제는 액티비티를 추가하면 AndroidManifest.xml에 새로운 액티비티 태그를 추가시켜줘야되는것을 알 것이다&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;EditText&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/edtNum1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:hint=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1번째 숫자&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;EditText&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/edtNum2&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:hint=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2번째 숫자&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnNewActivity&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;더하기&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;second.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnReturn&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;돌아가기&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SecondActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.dataintent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.app.Activity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SecondActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Activity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;second&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Second 액티비티&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inIntent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;getIntent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hapValue&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inIntent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getIntExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Num1&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inIntent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getIntExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Num2&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnReturn&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnReturn&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;btnReturn&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;outIntent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getApplicationContext&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;outIntent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hap&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hapValue&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;setResult&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;RESULT_OK&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;outIntent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;finish&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.dataintent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.annotation.Nullable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;메인 액티비티&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnNewActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnNewActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;btnNewActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;edtNum1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;edtNum1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;edtNum2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EditText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;edtNum2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getApplicationContext&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SecondActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Num1&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;parseInt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;edtNum1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()));&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Num2&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;parseInt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;edtNum2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()));&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;startActivityForResult&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onActivityResult&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;requestCode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;resultCode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nd&quot;&gt;@Nullable&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onActivityResult&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;requestCode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;resultCode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;resultCode&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;RESULT_OK&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hap&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getIntExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hap&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;makeText&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getApplicationContext&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;합계 :&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Toast&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;LENGTH_SHORT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AndroidManifest.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;manifest&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;package=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;com.example.boki.dataintent&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;application&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:allowBackup=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:icon=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@mipmap/ic_launcher&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:label=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@string/app_name&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:roundIcon=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@mipmap/ic_launcher_round&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:supportsRtl=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:theme=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@style/AppTheme&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;activity&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;intent-filter&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;action&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.intent.action.MAIN&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

                &lt;span class=&quot;nt&quot;&gt;&amp;lt;category&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.intent.category.LAUNCHER&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/intent-filter&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/activity&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;activity&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.SecondActivity&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:label=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Second 액티비티&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/application&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;실행화면&quot;&gt;실행화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384159-d453da80-19bd-11ea-8336-4a4d2d931de0.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384161-da49bb80-19bd-11ea-8757-05f43d16728a.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384164-e46bba00-19bd-11ea-9e4a-273f9d73479f.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/intentData/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/intentData/</guid>
        
        <category>Activity</category>
        
        <category>Intent</category>
        
        <category>data</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> 간단한 암시적(Implicit) 인텐트 앱 </title>
        <description>&lt;h2 id=&quot;implicit-intent를-이용해서-여러가지-기능들을-동작해본다&quot;&gt;implicit intent를 이용해서 여러가지 기능들을 동작해본다&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;먼저 AndroidManifest.xml에 uses-permission 권한을 3개 추가시켜준다&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AndroidManifest.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;manifest&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;package=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;com.example.boki.implicitintent&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.permission.CALL_PHONE&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.permission.ACCESS_COARSE_LOCATION&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;uses-permission&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.permission.ACCESS_FINE_LOCATION&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;application&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:allowBackup=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:icon=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@mipmap/ic_launcher&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:label=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@string/app_name&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:roundIcon=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@mipmap/ic_launcher_round&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:supportsRtl=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:theme=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@style/AppTheme&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;activity&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;intent-filter&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;nt&quot;&gt;&amp;lt;action&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.intent.action.MAIN&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

                &lt;span class=&quot;nt&quot;&gt;&amp;lt;category&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android.intent.category.LAUNCHER&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/intent-filter&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/activity&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/application&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;/manifest&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnDial&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;전화 걸기&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnWeb&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;홈페이지 열기&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnGoogle&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;구글 맵 열기&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnSearch&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;구글 검색하기&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnSms&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;문자 보내기&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/btnPhoto&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;사진 찍기&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.implicitintent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.app.SearchManager&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.net.Uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.provider.MediaStore&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;암시적 인텐트 예제&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnDial&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnDial&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnWeb&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnWeb&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnGoogle&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnGoogle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnSearch&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnSearch&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnSms&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnSms&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;btnPhoto&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;btnPhoto&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnDial&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Uri&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;tel:01012345678&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ACTION_DIAL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;startActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnWeb&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Uri&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.hanbit.co.kr&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ACTION_VIEW&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;startActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnGoogle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Uri&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://maps.google.com/maps?q=&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;37.554264&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;,&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;126.913598&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ACTION_VIEW&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;startActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnSearch&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ACTION_WEB_SEARCH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;SearchManager&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;QUERY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;안드로이드&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;startActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnSms&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ACTION_SENDTO&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;sms_body&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;안녕하세요?&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setData&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;smsto:&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;encode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;010-1234-4567&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)));&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;startActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;btnPhoto&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MediaStore&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ACTION_IMAGE_CAPTURE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;startActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;intent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;실행화면&quot;&gt;실행화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384459-1c74fc00-19c2-11ea-9589-ef0fe411450e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/implicit-Intent/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/implicit-Intent/</guid>
        
        <category>Implicit</category>
        
        <category>Intent</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> GirdView를 이용해 MoviePoster 만들기 </title>
        <description>&lt;h2 id=&quot;girdview를-이용해-영화-포스터-앱을-만들어보자&quot;&gt;GirdView를 이용해 영화 포스터 앱을 만들어보자&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;목표&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386498-74b8f780-19dc-11ea-95c2-343d07d859ff.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;영화 포스터&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;다른-이름으로-저장해서-다운받기를-바란다&quot;&gt;다른 이름으로 저장해서 다운받기를 바란다&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386519-cceff980-19dc-11ea-9740-434ea215587f.jpg&quot; alt=&quot;mov01&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386520-cceff980-19dc-11ea-9955-dd6040dad7d8.jpg&quot; alt=&quot;mov02&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386521-cceff980-19dc-11ea-8d14-00a4e5f8f3d9.jpg&quot; alt=&quot;mov03&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386522-cceff980-19dc-11ea-9976-b7d19513c35a.jpg&quot; alt=&quot;mov04&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386523-cd889000-19dc-11ea-834e-4aa7b465c399.jpg&quot; alt=&quot;mov05&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386524-cd889000-19dc-11ea-9387-71cabcf18579.jpg&quot; alt=&quot;mov06&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386525-cd889000-19dc-11ea-9a00-78775d7f35b3.jpg&quot; alt=&quot;mov07&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386526-cd889000-19dc-11ea-8a45-007299f05673.jpg&quot; alt=&quot;mov08&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386527-ce212680-19dc-11ea-838a-f41eb74e241c.jpg&quot; alt=&quot;mov09&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386528-ce212680-19dc-11ea-99af-4985c2bfa3eb.jpg&quot; alt=&quot;mov10&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386529-ce212680-19dc-11ea-8590-3cf058e7403e.jpg&quot; alt=&quot;mov11&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386530-ce212680-19dc-11ea-96f1-0aaac1772b8a.jpg&quot; alt=&quot;mov12&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386531-ceb9bd00-19dc-11ea-9f8b-fc8cdfa752e6.jpg&quot; alt=&quot;mov13&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386532-ceb9bd00-19dc-11ea-9a92-a87a5c55aa2d.jpg&quot; alt=&quot;mov14&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386533-ceb9bd00-19dc-11ea-80ec-919b3a9d497f.jpg&quot; alt=&quot;mov15&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386534-cf525380-19dc-11ea-9e83-537dc12a39bc.jpg&quot; alt=&quot;mov16&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386535-cf525380-19dc-11ea-8aa1-a747a0cdd931.jpg&quot; alt=&quot;mov17&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386536-cf525380-19dc-11ea-8895-89b4fe11e856.jpg&quot; alt=&quot;mov18&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386537-cfeaea00-19dc-11ea-9a58-c03b3f24ccc5.jpg&quot; alt=&quot;mov19&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386538-cfeaea00-19dc-11ea-98c7-1591389577c3.jpg&quot; alt=&quot;mov20&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386539-cfeaea00-19dc-11ea-8303-c9aa36937f76.jpg&quot; alt=&quot;mov21&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386540-d0838080-19dc-11ea-8d43-6dd488b5f1c4.jpg&quot; alt=&quot;mov22&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386541-d0838080-19dc-11ea-81e9-1a96b95d902e.jpg&quot; alt=&quot;mov23&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386542-d0838080-19dc-11ea-9bdd-769d62c2f8df.jpg&quot; alt=&quot;mov24&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386543-d0838080-19dc-11ea-8599-b38870d7fadf.jpg&quot; alt=&quot;mov25&quot; width=&quot;20%&quot; height=&quot;20%&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;아이콘&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70386544-d11c1700-19dc-11ea-828f-d5beb3d42f0d.png&quot; alt=&quot;movie_icon&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;GridView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/gridView1&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:numColumns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;4&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/GridView&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dialog.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;ImageView&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/ivPoster&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.movieposter_gridview&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.Context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AlertDialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.ViewGroup&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.BaseAdapter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.GridView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.ImageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;그리드뷰 영화 포스터&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;GridView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gv&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;GridView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;gridView1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;MyGridAdapter&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gAdapter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MyGridAdapter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;gv&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setAdapter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gAdapter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MyGridAdapter&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;BaseAdapter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Context&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;MyGridAdapter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Context&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// context 변수를 다른 메소드에서 사용하기 위함&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getCount&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 그리드뷰에 보여질 이미지의 개수를 반환하도록 수정&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;posterID&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Object&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getItem&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getItemId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// 이미지 파일을 배열로 초기화&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;posterID&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov01&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov02&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov03&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov04&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov05&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov06&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov07&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov08&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov09&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov10&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
                &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov11&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov12&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov13&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov14&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov15&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov16&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov17&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov18&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov19&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov20&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
                &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov21&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov22&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov23&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov24&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;mov25&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;};&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// 영화제목을 문자 배열로 초기화&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;posterTitle&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;써니&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;완득이&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;괴물&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;라디오스타&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;비열한거리&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;왕의남자&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;아일랜드&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;웰컴투동막골&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;헬보이&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;빽투더퓨처&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;여인의향기&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;쥬라기공원&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;포레스트검프&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;그라운드데이&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;혹성탈출-진화의시작&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;s&quot;&gt;&quot;아름다운비행&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;내이름은칸&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;해리포터&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;마더&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;킹콩을들다&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;쿵푸팬더2&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;짱구는못말려-미래의신부를구하라&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;아저씨&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;아바타&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;대부&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;};&lt;/span&gt;
        &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;convertView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ViewGroup&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 영화 포스터를 각 그리드뷰의 칸마다 이미지뷰를 생성해서 보여주게 함&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;ImageView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;imageView&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ImageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;imageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setLayoutParams&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;GridView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;LayoutParams&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;imageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setScaleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ImageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ScaleType&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;FIT_CENTER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 그리드뷰 칸의 중앙에 배치&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;imageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setPadding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;imageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setImageResource&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;posterID&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// R.drawable.mov0x 이미지를 로드하여 출력&lt;/span&gt;
            &lt;span class=&quot;c1&quot;&gt;//TODO 이미지를 클릭했을 때, 원래 이미지 크기가 보이도록 함&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;imageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setOnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;OnClickListener&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
                &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dialogView&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;inflate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;dialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;nc&quot;&gt;AlertDialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;Builder&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AlertDialog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;Builder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;nc&quot;&gt;ImageView&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ivPoster&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ImageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dialogView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ivPoster&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ivPoster&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setImageResource&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;posterID&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;posterTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pos&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setIcon&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;movie_icon&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dialogView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setNegativeButton&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;닫기&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;dlg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
                &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;});&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;imageView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/gridViewMoviePoster/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/gridViewMoviePoster/</guid>
        
        <category>GridView</category>
        
        <category>MoviePoster</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> XML을 이용한 컨텍스트 메뉴 만들기 </title>
        <description>&lt;h2 id=&quot;menu-xml들을-이용해서-contextmenu를-만들어보자&quot;&gt;menu xml들을 이용해서 contextMenu를 만들어보자&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379228-74cdde80-196d-11ea-83e4-1dcc0feb643b.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379233-80210a00-196d-11ea-8c1a-891bf4aff686.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;res 밑에 menu 폴더(directory)를 만들고, menu1.xml, menu2.xml을 만들어준다
&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379300-3127a480-196e-11ea-8960-7a9dcaf439de.png&quot; alt=&quot;image&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;menu1.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;menu xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&amp;gt;
    &amp;lt;item android:id=&quot;@+id/itemRed&quot;
        android:title=&quot;배경색(빨강)&quot;/&amp;gt;
    &amp;lt;item android:id=&quot;@+id/itemGreen&quot;
        android:title=&quot;배경색(초록)&quot;/&amp;gt;
    &amp;lt;item android:id=&quot;@+id/itemBlue&quot;
        android:title=&quot;배경색(파랑)&quot;/&amp;gt;
&amp;lt;/menu&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;menu2.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;menu xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&amp;gt;
    &amp;lt;item android:id=&quot;@+id/subRotate&quot;
        android:title=&quot;버튼 45도 회전&quot;/&amp;gt;
    &amp;lt;item android:id=&quot;@+id/subSize&quot;
        android:title=&quot;버튼 2개 확대&quot;/&amp;gt;
&amp;lt;/menu&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:app=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;xmlns:tools=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill_parent&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tools:context=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;nt&quot;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/baseLayout&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:orientation=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;vertical&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;android:gravity=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center_horizontal&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/button1&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;배경색 변경&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;android:id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;@+id/button2&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;wrap_content&quot;&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;android:text=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;버튼 변경&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.contextmenuusingxml&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.Color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.ContextMenu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.MenuInflater&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.MenuItem&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.widget.LinearLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nc&quot;&gt;LinearLayout&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;baseLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;button1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;button2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;layout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;activity_main&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;배경색 바꾸기(컨텍스트 메뉴)&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;baseLayout&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;LinearLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;baseLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;button1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;button1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;button2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Button&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;button2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;registerForContextMenu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;button1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;registerForContextMenu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;button2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreateContextMenu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;ContextMenu&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ContextMenu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;ContextMenuInfo&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;menuInfo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreateContextMenu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;menuInfo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;nc&quot;&gt;MenuInflater&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mInflater&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;getMenuInflater&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;button1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setHeaderTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;배경색 변경&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;mInflater&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;inflate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;menu1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;button2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setHeaderTitle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;버튼 변경&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;mInflater&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;inflate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;menu2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onContextItemSelected&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MenuItem&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//        return super.onContextItemSelected(item);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;switch&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getItemId&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;itemRed&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;baseLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setBackgroundColor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;RED&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;itemGreen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;baseLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setBackgroundColor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;GREEN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;itemBlue&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;baseLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setBackgroundColor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;BLUE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;subRotate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;button1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setRotation&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;45&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;button2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setRotation&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;45&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;subSize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;button1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setScaleX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;button2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setScaleY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;결과-화면&quot;&gt;결과 화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379258-ec037280-196d-11ea-8947-e0a87893024f.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379260-f4f44400-196d-11ea-85c6-9a3fc440e2ce.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70379264-00476f80-196e-11ea-92f6-9b8a8b4bac8e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/contextMenuUsingXML/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/contextMenuUsingXML/</guid>
        
        <category>ContextMenu</category>
        
        
        <category>android</category>
        
      </item>
    
      <item>
        <title> ImageView를 이용하지않고 Bitmap을 이용해서 이미지 출력 </title>
        <description>&lt;h2 id=&quot;view-클래스를-상속받아-새로운-클래스를-만들고-ondraw를-재정의해준다&quot;&gt;View 클래스를 상속받아 새로운 클래스를 만들고 onDraw를 재정의해준다&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383814-8cca5000-19b7-11ea-9325-c84ae2542fd2.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383816-99e73f00-19b7-11ea-964b-b5274f5cbd3e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;미리-자신이-준비한-그림파일들을-drawble-폴더에-넣어주자&quot;&gt;미리 자신이 준비한 그림파일들을 drawble 폴더에 넣어주자&lt;/h3&gt;
&lt;h4 id=&quot;파일-ctrlc-해주고-자기만의-ide에서-drawable-폴더를-선택한-채로-ctrlv해주면-된다&quot;&gt;파일 Ctrl+C 해주고 자기만의 IDE에서 drawable 폴더를 선택한 채로 Ctrl+V해주면 된다&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;이름을 클릭하면 원본 크기로 파일을 다운받을 수 있다&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70384690-1da82800-19c6-11ea-93ed-43e823e6df7e.jpg&quot; alt=&quot;jeju14&quot; /&gt;
&lt;a href=&quot;https://user-images.githubusercontent.com/39071798/70384690-1da82800-19c6-11ea-93ed-43e823e6df7e.jpg&quot;&gt;jeju14&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;activity_main.xml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;필요없다~! java에서 View를 커스터마이징해줄거니깐
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MainActivity.java&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;com.example.boki.basicbitmap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.content.Context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.Bitmap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.BitmapFactory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.graphics.Canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.support.v7.app.AppCompatActivity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.os.Bundle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;android.view.View&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;AppCompatActivity&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onCreate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;savedInstanceState&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;//        setContentView(R.layout.activity_main);&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;//TODO 클래스를 직접 setContentView할거임&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;setContentView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MyGraphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;));&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MyGraphicView&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;View&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;MyGraphicView&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Context&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
        &lt;span class=&quot;kd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;onDraw&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kd&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;onDraw&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;nc&quot;&gt;Bitmap&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;BitmapFactory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;decodeResource&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getResources&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;R&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;jeju14&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getWidth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getWidth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getHeight&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getHeight&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;canvas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;drawBitmap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;picY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;picture&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;recycle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;실행화면&quot;&gt;실행화면&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/39071798/70383825-d5820900-19b7-11ea-9dc2-f494ee26d61e.png&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 08 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://lsb530.github.io/2019/12/08/bitmapFactoryImg/</link>
        <guid isPermaLink="true">https://lsb530.github.io/2019/12/08/bitmapFactoryImg/</guid>
        
        <category>Bitmap</category>
        
        <category>BitmapFactory</category>
        
        <category>MyGraphicView</category>
        
        
        <category>android</category>
        
      </item>
    
  </channel>
</rss>