코드 정렬 단축키

Android Studio 2016. 11. 2. 11:58

코드 정렬 단축키

Ctrl + Alt + L

[추천어플] 드롭박스 :: 클라우드 편리한 세상 강력한 스마트폰 필수 어플

추천 어플/안드로이드 2012. 4. 9. 21:50

드롭박스 Dropbox 편리한 세상 , 스마트폰 필수 어플




드롭박스는 한마디로 말해 클라우드 서비스 입니다.

1. 스마트폰에서 업로드 하고 집의 PC에서 보고 또는
회사 PC에서도 볼 수 있습니다.
컴퓨터 PC에서 업로드 하고 스마트폰에서 보는건 당연한 일.
어디서? 어디서든지 내가 원하는 곳에서...

2. 친구글과 또는 사무실의 동료들과 파일을 공유하기가 너무 편리합니다.
정말 간단하지만 대박입니다.
스마트폰에서도 여러대의 컴퓨터에서도 접속이 가능합니다.


3. 접속이 필요 없는 컴퓨터나 스마폰은 UNLINK 해서 접속을 차단할 수도 있습니다.
이것 또한 좋은 기능입니다.



4. 실수로 파일을 삭제 했더라고 걱정하지 마세요
최대 30일 이전엔 다시 복구 할 수 있습니다. (잘못 알고 있음 알려주세요)



5. 드롭박스는 기본적으로 2G 무료로 줍니다.
친구들을 소개해 등록하는 방식으로 최대 8G 용량을 더 확보 할 수 있습니다.
SNS 연동등으로 추가 할 수 있습니다.



네이버 N드라이브, 다음 클라우드, KT 클라우드 등도 있지만
사용해 보시면 압니다. 왜 드롭박스를 사용하는지요.


그래서 저는 오래 보관해야 하고 자주 사용하지 않는 것거나 공유가 필요 없는 것들은

N드라이브나 다음 클라우드에 저장해 놓고
자주 공유하거나 사용해야 하는 것들은 드롭박스를 이용합니다.
참고하세용 ^^;;


단점은, 

-1. 서버가 외국에 있어서 좀 느리다.
         그러나 저는 국내 클라우드들 보다 느린거 잘 모르겠어요
-2. 기본 용량이 2G로 적다는 겁니다.
         하지만 용량을 무료로 늘릴 수 있으니 희망을 버리지 마세요.




팁 > 드롭박스 용량 늘리는 방법
+1. 가입할 때 추천링크를 통해 가입하는 방법과 친구를 추천하여 용량 추가하기

http://db.tt/7ITWWXEB 추천자와 가입자 모두에게 250M를 줍니다.



+2. Get Started를 이용하여 용량 추가하기



+3. 소셜 네트워크 서비스(SNS) 연동하여 용량 추가하기


+4. 컴퓨터 맥주소를 바꿔가며 ^^ 편법으로 늘리는 방법 ... 이건 패스



마지막으로 드롭박스 활용팁에 대한 소개 영상이 있어 함께 등록합니다.





다음 포스팅은
드롭박스와 구글뮤직을 이용한 음악동기화 시키는 방법을 다뤄보도록 하겠습니다


[추천어플] Turn Off The Lights 화면 끄기 및 잠금 기능

추천 어플/안드로이드 2012. 4. 4. 21:53

Turn Off The Lights 화면 끄기 및 잠금 기능


우리는 스마트폰 화면을 끄거나 잠그기 위해서 스마트폰 전원 버튼을 사용합니다

하지만 안드로이드 스마트폰은 반드시 전원버튼을 통해서만 화면을 끄거나 잠금 하지 않아도 됩니다

왜냐 위젯을 통해 아주 쉽고 빠르게 원터치로
화면을 끄거나 잠금 기능을 사용할 수 있기 때문이죠

가볍고 성능 만점인 화면 끄기와 잠금 기능을 제공하는 어플을 소개할까 합니다.

아주 간단하지만 당신의 스마트폰 생활을 편리하게 해 줄 것입니다.




