목록IT (1533)
오늘도 공부
Fixed header in a TableLayout As the previous post this will also cover TableLayout. As with borders, there are no attribute for defining a TableRow as a header row. With header row I mean a row that will not scroll with the rest of the data in the TableLayout (providing you have declared the table to be inside a ScrollView). Well, there is actually a way to work around this using a separate Tab..
출처 : http://www.ibm.com/developerworks/xml/library/x-andbene1/index.html Mobile devices and platforms boast more features and functionality with each new release, and often mere months separate significant announcements from the leading mobile vendors. The headlines are mostly about UI features (such as advanced multitouch capabilities and Adobe® Flash® technology) and hardware enhancements (suc..
출처 : http://adsgear.tistory.com/49 HTTP GET try { HttpClient client = new DefaultHttpClient(); String getURL = "http://www.google.com"; HttpGet get = new HttpGet(getURL); HttpResponse responseGet = client.execute(get); HttpEntity resEntityGet = responseGet.getEntity(); if (resEntityGet != null) { //do something with the response Log.w("RESPONSE",EntityUtils.toString(resEntityGet)); } } catch (Ex..
* mysql server의 character set 변경하기 mysql이 설치된 경로에 path\my.ini default-character-set=latin1 => default-character-set=utf8 등등 latin1이라고 되어 있는 부분을 utf8로 변경하시고 Reboot ^^ database alter database [databasename] charset=utf8 table alter table [tablename] charset=utf8 column ALTER TABLE [tablename] CHANGE [exists_columnname] [new_columnname] VARCHAR(10) CHARACTER SET utf8 대략 이런 형식이네.. 설정확인 mysql> show v..
출처 : http://tigerwoods.tistory.com/23 안드로이드 Study 목차가기 1. ViewFlipper의 용도 ViewFlipper는 Tab과 마찬가지로 화면에 표시 가능한 여러 view가 준비되어 있을 때 화면에 현재 표시된 view를 다른 view로 전환하기 위해 사용된다. Tab은 일반적으로 표현하려는 view간의 구분(TabWidget의 이름으로) 이 필요할 때 사용되며, ViewFlipper는 view간의 구분이 필요 없을 경우 많이 사용된다. ViewFlipper의 사용 예로는 안드로이드 폰의 초기화면과 같은 경우가 있다. 예를 들면, 많은 어플리케이션을 인스톨한 유저는 사용하는 모든 어플리케이션에 대한 icon을 하나의 view에 표시할 수 없고, 여러 개의 view를 ..
xmlns:android="http://schemas.android.com/apk/res/android"> android:id="@android:id/background"> android:radius="5dip" /> android:startColor="#ff9d9e9d" android:centerColor="#ff5a5d5a" android:centerY="0.75" android:endColor="#ff747674" android:angle="270" /> android:id="@android:id/secondar..
출처 : http://fanpro.springnote.com/pages/5306953 xml에 color설정하는 법http://developer.android.com/intl/fr/guide/topics/resources/available-resources.html res/values/colors.xml이라는 파일을 만들고 아래와 같이 지정하면 된다. #77000000 #00000000 이렇게 지정한 color는 android:textColor="@color/dim" 과 같은 식으로 사용이 가능하다. xml에 color state list 설정하는 법http://androidappdocs-staging.appspot.com/reference/android/content/res/ColorStateList...
테이블 결합 함수 데이터 베이스 2009/12/03 13:24 http://blog.naver.com/findaday/94643786 1. 내부 조인(INNER JOIN) 내부조인 (Inneer Join) 은 단순히 연결만 한 개념이 아니라 결과값이 일치하는 것만 join을 한 것이다. 기준이 되는 테이블과 일치하는 값만 join 하여 return 한다고 생각을 하면 된다. 2. 전체외부조인 (FULL JOIN) 오른쪽 외부조인과 왼쪽 외부조인을 합친 개념이다. 왼쪽/오른쪽 테이블의 값이 일치하든 일치 하지 않든 모두 가져오는 조인이다. 다만 Cross join 과 다른 점은 Full join 은 빈 값을 null 로 리턴한다는 것이고 Crosss join 은 양쪽 테이블을 그냥 단순히 연결시켜 준다는 ..
http://tigerwoods.tistory.com/12 안드로이드 Study 목차가기 이번에는 위젯들을 화면에 배치 하는데 필요한 container에 관한 내용입니다. 다음과 같이 3부분으로 나누어서 포스팅 하려고 합니다. Part 1. LinearLayout Part 2. RelativeLayout Part 3. TableLayout + ScrollView 그중 Part 3. TableLayout에 대한 정리 입니다. 3. TableLayout (Grid Model) TableLayout 컨테이너는 HTML과 같이 방식으로 쓰인다. 즉, 위젯을 테이블에 배치하고, 테이블의 행과 열의 간격을 조정하여 위젯의 크기를 결정하는 방식이다. Table 구성하기 TableLayout은 TableRow와 같이 ..
GridView의 background에 white color를 설정 하면 흰색의 테두리가 나타난다. 이것은 list selector에 padding이 지정되어 있어서 나타나는 문제인데 단순히 Padding 같은 layout조정으로는 해결이 되지 않는다. 해결을 하기위해서는 GridView의 속성 중에서 listSelector를 수정해야 한다. GridView는 AbsListVIew를 상속받게 되어 있는데 AbsListView에 기본으로 지정되어 있는 listSeletor에 padding이 들어가 있어서 GridView에 여백이 생기게 된다. GridView에 여백을 없에기 위해서는 GridView에 listSelector속성에 padding을 제거한 selector를 지정하면 됩니다. 위의 소스를 lis..
안드로이드 디바이스의 경우 크게 3가지의 해상도 범주를 가지고 있는데, LDPI(저해상도), MDPI(중해상도), HDPI(고해상도)입니다. Density값은 LDPI가 120, MDPI가 160, HDPI가 240입니다. (각각 인치당 픽셀수를 이야기합니다.) 아래 표 (Table.1)를 참고하시면 결국 현재 디자인 하신 그림 파일의 기준은 HDPI를 기준으로 되어있는 것이고, LDPI를 위해서는 당연히 120/240 = 1/2, MDPI를 위해서는 당연히 160/240 = 3/4로 길이당 픽셀수가 감소하는 셈입니다. 모든 해상도를 지원하시려면 하나의 그림 파일을 HDPI, MDPI, LDPI에 맞춰서 3개로 만들어서 개발자에게 넘기시면 됩니다. Table 1. Screen sizes and densi..
출처 : http://developer.android.com/guide/topics/resources/runtime-changes.html#HandlingTheChange Application Resources >Handling Runtime Changes In this document Retaining an Object During a Configuration Change Handling the Configuration Change Yourself See also Providing Resources Accessing Resources Faster Screen Orientation Change Some device configurations can change during runtime (such as ..
http://blog.daum.net/hopefullife/98
Android... 멈추지 않는 변화 [Intro] SDK 1.5 R1 버전이 발표된지 꽤 오래전 일입니다만, 무슨 바람이 들었는지 몰라도 재빨리 바뀐 부분을 캐치했어야 하는데 그러지 못했습니다. 이제서야 부랴부랴 Android Development Tool도 뭔가 바뀌어 버린것을 알았고, SDK들도 뭔가 바뀌어 버린 것을 알았습니다. 이전에 만들어 두었던 프로젝트들도 1.5버전에 맞추어서 실행 하려던 찰나... 아차! 이게 뭡니까... AbsoluteLayout is deprecated 아... 이렇게 허망하게 없애 버리다니... 없애는게 이해가 안가는것은 아닙니다. 디바이스마다 화면이 다르니 절대 좌표로 박으면 호환성 유지가 안되는건... 뭐 충분히 생각 할 수 있는 부분입니다. 그냥 이번에 1.5버..
출처 : http://stackoverflow.com/questions/3693234/custom-imageview-with-drop-shadow Custom ImageView with drop shadow up vote3down votefavorite 6 Okay, I've been reading and searching around, and am now banging my head against the wall trying to figure this out. Here's what I have so far: package com.pockdroid.sandbox; import android.content.Context; import android.graphics.Canvas; import android...
http://stackoverflow.com/questions/3748568/how-can-i-launch-androids-email-activity-with-an-attachment-attached-in-the-emai http://stackoverflow.com/questions/2264622/android-multiple-email-attachment-using-intent-question http://blog.blackmoonit.com/2010/02/filebrowser-send-receive-intents.html public static void email(Context context, String emailTo, String emailCC, String subject, String emai..
출처 : http://sdw8001.tistory.com/5 리소스에서 bitmap을 읽어오고 화면에 출력한 후 touch를 이용해서 drag하는 예제 package com.jjihun.bitmaptest; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Rect; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.View;..
C2DM과 Notification 사용시 막히는 부분이 있어서 이렇게 질문 드립니다. 01.public class C2dm_BroadcastReceiver extends BroadcastReceiver { // -------- 1번 02. 03.NotificationManager mNotiManager; 04.public static String registration_id = null; 05.static String c2dm_name = ""; 06.static String c2dm_msg = ""; 07. 08. 09.public void onReceive(Context context, Intent intent) { 10. 11.mNotiManager = (NotificationManager)getS..
출처 : http://www.ibm.com/developerworks/opensource/library/x-android/index.html Working with XML on Android Build Java applications for mobile devices Michael Galpin, Software architect, eBay Michael Galpin is an architect at eBay. He is a frequent contributor to developerWorks and has also written for TheServerSide.com and the Java Developer's Journal, as well as his own blog. He has been progra..
출처 : http://www.cyworld.com/prizm0911/3284619 아래 xml파일을 res/values 에 생성. 1.-------------------------------------------------------------------------------------------- color.xml #959ca4 #646d79 #959ca4 #646d79 #686e77 #40474f #00000000 2.-------------------------------------------------------------------------------------------- 아래 xml파일을 res 에 해당 drawable 에 생성. 여기서는 위 1 번에서 설정된 색을 가져와서 셋팅하게됩니다...
SimpleCursorAdapter와 spinner 연결시 getSelectedItem() android by 왕새우 2010/11/26 18:00 daeha.egloos.com/1139323 덧글수 : 0 출처 : http://daeha.egloos.com/1139323 ★ 현상 SimpleCursorAdapter와 spinner 연결해서 사용할 경우 Spinner.getSelectedItem()을 하면 Cursor가 넘어온다. 정확하게 말하면 SQLiteCursor... Cursor에 들어있는 값을 가져오고 싶은데 어떻게 해야하나요? ★ 해결 ((SQLiteCursor)spinner.getSelectedItem()).getString(1) 존나 촌스럽고 더티하다 -_-;; 하지만 일단되니 뭐... 좀..
안드로이드 차트Chart (Graph)관련(/www.androidpub.com) 안드로이드 2010/05/01 14:51 http://blog.naver.com/chullin/130085283285 상용 aiCharts http://www.artfulbits.com/Android/aiCharts.aspx 상용 차트입니다. 갤러리 - http://www.artfulbits.com/Android/gallery/galleryCharts.aspx 우크라이나 회사 같습니다. 미국에서도 영업합니다. 온라인 결재 299달러 시작 오픈소스 achartengine http://code.google.com/p/achartengine/ 현재도 계속 개발중입니다. 종류 line chart area chart scatter c..
@Override public void update(Observable observable, Object data) { // database changed runOnUiThread(new Runnable() { @Override public void run() { stopManagingCursor(cursor); dbAdapter.close(); dbAdapter.open(); cursor = getAccounts(); startManagingCursor(cursor); adapter.changeCursor(cursor); } }); }
Android Custom CursorAdapter 사용법 데이터베이스에 있는 내용을 쿼리해서 리스트에 바인딩 할 때 SimpleCursorAdapter 를 사용하시는 건 다들 아시죠? 하지만 요 어댑터의 맹점은 모든 필드를 하나의 아이템 위젯에 밖에 연결할 수 없다는 것입니다. cs = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_2, cursor, new String[] { "capital", "country" }, new int[] { android.R.id.text1, android.R.id.text2 }); 이 코드는 쿼리해 받아온 cursor 에서 capital, country 필드 두개를 리스트 아이템2 기본 템플릿에 바인..
출처 : http://www.yougli.net/android/a-photoshop-like-color-picker-for-your-android-application/ A Photoshop like color picker for your Android application Introduction Depending on your application, you might one day need a good color picker. With Shake Them All! I needed a color picker to select the color of the default skin and default background. I first had a look at the Android API to see if..
출처 : http://www.androidside.com/bbs/board.php?bo_table=B46&wr_id=1672 안드로이드에서는 트리거를 직접 작성해야 합니다. 트리거 궁금하신 분은 아래 내용 읽어보세요~ 참고 http://blog.daum.net/_blog/BlogView.do?blogid=0Idq4&articleno=8429305#ajax_history_home /* 테스트 테이블 생성 */ CREATE TABLE address (uid INTEGER PRIMARY KEY, name TEXT, gender INTEGER); CREATE TABLE metadata (uid INTEGER PRIMARY KEY, man_count INTEGER, woman_count INTEGER); /* a..
http://www.suppul.com/blog/main/category/%EA%B8%B0%EC%88%A0%EC%A0%81%EC%9D%B8%20%EA%B2%83/%EC%95%88%EB%93%9C%EB%A1%9C%EC%9D%B4%EB%93%9C?page=2
출처 : http://tigerwoods.tistory.com/17 파트 1에 이어 파트 2에서는 사용자와 interact가 가능한 ListView의 구현과 이를 재사용 가능 하도록 하는 방법에 대해 다룹니다. 재사용 가능한 커스텀 ListView에 관한 부분은 지금까지 다룬 모든 ListView관련 노하우 + @ 가 사용 됨으로 전 포스팅의 내용을 모두 숙지 하고 계셔야 이해가 쉬울 것 같습니다. 4. Interactive ListView 만들기 지금까지는 Static한 ListView만 살펴봤지만, 사용자와 교감(interact)이 가능한 ListView를 만들 수도 있다. 예를 들면, mp3플레이어 플레이 리스트에 별표의 개수를 저장할 수 있도록 하여 특정 곡에 대한 선호도를 지정할 수 있을 것이다..
출처 : http://tigerwoods.tistory.com/14 이번에는 마지막에 살펴봤던 ListView를 더 쓸모 있게 만드는 방법을 소개합니다. 내용이 좀 길어져서 2파트로 나누었습니다. 파트 1은 ListView 위젯을 더 복잡하게 꾸미고 성능을 향상 시키는 방법을 소개하고, 파트 2는 사용자와 Interact가 가능한 ListView를 먼저 살펴보고 이를 재활용 하는 방법에 대해 다룹니다. 1. XML을 이용해 꾸미기 스마트폰의 제한적인 스크린 사이즈 때문에 List위젯들(ListView, spinner등)의 중요성은 아주 크다. list 위젯의 생김새를 결정하는 것은 전적으로 어떤 구성의 Adapter를 해당 list위젯에 연결하느냐에 달려있다. 다음 예는 전 장에서 사용한 썰렁한 text..
Preparing to Publish: A Checklist출시 준비를 위한 체크 리스트 (읽어보니 이부분은 앞부분의 서명을 하는 방법에 대한글을 읽기전에 봐야 하는 글이다. 말그대로 서명하기전에 이건 확인해야 한다! 하는 체크리스트 쯤..실제 출시를 위해 어떤 순서를 밟아야 하는지 잘 나와 있다.) 어플리케이션을 출시한다는 것은 그것을 시험하고, 적합하게 패키징하고 안드로이드 구동 모바일 디바이스 사용자들에게 이용가능하게 만드는 것을 의미한다. 만약 당신이 안드로이드 구동 디바이스에 설치를 위한 당신의 어플리케이션을 출시할 계획이라면, 해야하는 일이 몇가지 있다. 이 글은 성공적인 배포를 위한 어플리케이션 준비로 중요한 확인점들을 강조한다. 당신이 어플리케이션 배포를 위한 준비를 하기 전에: 실제 디바..
