목록Android (496)
오늘도 공부
http://underclub.tistory.com/367 랩하는 프로그래머 블로그
// VideoView에는 기본 버튼들이 정의되어 있어서 앞에 글에서처럼 // MediaPlayer을 이용해 만들었을 때 버튼을 만들고 정의하는 과정이 필요없다. // 하지만 VIdeoView로 객체를 만들어 동영상을 재생시키면 무슨 설정을 해도 전체화면으로 나오게 할 수 없다 // 때문에 VIdeoView를 상속받은 클래스를 만들어 사용해야 한다. // manifest에서 해당 activity에 android:theme="@android:style/Theme.NoTitleBar.Fullscreen" // 옵션을 설정해도 해결되지 않아 만들게 되었다. class MyVideoView extends VideoView { public MyVideoView(Context context, AttributeS..
http://stackoverflow.com/questions/6520313/how-to-get-rtsp-links-android 에서 참조 package jp.ddo.gallop.android; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; import jp.ddo.gallop.android.youtube.*; import org.apache.http.HttpR..
package org.apache.android.media; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.webkit.URLUt..
출처 : http://croute.me/392 예전에 한번 버튼의 클릭이벤트에 대해서 고찰한적이 있었습니다. onClick()의 구현이 더 좋을까, OnClickListener 객체를 각각 생성해서 구현하는 것이 좋을까에 대한 내용이었습니다. 어쨋든 전 결론을 onClick()의 구현(implements)으로 내렸었죠. ( 버튼 클릭 이벤트 처리에 관한 고찰 : http://croute.me/326 ) 이번에는 저번과는 조금 다른 고찰입니다. 수많은 버튼을 사용해야 하는 경우, 하나씩 아이디를 onClick()에서 siwtch 문 안에 case로 정의내려 처리하기는 너무 곤욕이죠. 휴... 그래서 이런 방법을 생각해 보았습니다. 향상된 for문과 배열을 이용하는 방법. 접기 주의 깊게 향상된 반복문(En..
출처 : http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/ I have updated the quickaction implementation code so it can be used more efficient and the dialog will be automatically dismissed after pressing the action item. All the source codes now available via github so you can track the changes. Official Twitter application for Android has introduced new Android UI features a..
link from : http://www.siegmann.nl/epublib/android Android Epublib-core runs on Android. Reading, writing and manipulating epub files is fully supported. Requirements Slf4j-android. You can download this at http://www.slf4j.org/android/ Getting started Download epublib-core-latest.jar from https://github.com/downloads/psiegman/epublib/epublib-core-latest.jar Download slf4j-android Add both to yo..
http://dlucky.tistory.com/168
출처 : http://sankarganesh-info-exchange.blogspot.com/2011/04/dynamically-loading-datas-in-listview.html Dynamically Loading Data's (Adding Footer to ListView ) in ListView in Android Add a footer to List View and when the user clicks that Footer, you can show parse the next set of data and show it in the list. Step1: Create a Button Step2: Make it as Footer to the List View ListView myList; View ..
Monday, August 3, 2009 HTTP connection reuse in Android Alright, time for something new and hopefully useful, re-using HTTP connections in your application. I've yet to write an Android application that doesn't make any HTTP requests, and they tend to do it frequently. Since all of my applications are also heavily concurrent, passing around a default HttpClient instance will give you thread cont..
출처 : http://bluejames77.blog.me/80124862451 예전에 HttpClient을 쓴 법을 있는데.. 최신에 이것을 다시 쓸일이 있어 정리해봅니다. ^-^; 제가 짠 메소드인데 이것만 보면 아마 감이 딱 오시지 않을까 생각됩니다. private static String requestConvert ( String szFilePath, int nPageCount, String szThumbnailSize) { // 아래처럼 해서 넘길 값이 있다면 키와 밸류 형식으로 파라메타를 넘기게 됩니다 List qparams = new ArrayList(); qparams.add(new BasicNameValuePair("FilePath", szFilePath)); qparams.add(new ..
http://blog.naver.com/kippee/130068924726
private String writeXml(List messages){ XmlSerializer serializer = Xml.newSerializer(); StringWriter writer = new StringWriter(); try { serializer.setOutput(writer); serializer.startDocument("UTF-8", true); serializer.startTag("", "messages"); serializer.attribute("", "number", String.valueOf(messages.size())); for (Message msg: messages){ serializer.startTag("", "message"); serializer.attribute..
http://lomohome.com/316
출처 : http://bench87.tistory.com/38 외국사이트에서 퍼왔습니다. 스샷에 보이듯이 말풍선만 뛰울수 있습니다... 소스는 자꾸 안된다는 분이 많아서 제가 되도록 살짝 고쳤습니다.. Android MapView Balloons This project provides an easy way to annotate map overlay items with a simple information balloon when using the Android Maps external library (com.google.android.maps). It consists of BalloonOverlayView, a view representing the balloon that is displayed over ..
출처 : http://www.dingpong.net/tt/277 안드로이드의 EditText에 포커스가 가게 되면 기본적으로 폰에서 설정한 기본 언어에 대한 키보드로 노출이 됩니다. 그런데 ID 값과 같은 것을 입력 받아야 하는 EditText와 같은 경우에는 처음에 영문 키보드가 나오도록 하고 싶은 경우가 있을 수 있습니다. 그럴 경우 아래와 같은 라인을 추가하면 영문 키보드가 바로 나오도록 할 수 있습니다. android:inputType="textVisiblePassword" EditText의 XML에 위 라인을 추가하면 됩니다. 이것은 EditText에 password 모드를 설정하면 키보드가 영문으로 띄워지는 것을 생각해서 구현한 방법입니다. 검색을 해보면 privateOption 같은 것을 조..
출처 : http://www.mtalking.com/?p=403안드로이드 device 에서 3G나 WIFI 연결 정보를 알아볼때 사용 우선 AndroidManifest.xml에 " android.permission.ACCESS_NETWORK_STATE " permission이 필요하다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ConnectivityManager cManager; NetworkInfo mobile; NetworkInfo wifi; cManager=(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); mobile = cManager.getNetworkInfo(ConnectivityManager.TY..
출처 : http://blog.tacticalnuclearstrike.com/2010/01/using-multipartentity-in-android-applications/ Using MultipartEntity in Android applications Posted on 2010/01/13 by Fredrik To be able to upload files from an Android application and use the Multipart content type you need to add some additional jar files to your application. The files needed are apache-mime4j, httpclient, httpcore and httpmime..
출처 : http://www.softwarepassion.com/android-series-get-post-and-multipart-post-requests/ Today I will describe shortly how to execute http GET and POST request on Android platform. The code is very simple and straightforward, for post request with attachement, you would have to add apache-mime4j-0.6.jar and httpmime-4.0.1.jar to your build path. HTTP GET try { HttpClient client = new DefaultHttp..
출처 : http://blog.daum.net/haha25/5387297
안드로이드 공부하시는 분들은 자신이 만든 어플리케이션이 멋지게 작동하는걸 원하실 겁니다. 그중에하나가 에니메이션이죠. 그런데 에니메이션 하면 보통 ViewFlipper 를 많이들 생각하실겁니다. 하지만 ViewFlipper는 뷰를 컨트롤하는거지 Activity간의 에니메이션을 컨트롤하지는 않습니다. 그래서 있는것이 overridePendingTransition 입니다. 사용 예) overridePendingTransition(R.anim.push_right_in, R.anim.push_right_out); 인텐트로 넘어갈때 써주시면 됩니다. 다만 아셔야 할것이 있습니다. 이것은 안드로이드 버전과 관련이있더군요. 제가 1.5로 어플을 만드는데 처음에 이걸썻다가 오작동 혹은 오류가 뜨길래 잘못된 정보인줄 알..
http://www.anddev.org/tutorial_change_look_of_checkbox-t4553.html
File: res/layout/main.xml File: res/layout/item.xml File: res/drawable/item_selector.xml File: res/values/colors.xml #ff00 #f0f0 #f00f #ffff #f000 [출처] ListView 에서 아이템 클릭시 주황색 화면 변경하는 예제 (Jin 프로젝트) |작성자 심대
출처 : http://www.shop-wiz.com/document/android/google_map_example1 [설명] - GPS를 이용한 내위치값 받기 DDMS > Emulator Control > Location Controls > Manual(원하는 좌표값 입력후 "Send") manifest xml : 확인 이번에도 먼저 전체 소스를 보여 드리겠습니다. [설명] AndroidManifest.xml ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [설명] res/layout/main.xml ? 1 2 3 4 5 6 7 8 9 10 [설명] res/values/strings.xml ? 1 2 3 4 5 6 7 8 9 10 Hello World, Proj..
dev.paran.com/
출처 : http://cafe.naver.com/ccjmaster.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=1158& 오늘은 반복되는 배경 이미지를 만들어 보겠습니다. 간단히 말해, 이런 간단한 이미지를 가지고 패턴이 반복되는 배경을 만드는 것입니다. 생각보다 간단합니다. 보시다시피 Main Class에는 손 댈 일이 없습니다. 먼저, drawable 폴더에 xml을 하나 만들어주시구요, pattern에 사용할 이미지도 넣어주셔야겠죠? 자, 이제 background.xml을 열고 다음과 같이 작성합니다. bitmap 속성을 주셔야하는데, 이것을 대문자로 주시면 적용되지 않습니다. 마찬가지로 @drawable/pattern, 이렇게 반복시켜 줄 이미지를 선택하신 다음..
출처 : http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ Separating Lists with Headers in Android 0.9 Monday August 18, 2008 at 4:42 PM Earlier today the latest Android 0.9 SDK was released, and it’s packed full of wonderful changes. As you play around, you might see ListViews split into sections using separating headers. (Example shown on the right is the browser se..
Anyone that is in need of it .. attached here is the Motorola Atrix4G addon for the Android SDK .. also the instructions for installation and execution. http://www.mediafire.com/?73hkz09wr0l1kqe Installing and Using Motorola SDK Add-ons A Motorola SDK add-on, when added to the Android™ SDK, allows you to run and debug your applications on an emulated Motorola handset. Note that while the device ..
제작하는 한 어플리케이션에 버튼은 총 몇개나 등장할까요? 버튼의 이벤트를 등록하려면 또 똑같은 코딩을 몇번을 해야 할 지 모릅니다. 그래서 준비한 강쉪의 특별 소스. '모든 뷰를 등록하자'입니다. Android SDK는 java코딩만으로도 충분히 xml의 역할을 대신 할 수 있지만, 바로 눈으로 보이는 구조와 편리함, 연동성을 생각한다면 불가피하게 xml을 사용 할 수 밖에 없습니다. Android SDK가 1.0부터 발전을 거듭해와 현재 나온 2.2 버전까지 달라진 메소드는 없지만 사라지거나 새로 생긴것들이 많습니다. 이번 주제와도 비슷한 예를 들자면 xml의 버튼에 라고 사용하신다면 java에선 public void ClickHandler(View target){ Intent i = new Inten..
width height w/h % 대표기종 320 480 66.67% 아이폰3Gs, Android G1 640 960 66.67% 아이폰4 ==========================================================아이폰 480 800 60.00% 갤럭시S, 넥서스원, Desire 480 854 56.21% 모토로이 540 960 56.25% 아트릭스 ==========================================================안드로이드 3.0 1280 720 ... 이후 넥서스프리미엄 출시이후(예정) ==========================================================안드로이드 4.0