1. 안드로이드 마켓에 접속해 Turn Off 또는 Turn Off The Light 라고 검색을 합니다

화면에 보시는 것과 같이 검색 화면에 출력이 됩니다.
당근 설치해야 되겠죠







2. 설치 후 아이콘을 클릭 후 들어가게 되면 위와 같은 화면이 뜹니다

Add icon desktop 버튼이 보이시죠? 그 버튼을 클릭하시면 위쳇 버튼이 화면에 생깁니다.

그러면 생겼는지 확인해 볼까요?

팁, Disable Now 버튼 보이시죠? 이 어플을 삭제 하기전에 반드시 이 버튼을 클릭 후 삭제 하여야 합니다.

같은 기능을 제공하는 다른 어플들을 보면 삭제 하려고 하는데 삭제가 안되요? 삭제 하게 해 주세요등
글이 있는 것들을 보게됩니다. 시스템설정에 들어가서 강제종료후 삭제하면 되는데
이 방법을 모르시는 분들이 많습니다.

하지만 이 Turn Off The Light 어플은 그러한 고민을 하지 않도록 친절히 버튼을 만들어 놓은 것을 볼 수 있습니다.






3. Turn Off The Light 아이콘이 화면에 생성된 것이 보이네요
지금 부터는 저 
Turn Off The Light 아이콘을 클릭해서 화면을 끄고 잠그세요 ^^ 너무 편해요



스마트폰을 더욱더 스마트하게 해주는 추천 어플 Turn Off The Light 였습니다.
끝까지 읽어 주셔서 감사합니다.

모든 추천 어플은 직접 써보고 충분히 활용 후 추천 합니다.


Chrome to Phone :: 개발자와 인터넷 서핑을 많이 하는 사용자 필수 어플1

추천 어플/안드로이드 2012. 3. 21. 14:20


개발자나 퍼블리셔, 디자이너 분들은
개발하던 페이지가 모바일에서 잘 보이나 체크해야 하는 경우

또는, 일반인들의 경우
웹서핑을 하다가 갑자기 밖으로 나가야 하지만
보던 페이지를 계속 봐야 할 경우

보던 주소가 길 경우 폰에서 주소를 입력하기도 그렇고
그렇다고 이메일로 보내고 받고 하는 것도 그렇고
너무 번잡 스럽습니다.

이럴때 구글 크롬 투 폰을 이용하면 한번의 클릭만으로 
컴퓨터에서 보던 웹페이지를 볼 수 있습니다.

정말 편리하죠?


@ 준비 할것은
# 구글 계정이 있어야 합니다.
# 어플에서도 구글 크롬 브라우저 에서도 로그인을 합니다.




그럼 여행을 떠나 볼까요?




1. 안드로이드 마켓에 들어 가서 Chrome to phone 또는 to phone 이라고 검색합니다.
위 아이콘과 깉은 화면이 나오면
설치 하기를 눌러서 

내 안드로이드 폰에 설치를 합니다.



 


2. 크롬 브라우저가 없 다면 구글 검색에서 "브라우저 크롬" 이라고 검색하셔서 설치 하세요 ^^


구글 크롬 브라우저에 보면 위와 그림과 같은 크롬 웹 스토어 아이콘이 있습니다.
저기로 들어 가세요.

찾지 못한다면 주소를 직접 입력해 들어 가셔도 됩니다.
https://chrome.google.com/webstore/category/home?utm_source=chrome-ntp-icon 







3. 크롬 웹 스토어에 들어 가셨다면
검색창에 "Chrome to phone" 이라고 검색을 합니다.

그러면 위 그림과 같이 나타 나는데 오른쪽에 "크롬에 추가" 를 누르면 바로 브라우저에 설치가 됩니다.
이미 저는 설치를 해서 그런지 설치했다는 표시가 뜨는 군요








4. 크롬에 설치가 되면 인터넷 브라우저 주소창 옆에
노란색 표시를 한 곳 처럼 아이콘이 생성이 됩니다.

