목록전체 글 (1528)
오늘도 공부
/* * 파일명 : Calendar.js * 원본출처 : 인터넷(원작자 알수 없음. 있다면 메일 주시기 바랍니다.) * 수정자 : 손대관(pinerest@naver.com) * 프로그램 설명 : createPopup을 이용한 달력 출력 자바스크립트. * 2008. 2. 7 : CSS의 분리, 코드 최적화, 버그 수정 및 프로젝트에 적합하게 하기 위해 수정작업이 있었습니다. * 2008. 2 .16 : IE6에서 주석으로 야기되는 오류로 인해 모든 주석 삭제. 주석버전은 메일주시면 드리겠습니다. * 2008. 2. 18 : 변수 명 규격화 * 2008. 2. 20 : 날짜 형식 8자리에서 10자리로 변경 * 2008. 2. 25 : IE6에서 오류로 인해 GetObjectTop, GetObjectLeft함..
출처 : http://crowjdh.blogspot.kr/2013/11/v3.htmlCh1. 준비0. Android SDK Manager -> Extras -> Google Play Billing Library 다운받고 설치한다.1. Google Play Developer Console 여기로 가서 내 앱 추가 - Prepare Store Listing 상태로 추가.2. /extras/google/play_billing/IInAppBillingService.aidl 파일을 프로젝트의 com.android.vending.billing 에 복사한다.3. /extras/google/play_billing/samples/TrivialDrive/src/com/example/android/trivialdrivesa..
츌처 : http://stackoverflow.com/questions/13991301/android-maps-api-v2-draw-circle// 1. some variables: private static final double EARTH_RADIUS = 6378100.0; private int offset; // 2. convert meters to pixels between 2 points in current zoom: private int convertMetersToPixels(double lat, double lng, double radiusInMeters) { double lat1 = radiusInMeters / EARTH_RADIUS; double lng1 = radiusInMeters ..
먼저 리스트뷰에서는 다음처럼 설정한다.예) listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); 그러면 이제 체크 상태를 ListView가 관리하게 된다. 그런데, custom view를 쓰면 ListView가 그 안에 있는 뷰 중 Checkable이 있으면 checked 상태를 바꾼다. 이 점을 이용하면 checkbox와 연동하게 할 수 있다. getView에서는 checkbox를 다음과 같이 설정한다. 안드로이드의 ListView에서는 focusable 뷰가 포함되어 있으면 onItemClick을 비롯한 여러 가지 ListView의 기본 동작이 안 먹는다. 그래서 CheckBox에서 focusable을 빼는 것. 그러면 리스트의 항목을 클릭할 때 check..
//Uri에서 이미지 이름을 얻어온다. final Uri selectImageUri = intent.getData(); final String[] filePathColumn = {MediaStore.Images.Media.DATA}; final Cursor imageCursor = this.getContentResolver().query(selectImageUri, filePathColumn, null, null, null); imageCursor.moveToFirst(); final int columnIndex = imageCursor.getColumnIndex(filePathColumn[0]); final String imagePath = imageCursor.getString(columnIndex)..
출처 : http://snowbora.tistory.com/421그동안 안드로이드에서의 Bitmap 이미지 관련해서 많은 글을 남겼는데, 거의 최종 버전에 가까운 글입니다. 관련글은 [안드로이드] URL을 이용해서 이미지 다운로드 하기 [안드로이드] URL을 이용해서 이미지 다운로드 하기 (멀티 쓰레드 이용) [안드로이드] 이미지 로딩할 때 메모리 초과할 경우(bitmap size exceeds VM budget) [안드로이드] Bitmap 이미지를 파일로 저장하기 [안드로이드] 특정 폴더에서 오래된 파일 삭제하기 이며, 관련글도 차례로 보는게 더 도움이 되실겁니다. 기본적인 뼈대는 구글 블로그에 공개되어 있는 멀티 쓰레드를 이용한 이미지 다운로드 소스입니다. 여기에 URL을 이용한 파일 캐싱 기능과 이..
안드로이드 3.0이후부터는 onCreate함수 안에 아래 라인을 추가해야 하네요+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectDiskWrites() .detectNetwork() .penaltyLog().build()); +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 참고 사이트 http://android-developers.blogspot.kr/2010/12/new-gingerbread-..
@Override public boolean shouldOverrideUrlLoading(WebView view, String url) { final String items[] = {"갤러리에서 가져오기","카메라로 촬영하기"}; if (url.startsWith("custom://")) { new AlertDialog.Builder(MyPageWeb.this) .setIcon(R.drawable.icon) .setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { Toast.makeText(getApplicationContext(),..
출처 : http://lky1001.tistory.com/47액션바의 서치뷰에서 검색어를 입력 후 소프트 키보드의 돋보기를 누르고 검색후에도 다시 돋보기 모양으로 바뀌지 않고 그 내용이 그대로 남아 있다.플레이스토어에서는 검색을 하면 다시 돋보기 모양으로 바뀐다... 이 상태로 돌아가고 싶은데 이 상태로 남아있는다. 구글링한 결과 .. MenuItem 클래스의 collapseActionView() 메소드를 이용하면 된다.액션바는 액션바셜록 사용 멤버변수 MenuItem mSearchItem 선언 @Overridepublic boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {// TODO Auto-generated method stub ..
출처 : http://nlopez.io/how-to-style-the-actionbar-searchview-programmatically/I stumbled upon a problem with the styling of a view at work. I had almost everything solved with a custom theme, but it all came down to style a SearchView widget of an ActionBar.That's where the fun begins.All of this must happen in your onCreateOptionsMenu method. With a reference to your SearchView object in there, ..