앞으로 보던 웹페이지를 저 아이콘을 통해서 내 스마트폰으로 보내면 됩니다.
원 클릭인거죠 ㅎㅎㅎ 너무 좋아







5. 제 블로그 화면입니다.
제 블로그를 제 스마트폰으로 전송해 보겠습니다.

아까 생성된 아이콘을 클릭합니다.
참 쉽죠? ^^







6. 만약에 성공한다면 위 그림과 같이 "휴대전화로 전송했습니다" 라는 메세지가 뜹니다.

짜잔 아래 그림과 같이
제 블로그 모바일용 화면이 떴네요

대박이죠? ^^





너무 좋습니다.

개발 작업을 하다가도
웹페이지를 컴퓨터에서 보다가
소파에 누워서 보고 플때나

갑자기 나갈일이 생겨서 
급히 나가봐야 할 경우 정말 편합니다.

그럼 즐거운 스마트 생활을 누리시길 ...
 


P.S
다음은 내 폰에서 보는 브라우저 화면을
내 컴퓨터 크롬 브라우저로 보내는 방법에 대해 글을 쓸까 합니다.

많이 기대해 주세요 


<관련포스팅>



안드로이드, 아이폰, 아이패드 웹브라우저에서 css overflow 되도록 하기

카테고리 없음 2012. 3. 21. 10:23
웹브라우저에서 overflow 가 잘 되는데 
단말에 브라우저에서는 안됩니다. 

왜냐 막혀 있기 때문이죠 
그래도 되도록 해야죠 
왜? 필요하니까 ㅎㅎㅎ 

구현 방법은 다음과 같습니다. 


@ css 먼저 준비 /---------------------------------------
< style > 
.faContents { position:absolute; text-align:left; font-size:14px; font-family:돋움; width:242px;  } 

.overthrow { 
    overflow: auto; 
    -webkit-overflow-scrolling: touch; 
height:140px; 
} 
< /style >

@ HTML 준비 /----------------------------------------------
< html > 
  • 테스트1
  • 테스트2
  • 테스트3
  • 테스트4
  • 테스트5
  • 테스트6
  • 테스트7
  • 테스트8
< /html >

위와 같이 css 와 HTML 을 준비하고 

다음 사이트에 가서 overflow.js 파일을 다운 받아 옵니다. 


이젠 이 다운 받은 스크립트를 
불러 들여서 구현하시면 끝 

< script src="/common/js/overflow.js" >< /script > 

// 테스트 모바일 OS 
안드로이드 2.2, 2.3 
IOS 4.x, 5.x



@ overflow.js 전체 소스 /===============================================
/*! Overthrow v.0.1.0. An overflow:auto polyfill for responsive design. (c) 2012: Scott Jehl, Filament Group, Inc. http://filamentgroup.github.com/Overthrow/license.txt */
(function( w, undefined ){
	
	var doc = w.document,
		docElem = doc.documentElement,
		classtext = "overthrow-enabled",
	
		// Touch events are used in the polyfill, and thus are a prerequisite
		canBeFilledWithPoly = "ontouchmove" in doc,
		
		// The following attempts to determine whether the browser has native overflow support
		// so we can enable it but not polyfill
		overflowProbablyAlreadyWorks = 
			// Features-first. iOS5 overflow scrolling property check - no UA needed here. thanks Apple :)
			"WebkitOverflowScrolling" in docElem.style ||
			// Touch events aren't supported and screen width is greater than X
			// ...basically, this is a loose "desktop browser" check. 
			// It may wrongly opt-in very large tablets with no touch support.
			( !canBeFilledWithPoly && w.screen.width > 1200 ) ||
			// Hang on to your hats.
			// Whitelist some popular, overflow-supporting mobile browsers for now and the future
			// These browsers are known to get overlow support right, but give us no way of detecting it.
			(function(){
				var ua = w.navigator.userAgent,
					// Webkit crosses platforms, and the browsers on our list run at least version 534
					webkit = ua.match( /AppleWebKit\/([0-9]+)/ ),
					wkversion = webkit && webkit[1],
					wkLte534 = webkit && wkversion >= 534;
					
				return (
					/* Android 3+ with webkit gte 534
					~: Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13 */
					ua.match( /Android ([0-9]+)/ ) && RegExp.$1 >= 3 && wkLte534 ||
					/* Blackberry 7+ with webkit gte 534
					~: Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0 Mobile Safari/534.11+ */
					ua.match( / Version\/([0-9]+)/ ) && RegExp.$1 >= 0 && w.blackberry && wkLte534 ||
					/* Blackberry Playbook with webkit gte 534
					~: Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+ */   
					ua.indexOf( /PlayBook/ ) > -1 && RegExp.$1 >= 0 && wkLte534 ||
					/* Firefox Mobile (Fennec) 4 and up
					~: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:2.1.1) Gecko/ Firefox/4.0.2pre Fennec/4.0. */
					ua.match( /Fennec\/([0-9]+)/ ) && RegExp.$1 >= 4 ||
					/* WebOS 3 and up (TouchPad too)
					~: Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.48 Safari/534.6 TouchPad/1.0 */
					ua.match( /wOSBrowser\/([0-9]+)/ ) && RegExp.$1 >= 233 && wkLte534 ||
					/* Nokia Browser N8
					~: Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaN8-00/012.002; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.0 Mobile Safari/533.4 3gpp-gba 
					~: Note: the N9 doesn't have native overflow with one-finger touch. wtf */
					ua.match( /NokiaBrowser\/([0-9\.]+)/ ) && parseFloat(RegExp.$1) === 7.3 && webkit && wkversion >= 533
				);
			})(),
			
		// Easing can use any of Robert Penner's equations (http://www.robertpenner.com/easing_terms_of_use.html). By default, overthrow includes ease-out-cubic
		// arguments: t = current iteration, b = initial value, c = end value, d = total iterations
		// use w.overthrow.easing to provide a custom function externally, or pass an easing function as a callback to the toss method
		defaultEasing = function (t, b, c, d) {
			return c*((t=t/d-1)*t*t + 1) + b;
		},	
			
		enabled = false,
		
		// Keeper of intervals
		timeKeeper,
				
		/* toss scrolls and element with easing
		
		// elem is the element to scroll
		// options hash:
			* left is the desired horizontal scroll. Default is "+0". For relative distances, pass a string with "+" or "-" in front.
			* top is the desired vertical scroll. Default is "+0". For relative distances, pass a string with "+" or "-" in front.
			* duration is the number of milliseconds the throw will take. Default is 100.
			* easing is an optional custom easing function. Default is w.overthrow.easing. Must follow the easing function signature 
		*/
		toss = function( elem, options ){
			var i = 0,
				sLeft = elem.scrollLeft,
				sTop = elem.scrollTop,
				// Toss defaults
				o = {
					top: "+0",
					left: "+0",
					duration: 100,
					easing: w.overthrow.easing
				},
				endLeft, endTop;
			
			// Mixin based on predefined defaults
			if( options ){
				for( var j in o ){
					if( options[ j ] !== undefined ){
						o[ j ] = options[ j ];
					}
				}
			}
			
			// Convert relative values to ints
			// First the left val
			if( typeof o.left === "string" ){
				o.left = parseFloat( o.left );
				endLeft = o.left + sLeft;
			}
			else {
				endLeft = o.left;
				o.left = o.left - sLeft;
			}
			// Then the top val
			if( typeof o.top === "string" ){
				o.top = parseFloat( o.top );
				endTop = o.top + sTop;
			}
			else {
				endTop = o.top;
				o.top = o.top - sTop;
			}

			timeKeeper = setInterval(function(){					
				if( i++ < o.duration ){
					elem.scrollLeft = o.easing( i, sLeft, o.left, o.duration );
					elem.scrollTop = o.easing( i, sTop, o.top, o.duration );
				}
				else{
					if( endLeft !== elem.scrollLeft ){
						elem.scrollLeft = endLeft;
					}
					if( endTop !== elem.scrollTop ){
						elem.scrollTop = endTop;
					}
					intercept();
				}
			}, 1 );
			
			// Return the values, post-mixin, with end values specified
			return { top: endTop, left: endLeft, duration: o.duration, easing: o.easing };
		},
		
		// find closest overthrow (elem or a parent)
		closest = function( target, ascend ){
			return !ascend && target.className && target.className.indexOf( "overthrow" ) > -1 && target || closest( target.parentNode );
		},
				
		// Intercept any throw in progress
		intercept = function(){
			clearInterval( timeKeeper );
		},
			
		// Enable and potentially polyfill overflow
		enable = function(){
				
			// If it's on, 
			if( enabled ){
				return;
			}
			// It's on.
			enabled = true;
				
			// If overflowProbablyAlreadyWorks or at least the element canBeFilledWithPoly, add a class to cue CSS that assumes overflow scrolling will work (setting height on elements and such)
			if( overflowProbablyAlreadyWorks || canBeFilledWithPoly ){
				docElem.className += " " + classtext;
			}
				
			// Destroy everything later. If you want to.
			w.overthrow.forget = function(){
				// Strip the class name from docElem
				docElem.className = docElem.className.replace( classtext, "" );
				// Remove touch binding (check for method support since this part isn't qualified by touch support like the rest)
				if( doc.removeEventListener ){
					doc.removeEventListener( "touchstart", start, false );
				}
				// reset easing to default
				w.overthrow.easing = defaultEasing;
				
				// Let 'em know
				enabled = false;
			};
	
			// If overflowProbablyAlreadyWorks or it doesn't look like the browser canBeFilledWithPoly, our job is done here. Exit viewport left.
			if( overflowProbablyAlreadyWorks || !canBeFilledWithPoly ){
				return;
			}

			// Fill 'er up!
			// From here down, all logic is associated with touch scroll handling
				// elem references the overthrow element in use
			var elem,
				
				// The last several Y values are kept here
				lastTops = [],
		
				// The last several X values are kept here
				lastLefts = [],
				
				// lastDown will be true if the last scroll direction was down, false if it was up
				lastDown,
				
				// lastRight will be true if the last scroll direction was right, false if it was left
				lastRight,
				
				// For a new gesture, or change in direction, reset the values from last scroll
				resetVertTracking = function(){
					lastTops = [];
					lastDown = null;
				},
				
				resetHorTracking = function(){
					lastLefts = [];
					lastRight = null;
				},
				
				// After releasing touchend, throw the overthrow element, depending on momentum
				finishScroll = function(){
					// Come up with a distance and duration based on how 
					// Multipliers are tweaked to a comfortable balance across platforms
					var top = ( lastTops[ 0 ] - lastTops[ lastTops.length -1 ] ) * 8,
						left = ( lastLefts[ 0 ] - lastLefts[ lastLefts.length -1 ] ) * 8,
						duration = Math.max( Math.abs( left ), Math.abs( top ) ) / 8;
					
					// Make top and left relative-style strings (positive vals need "+" prefix)
					top = ( top > 0 ? "+" : "" ) + top;
					left = ( left > 0 ? "+" : "" ) + left;
					
					// Make sure there's a significant amount of throw involved, otherwise, just stay still
					if( !isNaN( duration ) && duration > 0 && ( Math.abs( left ) > 80 || Math.abs( top ) > 80 ) ){
						toss( elem, { left: left, top: top, duration: duration } );
					}
				},
			
				// On webkit, touch events hardly trickle through textareas and inputs
				// Disabling CSS pointer events makes sure they do, but it also makes the controls innaccessible
				// Toggling pointer events at the right moments seems to do the trick
				// Thanks Thomas Bachem http://stackoverflow.com/a/5798681 for the following
				inputs,
				setPointers = function( val ){
					inputs = elem.querySelectorAll( "textarea, input" );
					for( var i = 0, il = inputs.length; i < il; i++ ) {
						inputs[ i ].style.pointerEvents = val;
					}
				},
				
				// For nested overthrows, changeScrollTarget restarts a touch event cycle on a parent or child overthrow
				changeScrollTarget = function( startEvent, ascend ){
					if( doc.createEvent ){
						var newTarget = ( !ascend || ascend === undefined ) && elem.parentNode || elem.touchchild || elem,
							tEnd;
								
						if( newTarget !== elem ){
							tEnd = doc.createEvent( "HTMLEvents" );
							tEnd.initEvent( "touchend", true, true );
							elem.dispatchEvent( tEnd );
							newTarget.touchchild = elem;
							elem = newTarget;
							newTarget.dispatchEvent( startEvent );
						}
					}
				},
				
				// Touchstart handler
				// On touchstart, touchmove and touchend are freshly bound, and all three share a bunch of vars set by touchstart
				// Touchend unbinds them again, until next time
				start = function( e ){
					
					// Stop any throw in progress
					intercept();
					
					// Reset the distance and direction tracking
					resetVertTracking();
					resetHorTracking();
						
					elem = closest( e.target );
						
					if( !elem || elem === docElem || e.touches.length > 1 ){
						return;
					}			

					setPointers( "none" );
					var touchStartE = e,
						scrollT = elem.scrollTop,
						scrollL = elem.scrollLeft,
						height = elem.offsetHeight,
						width = elem.offsetWidth,
						startY = e.touches[ 0 ].pageY,
						startX = e.touches[ 0 ].pageX,
						scrollHeight = elem.scrollHeight,
						scrollWidth = elem.scrollWidth,
					
						// Touchmove handler
						move = function( e ){
						
							var ty = scrollT + startY - e.touches[ 0 ].pageY,
								tx = scrollL + startX - e.touches[ 0 ].pageX,
								down = ty >= ( lastTops.length ? lastTops[ 0 ] : 0 ),
								right = tx >= ( lastLefts.length ? lastLefts[ 0 ] : 0 );
								
							// If there's room to scroll the current container, prevent the default window scroll
							if( ( ty > 0 && ty < scrollHeight - height ) || ( tx > 0 && tx < scrollWidth - width ) ){
								e.preventDefault();
							}
							// This bubbling is dumb. Needs a rethink.
							else {
								changeScrollTarget( touchStartE );
							}
							
							// If down and lastDown are inequal, the y scroll has changed direction. Reset tracking.
							if( lastDown && down !== lastDown ){
								resetVertTracking();
							}
							
							// If right and lastRight are inequal, the x scroll has changed direction. Reset tracking.
							if( lastRight && right !== lastRight ){
								resetHorTracking();
							}
							
							// remember the last direction in which we were headed
							lastDown = down;
							lastRight = right;							
							
							// set the container's scroll
							elem.scrollTop = ty;
							elem.scrollLeft = tx;
						
							lastTops.unshift( ty );
							lastLefts.unshift( tx );
						
							if( lastTops.length > 3 ){
								lastTops.pop();
							}
							if( lastLefts.length > 3 ){
								lastLefts.pop();
							}
						},
					
						// Touchend handler
						end = function( e ){
							// Apply momentum based easing for a graceful finish
							finishScroll();	
							// Bring the pointers back
							setPointers( "auto" );
							setTimeout( function(){
								setPointers( "none" );
							}, 450 );
							elem.removeEventListener( "touchmove", move, false );
							elem.removeEventListener( "touchend", end, false );
						};
					
					elem.addEventListener( "touchmove", move, false );
					elem.addEventListener( "touchend", end, false );
				};
				
			// Bind to touch, handle move and end within
			doc.addEventListener( "touchstart", start, false );
		};
		
	// Expose overthrow API
	w.overthrow = {
		set: enable,
		forget: function(){},
		easing: defaultEasing,
		toss: toss,
		intercept: intercept,
		closest: closest,
		support: overflowProbablyAlreadyWorks ? "native" : canBeFilledWithPoly && "polyfilled" || "none"
	};
	
	// Auto-init
	enable();
		
})( this );